Wed Jul 23 14:01:16 CEST 2008
Synth doesn't work. Time to get piklab-prog to work without having to
re-plug the board: using run etc.. OK
The problem seems to be in the binary code chunking: the first chunk
it produces is correct, but the remaining ones are not:
(map car (car *bin*))
(576 0 688 48 50 2142)
The problem is data chunks. How do they end up in the code? The
problem is conversion of words to binary: this should take only code
words. the error is in 'target-chain->bin : added a realm filter.
Looks like there's still a problem: there are 3 code chunks remaining
box> (map car (car (bin)))
(576 688 2142)
The problem could be that data chunks do not get disconnected. Looks
like that was it: added 'terminate-chain after variable macro.
Ok, booted the synth, but it doesn't work properly. This means i get a
chance to test some of the debug features.
There's something wrong with the 2nd instruction 089A E1B3 [bpz _L717
1]. The address is way off. 3 is correct, but where does the 'B' come
from? (It should be E103).
compile> : boo 0 xor z? if -1 else 0 then ;
0898 0A00 [xorlw 0]
089A E1B3 [bpz _L717 1]
089C 6EEC [dup]
089E 0EFF [movlw -1]
08A0 D002 [jsr 1 _L718]
08A2 6EEC [dup]
08A4 0E00 [movlw 0]
08A6 0012 [return 0]
The 3 above looks like it's accidental.
compile> : boo z? if 123 then
08A8 E1AC [bpz _L719 1]
08AA 6EEC [dup]
08AC 0E7B [movlw 123]
This should be E102
Let's go back to only the monitor.
This is a problem with this:
(bpc (p R) "1110 001p RRRR RRRR")
(bpn (p R) "1110 011p RRRR RRRR")
(bpov (p R) "1110 010p RRRR RRRR")
(bpz (p R) "1110 000p RRRR RRRR")
wich i thought was fixed. This line was wrong:
(([flag? opc p] [qw l] or-jump) ([,opc (flip p) l]))
compile> : foo z? if 123 then
0240 E102 [bpz 1 _L184]
0242 6EEC [dup]
0244 0E7B [movlw 123]