Browse Source

Fix formatting

compile-me
garritfra 5 years ago
parent
commit
53699dcd6d
  1. 1
      .gitignore
  2. 20
      io.s

1
.gitignore vendored

@ -4,3 +4,4 @@ dittoOS.img
**/*.elf
**/*.iso
bochslog.txt
.vscode/

20
io.s

@ -1,11 +1,11 @@
global outb ; make the label outb visible outside this file
global outb ; make the label outb visible outside this file
; outb - send a byte to an I/O port
; stack: [esp + 8] the data byte
; [esp + 4] the I/O port
; [esp ] return address
outb:
mov al, [esp + 8] ; move the data to be sent into the al register
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 to the calling function
; outb - send a byte to an I/O port
; stack: [esp + 8] the data byte
; [esp + 4] the I/O port
; [esp ] return address
outb:
mov al, [esp + 8] ; move the data to be sent into the al register
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 to the calling function
Loading…
Cancel
Save