Added support for setting up a serial port. This first serial driver appears to only work correctly in QEMU.

This commit is contained in:
2020-05-24 03:24:25 -05:00
parent cf88cb98fb
commit b409b3e9d2
11 changed files with 113 additions and 27 deletions
+10
View File
@@ -9,3 +9,13 @@ outb:
mov dx, [esp + 4] ; Move the address of the I/O port into the DX register
out dx, al ; Send the data to the I/O port
ret ; Return
global inb
; inb - Returns a byte from the give I/O port.
; stack: [esp + 4] The address of the I/O port
; [esp ] The return address
inb:
mov dx, [esp + 4] ; Move the address of the I/O port to the dx register.
in al, dx ; Read a byte from the I/O port and store it in the al register
ret