StupidOS/kernel/dev/dev.inc

28 lines
299 B
PHP
Raw Normal View History

2024-07-14 13:11:28 +00:00
;; File: dev.inc
struc Device {
2024-07-16 07:52:08 +00:00
.probe dd ?
2024-07-14 13:11:28 +00:00
.write dd ?
.read dd ?
}
2024-07-16 07:52:08 +00:00
DEFN Device
aDevices:
dd console_device
dd floppy_device
.end:
2024-07-14 13:11:28 +00:00
2024-07-16 06:29:16 +00:00
dev_init:
2024-07-16 07:52:08 +00:00
mov ecx, aDevices
@@:
mov eax, [ecx]
mov eax, [eax + Device.probe]
push ecx
call eax
pop ecx
add ecx, 4
cmp ecx, aDevices.end
jb @b
2024-07-16 06:29:16 +00:00
ret