[PicForth] Dumb question - 'code' words and register banks
David McNab
david at rebirthing.co.nz
Sun Nov 14 17:21:57 CET 2004
Hi,
When writing 'code' words, what's the best/quickest way to insert the
appropriate bank-selection (rp0 b[s|c]f, rp1 b[s|c]f) instructions
before accessing a variable?
For example:
variable fred
...
code someword
... magic word here to set RP0 and RP1 correctly...
someword ,w movf
$3f xorlw
...
end-code
I know that for pure-target-forth words, PicForth's aggressive
heuristics take care of generating these instructions automatically, but
this doesn't extend into PicForth's parsing of assembler.
Or should I just manually keep track of which banks which vars live in,
and write in the rp0/1 bsf/bcf instructions by hand?
--
Cheers
David
More information about the PicForth
mailing list