From f0e146fc7b947bae526657d8c858a95319abf204 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 1 May 2021 23:52:28 -0700 Subject: . --- html/mu-init.subx.html | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'html/mu-init.subx.html') diff --git a/html/mu-init.subx.html b/html/mu-init.subx.html index cc77fcce..8aa49531 100644 --- a/html/mu-init.subx.html +++ b/html/mu-init.subx.html @@ -68,24 +68,30 @@ if ('onhashchange' in window) { 12 Entry: 13 # initialize stack 14 bd/copy-to-ebp 0/imm32 -15 #? (main 0 0 Primary-bus-secondary-drive) -16 # always first run tests -17 (run-tests) -18 (num-test-failures) # => eax -19 # call main if tests all passed -20 { -21 3d/compare-eax-and 0/imm32 -22 75/jump-if-!= break/disp8 -23 (clear-real-screen) -24 c7 0/subop/copy *Real-screen-cursor-x 0/imm32 -25 c7 0/subop/copy *Real-screen-cursor-y 0/imm32 -26 (main 0 0 Primary-bus-secondary-drive) -27 } -28 -29 # hang indefinitely -30 { -31 eb/jump loop/disp8 -32 } +15 # Clear memory location 0 to ensure that uninitialized arrays run afoul of +16 # the bounds checker. +17 # TODO: This is utterly bonkers, and does not actually protect us against +18 # all null pointer reads/writes. Create a real page table sometime. +19 b8/copy-to-eax 0/imm32 +20 c7 0/subop/copy *eax 0/imm32 +21 #? (main 0 0 Primary-bus-secondary-drive) +22 # always first run tests +23 (run-tests) +24 (num-test-failures) # => eax +25 # call main if tests all passed +26 { +27 3d/compare-eax-and 0/imm32 +28 75/jump-if-!= break/disp8 +29 (clear-real-screen) +30 c7 0/subop/copy *Real-screen-cursor-x 0/imm32 +31 c7 0/subop/copy *Real-screen-cursor-y 0/imm32 +32 (main 0 0 Primary-bus-secondary-drive) +33 } +34 +35 # hang indefinitely +36 { +37 eb/jump loop/disp8 +38 } -- cgit 1.4.1-2-gfad0