From 3ff2fe607c2cb5690d201d3b83ddcc957e949b7a Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 9 Nov 2021 09:23:31 -0800 Subject: . --- html/linux/120allocate.subx.html | 43 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'html/linux/120allocate.subx.html') diff --git a/html/linux/120allocate.subx.html b/html/linux/120allocate.subx.html index df51d7ce..5c4c9039 100644 --- a/html/linux/120allocate.subx.html +++ b/html/linux/120allocate.subx.html @@ -14,16 +14,17 @@ pre { font-family: monospace; color: #000000; background-color: #ffffd7; } body { font-size:12pt; font-family: monospace; color: #000000; background-color: #ffffd7; } a { color:inherit; } * { font-size:12pt; font-size: 1em; } +.subxMinorFunction { color: #875f5f; } .subxComment { color: #005faf; } +.subxS1Comment { color: #0000af; } .subxS2Comment { color: #8a8a8a; } .LineNr { } -.subxFunction { color: #af5f00; text-decoration: underline; } -.subxS1Comment { color: #0000af; } -.Constant { color: #008787; } -.SpecialChar { color: #d70000; } .Normal { color: #000000; background-color: #ffffd7; padding-bottom: 1px; } -.subxMinorFunction { color: #875f5f; } .subxTest { color: #5f8700; } +.SpecialChar { color: #d70000; } +.Constant { color: #008787; } +.CommentedCode { color: #8a8a8a; } +.subxFunction { color: #af5f00; text-decoration: underline; } --> @@ -103,22 +104,22 @@ if ('onhashchange' in window) { 42 # . op subop mod rm32 base index scale r32 43 # . 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 44 - 45 # Let's start initializing the default allocation descriptor. - 46 - 47 Entry: - 48 # initialize heap - 49 # . Heap = new-segment(Heap-size) - 50 # . . push args - 51 68/push Heap/imm32 - 52 ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 . . . Heap-size/disp32 # push *Heap-size - 53 # . . call - 54 e8/call new-segment/disp32 - 55 # . . discard args - 56 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 45 #? # Let's start initializing the default allocation descriptor. + 46 #? + 47 #? Entry: + 48 #? # initialize heap + 49 #? # . Heap = new-segment(Heap-size) + 50 #? # . . push args + 51 #? 68/push Heap/imm32 + 52 #? ff 6/subop/push 0/mod/indirect 5/rm32/.disp32 . . . Heap-size/disp32 # push *Heap-size + 53 #? # . . call + 54 #? e8/call new-segment/disp32 + 55 #? # . . discard args + 56 #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 57 58 e8/call run-tests/disp32 # 'run-tests' is a function created automatically by SubX. It calls all functions that start with 'test-'. 59 $array-equal-main:end: - 60 # syscall(exit, Num-test-failures) + 60 # syscall_exit(Num-test-failures) 61 8b/copy 0/mod/indirect 5/rm32/.disp32 . . 3/r32/ebx Num-test-failures/disp32 # copy *Num-test-failures to ebx 62 e8/call syscall_exit/disp32 63 @@ -222,7 +223,7 @@ if ('onhashchange' in window) { 161 e8/call _write/disp32 162 # . . discard args 163 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -164 # . syscall(exit, 1) +164 # . syscall_exit(1) 165 bb/copy-to-ebx 1/imm32 166 e8/call syscall_exit/disp32 167 # never gets here @@ -353,7 +354,7 @@ if ('onhashchange' in window) { 292 e8/call _write/disp32 293 # . . discard args 294 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -295 # . syscall(exit, 1) +295 # . syscall_exit(1) 296 bb/copy-to-ebx 1/imm32/exit-status 297 e8/call syscall_exit/disp32 298 @@ -635,7 +636,7 @@ if ('onhashchange' in window) { 574 e8/call _write/disp32 575 # . . discard args 576 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -577 # . syscall(exit, 1) +577 # . syscall_exit(1) 578 bb/copy-to-ebx 1/imm32 579 e8/call syscall_exit/disp32 580 # never gets here -- cgit 1.4.1-2-gfad0