#lang scheme/unit
(require
"../sig.ss"
"sig.ss"
"../coma/macro.ss"
"../control/op.ss"
"asm.ss"
"pic18-const.ss"
)
(import control^ jump^ cfg^ pic18-extra^ memory-extra^ pic18-assembler^)
(export rstack^)
(patterns
(macro)
(([qw l] jw/nz) ([bpz 1 l]))
((rdrop) ([movf POSTDEC1 1 0]))
)
(compositions
(macro) macro:
(for0 >r begin)
(next0 sym label: r1- m> jw/nz
rdrop)
(for for0)
(next next0)
(+r PREINC1)
(r- POSTDEC1)
(r INDF1)
(rl FSR1L)
(rh FSR1H)
(>r +r !)
(r@ r @)
(r> r- @)
(r1- r 1-!)
(swap>r 2nd- +r movff)
(over>r 2nd +r movff)
)