about summary refs log tree commit diff stats
path: root/boot.subx
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-03-21 22:33:33 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-03-21 22:33:33 -0700
commit2718cb453cdb222a4d03593c975f183bd0ecf990 (patch)
tree277a6eae3714065d4e774d0c258ae5bdbe75b0ee /boot.subx
parent0c3f126377c2f14fe3b063dca686d6e1608f80d4 (diff)
downloadmu-2718cb453cdb222a4d03593c975f183bd0ecf990.tar.gz
.
Diffstat (limited to 'boot.subx')
-rw-r--r--boot.subx6
1 files changed, 3 insertions, 3 deletions
diff --git a/boot.subx b/boot.subx
index 2bd4e0b8..0573d19e 100644
--- a/boot.subx
+++ b/boot.subx
@@ -942,7 +942,7 @@ read-a-sector:
   }
   # kick off read
   (ata-drive-select 0xf0)  # primary bus, secondary drive; 4 LSBs contain 4 upper bits of LBA (here 0)
-  (ata-error 0)
+  (clear-ata-error)
   (ata-sector-count 1)
   (ata-lba 0 0 0)  # lower 24 bits of LBA
   (ata-command 0x20)  # read sectors with retries
@@ -990,7 +990,7 @@ $ata-drive-select:end:
   5d/pop-to-ebp
   c3/return
 
-ata-error:  # n: byte
+clear-ata-error:
   # . prologue
   55/push-ebp
   89/<- %ebp 4/r32/esp
@@ -998,7 +998,7 @@ ata-error:  # n: byte
   50/push-eax
   52/push-edx
   #
-  8b/-> *(ebp+8) 0/r32/eax
+  b8/copy-to-eax 0/imm32
   ba/copy-to-edx 0x1f1/imm32
   ee/write-al-into-port-dx
 $ata-error:end: