diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-01-15 16:36:24 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-01-15 16:36:24 -0800 |
commit | bf58189697ff3f28861ea1f453048a38e0179199 (patch) | |
tree | 70600bf04077e16d070301d1f063920578d383f7 /subx/064print-byte.subx | |
parent | 7011322ad1640067d354e5a8f68a07963f7b898e (diff) | |
download | mu-bf58189697ff3f28861ea1f453048a38e0179199.tar.gz |
4930
Diffstat (limited to 'subx/064print-byte.subx')
-rw-r--r-- | subx/064print-byte.subx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/subx/064print-byte.subx b/subx/064print-byte.subx index dacc78d9..3d362fa0 100644 --- a/subx/064print-byte.subx +++ b/subx/064print-byte.subx @@ -21,6 +21,7 @@ print-byte: # f : (address buffered-file), n : int -> <void> # AL = convert upper nibble to hex 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 0/r32/EAX 0xc/disp8 . # copy *(EBP+12) to EAX c1/shift 5/subop/logic-right 3/mod/direct 0/rm32/EAX . . . . . 4/imm8 # shift EAX right by 4 bits, while padding zeroes + 25/and-EAX 0xf/imm32 # . AL = to-hex-char(AL) e8/call to-hex-char/disp32 # write-byte(f, AL) @@ -46,7 +47,6 @@ print-byte: # f : (address buffered-file), n : int -> <void> 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP $print-byte:end: # . restore registers - 59/pop-to-ECX 58/pop-to-EAX # . epilog 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . . # copy EBP to ESP |