diff options
author | Kartik Agaram <vc@akkartik.com> | 2021-01-16 16:24:38 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2021-01-16 16:27:58 -0800 |
commit | 117a710a9d04c7176ce192cdb26134d2828478f9 (patch) | |
tree | 27049218b292f865ad55c907bacc1824e5022cfb /baremetal/313index-bounds-check.subx | |
parent | 6efc1ebed7131a8cd88aafdce8eaa8ee0260d692 (diff) | |
download | mu-117a710a9d04c7176ce192cdb26134d2828478f9.tar.gz |
7530 - baremetal: print ints to screen
Diffstat (limited to 'baremetal/313index-bounds-check.subx')
-rw-r--r-- | baremetal/313index-bounds-check.subx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/baremetal/313index-bounds-check.subx b/baremetal/313index-bounds-check.subx index 8a7700c6..6970e23a 100644 --- a/baremetal/313index-bounds-check.subx +++ b/baremetal/313index-bounds-check.subx @@ -26,7 +26,13 @@ __check-mu-array-bounds: # index: int, elem-size: int, arr-size: int, function- 39/compare %eax 1/r32/ecx 0f 82/jump-if-unsigned< $__check-mu-array-bounds:end/disp32 # negative index should always abort # abort if necessary - (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "offset too large for array" 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "fn " 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 *(ebp+0x14) 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 ": offset " 3) # 3=cyan + (draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 %eax 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 " is too large for array '" 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 *(ebp+0x18) 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "'" 3) # 3=cyan { eb/jump loop/disp8 } @@ -42,7 +48,12 @@ $__check-mu-array-bounds:end: c3/return __check-mu-array-bounds:overflow: + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "fn " 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 *(ebp+0x14) 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 ": offset to array '" 3) # 3=cyan (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "offset to array overflowed 32 bits" 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 *(ebp+0x18) 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "' overflowed 32 bits" 3) # 3=cyan { eb/jump loop/disp8 } |