diff options
Diffstat (limited to 'html/056trace.subx.html')
-rw-r--r-- | html/056trace.subx.html | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/html/056trace.subx.html b/html/056trace.subx.html index 79c4d40b..8897bbf4 100644 --- a/html/056trace.subx.html +++ b/html/056trace.subx.html @@ -15,17 +15,17 @@ body { font-size:12pt; font-family: monospace; color: #000000; background-color: a { color:inherit; } * { font-size:12pt; font-size: 1em; } .subxComment { color: #005faf; } +.subxS2Comment { color: #8a8a8a; } +.subxTest { color: #5f8700; } .subxFunction { color: #af5f00; text-decoration: underline; } -.subxH1Comment { color: #005faf; text-decoration: underline; } .LineNr { } .subxS1Comment { color: #0000af; } .CommentedCode { color: #8a8a8a; } .SpecialChar { color: #d70000; } .Normal { color: #000000; background-color: #c6c6c6; padding-bottom: 1px; } -.subxMinorFunction { color: #875f5f; } -.subxS2Comment { color: #8a8a8a; } +.subxH1Comment { color: #005faf; text-decoration: underline; } .Constant { color: #008787; } -.subxTest { color: #5f8700; } +.subxMinorFunction { color: #875f5f; } --> </style> @@ -66,7 +66,7 @@ if ('onhashchange' in window) { <span id="L3" class="LineNr"> 3 </span><span class="subxComment"># A trace stream looks like a regular stream:</span> <span id="L4" class="LineNr"> 4 </span><span class="subxComment"># write: int # index at which writes go</span> <span id="L5" class="LineNr"> 5 </span><span class="subxComment"># read: int # index that we've read until</span> -<span id="L6" class="LineNr"> 6 </span><span class="subxComment"># data: (array byte) # prefixed by length as usual</span> +<span id="L6" class="LineNr"> 6 </span><span class="subxComment"># data: (array byte) # prefixed by size as usual</span> <span id="L7" class="LineNr"> 7 </span><span class="subxComment"># Usually the trace stream will be in a separate segment set aside for the purpose.</span> <span id="L8" class="LineNr"> 8 </span><span class="subxComment">#</span> <span id="L9" class="LineNr"> 9 </span><span class="subxComment"># primitives for operating on traces (arguments in quotes):</span> @@ -96,7 +96,7 @@ if ('onhashchange' in window) { <span id="L33" class="LineNr"> 33 </span> 0/imm32 <span id="L34" class="LineNr"> 34 </span> <span class="subxComment"># current read index</span> <span id="L35" class="LineNr"> 35 </span> 0/imm32 -<span id="L36" class="LineNr"> 36 </span> <span class="subxComment"># length</span> +<span id="L36" class="LineNr"> 36 </span> <span class="subxComment"># size</span> <span id="L37" class="LineNr"> 37 </span> 8/imm32 <span id="L38" class="LineNr"> 38 </span> <span class="subxComment"># data</span> <span id="L39" class="LineNr"> 39 </span> 00 00 00 00 00 00 00 00 <span class="subxComment"># 8 bytes</span> @@ -106,7 +106,7 @@ if ('onhashchange' in window) { <span id="L43" class="LineNr"> 43 </span><span class="subxS1Comment"># . op subop mod rm32 base index scale r32</span> <span id="L44" class="LineNr"> 44 </span><span class="subxS1Comment"># . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes</span> <span id="L45" class="LineNr"> 45 </span> -<span id="L46" class="LineNr"> 46 </span><span class="subxComment"># Allocate a new segment for the trace stream, initialize its length, and save its address to Trace-stream.</span> +<span id="L46" class="LineNr"> 46 </span><span class="subxComment"># Allocate a new segment for the trace stream, initialize its size, and save its address to Trace-stream.</span> <span id="L47" class="LineNr"> 47 </span><span class="subxComment"># The Trace-stream segment will consist of variable-length lines separated by newlines (0x0a)</span> <span id="L48" class="LineNr"> 48 </span><span class="subxFunction">initialize-trace-stream</span>: <span class="subxComment"># n: int</span> <span id="L49" class="LineNr"> 49 </span> <span class="subxS1Comment"># . prologue</span> @@ -130,10 +130,10 @@ if ('onhashchange' in window) { <span id="L67" class="LineNr"> 67 </span><span class="CommentedCode">#? # watch point to catch Trace-stream leaks</span> <span id="L68" class="LineNr"> 68 </span><span class="CommentedCode">#? $watch-1:</span> <span id="L69" class="LineNr"> 69 </span> 89/copy 0/mod/indirect 5/rm32/.disp32 <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="SpecialChar"><a href='056trace.subx.html#L21'>Trace-stream</a></span>/disp32 <span class="subxComment"># copy eax to *Trace-stream</span> -<span id="L70" class="LineNr"> 70 </span> <span class="subxComment"># Trace-stream->length = n - 12</span> +<span id="L70" class="LineNr"> 70 </span> <span class="subxComment"># Trace-stream->size = n - 12</span> <span id="L71" class="LineNr"> 71 </span> <span class="subxS1Comment"># . ecx -= 12</span> <span id="L72" class="LineNr"> 72 </span> 81 5/subop/subtract 3/mod/direct 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/imm32 <span class="subxComment"># subtract from ecx</span> -<span id="L73" class="LineNr"> 73 </span> <span class="subxS1Comment"># . Trace-stream->length = ecx</span> +<span id="L73" class="LineNr"> 73 </span> <span class="subxS1Comment"># . Trace-stream->size = ecx</span> <span id="L74" class="LineNr"> 74 </span> 89/copy 1/mod/*+disp8 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ecx to *(eax+8)</span> <span id="L75" class="LineNr"> 75 </span><span class="Constant">$initialize-trace-stream:end</span>: <span id="L76" class="LineNr"> 76 </span> <span class="subxS1Comment"># . restore registers</span> @@ -163,12 +163,12 @@ if ('onhashchange' in window) { <span id="L100" class="LineNr">100 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+8) to esi</span> <span id="L101" class="LineNr">101 </span> <span class="subxComment"># var ecx: int = t->write</span> <span id="L102" class="LineNr">102 </span> 8b/copy 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *edi to ecx</span> -<span id="L103" class="LineNr">103 </span> <span class="subxComment"># var edx: int = t->length</span> +<span id="L103" class="LineNr">103 </span> <span class="subxComment"># var edx: int = t->size</span> <span id="L104" class="LineNr">104 </span> 8b/copy 1/mod/*+disp8 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(edi+8) to edx</span> -<span id="L105" class="LineNr">105 </span> <span class="subxComment"># eax = _append-3(&t->data[t->write], &t->data[t->length], line)</span> +<span id="L105" class="LineNr">105 </span> <span class="subxComment"># eax = _append-3(&t->data[t->write], &t->data[t->size], line)</span> <span id="L106" class="LineNr">106 </span> <span class="subxS2Comment"># . . push line</span> <span id="L107" class="LineNr">107 </span> 56/push-esi -<span id="L108" class="LineNr">108 </span> <span class="subxS2Comment"># . . push &t->data[t->length]</span> +<span id="L108" class="LineNr">108 </span> <span class="subxS2Comment"># . . push &t->data[t->size]</span> <span id="L109" class="LineNr">109 </span> 8d/copy-address 1/mod/*+disp8 4/rm32/sib 7/base/edi 2/index/edx <span class="Normal"> . </span> 3/r32/ebx 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy edi+edx+12 to ebx</span> <span id="L110" class="LineNr">110 </span> 53/push-ebx <span id="L111" class="LineNr">111 </span> <span class="subxS2Comment"># . . push &t->data[t->write]</span> @@ -185,10 +185,10 @@ if ('onhashchange' in window) { <span id="L122" class="LineNr">122 </span> 01/add 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># add eax to *edi</span> <span id="L123" class="LineNr">123 </span> <span class="subxComment"># refresh ecx = t->write</span> <span id="L124" class="LineNr">124 </span> 8b/copy 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *edi to ecx</span> -<span id="L125" class="LineNr">125 </span> <span class="subxComment"># eax = _append-3(&t->data[t->write], &t->data[t->length], line)</span> +<span id="L125" class="LineNr">125 </span> <span class="subxComment"># eax = _append-3(&t->data[t->write], &t->data[t->size], line)</span> <span id="L126" class="LineNr">126 </span> <span class="subxS2Comment"># . . push line</span> <span id="L127" class="LineNr">127 </span> 68/push <span class="SpecialChar"><a href='051test.subx.html#L83'>Newline</a></span>/imm32 -<span id="L128" class="LineNr">128 </span> <span class="subxS2Comment"># . . push &t->data[t->length]</span> +<span id="L128" class="LineNr">128 </span> <span class="subxS2Comment"># . . push &t->data[t->size]</span> <span id="L129" class="LineNr">129 </span> 8d/copy-address 1/mod/*+disp8 4/rm32/sib 7/base/edi 2/index/edx <span class="Normal"> . </span> 3/r32/ebx 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy edi+edx+12 to ebx</span> <span id="L130" class="LineNr">130 </span> 53/push-ebx <span id="L131" class="LineNr">131 </span> <span class="subxS2Comment"># . . push &t->data[t->write]</span> @@ -931,8 +931,8 @@ if ('onhashchange' in window) { <span id="L868" class="LineNr">868 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> <span id="L869" class="LineNr">869 </span> <span class="subxS1Comment"># . save registers</span> <span id="L870" class="LineNr">870 </span> 51/push-ecx -<span id="L871" class="LineNr">871 </span> <span class="subxComment"># eax = _append-4(out, outend, &s->data[0], &s->data[s->length])</span> -<span id="L872" class="LineNr">872 </span> <span class="subxS2Comment"># . . push &s->data[s->length]</span> +<span id="L871" class="LineNr">871 </span> <span class="subxComment"># eax = _append-4(out, outend, &s->data[0], &s->data[s->size])</span> +<span id="L872" class="LineNr">872 </span> <span class="subxS2Comment"># . . push &s->data[s->size]</span> <span id="L873" class="LineNr">873 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 0x10/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+16) to eax</span> <span id="L874" class="LineNr">874 </span> 8b/copy 0/mod/indirect 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *eax to ecx</span> <span id="L875" class="LineNr">875 </span> 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx <span class="Normal"> . </span> 1/r32/ecx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy eax+ecx+4 to ecx</span> @@ -1028,7 +1028,7 @@ if ('onhashchange' in window) { <span id="L965" class="LineNr">965 </span> 8/imm32 <span id="L966" class="LineNr">966 </span> <span class="subxComment"># read</span> <span id="L967" class="LineNr">967 </span> 0/imm32 -<span id="L968" class="LineNr">968 </span> <span class="subxComment"># length</span> +<span id="L968" class="LineNr">968 </span> <span class="subxComment"># size</span> <span id="L969" class="LineNr">969 </span> 8/imm32 <span id="L970" class="LineNr">970 </span> <span class="subxComment"># data</span> <span id="L971" class="LineNr">971 </span> 41 42 41 42 41 0a 00 00 <span class="subxComment"># 8 bytes</span> @@ -1038,7 +1038,7 @@ if ('onhashchange' in window) { <span id="L975" class="LineNr">975 </span> 0/imm32 <span id="L976" class="LineNr">976 </span> <span class="subxComment"># read</span> <span id="L977" class="LineNr">977 </span> 0/imm32 -<span id="L978" class="LineNr">978 </span> <span class="subxComment"># length</span> +<span id="L978" class="LineNr">978 </span> <span class="subxComment"># size</span> <span id="L979" class="LineNr">979 </span> 8/imm32 <span id="L980" class="LineNr">980 </span> <span class="subxComment"># data</span> <span id="L981" class="LineNr">981 </span> 00 00 00 00 00 00 00 00 <span class="subxComment"># 8 bytes</span> @@ -1048,7 +1048,7 @@ if ('onhashchange' in window) { <span id="L985" class="LineNr">985 </span> 8/imm32 <span id="L986" class="LineNr">986 </span> <span class="subxComment"># read</span> <span id="L987" class="LineNr">987 </span> 0/imm32 -<span id="L988" class="LineNr">988 </span> <span class="subxComment"># length</span> +<span id="L988" class="LineNr">988 </span> <span class="subxComment"># size</span> <span id="L989" class="LineNr">989 </span> 8/imm32 <span id="L990" class="LineNr">990 </span> <span class="subxComment"># data</span> <span id="L991" class="LineNr">991 </span> 41 41 41 41 0a 41 41 41 <span class="subxComment"># 8 bytes</span> |