From 86351aafe218a7386f6578be3c4da3edcdcb0c98 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 12 Jun 2020 07:57:27 -0700 Subject: 6513 --- html/064write-byte.subx.html | 173 +++++++++++++++++++++---------------------- 1 file changed, 86 insertions(+), 87 deletions(-) (limited to 'html/064write-byte.subx.html') diff --git a/html/064write-byte.subx.html b/html/064write-byte.subx.html index 4aebe3e0..f8c6d6f4 100644 --- a/html/064write-byte.subx.html +++ b/html/064write-byte.subx.html @@ -155,7 +155,7 @@ if ('onhashchange' in window) { 93 51/push-ecx 94 ff 6/subop/push 0/mod/indirect 0/rm32/eax . . . . . . # push *eax 95 # . . call - 96 e8/call write-stream/disp32 + 96 e8/call write-stream/disp32 97 # . . discard args 98 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 99 $flush:end: @@ -304,55 +304,55 @@ if ('onhashchange' in window) { 242 68/push "append-byte: out of space\n"/imm32 243 68/push 2/imm32/stderr 244 # . . call -245 e8/call _write/disp32 +245 e8/call _write/disp32 246 # . . discard args 247 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 248 # . syscall(exit, 1) 249 bb/copy-to-ebx 1/imm32 -250 b8/copy-to-eax 1/imm32/exit -251 cd/syscall 0x80/imm8 -252 # never gets here -253 -254 test-append-byte-single: -255 # - check that append-byte writes to first byte of 'file' -256 # setup -257 # . clear-stream(_test-stream) -258 # . . push args -259 68/push _test-stream/imm32 -260 # . . call -261 e8/call clear-stream/disp32 -262 # . . discard args -263 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -264 # append-byte(_test-stream, 'A') -265 # . . push args -266 68/push 0x41/imm32 -267 68/push _test-stream/imm32 -268 # . . call -269 e8/call append-byte/disp32 -270 # . . discard args -271 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -272 # check-stream-equal(_test-stream, "A", msg) -273 # . . push args -274 68/push "F - test-append-byte-single"/imm32 -275 68/push "A"/imm32 -276 68/push _test-stream/imm32 -277 # . . call -278 e8/call check-stream-equal/disp32 -279 # . . discard args -280 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -281 # . end -282 c3/return -283 -284 == data -285 -286 _test-output-stream: # (stream byte) -287 # current write index -288 0/imm32 -289 # current read index -290 0/imm32 -291 # size -292 0x400/imm32 # 1024 bytes -293 # data (64 lines x 16 bytes/line) +250 e8/call syscall_exit/disp32 +251 # never gets here +252 +253 test-append-byte-single: +254 # - check that append-byte writes to first byte of 'file' +255 # setup +256 # . clear-stream(_test-stream) +257 # . . push args +258 68/push _test-stream/imm32 +259 # . . call +260 e8/call clear-stream/disp32 +261 # . . discard args +262 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp +263 # append-byte(_test-stream, 'A') +264 # . . push args +265 68/push 0x41/imm32 +266 68/push _test-stream/imm32 +267 # . . call +268 e8/call append-byte/disp32 +269 # . . discard args +270 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp +271 # check-stream-equal(_test-stream, "A", msg) +272 # . . push args +273 68/push "F - test-append-byte-single"/imm32 +274 68/push "A"/imm32 +275 68/push _test-stream/imm32 +276 # . . call +277 e8/call check-stream-equal/disp32 +278 # . . discard args +279 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp +280 # . end +281 c3/return +282 +283 == data +284 +285 _test-output-stream: # (stream byte) +286 # current write index +287 0/imm32 +288 # current read index +289 0/imm32 +290 # size +291 0x400/imm32 # 1024 bytes +292 # data (64 lines x 16 bytes/line) +293 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 294 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 295 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 296 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -416,30 +416,30 @@ if ('onhashchange' in window) { 354 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 355 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 356 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -357 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -358 -359 # a test buffered file for _test-output-stream -360 _test-output-buffered-file: # buffered-file -361 # file descriptor or (addr stream byte) -362 _test-output-stream/imm32 -363 $_test-output-buffered-file->buffer: -364 # current write index -365 0/imm32 -366 # current read index -367 0/imm32 -368 # size -369 6/imm32 -370 # data -371 00 00 00 00 00 00 # 6 bytes -372 -373 _test-error-stream: # (stream byte) -374 # current write index -375 0/imm32 -376 # current read index -377 0/imm32 -378 # line -379 0x80/imm32 # 128 bytes -380 # data (8 lines x 16 bytes/line) +357 +358 # a test buffered file for _test-output-stream +359 _test-output-buffered-file: # buffered-file +360 # file descriptor or (addr stream byte) +361 _test-output-stream/imm32 +362 $_test-output-buffered-file->buffer: +363 # current write index +364 0/imm32 +365 # current read index +366 0/imm32 +367 # size +368 6/imm32 +369 # data +370 00 00 00 00 00 00 # 6 bytes +371 +372 _test-error-stream: # (stream byte) +373 # current write index +374 0/imm32 +375 # current read index +376 0/imm32 +377 # line +378 0x80/imm32 # 128 bytes +379 # data (8 lines x 16 bytes/line) +380 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 381 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 382 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 383 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -447,23 +447,22 @@ if ('onhashchange' in window) { 385 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 386 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 387 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -388 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -389 -390 # a test buffered file for _test-error-stream -391 _test-error-buffered-file: # buffered-file -392 # file descriptor or (addr stream byte) -393 _test-error-stream/imm32 -394 $_test-error-buffered-file->buffer: -395 # current write index -396 0/imm32 -397 # current read index -398 0/imm32 -399 # size -400 6/imm32 -401 # data -402 00 00 00 00 00 00 # 6 bytes -403 -404 # . . vim:nowrap:textwidth=0 +388 +389 # a test buffered file for _test-error-stream +390 _test-error-buffered-file: # buffered-file +391 # file descriptor or (addr stream byte) +392 _test-error-stream/imm32 +393 $_test-error-buffered-file->buffer: +394 # current write index +395 0/imm32 +396 # current read index +397 0/imm32 +398 # size +399 6/imm32 +400 # data +401 00 00 00 00 00 00 # 6 bytes +402 +403 # . . vim:nowrap:textwidth=0 -- cgit 1.4.1-2-gfad0