diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-05-02 23:32:51 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-05-02 23:32:51 -0700 |
commit | f2cd405d04cd904bf1ed4d5ddf4916234c0509f5 (patch) | |
tree | aacf72ab67c49c3ac2a2d6425924ef0999ebfe8d /subx/apps/hex.subx | |
parent | 6e131cefe2cdf9d83bd0727fa3ca97a2ec3b2d3f (diff) | |
download | mu-f2cd405d04cd904bf1ed4d5ddf4916234c0509f5.tar.gz |
standardize function names
Operations on buffered-file now always include the word 'buffered'. More verbose, but hopefully this highlights holes in the library.
Diffstat (limited to 'subx/apps/hex.subx')
-rw-r--r-- | subx/apps/hex.subx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/subx/apps/hex.subx b/subx/apps/hex.subx index c0627c77..3730351f 100644 --- a/subx/apps/hex.subx +++ b/subx/apps/hex.subx @@ -75,7 +75,7 @@ convert: # in : (address buffered-file), out : (address buffered-file), err : ( # while true # EAX = convert-next-octet(in, err, ed) # if (EAX == Eof) break - # write-byte(out, AL) + # write-byte-buffered(out, AL) # flush(out) # # . prolog @@ -96,12 +96,12 @@ $convert:loop: # if (EAX == Eof) break 3d/compare-EAX-and 0xffffffff/imm32/Eof 74/jump-if-equal $convert:loop-end/disp8 - # write-byte(out, AL) + # write-byte-buffered(out, AL) # . . push args 50/push-EAX ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0xc/disp8 . # push *(EBP+12) # . . call - e8/call write-byte/disp32 + e8/call write-byte-buffered/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP # loop @@ -489,7 +489,7 @@ $test-convert-next-octet-aborts-on-single-hex-byte:end: scan-next-byte: # in : (address buffered-file), err : (address buffered-file), ed : (address exit-descriptor) -> byte-or-Eof/EAX # pseudocode: # while true - # EAX = read-byte(in) + # EAX = read-byte-buffered(in) # if (EAX == Eof) return EAX # if (is-hex-digit?(EAX)) return EAX # if (EAX == ' ' or '\t' or '\n') continue @@ -501,11 +501,11 @@ scan-next-byte: # in : (address buffered-file), err : (address buffered-file), 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . . # copy ESP to EBP # . save registers $scan-next-byte:loop: - # EAX = read-byte(in) + # EAX = read-byte-buffered(in) # . . push args ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 . # push *(EBP+8) # . . call - e8/call read-byte/disp32 + e8/call read-byte-buffered/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP # if (EAX == Eof) return EAX @@ -1389,7 +1389,7 @@ skip-until-newline: # in : (address buffered-file) -> <void> # pseudocode: # push EAX # while true - # EAX = read-byte(in) + # EAX = read-byte-buffered(in) # if (EAX == Eof) break # if (EAX == 0x0a) break # pop EAX @@ -1399,11 +1399,11 @@ skip-until-newline: # in : (address buffered-file) -> <void> # . save registers 50/push-EAX $skip-until-newline:loop: - # . EAX = read-byte(in) + # . EAX = read-byte-buffered(in) # . . push args ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 . # push *(EBP+8) # . . call - e8/call read-byte/disp32 + e8/call read-byte-buffered/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP # . if (EAX == Eof) break |