From a94b60b5cc217f08e4fd6c949e6af590c55a176b Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 4 Dec 2018 12:16:17 -0800 Subject: 4840 New helper: printing a string to a buffered file. --- html/subx/059read-byte.subx.html | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 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 fd8af4bf..07822a01 100644 --- a/html/subx/059read-byte.subx.html +++ b/html/subx/059read-byte.subx.html @@ -147,7 +147,7 @@ if ('onhashchange' in window) { 81 # read byte 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 + 84 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/AL 0x10/disp8 . # copy byte at *(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: @@ -300,19 +300,20 @@ if ('onhashchange' in window) { 234 235 == data 236 -237 _test-buffered-file: -238 # file descriptor or (address stream) -239 _test-stream/imm32 -240 # current write index -241 00 00 00 00 -242 # current read index -243 00 00 00 00 -244 # length (8) -245 08 00 00 00 -246 # data -247 00 00 00 00 00 00 00 00 # 8 bytes -248 -249 # . . vim:nowrap:textwidth=0 +237 # a test buffered file for _test-stream +238 _test-buffered-file: +239 # file descriptor or (address stream) +240 _test-stream/imm32 +241 # current write index +242 00 00 00 00 +243 # current read index +244 00 00 00 00 +245 # length (6) +246 06 00 00 00 +247 # data +248 00 00 00 00 00 00 # 6 bytes +249 +250 # . . vim:nowrap:textwidth=0 -- cgit 1.4.1-2-gfad0