From ec73ed1230d75deb0f913a32617c9f1e0a5ca640 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 10 Jul 2020 23:44:10 -0700 Subject: 6631 --- html/apps/assort.subx.html | 166 ++++++++++++++++++++++----------------------- 1 file changed, 83 insertions(+), 83 deletions(-) (limited to 'html/apps/assort.subx.html') diff --git a/html/apps/assort.subx.html b/html/apps/assort.subx.html index cd170945..16aeb653 100644 --- a/html/apps/assort.subx.html +++ b/html/apps/assort.subx.html @@ -92,10 +92,10 @@ if ('onhashchange' in window) { 30 # initialize heap 31 # . Heap = new-segment(Heap-size) 32 # . . push args - 33 68/push Heap/imm32 - 34 ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 . . . Heap-size/disp32 # push *Heap-size + 33 68/push Heap/imm32 + 34 ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 . . . Heap-size/disp32 # push *Heap-size 35 # . . call - 36 e8/call new-segment/disp32 + 36 e8/call new-segment/disp32 37 # . . discard args 38 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 39 @@ -109,7 +109,7 @@ if ('onhashchange' in window) { 47 68/push "test"/imm32 48 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8) 49 # . . call - 50 e8/call kernel-string-equal?/disp32 + 50 e8/call kernel-string-equal?/disp32 51 # . . discard args 52 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 53 # . if (eax == false) goto interactive @@ -118,7 +118,7 @@ if ('onhashchange' in window) { 56 # run-tests() 57 e8/call run-tests/disp32 58 # syscall(exit, *Num-test-failures) - 59 8b/copy 0/mod/indirect 5/rm32/.disp32 . . 3/r32/ebx Num-test-failures/disp32 # copy *Num-test-failures to ebx + 59 8b/copy 0/mod/indirect 5/rm32/.disp32 . . 3/r32/ebx Num-test-failures/disp32 # copy *Num-test-failures to ebx 60 eb/jump $subx-assort-main:end/disp8 61 $subx-assort-main:interactive: 62 # - otherwise convert stdin @@ -131,9 +131,9 @@ if ('onhashchange' in window) { 69 # subx-assort(Stdin, Stdout, Stderr, ed) 70 # . . push args 71 50/push-eax/ed - 72 68/push Stderr/imm32 - 73 68/push Stdout/imm32 - 74 68/push Stdin/imm32 + 72 68/push Stderr/imm32 + 73 68/push Stdout/imm32 + 74 68/push Stdin/imm32 75 # . . call 76 e8/call subx-assort/disp32 77 # . . discard args @@ -168,10 +168,10 @@ if ('onhashchange' in window) { 106 # . . push args 107 51/push-ecx 108 # . . call - 109 e8/call clear-stream/disp32 + 109 e8/call clear-stream/disp32 110 # . . discard args 111 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp - 112 $subx-assort:read: + 112 $subx-assort:read: 113 +-- 9 lines: #? # print("read\n") -------------------------------------------------------------------------------------------------------------------------------------------------- 122 # read-segments(in, table) 123 # . . push args @@ -181,7 +181,7 @@ if ('onhashchange' in window) { 127 e8/call read-segments/disp32 128 # . . discard args 129 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - 130 $subx-assort:write: + 130 $subx-assort:write: 131 +-- 9 lines: #? # print("write\n") ------------------------------------------------------------------------------------------------------------------------------------------------- 140 # write-segments(out, table) 141 # . . push args @@ -208,30 +208,30 @@ if ('onhashchange' in window) { 162 # setup 163 # . clear-stream(_test-input-stream) 164 # . . push args - 165 68/push _test-input-stream/imm32 + 165 68/push _test-input-stream/imm32 166 # . . call - 167 e8/call clear-stream/disp32 + 167 e8/call clear-stream/disp32 168 # . . discard args 169 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 170 # . clear-stream($_test-input-buffered-file->buffer) 171 # . . push args 172 68/push $_test-input-buffered-file->buffer/imm32 173 # . . call - 174 e8/call clear-stream/disp32 + 174 e8/call clear-stream/disp32 175 # . . discard args 176 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 177 # . clear-stream(_test-output-stream) 178 # . . push args - 179 68/push _test-output-stream/imm32 + 179 68/push _test-output-stream/imm32 180 # . . call - 181 e8/call clear-stream/disp32 + 181 e8/call clear-stream/disp32 182 # . . discard args 183 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 184 # . clear-stream($_test-output-buffered-file->buffer) 185 # . . push args 186 68/push $_test-output-buffered-file->buffer/imm32 187 # . . call - 188 e8/call clear-stream/disp32 + 188 e8/call clear-stream/disp32 189 # . . discard args 190 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 191 # initialize input (meta comments in parens) @@ -252,128 +252,128 @@ if ('onhashchange' in window) { 206 # . write(_test-input-stream, "# comment 1\n") 207 # . . push args 208 68/push "# comment 1\n"/imm32 - 209 68/push _test-input-stream/imm32 + 209 68/push _test-input-stream/imm32 210 # . . call - 211 e8/call write/disp32 + 211 e8/call write/disp32 212 # . . discard args 213 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 214 # . write(_test-input-stream, " # comment 2 indented\n") 215 # . . push args 216 68/push " # comment 2 indented\n"/imm32 - 217 68/push _test-input-stream/imm32 + 217 68/push _test-input-stream/imm32 218 # . . call - 219 e8/call write/disp32 + 219 e8/call write/disp32 220 # . . discard args 221 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 222 # . write(_test-input-stream, "== code 0x09000000\n") 223 # . . push args 224 68/push "== code 0x09000000\n"/imm32 - 225 68/push _test-input-stream/imm32 + 225 68/push _test-input-stream/imm32 226 # . . call - 227 e8/call write/disp32 + 227 e8/call write/disp32 228 # . . discard args 229 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 230 # . write(_test-input-stream, "# comment 3 inside a segment\n") 231 # . . push args 232 68/push "# comment 3 inside a segment\n"/imm32 - 233 68/push _test-input-stream/imm32 + 233 68/push _test-input-stream/imm32 234 # . . call - 235 e8/call write/disp32 + 235 e8/call write/disp32 236 # . . discard args 237 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 238 # . write(_test-input-stream, "1\n") 239 # . . push args 240 68/push "1\n"/imm32 - 241 68/push _test-input-stream/imm32 + 241 68/push _test-input-stream/imm32 242 # . . call - 243 e8/call write/disp32 + 243 e8/call write/disp32 244 # . . discard args 245 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 246 # . write(_test-input-stream, "\n") # empty line 247 # . . push args - 248 68/push Newline/imm32 - 249 68/push _test-input-stream/imm32 + 248 68/push Newline/imm32 + 249 68/push _test-input-stream/imm32 250 # . . call - 251 e8/call write/disp32 + 251 e8/call write/disp32 252 # . . discard args 253 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 254 # . write(_test-input-stream, "2 3 # comment 4 inline with other contents\n") 255 # . . push args 256 68/push "2 3 # comment 4 inline with other contents\n"/imm32 - 257 68/push _test-input-stream/imm32 + 257 68/push _test-input-stream/imm32 258 # . . call - 259 e8/call write/disp32 + 259 e8/call write/disp32 260 # . . discard args 261 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 262 # . write(_test-input-stream, "== data 0x0a000000\n") 263 # . . push args 264 68/push "== data 0x0a000000\n"/imm32 - 265 68/push _test-input-stream/imm32 + 265 68/push _test-input-stream/imm32 266 # . . call - 267 e8/call write/disp32 + 267 e8/call write/disp32 268 # . . discard args 269 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 270 # . write(_test-input-stream, "4 5/imm32\n") 271 # . . push args 272 68/push "4 5/imm32\n"/imm32 - 273 68/push _test-input-stream/imm32 + 273 68/push _test-input-stream/imm32 274 # . . call - 275 e8/call write/disp32 + 275 e8/call write/disp32 276 # . . discard args 277 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 278 # . write(_test-input-stream, "== code\n") 279 # . . push args 280 68/push "== code\n"/imm32 - 281 68/push _test-input-stream/imm32 + 281 68/push _test-input-stream/imm32 282 # . . call - 283 e8/call write/disp32 + 283 e8/call write/disp32 284 # . . discard args 285 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 286 # . write(_test-input-stream, "6 7\n") 287 # . . push args 288 68/push "6 7\n"/imm32 - 289 68/push _test-input-stream/imm32 + 289 68/push _test-input-stream/imm32 290 # . . call - 291 e8/call write/disp32 + 291 e8/call write/disp32 292 # . . discard args 293 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 294 # . write(_test-input-stream, "8 9\n") 295 # . . push args 296 68/push "8 9\n"/imm32 - 297 68/push _test-input-stream/imm32 + 297 68/push _test-input-stream/imm32 298 # . . call - 299 e8/call write/disp32 + 299 e8/call write/disp32 300 # . . discard args 301 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 302 # . write(_test-input-stream, "== code\n") 303 # . . push args 304 68/push "== code\n"/imm32 - 305 68/push _test-input-stream/imm32 + 305 68/push _test-input-stream/imm32 306 # . . call - 307 e8/call write/disp32 + 307 e8/call write/disp32 308 # . . discard args 309 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 310 # . write(_test-input-stream, "10 11\n") 311 # . . push args 312 68/push "10 11\n"/imm32 - 313 68/push _test-input-stream/imm32 + 313 68/push _test-input-stream/imm32 314 # . . call - 315 e8/call write/disp32 + 315 e8/call write/disp32 316 # . . discard args 317 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 318 # subx-assort(_test-input-buffered-file, _test-output-buffered-file) 319 # . . push args - 320 68/push _test-output-buffered-file/imm32 - 321 68/push _test-input-buffered-file/imm32 + 320 68/push _test-output-buffered-file/imm32 + 321 68/push _test-input-buffered-file/imm32 322 # . . call 323 e8/call subx-assort/disp32 324 # . . discard args 325 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 326 # . flush(_test-output-buffered-file) 327 # . . push args - 328 68/push _test-output-buffered-file/imm32 + 328 68/push _test-output-buffered-file/imm32 329 # . . call - 330 e8/call flush/disp32 + 330 e8/call flush/disp32 331 # . . discard args 332 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 333 # check output @@ -390,72 +390,72 @@ if ('onhashchange' in window) { 376 # . . push args 377 68/push "F - test-subx-assort/0"/imm32 378 68/push "== code 0x09000000"/imm32 - 379 68/push _test-output-stream/imm32 + 379 68/push _test-output-stream/imm32 380 # . . call - 381 e8/call check-next-stream-line-equal/disp32 + 381 e8/call check-next-stream-line-equal/disp32 382 # . . discard args 383 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 384 # . check-next-stream-line-equal(_test-output-stream, "1", msg) 385 # . . push args 386 68/push "F - test-subx-assort/1"/imm32 387 68/push "1"/imm32 - 388 68/push _test-output-stream/imm32 + 388 68/push _test-output-stream/imm32 389 # . . call - 390 e8/call check-next-stream-line-equal/disp32 + 390 e8/call check-next-stream-line-equal/disp32 391 # . . discard args 392 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 393 # . check-next-stream-line-equal(_test-output-stream, "2 3 # comment 4 inline with other contents", msg) 394 # . . push args 395 68/push "F - test-subx-assort/2"/imm32 396 68/push "2 3 # comment 4 inline with other contents"/imm32 - 397 68/push _test-output-stream/imm32 + 397 68/push _test-output-stream/imm32 398 # . . call - 399 e8/call check-next-stream-line-equal/disp32 + 399 e8/call check-next-stream-line-equal/disp32 400 # . . discard args 401 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 402 # . check-next-stream-line-equal(_test-output-stream, "6 7", msg) 403 # . . push args 404 68/push "F - test-subx-assort/3"/imm32 405 68/push "6 7"/imm32 - 406 68/push _test-output-stream/imm32 + 406 68/push _test-output-stream/imm32 407 # . . call - 408 e8/call check-next-stream-line-equal/disp32 + 408 e8/call check-next-stream-line-equal/disp32 409 # . . discard args 410 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 411 # . check-next-stream-line-equal(_test-output-stream, "8 9", msg) 412 # . . push args 413 68/push "F - test-subx-assort/4"/imm32 414 68/push "8 9"/imm32 - 415 68/push _test-output-stream/imm32 + 415 68/push _test-output-stream/imm32 416 # . . call - 417 e8/call check-next-stream-line-equal/disp32 + 417 e8/call check-next-stream-line-equal/disp32 418 # . . discard args 419 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 420 # . check-next-stream-line-equal(_test-output-stream, "10 11", msg) 421 # . . push args 422 68/push "F - test-subx-assort/5"/imm32 423 68/push "10 11"/imm32 - 424 68/push _test-output-stream/imm32 + 424 68/push _test-output-stream/imm32 425 # . . call - 426 e8/call check-next-stream-line-equal/disp32 + 426 e8/call check-next-stream-line-equal/disp32 427 # . . discard args 428 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 429 # . check-next-stream-line-equal(_test-output-stream, "== data 0x0a000000", msg) 430 # . . push args 431 68/push "F - test-subx-assort/6"/imm32 432 68/push "== data 0x0a000000"/imm32 - 433 68/push _test-output-stream/imm32 + 433 68/push _test-output-stream/imm32 434 # . . call - 435 e8/call check-next-stream-line-equal/disp32 + 435 e8/call check-next-stream-line-equal/disp32 436 # . . discard args 437 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 438 # . check-next-stream-line-equal(_test-output-stream, "4 5/imm32", msg) 439 # . . push args 440 68/push "F - test-subx-assort/7"/imm32 441 68/push "4 5/imm32"/imm32 - 442 68/push _test-output-stream/imm32 + 442 68/push _test-output-stream/imm32 443 # . . call - 444 e8/call check-next-stream-line-equal/disp32 + 444 e8/call check-next-stream-line-equal/disp32 445 # . . discard args 446 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 447 # . epilogue @@ -522,7 +522,7 @@ if ('onhashchange' in window) { 508 # . . push args 509 51/push-ecx 510 # . . call - 511 e8/call clear-stream/disp32 + 511 e8/call clear-stream/disp32 512 # . . discard args 513 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 514 # read-line-buffered(in, line) @@ -530,7 +530,7 @@ if ('onhashchange' in window) { 516 51/push-ecx 517 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8) 518 # . . call - 519 e8/call read-line-buffered/disp32 + 519 e8/call read-line-buffered/disp32 520 # . . discard args 521 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 522 $read-segments:check0: @@ -543,7 +543,7 @@ if ('onhashchange' in window) { 561 52/push-edx 562 51/push-ecx 563 # . . call - 564 e8/call next-word-or-string/disp32 + 564 e8/call next-word-or-string/disp32 565 # . . discard args 566 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 567 $read-segments:check1: @@ -553,7 +553,7 @@ if ('onhashchange' in window) { 579 # . . push args 580 52/push-edx 581 # . . call - 582 e8/call slice-empty?/disp32 + 582 e8/call slice-empty?/disp32 583 # . . discard args 584 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 585 # . if (eax != false) continue @@ -579,7 +579,7 @@ if ('onhashchange' in window) { 660 68/push "=="/imm32 661 52/push-edx 662 # . . call - 663 e8/call slice-equal?/disp32 + 663 e8/call slice-equal?/disp32 664 # . . discard args 665 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 666 # . if (eax == false) goto next check @@ -590,19 +590,19 @@ if ('onhashchange' in window) { 671 52/push-edx 672 51/push-ecx 673 # . . call - 674 e8/call next-word-or-string/disp32 + 674 e8/call next-word-or-string/disp32 675 # . . discard args 676 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 677 +-- 40 lines: #? # dump segment name ------------------------------------------------------------------------------------------------------------------------------------------------ 717 # var segment-slot/edi: (addr handle stream byte) = get-or-insert-slice(table, segment-name, row-size=16, Heap) 718 # . eax = get-or-insert-slice(table, segment-name, row-size=16, Heap) 719 # . . push args - 720 68/push Heap/imm32 + 720 68/push Heap/imm32 721 68/push 0x10/imm32/row-size 722 52/push-edx 723 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 . # push *(ebp+12) 724 # . . call - 725 e8/call get-or-insert-slice/disp32 + 725 e8/call get-or-insert-slice/disp32 726 # . . discard args 727 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32 # add to esp 728 # . edi = eax @@ -617,7 +617,7 @@ if ('onhashchange' in window) { 769 ff 6/subop/push 1/mod/*+disp8 7/rm32/edi . . . . 4/disp8 . # push *(edi+4) 770 ff 6/subop/push 0/mod/indirect 7/rm32/edi . . . . . . # push *edi 771 # . . call - 772 e8/call lookup/disp32 + 772 e8/call lookup/disp32 773 # . . discard args 774 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 775 # . ebx = eax @@ -630,9 +630,9 @@ if ('onhashchange' in window) { 782 57/push-edi 783 68/push 1/imm32 784 ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 . . . Segment-size/disp32 # push *Segment-size - 785 68/push Heap/imm32 + 785 68/push Heap/imm32 786 # . . call - 787 e8/call new-stream/disp32 + 787 e8/call new-stream/disp32 788 # . . discard args 789 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32 # add to esp 790 # var curr-segment/ebx: (addr stream byte) = lookup(*segment-slot) @@ -641,7 +641,7 @@ if ('onhashchange' in window) { 793 ff 6/subop/push 1/mod/*+disp8 7/rm32/edi . . . . 4/disp8 . # push *(edi+4) 794 ff 6/subop/push 0/mod/indirect 7/rm32/edi . . . . . . # push *edi 795 # . . call - 796 e8/call lookup/disp32 + 796 e8/call lookup/disp32 797 # . . discard args 798 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 799 # . ebx = eax @@ -657,7 +657,7 @@ if ('onhashchange' in window) { 945 # . . push args 946 51/push-ecx 947 # . . call - 948 e8/call rewind-stream/disp32 + 948 e8/call rewind-stream/disp32 949 # . . discard args 950 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 951 +-- 9 lines: #? # print("write stream\n") ------------------------------------------------------------------------------------------------------------------------------------------ @@ -666,7 +666,7 @@ if ('onhashchange' in window) { 962 51/push-ecx 963 53/push-ebx 964 # . . call - 965 e8/call write-stream/disp32 + 965 e8/call write-stream/disp32 966 # . . discard args 967 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 968 # loop @@ -722,7 +722,7 @@ if ('onhashchange' in window) { 1026 ff 6/subop/push 1/mod/*+disp8 6/rm32/esi . . . . 0xc/disp8 . # push *(esi+12) 1027 ff 6/subop/push 1/mod/*+disp8 6/rm32/esi . . . . 8/disp8 . # push *(esi+8) 1028 # . . call -1029 e8/call lookup/disp32 +1029 e8/call lookup/disp32 1030 # . . discard args 1031 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 1032 # write-stream-data(out, stream) @@ -730,7 +730,7 @@ if ('onhashchange' in window) { 1034 50/push-eax 1035 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8) 1036 # . . call -1037 e8/call write-stream-data/disp32 +1037 e8/call write-stream-data/disp32 1038 # . . discard args 1039 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 1040 $write-segments:continue: @@ -742,7 +742,7 @@ if ('onhashchange' in window) { 1046 # . . push args 1047 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 8/disp8 . # push *(ebp+8) 1048 # . . call -1049 e8/call flush/disp32 +1049 e8/call flush/disp32 1050 # . . discard args 1051 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 1052 $write-segments:end: -- cgit 1.4.1-2-gfad0