From d1c9392a5461e0d33e226375a8f7986a97d2d66b Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 26 Nov 2018 01:19:47 -0800 Subject: 4782 --- html/subx/apps/factorial.subx.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'html/subx/apps/factorial.subx.html') diff --git a/html/subx/apps/factorial.subx.html b/html/subx/apps/factorial.subx.html index a30495cb..ea499438 100644 --- a/html/subx/apps/factorial.subx.html +++ b/html/subx/apps/factorial.subx.html @@ -16,7 +16,9 @@ a { color:#eeeeee; text-decoration: none; } a:hover { text-decoration: underline; } * { font-size: 12pt; font-size: 1em; } .LineNr { color: #444444; } +.Constant { color: #00a0a0; } .Delimiter { color: #800080; } +.Special { color: #c00000; } .Comment { color: #9090ff; } .Comment a { color:#0000ee; text-decoration:underline; } .SalientComment { color: #00ffff; } @@ -83,7 +85,7 @@ if ('onhashchange' in window) { 27 7e/jump-if-lesser-or-equal $run-main/disp8 28 # and if (argv[1] == "test") 29 # push args - 30 68/push "test"/imm32 + 30 68/push "test"/imm32 31 ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none . . 0x8/disp8 . # push *(EBP+8) 32 # call 33 e8/call kernel-string-equal/disp32 @@ -94,7 +96,7 @@ if ('onhashchange' in window) { 38 75/jump-if-not-equal $run-main/disp8 39 # then return run-tests() 40 e8/call run-tests/disp32 - 41 8b/copy 0/mod/indirect 5/rm32/.disp32 . . 0/r32/EAX Num-test-failures/disp32 # copy *Num-test-failures to EAX + 41 8b/copy 0/mod/indirect 5/rm32/.disp32 . . 0/r32/EAX Num-test-failures/disp32 # copy *Num-test-failures to EAX 42 eb/jump $main:end/disp8 # where EAX will get copied to EBX 43 # else EAX = factorial(5) 44 $run-main: @@ -151,7 +153,7 @@ if ('onhashchange' in window) { 95 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP 96 # check-ints-equal(EAX, 120, failure message) 97 # push args - 98 68/push "F - test-factorial"/imm32 + 98 68/push "F - test-factorial"/imm32 99 68/push 0x78/imm32/expected-120 100 50/push-EAX 101 # call -- cgit 1.4.1-2-gfad0