[<<][staapl][>>][..]
Wed Jun 11 11:27:43 CEST 2008

error reporting

box> (assemble! (all-code))
asm-overflow: (bpz (p R) ((112 . 7) (p . 1) (R . 8))) (bpz 126 1) (-131 8 -1)

that's nice, but where does it come from? what i want to know here is:

       * where in the assembly code does this happen
       * what is the corresponding source location

the latter might be difficult, but at least it should be possible to
find out in which word this is.

ok, got better error reporting now: it tells you which word chain it's
in, and dumps out the assembler code before it re-raises the
exception.

/home/tom/staapl/pic18/interpreter.f:59:2: n!f+
n!f+:
	[jsr 0 async.rx>]
	[movwf 4068 0]
	[drop]
_L72:
	[jsr 0 async.rx>]
	[movwf 4085 0]
	[tblwt*+]
	[drop]
_L75:
	[decf 4071 1 0]
	[bpz _L72 1]
	[movf POSTDEC1 1 0]
	[jsr 1 ack]
asm-overflow: (bpz (p R) ((112 . 7) (p . 1) (R . 8))) (bpz 129 1) (-134 8 -1)


the problem is quite clear now: relative instructions need to be
initialized differently so they don't overflow in the first pass.

no.. problem is something else:

 (bpz      (p R)     "1110 000p RRRR RRRR")


p is the first argument.

where did that come from?

i think i remember: all jump instructions were changed such that the
target address is the first argument. however, apperently the
assembler hasn't changed accordingly. this looks like a relic. let's
change it back..

ok, seems to work now.

next problem: all jumps are long. (typo)
next problem: dead code elimination for jump tables (fixed)
next problem: org



[Reply][About]
[<<][staapl][>>][..]