From 39d718afcff131abf9c12f89357e7e387d7892d5 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 2 Dec 2018 12:49:15 -0800 Subject: 4816 --- html/subx/059read-byte.subx.html | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'html/subx/059read-byte.subx.html') diff --git a/html/subx/059read-byte.subx.html b/html/subx/059read-byte.subx.html index eb760dd4..c81434ac 100644 --- a/html/subx/059read-byte.subx.html +++ b/html/subx/059read-byte.subx.html @@ -23,6 +23,9 @@ body { font-size:12pt; font-family: monospace; color: #aaaaaa; background-color: .LineNr { color:#444444; } .subxS1Comment { color:#2d8cff; } .SpecialChar { color: #ff0000; } +.subxFunction { color: #ff8700; } +.subxTest { color: #00af00; } +.subxMinorFunction { color: #875f5f; } .Constant { color:#00a0a0; } .CommentedCode { color: #6c6c6c; } .subxH1Comment { color:#00ffff; } @@ -104,7 +107,7 @@ if ('onhashchange' in window) { 41 42 # return next byte value in EAX, with top 3 bytes cleared. 43 # On EOF, return 0xffffffff. - 44 read-byte: # f : (address buffered-file) -> byte/EAX + 44 read-byte: # f : (address buffered-file) -> byte/EAX 45 # . prolog 46 55/push-EBP 47 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . . # copy ESP to EBP @@ -140,14 +143,14 @@ if ('onhashchange' in window) { 77 75/jump-if-not-equal $read-byte:from-stream/disp8 78 b8/copy-to-EAX 0xffffffff/imm32 79 eb/jump $read-byte:end/disp8 - 80 $read-byte:from-stream: + 80 $read-byte:from-stream: 81 # reading from stream 82 # AL = f->data[f->read] 83 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . . # clear EAX 84 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/AL 0x10/disp8 . # copy *(ESI+ECX+16) to AL 85 # ++f->read 86 ff 0/subop/increment 1/mod/*+disp8 6/rm32/ESI . . . . 8/disp8 . # increment *(ESI+8) - 87 $read-byte:end: + 87 $read-byte:end: 88 # . restore registers 89 5e/pop-to-ESI 90 59/pop-to-ECX @@ -161,7 +164,7 @@ if ('onhashchange' in window) { 98 99 # - tests 100 -101 test-read-byte-single: +101 test-read-byte-single: 102 # - check that read-byte returns first byte of 'file' 103 # setup 104 # . clear-stream(_test-stream) @@ -207,7 +210,7 @@ if ('onhashchange' in window) { 144 # . end 145 c3/return 146 -147 test-read-byte-multiple: +147 test-read-byte-multiple: 148 # - call read-byte twice, check that second call returns second byte 149 # setup 150 # . clear-stream(_test-stream) @@ -260,7 +263,7 @@ if ('onhashchange' in window) { 197 # . end 198 c3/return 199 -200 test-read-byte-end-of-file: +200 test-read-byte-end-of-file: 201 # - call read-byte on an empty 'file', check that it returns -1 202 # setup 203 # . clear-stream(_test-stream) @@ -300,7 +303,7 @@ if ('onhashchange' in window) { 237 238 == data 239 -240 _test-buffered-file: +240 _test-buffered-file: 241 # file descriptor or (address stream) 242 _test-stream/imm32 243 # current write index -- cgit 1.4.1-2-gfad0