diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-07-07 01:05:52 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-07-07 07:13:16 -0700 |
commit | ef73cb78f15839cf0254ead273e0d1eca1d4826c (patch) | |
tree | b31aa6df6f31fc259af8810dcddfb09c275d5cb8 /boot.subx | |
parent | 2d3fe4e940deb0078bef80f0f56ea38852c991e7 (diff) | |
download | mu-ef73cb78f15839cf0254ead273e0d1eca1d4826c.tar.gz |
initial image rendering
Supports just some ASCII formats: https://en.wikipedia.org/wiki/Netpbm Colors are messed up. That's next.
Diffstat (limited to 'boot.subx')
-rw-r--r-- | boot.subx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/boot.subx b/boot.subx index afabc193..2c468458 100644 --- a/boot.subx +++ b/boot.subx @@ -972,6 +972,7 @@ Primary-bus-secondary-drive: == code +# No more than 0x100 sectors load-sectors: # disk: (addr disk), lba: int, n: int, out: (addr stream byte) # . prologue 55/push-ebp @@ -980,6 +981,12 @@ load-sectors: # disk: (addr disk), lba: int, n: int, out: (addr stream byte) 50/push-eax 51/push-ecx 52/push-edx + # check precondition + 81 7/subop/compare *(ebp+0x10) 0x100/imm32 + { + 7e/jump-if-<= break/disp8 + (abort "load-sectors: no more than 0x100 sectors") + } # check for drive (drive-exists? *(ebp+8)) # => eax 3d/compare-eax-and 0/imm32/false |