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/055trace.subx.html | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'html/subx/055trace.subx.html') diff --git a/html/subx/055trace.subx.html b/html/subx/055trace.subx.html index bd3ec9c0..4e92ea63 100644 --- a/html/subx/055trace.subx.html +++ b/html/subx/055trace.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; } @@ -90,7 +93,7 @@ if ('onhashchange' in window) { 27 28 # Fake trace-stream for tests. 29 # Also illustrates the layout of the real trace-stream (segment). - 30 _test-trace-stream: + 30 _test-trace-stream: 31 # current write index 32 00 00 00 00 33 # current read index @@ -115,7 +118,7 @@ if ('onhashchange' in window) { 52 53 # Allocate a new segment for the trace stream, initialize its length, and save its address to Trace-stream. 54 # The Trace-stream segment will consist of variable-length lines separated by newlines (0x0a) - 55 initialize-trace-stream: + 55 initialize-trace-stream: 56 # EAX = new-segment(0x1000) 57 # . . push args 58 68/push 0x1000/imm32/N @@ -131,7 +134,7 @@ if ('onhashchange' in window) { 68 69 # Append a string to the given trace stream. 70 # Silently give up if it's already full. Or truncate the string if there isn't enough room. - 71 trace: # t : (address trace-stream), line : string + 71 trace: # t : (address trace-stream), line : string 72 # . prolog 73 55/push-EBP 74 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . . # copy ESP to EBP @@ -185,7 +188,7 @@ if ('onhashchange' in window) { 122 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP 123 # t->write += EAX 124 01/add 0/mod/indirect 7/rm32/EDI . . . 0/r32/EAX . . # add EAX to *EDI -125 $trace:end: +125 $trace:end: 126 # . restore registers 127 5f/pop-to-EDI 128 5e/pop-to-ESI @@ -198,7 +201,7 @@ if ('onhashchange' in window) { 135 5d/pop-to-EBP 136 c3/return 137 -138 clear-trace-stream: # t : (address trace-stream) +138 clear-trace-stream: # t : (address trace-stream) 139 # . prolog 140 55/push-EBP 141 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . . # copy ESP to EBP @@ -218,7 +221,7 @@ if ('onhashchange' in window) { 155 # EAX = t->data 156 81 0/subop/add 3/mod/direct 0/rm32/EAX . . . . . 0xc/imm32 # add to EAX 157 # while (true) -158 $clear-trace-stream:loop: +158 $clear-trace-stream:loop: 159 # if EAX >= ECX break 160 39/compare 3/mod/direct 0/rm32/EAX . . . 1/r32/ECX . . # compare EAX with ECX 161 7d/jump-if-greater-or-equal $clear-trace-stream:end/disp8 @@ -227,7 +230,7 @@ if ('onhashchange' in window) { 164 # EAX += 4 165 81 0/subop/add 3/mod/direct 0/rm32/EAX . . . . . 4/imm32 # add to EAX 166 eb/jump $clear-trace-stream:loop/disp8 -167 $clear-trace-stream:end: +167 $clear-trace-stream:end: 168 # . restore registers 169 59/pop-to-ECX 170 58/pop-to-EAX @@ -238,7 +241,7 @@ if ('onhashchange' in window) { 175 176 # - tests 177 -178 test-trace-single: +178 test-trace-single: 179 # clear-trace-stream(_test-trace-stream) 180 # . . push args 181 68/push _test-trace-stream/imm32 @@ -268,7 +271,7 @@ if ('onhashchange' in window) { 205 # end 206 c3/return 207 -208 test-trace-appends: +208 test-trace-appends: 209 # clear-trace-stream(_test-trace-stream) 210 # . . push args 211 68/push _test-trace-stream/imm32 @@ -306,7 +309,7 @@ if ('onhashchange' in window) { 243 # end 244 c3/return 245 -246 test-trace-empty-line: +246 test-trace-empty-line: 247 # clear-trace-stream(_test-trace-stream) 248 # . . push args 249 68/push _test-trace-stream/imm32 @@ -339,7 +342,7 @@ if ('onhashchange' in window) { 276 # - helpers 277 278 # 3-argument variant of _append -279 _append-3: # out : address, outend : address, s : (array byte) -> num_bytes_appended/EAX +279 _append-3: # out : address, outend : address, s : (array byte) -> num_bytes_appended/EAX 280 # . prolog 281 55/push-EBP 282 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . . # copy ESP to EBP @@ -370,7 +373,7 @@ if ('onhashchange' in window) { 307 c3/return 308 309 # 4-argument variant of _append -310 _append-4: # out : address, outend : address, in : address, inend : address -> num_bytes_appended/EAX +310 _append-4: # out : address, outend : address, in : address, inend : address -> num_bytes_appended/EAX 311 # . prolog 312 55/push-EBP 313 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . . # copy ESP to EBP @@ -390,7 +393,7 @@ if ('onhashchange' in window) { 327 8b/copy 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none . 6/r32/ESI 0x10/disp8 . # copy *(EBP+16) to ESI 328 # ECX = inend 329 8b/copy 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none . 1/r32/ECX 0x14/disp8 . # copy *(EBP+20) to ECX -330 $_append-4:loop: +330 $_append-4:loop: 331 # if ESI/src >= ECX/srcend break 332 39/compare 3/mod/direct 6/rm32/ESI . . . 1/r32/ECX . . # compare ESI with ECX 333 7d/jump-if-greater-or-equal $_append-4:end/disp8 @@ -405,7 +408,7 @@ if ('onhashchange' in window) { 342 46/increment-ESI 343 47/increment-EDI 344 eb/jump $_append-4:loop/disp8 -345 $_append-4:end: +345 $_append-4:end: 346 # . restore registers 347 5f/pop-to-EDI 348 5e/pop-to-ESI -- cgit 1.4.1-2-gfad0