diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-05-20 01:44:06 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-05-20 01:44:06 -0700 |
commit | 52daf0722f7f4ad9d3f29e3cbbbaddde066f49f3 (patch) | |
tree | dac2a82e0b7148f2f215dee77c013b7a6fb329a2 /html/subx/examples | |
parent | cfea67e9a00419c4493699c0ac8691d9bbb0ceca (diff) | |
download | mu-52daf0722f7f4ad9d3f29e3cbbbaddde066f49f3.tar.gz |
5211
Update syntax-highlighted renderings after a _long_ time.
Diffstat (limited to 'html/subx/examples')
-rw-r--r-- | html/subx/examples/ex1.subx.html | 2 | ||||
-rw-r--r-- | html/subx/examples/ex10.subx.html | 8 | ||||
-rw-r--r-- | html/subx/examples/ex11.subx.html | 14 | ||||
-rw-r--r-- | html/subx/examples/ex12.subx.html | 4 | ||||
-rw-r--r-- | html/subx/examples/ex2.subx.html | 4 | ||||
-rw-r--r-- | html/subx/examples/ex3.subx.html | 4 | ||||
-rw-r--r-- | html/subx/examples/ex4.subx.html | 65 | ||||
-rw-r--r-- | html/subx/examples/ex5.subx.html | 2 | ||||
-rw-r--r-- | html/subx/examples/ex6.subx.html | 4 | ||||
-rw-r--r-- | html/subx/examples/ex7.subx.html | 4 | ||||
-rw-r--r-- | html/subx/examples/ex8.subx.html | 12 | ||||
-rw-r--r-- | html/subx/examples/ex9.subx.html | 2 |
12 files changed, 63 insertions, 62 deletions
diff --git a/html/subx/examples/ex1.subx.html b/html/subx/examples/ex1.subx.html index b4bb151b..3185d270 100644 --- a/html/subx/examples/ex1.subx.html +++ b/html/subx/examples/ex1.subx.html @@ -62,7 +62,7 @@ if ('onhashchange' in window) { <span id="L8" class="LineNr"> 8 </span><span class="subxComment"># $ echo $?</span> <span id="L9" class="LineNr"> 9 </span><span class="subxComment"># 42</span> <span id="L10" class="LineNr">10 </span> -<span id="L11" class="LineNr">11 </span>== code +<span id="L11" class="LineNr">11 </span>== code 0x09000000 <span id="L12" class="LineNr">12 </span> <span id="L13" class="LineNr">13 </span><span class="subxComment"># syscall(exit, 42)</span> <span id="L14" class="LineNr">14 </span>bb/copy-to-EBX 2a/imm32 <span class="subxComment"># 42 in hex</span> diff --git a/html/subx/examples/ex10.subx.html b/html/subx/examples/ex10.subx.html index c3b047b7..a305d66d 100644 --- a/html/subx/examples/ex10.subx.html +++ b/html/subx/examples/ex10.subx.html @@ -66,7 +66,7 @@ if ('onhashchange' in window) { <span id="L7" class="LineNr"> 7 </span><span class="subxComment"># $ echo $?</span> <span id="L8" class="LineNr"> 8 </span><span class="subxComment"># 0 # false</span> <span id="L9" class="LineNr"> 9 </span> -<span id="L10" class="LineNr">10 </span>== code +<span id="L10" class="LineNr">10 </span>== code 0x09000000 <span id="L11" class="LineNr">11 </span><span class="subxComment"># instruction effective address register displacement immediate</span> <span id="L12" class="LineNr">12 </span><span class="subxS1Comment"># . op subop mod rm32 base index scale r32</span> <span id="L13" class="LineNr">13 </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> @@ -104,14 +104,14 @@ if ('onhashchange' in window) { <span id="L45" class="LineNr">45 </span> bb/copy-to-EBX 0/imm32 <span id="L46" class="LineNr">46 </span> 8a/copy-byte 0/mod/indirect 2/rm32/EDX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *EDX to BL</span> <span id="L47" class="LineNr">47 </span> <span class="subxComment"># if (c1 == 0) break</span> -<span id="L48" class="LineNr">48 </span> 3d/compare-EAX 0/imm32 +<span id="L48" class="LineNr">48 </span> 3d/compare-EAX-and 0/imm32 <span id="L49" class="LineNr">49 </span> 74/jump-if-equal $argv-equal:break/disp8 <span id="L50" class="LineNr">50 </span> <span class="subxComment"># if (c1 != c2) return false</span> <span id="L51" class="LineNr">51 </span> 39/compare 3/mod/direct 0/rm32/EAX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/EBX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare EAX and EBX</span> <span id="L52" class="LineNr">52 </span> 75/jump-if-not-equal $argv-equal:false/disp8 <span id="L53" class="LineNr">53 </span> <span class="subxComment"># ++s1, ++s2</span> -<span id="L54" class="LineNr">54 </span> 41/inc-ECX -<span id="L55" class="LineNr">55 </span> 42/inc-EDX +<span id="L54" class="LineNr">54 </span> 41/increment-ECX +<span id="L55" class="LineNr">55 </span> 42/increment-EDX <span id="L56" class="LineNr">56 </span> <span class="subxComment"># end while</span> <span id="L57" class="LineNr">57 </span> eb/jump $argv-equal:loop/disp8 <span id="L58" class="LineNr">58 </span><span class="Constant">$argv-equal:break</span>: diff --git a/html/subx/examples/ex11.subx.html b/html/subx/examples/ex11.subx.html index f0b64cf8..3904ee88 100644 --- a/html/subx/examples/ex11.subx.html +++ b/html/subx/examples/ex11.subx.html @@ -76,7 +76,7 @@ if ('onhashchange' in window) { <span id="L14" class="LineNr"> 14 </span><span class="subxComment"># because checking for it would require the function being tested! Breakage</span> <span id="L15" class="LineNr"> 15 </span><span class="subxComment"># would cause tests to not run, rather than to fail as we'd like.)</span> <span id="L16" class="LineNr"> 16 </span> -<span id="L17" class="LineNr"> 17 </span>== code +<span id="L17" class="LineNr"> 17 </span>== code 0x09000000 <span id="L18" class="LineNr"> 18 </span><span class="subxComment"># instruction effective address register displacement immediate</span> <span id="L19" class="LineNr"> 19 </span><span class="subxS1Comment"># . op subop mod rm32 base index scale r32</span> <span id="L20" class="LineNr"> 20 </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> @@ -142,22 +142,22 @@ if ('onhashchange' in window) { <span id="L80" class="LineNr"> 80 </span> <span class="subxComment"># c2 = *s2</span> <span id="L81" class="LineNr"> 81 </span> 8a/copy-byte 0/mod/indirect 6/rm32/ESI <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/BL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *ESI to BL</span> <span id="L82" class="LineNr"> 82 </span> <span class="subxComment"># if (c1 == 0) return false</span> -<span id="L83" class="LineNr"> 83 </span> 3d/compare-EAX 0/imm32 +<span id="L83" class="LineNr"> 83 </span> 3d/compare-EAX-and 0/imm32 <span id="L84" class="LineNr"> 84 </span> 74/jump-if-equal $kernel-string-equal?:false/disp8 <span id="L85" class="LineNr"> 85 </span> <span class="subxComment"># if (c1 != c2) return false</span> <span id="L86" class="LineNr"> 86 </span> 39/compare 3/mod/direct 0/rm32/EAX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/EBX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare EAX and EBX</span> <span id="L87" class="LineNr"> 87 </span> 75/jump-if-not-equal $kernel-string-equal?:false/disp8 <span id="L88" class="LineNr"> 88 </span> <span class="subxComment"># ++i</span> -<span id="L89" class="LineNr"> 89 </span> 41/inc-ECX +<span id="L89" class="LineNr"> 89 </span> 41/increment-ECX <span id="L90" class="LineNr"> 90 </span> <span class="subxComment"># ++s1</span> -<span id="L91" class="LineNr"> 91 </span> 47/inc-EDI +<span id="L91" class="LineNr"> 91 </span> 47/increment-EDI <span id="L92" class="LineNr"> 92 </span> <span class="subxComment"># ++s2</span> -<span id="L93" class="LineNr"> 93 </span> 46/inc-ESI +<span id="L93" class="LineNr"> 93 </span> 46/increment-ESI <span id="L94" class="LineNr"> 94 </span> eb/jump $kernel-string-equal?:loop/disp8 <span id="L95" class="LineNr"> 95 </span><span class="Constant">$kernel-string-equal?:break</span>: <span id="L96" class="LineNr"> 96 </span> <span class="subxComment"># return *s1 == 0</span> <span id="L97" class="LineNr"> 97 </span> 8a/copy-byte 0/mod/indirect 7/rm32/EDI <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/AL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *EDI to AL</span> -<span id="L98" class="LineNr"> 98 </span> 3d/compare-EAX 0/imm32 +<span id="L98" class="LineNr"> 98 </span> 3d/compare-EAX-and 0/imm32 <span id="L99" class="LineNr"> 99 </span> 75/jump-if-not-equal $kernel-string-equal?:false/disp8 <span id="L100" class="LineNr">100 </span><span class="Constant">$kernel-string-equal?:true</span>: <span id="L101" class="LineNr">101 </span> b8/copy-to-EAX 1/imm32 @@ -401,7 +401,7 @@ if ('onhashchange' in window) { <span id="L339" class="LineNr">339 </span> 5d/pop-to-EBP <span id="L340" class="LineNr">340 </span> c3/return <span id="L341" class="LineNr">341 </span> -<span id="L342" class="LineNr">342 </span>== data +<span id="L342" class="LineNr">342 </span>== data 0x0a000000 <span id="L343" class="LineNr">343 </span> <span id="L344" class="LineNr">344 </span><span class="SpecialChar">Newline</span>: <span id="L345" class="LineNr">345 </span> <span class="subxComment"># size</span> diff --git a/html/subx/examples/ex12.subx.html b/html/subx/examples/ex12.subx.html index 02792b12..6e491637 100644 --- a/html/subx/examples/ex12.subx.html +++ b/html/subx/examples/ex12.subx.html @@ -63,7 +63,7 @@ if ('onhashchange' in window) { <span id="L6" class="LineNr"> 6 </span><span class="subxComment"># $ ./subx run examples/ex12</span> <span id="L7" class="LineNr"> 7 </span><span class="subxComment"># You shouldn't get a segmentation fault.</span> <span id="L8" class="LineNr"> 8 </span> -<span id="L9" class="LineNr"> 9 </span>== code +<span id="L9" class="LineNr"> 9 </span>== code 0x09000000 <span id="L10" class="LineNr">10 </span><span class="subxComment"># instruction effective address register displacement immediate</span> <span id="L11" class="LineNr">11 </span><span class="subxS1Comment"># . op subop mod rm32 base index scale r32</span> <span id="L12" class="LineNr">12 </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> @@ -81,7 +81,7 @@ if ('onhashchange' in window) { <span id="L24" class="LineNr">24 </span> b8/copy-to-EAX 1/imm32/exit <span id="L25" class="LineNr">25 </span> cd/syscall 0x80/imm8 <span id="L26" class="LineNr">26 </span> -<span id="L27" class="LineNr">27 </span>== data +<span id="L27" class="LineNr">27 </span>== data 0x0a000000 <span id="L28" class="LineNr">28 </span> <span id="L29" class="LineNr">29 </span><span class="subxComment"># various constants used here were found in the Linux sources (search for file mman-common.h)</span> <span id="L30" class="LineNr">30 </span><span class="SpecialChar">Mmap-new-segment</span>: <span class="subxComment"># type mmap_arg_struct</span> diff --git a/html/subx/examples/ex2.subx.html b/html/subx/examples/ex2.subx.html index a7c19e82..6ea72349 100644 --- a/html/subx/examples/ex2.subx.html +++ b/html/subx/examples/ex2.subx.html @@ -61,12 +61,12 @@ if ('onhashchange' in window) { <span id="L7" class="LineNr"> 7 </span><span class="subxComment"># $ echo $?</span> <span id="L8" class="LineNr"> 8 </span><span class="subxComment"># 2</span> <span id="L9" class="LineNr"> 9 </span> -<span id="L10" class="LineNr">10 </span>== code +<span id="L10" class="LineNr">10 </span>== code 0x09000000 <span id="L11" class="LineNr">11 </span> <span id="L12" class="LineNr">12 </span><span class="subxComment"># EBX = 1</span> <span id="L13" class="LineNr">13 </span>bb/copy-to-EBX 1/imm32 <span id="L14" class="LineNr">14 </span><span class="subxComment"># increment EBX</span> -<span id="L15" class="LineNr">15 </span>43/inc-EBX +<span id="L15" class="LineNr">15 </span>43/increment-EBX <span id="L16" class="LineNr">16 </span><span class="subxComment"># syscall(exit, EBX)</span> <span id="L17" class="LineNr">17 </span>b8/copy-to-EAX 1/imm32/exit <span id="L18" class="LineNr">18 </span>cd/syscall 0x80/imm8 diff --git a/html/subx/examples/ex3.subx.html b/html/subx/examples/ex3.subx.html index d7ace88f..096ff79c 100644 --- a/html/subx/examples/ex3.subx.html +++ b/html/subx/examples/ex3.subx.html @@ -64,7 +64,7 @@ if ('onhashchange' in window) { <span id="L7" class="LineNr"> 7 </span><span class="subxComment"># $ echo $?</span> <span id="L8" class="LineNr"> 8 </span><span class="subxComment"># 55</span> <span id="L9" class="LineNr"> 9 </span> -<span id="L10" class="LineNr">10 </span>== code +<span id="L10" class="LineNr">10 </span>== code 0x09000000 <span id="L11" class="LineNr">11 </span><span class="subxComment"># instruction effective address register displacement immediate</span> <span id="L12" class="LineNr">12 </span><span class="subxS1Comment"># . op subop mod rm32 base index scale r32</span> <span id="L13" class="LineNr">13 </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> @@ -81,7 +81,7 @@ if ('onhashchange' in window) { <span id="L24" class="LineNr">24 </span> <span class="subxComment"># result += counter</span> <span id="L25" class="LineNr">25 </span> 01/add 3/mod/direct 3/rm32/EBX <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"># add ECX to EBX</span> <span id="L26" class="LineNr">26 </span> <span class="subxComment"># ++counter</span> -<span id="L27" class="LineNr">27 </span> 41/inc-ECX +<span id="L27" class="LineNr">27 </span> 41/increment-ECX <span id="L28" class="LineNr">28 </span> <span class="subxComment"># loop</span> <span id="L29" class="LineNr">29 </span> eb/jump $loop/disp8 <span id="L30" class="LineNr">30 </span> diff --git a/html/subx/examples/ex4.subx.html b/html/subx/examples/ex4.subx.html index 917e1359..7e0512b0 100644 --- a/html/subx/examples/ex4.subx.html +++ b/html/subx/examples/ex4.subx.html @@ -60,40 +60,41 @@ if ('onhashchange' in window) { <span id="L4" class="LineNr"> 4 </span><span class="subxComment"># $ ./subx translate examples/ex4.subx -o examples/ex4</span> <span id="L5" class="LineNr"> 5 </span><span class="subxComment"># $ ./subx run examples/ex4</span> <span id="L6" class="LineNr"> 6 </span> -<span id="L7" class="LineNr"> 7 </span>== code +<span id="L7" class="LineNr"> 7 </span>== data 0x0a000000 <span id="L8" class="LineNr"> 8 </span> -<span id="L9" class="LineNr"> 9 </span><span class="subxComment"># syscall(read, stdin, X, 1)</span> -<span id="L10" class="LineNr">10 </span><span class="subxS1Comment"># . fd = 0 (stdin)</span> -<span id="L11" class="LineNr">11 </span>bb/copy-to-EBX 0/imm32 -<span id="L12" class="LineNr">12 </span><span class="subxS1Comment"># . data = X (location to write result to)</span> -<span id="L13" class="LineNr">13 </span>b9/copy-to-ECX <span class="SpecialChar"><a href='ex4.subx.html#L37'>X</a></span>/imm32 -<span id="L14" class="LineNr">14 </span><span class="subxS1Comment"># . size = 1 character</span> -<span id="L15" class="LineNr">15 </span>ba/copy-to-EDX 1/imm32 -<span id="L16" class="LineNr">16 </span><span class="subxS1Comment"># . syscall</span> -<span id="L17" class="LineNr">17 </span>b8/copy-to-EAX 3/imm32/read -<span id="L18" class="LineNr">18 </span>cd/syscall 0x80/imm8 -<span id="L19" class="LineNr">19 </span> -<span id="L20" class="LineNr">20 </span><span class="subxComment"># syscall(write, stdout, X, 1)</span> -<span id="L21" class="LineNr">21 </span><span class="subxS1Comment"># . fd = 1 (stdout)</span> -<span id="L22" class="LineNr">22 </span>bb/copy-to-EBX 1/imm32 -<span id="L23" class="LineNr">23 </span><span class="subxS1Comment"># . initialize X (location to read from)</span> -<span id="L24" class="LineNr">24 </span>b9/copy-to-ECX <span class="SpecialChar"><a href='ex4.subx.html#L37'>X</a></span>/imm32 -<span id="L25" class="LineNr">25 </span><span class="subxS1Comment"># . size = 1 character</span> -<span id="L26" class="LineNr">26 </span>ba/copy-to-EDX 1/imm32 -<span id="L27" class="LineNr">27 </span><span class="subxS1Comment"># . syscall</span> -<span id="L28" class="LineNr">28 </span>b8/copy-to-EAX 4/imm32/write -<span id="L29" class="LineNr">29 </span>cd/syscall 0x80/imm8 -<span id="L30" class="LineNr">30 </span> -<span id="L31" class="LineNr">31 </span><span class="subxComment"># syscall(exit, EBX)</span> -<span id="L32" class="LineNr">32 </span>b8/copy-to-EAX 1/imm32/exit -<span id="L33" class="LineNr">33 </span>cd/syscall 0x80/imm8 -<span id="L34" class="LineNr">34 </span> -<span id="L35" class="LineNr">35 </span>== data +<span id="L9" class="LineNr"> 9 </span><span class="subxComment"># the global variable we save to</span> +<span id="L10" class="LineNr">10 </span><span class="SpecialChar">X</span>: +<span id="L11" class="LineNr">11 </span> 0/imm32 <span class="subxComment"># space for read() to write to</span> +<span id="L12" class="LineNr">12 </span> +<span id="L13" class="LineNr">13 </span>== code 0x09000000 +<span id="L14" class="LineNr">14 </span> +<span id="L15" class="LineNr">15 </span><span class="subxComment"># syscall(read, stdin, X, 1)</span> +<span id="L16" class="LineNr">16 </span><span class="subxS1Comment"># . fd = 0 (stdin)</span> +<span id="L17" class="LineNr">17 </span>bb/copy-to-EBX 0/imm32 +<span id="L18" class="LineNr">18 </span><span class="subxS1Comment"># . data = X (location to write result to)</span> +<span id="L19" class="LineNr">19 </span>b9/copy-to-ECX <span class="SpecialChar"><a href='ex4.subx.html#L10'>X</a></span>/imm32 +<span id="L20" class="LineNr">20 </span><span class="subxS1Comment"># . size = 1 character</span> +<span id="L21" class="LineNr">21 </span>ba/copy-to-EDX 1/imm32 +<span id="L22" class="LineNr">22 </span><span class="subxS1Comment"># . syscall</span> +<span id="L23" class="LineNr">23 </span>b8/copy-to-EAX 3/imm32/read +<span id="L24" class="LineNr">24 </span>cd/syscall 0x80/imm8 +<span id="L25" class="LineNr">25 </span> +<span id="L26" class="LineNr">26 </span><span class="subxComment"># syscall(write, stdout, X, 1)</span> +<span id="L27" class="LineNr">27 </span><span class="subxS1Comment"># . fd = 1 (stdout)</span> +<span id="L28" class="LineNr">28 </span>bb/copy-to-EBX 1/imm32 +<span id="L29" class="LineNr">29 </span><span class="subxS1Comment"># . initialize X (location to read from)</span> +<span id="L30" class="LineNr">30 </span>b9/copy-to-ECX <span class="SpecialChar"><a href='ex4.subx.html#L10'>X</a></span>/imm32 +<span id="L31" class="LineNr">31 </span><span class="subxS1Comment"># . size = 1 character</span> +<span id="L32" class="LineNr">32 </span>ba/copy-to-EDX 1/imm32 +<span id="L33" class="LineNr">33 </span><span class="subxS1Comment"># . syscall</span> +<span id="L34" class="LineNr">34 </span>b8/copy-to-EAX 4/imm32/write +<span id="L35" class="LineNr">35 </span>cd/syscall 0x80/imm8 <span id="L36" class="LineNr">36 </span> -<span id="L37" class="LineNr">37 </span><span class="SpecialChar">X</span>: -<span id="L38" class="LineNr">38 </span> 0/imm32 <span class="subxComment"># space for read() to write to</span> -<span id="L39" class="LineNr">39 </span> -<span id="L40" class="LineNr">40 </span><span class="subxS2Comment"># . . vim:nowrap:textwidth=0</span> +<span id="L37" class="LineNr">37 </span><span class="subxComment"># syscall(exit, EBX)</span> +<span id="L38" class="LineNr">38 </span>b8/copy-to-EAX 1/imm32/exit +<span id="L39" class="LineNr">39 </span>cd/syscall 0x80/imm8 +<span id="L40" class="LineNr">40 </span> +<span id="L41" class="LineNr">41 </span><span class="subxS2Comment"># . . vim:nowrap:textwidth=0</span> </pre> </body> </html> diff --git a/html/subx/examples/ex5.subx.html b/html/subx/examples/ex5.subx.html index 44ba1b76..1223f307 100644 --- a/html/subx/examples/ex5.subx.html +++ b/html/subx/examples/ex5.subx.html @@ -61,7 +61,7 @@ if ('onhashchange' in window) { <span id="L4" class="LineNr"> 4 </span><span class="subxComment"># $ ./subx translate examples/ex5.subx -o examples/ex5</span> <span id="L5" class="LineNr"> 5 </span><span class="subxComment"># $ ./subx run examples/ex5</span> <span id="L6" class="LineNr"> 6 </span> -<span id="L7" class="LineNr"> 7 </span>== code +<span id="L7" class="LineNr"> 7 </span>== code 0x09000000 <span id="L8" class="LineNr"> 8 </span><span class="subxComment"># instruction effective address register displacement immediate</span> <span id="L9" class="LineNr"> 9 </span><span class="subxS1Comment"># . op subop mod rm32 base index scale r32</span> <span id="L10" class="LineNr">10 </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> diff --git a/html/subx/examples/ex6.subx.html b/html/subx/examples/ex6.subx.html index dc0f4217..6cbabe19 100644 --- a/html/subx/examples/ex6.subx.html +++ b/html/subx/examples/ex6.subx.html @@ -62,7 +62,7 @@ if ('onhashchange' in window) { <span id="L5" class="LineNr"> 5 </span><span class="subxComment"># $ ./subx run examples/ex6</span> <span id="L6" class="LineNr"> 6 </span><span class="subxComment"># Hello, world!</span> <span id="L7" class="LineNr"> 7 </span> -<span id="L8" class="LineNr"> 8 </span>== code +<span id="L8" class="LineNr"> 8 </span>== code 0x09000000 <span id="L9" class="LineNr"> 9 </span><span class="subxComment"># instruction effective address register displacement immediate</span> <span id="L10" class="LineNr">10 </span><span class="subxS1Comment"># . op subop mod rm32 base index scale r32</span> <span id="L11" class="LineNr">11 </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> @@ -82,7 +82,7 @@ if ('onhashchange' in window) { <span id="L25" class="LineNr">25 </span> b8/copy-to-EAX 1/imm32/exit <span id="L26" class="LineNr">26 </span> cd/syscall 0x80/imm8 <span id="L27" class="LineNr">27 </span> -<span id="L28" class="LineNr">28 </span>== data +<span id="L28" class="LineNr">28 </span>== data 0x0a000000 <span id="L29" class="LineNr">29 </span> <span id="L30" class="LineNr">30 </span><span class="SpecialChar">Size</span>: <span class="subxComment"># size of string</span> <span id="L31" class="LineNr">31 </span> 0x0e/imm32 <span class="subxComment"># 14</span> diff --git a/html/subx/examples/ex7.subx.html b/html/subx/examples/ex7.subx.html index 98468078..996cb242 100644 --- a/html/subx/examples/ex7.subx.html +++ b/html/subx/examples/ex7.subx.html @@ -68,7 +68,7 @@ if ('onhashchange' in window) { <span id="L11" class="LineNr"> 11 </span><span class="subxComment"># $ echo $?</span> <span id="L12" class="LineNr"> 12 </span><span class="subxComment"># 97</span> <span id="L13" class="LineNr"> 13 </span> -<span id="L14" class="LineNr"> 14 </span>== code +<span id="L14" class="LineNr"> 14 </span>== code 0x09000000 <span id="L15" class="LineNr"> 15 </span><span class="subxComment"># instruction effective address register displacement immediate</span> <span id="L16" class="LineNr"> 16 </span><span class="subxS1Comment"># . op subop mod rm32 base index scale r32</span> <span id="L17" class="LineNr"> 17 </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> @@ -148,7 +148,7 @@ if ('onhashchange' in window) { <span id="L91" class="LineNr"> 91 </span> b8/copy-to-EAX 1/imm32/exit <span id="L92" class="LineNr"> 92 </span> cd/syscall 0x80/imm8 <span id="L93" class="LineNr"> 93 </span> -<span id="L94" class="LineNr"> 94 </span>== data +<span id="L94" class="LineNr"> 94 </span>== data 0x0a000000 <span id="L95" class="LineNr"> 95 </span> <span id="L96" class="LineNr"> 96 </span><span class="SpecialChar">Stream</span>: <span id="L97" class="LineNr"> 97 </span> 0/imm32 diff --git a/html/subx/examples/ex8.subx.html b/html/subx/examples/ex8.subx.html index 03c23e36..b65a4faa 100644 --- a/html/subx/examples/ex8.subx.html +++ b/html/subx/examples/ex8.subx.html @@ -72,7 +72,7 @@ if ('onhashchange' in window) { <span id="L14" class="LineNr">14 </span><span class="subxComment"># ...</span> <span id="L15" class="LineNr">15 </span><span class="subxComment"># Locals start from ESP-4 downwards.</span> <span id="L16" class="LineNr">16 </span> -<span id="L17" class="LineNr">17 </span>== code +<span id="L17" class="LineNr">17 </span>== code 0x09000000 <span id="L18" class="LineNr">18 </span><span class="subxComment"># instruction effective address register displacement immediate</span> <span id="L19" class="LineNr">19 </span><span class="subxS1Comment"># . op subop mod rm32 base index scale r32</span> <span id="L20" class="LineNr">20 </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> @@ -97,19 +97,19 @@ if ('onhashchange' in window) { <span id="L39" class="LineNr">39 </span> 8b/copy 1/mod/*+disp8 4/rm32/sib 4/base/ESP 4/index/none <span class="Normal"> . </span> 2/r32/EDX 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ESP+4) to EDX</span> <span id="L40" class="LineNr">40 </span> <span class="subxComment"># var result/EAX = 0</span> <span id="L41" class="LineNr">41 </span> b8/copy-to-EAX 0/imm32 -<span id="L42" class="LineNr">42 </span><span class="Constant">$ascii-length-loop</span>: +<span id="L42" class="LineNr">42 </span><span class="Constant">$ascii-length:loop</span>: <span id="L43" class="LineNr">43 </span> <span class="subxComment"># var c/ECX = *s</span> <span id="L44" class="LineNr">44 </span> 8a/copy-byte 0/mod/* 2/rm32/EDX <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/CL <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy byte at *EDX to CL</span> <span id="L45" class="LineNr">45 </span> <span class="subxComment"># if (c == '\0') break</span> <span id="L46" class="LineNr">46 </span> 81 7/subop/compare 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> 0/imm32 <span class="subxComment"># compare ECX</span> -<span id="L47" class="LineNr">47 </span> 74/jump-if-equal $ascii-length-ret/disp8 +<span id="L47" class="LineNr">47 </span> 74/jump-if-equal $ascii-length:end/disp8 <span id="L48" class="LineNr">48 </span> <span class="subxComment"># ++s</span> <span id="L49" class="LineNr">49 </span> 42/increment-EDX <span id="L50" class="LineNr">50 </span> <span class="subxComment"># ++result</span> -<span id="L51" class="LineNr">51 </span> 40/inc-EAX +<span id="L51" class="LineNr">51 </span> 40/increment-EAX <span id="L52" class="LineNr">52 </span> <span class="subxComment"># loop</span> -<span id="L53" class="LineNr">53 </span> eb/jump $ascii-length-loop/disp8 -<span id="L54" class="LineNr">54 </span><span class="Constant">$ascii-length-ret</span>: +<span id="L53" class="LineNr">53 </span> eb/jump $ascii-length:loop/disp8 +<span id="L54" class="LineNr">54 </span><span class="Constant">$ascii-length:end</span>: <span id="L55" class="LineNr">55 </span> <span class="subxComment"># return EAX</span> <span id="L56" class="LineNr">56 </span> c3/return <span id="L57" class="LineNr">57 </span> diff --git a/html/subx/examples/ex9.subx.html b/html/subx/examples/ex9.subx.html index ab4693d3..38663f30 100644 --- a/html/subx/examples/ex9.subx.html +++ b/html/subx/examples/ex9.subx.html @@ -74,7 +74,7 @@ if ('onhashchange' in window) { <span id="L17" class="LineNr">17 </span><span class="subxComment"># ...</span> <span id="L18" class="LineNr">18 </span><span class="subxComment"># Locals start from ESP-4 downwards.</span> <span id="L19" class="LineNr">19 </span> -<span id="L20" class="LineNr">20 </span>== code +<span id="L20" class="LineNr">20 </span>== code 0x09000000 <span id="L21" class="LineNr">21 </span><span class="subxComment"># instruction effective address register displacement immediate</span> <span id="L22" class="LineNr">22 </span><span class="subxS1Comment"># . op subop mod rm32 base index scale r32</span> <span id="L23" class="LineNr">23 </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> |