tmp: debugging why brline prints no pixels

Among other things, we turned off the trace to significantly speed up the
debug cycle.

State as of https://merveilles.town/@akkartik/106079258606146213

Ohhh, as I save the commit I notice a big problem: I've been editing the
disk image directly because writes to the Mu disk lose indentation. But
I've been forgetting that the state in the Mu disk needs to be pre-evaluated.
So function bindings need extra parens for the environment. The `pixel`
calls in the previous commit message are the first statement in the body,
and they aren't actually considered part of the body right now. No wonder
they don't run.

There are lots of other problems, but this will clarify a lot.
This commit is contained in:
Kartik K. Agaram 2021-04-17 08:30:01 -07:00
parent 1a74c3a1e6
commit 1354161a36
2 changed files with 14 additions and 14 deletions

View File

@ -12,19 +12,19 @@
Entry:
# initialize stack
bd/copy-to-ebp 0/imm32
#? (main 0 0 Primary-bus-secondary-drive)
# always first run tests
(run-tests)
(num-test-failures) # => eax
# call main if tests all passed
{
3d/compare-eax-and 0/imm32
75/jump-if-!= break/disp8
(clear-real-screen)
c7 0/subop/copy *Real-screen-cursor-x 0/imm32
c7 0/subop/copy *Real-screen-cursor-y 0/imm32
(main 0 0 Primary-bus-secondary-drive)
}
(main 0 0 Primary-bus-secondary-drive)
#? # always first run tests
#? (run-tests)
#? (num-test-failures) # => eax
#? # call main if tests all passed
#? {
#? 3d/compare-eax-and 0/imm32
#? 75/jump-if-!= break/disp8
#? (clear-real-screen)
#? c7 0/subop/copy *Real-screen-cursor-x 0/imm32
#? c7 0/subop/copy *Real-screen-cursor-y 0/imm32
#? (main 0 0 Primary-bus-secondary-drive)
#? }
# hang indefinitely
{

View File

@ -29,7 +29,7 @@ fn initialize-sandbox _self: (addr sandbox), screen-and-keyboard?: boolean {
}
#
var trace-ah/eax: (addr handle trace) <- get self, trace
allocate trace-ah
#? allocate trace-ah
var trace/eax: (addr trace) <- lookup *trace-ah
initialize-trace trace, 0x8000/lines, 0x80/visible-lines
var cursor-in-data?/eax: (addr boolean) <- get self, cursor-in-data?