adds some more io commnads; starts work on a PCI driver
This commit is contained in:
@ -9,8 +9,25 @@ outb:
|
||||
out dx, al ; send the data to the I/O port
|
||||
ret ; return to the calling function
|
||||
|
||||
|
||||
global outb_16
|
||||
outb_16:
|
||||
mov ax, [esp + 8]
|
||||
mov dx, [esp + 4]
|
||||
out dx, ax
|
||||
ret
|
||||
|
||||
|
||||
|
||||
global outb_32
|
||||
outb_32:
|
||||
mov eax, [esp + 8]
|
||||
mov dx, [esp + 4]
|
||||
out dx, eax
|
||||
ret
|
||||
|
||||
global inb
|
||||
; inb - returns a byte from the given I/O port
|
||||
; inb - returns a byte from the given I/O porot
|
||||
; stack: [esp + 4] The address of the I/O port
|
||||
; [esp ] The return address
|
||||
inb:
|
||||
@ -18,9 +35,24 @@ inb:
|
||||
in al, dx ; read a byte from the I/O port and store it in the al register
|
||||
ret ; return the read byte
|
||||
|
||||
global inb_16
|
||||
inb_16:
|
||||
mov dx, [esp + 4]
|
||||
in ax, dx
|
||||
ret
|
||||
|
||||
global inb_32
|
||||
inb_32:
|
||||
mov dx, [esp + 4]
|
||||
in eax, dx
|
||||
ret
|
||||
|
||||
|
||||
global io_wait
|
||||
io_wait:
|
||||
mov al, 0x0
|
||||
out 0x80, al
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user