Re: Converting PBP interrupt to ASM - 18F25K20
The Access Bank consists of the first 96 bytes of memory(00h-5Fh) so if you create your asm vars in that space you can use the opcode access field rather than needing to switch banks
eg
ppm_n var byte $5f [in access bank]
pausetime var byte $5d [in access bank]
asm
movf _ppm_n, W ,a
...
movf _pausetime, W,a
or let pbp store the vars anywhere it likes
ppm_n var byte [anywhere]
pausetime var byte
asm
banksel _ppm_n
movf _ppm_n, W
...
banksel _pausetime
movf _pausetime, W
or store all the asm vars in the same bank
ppm_n var byte bank0
pausetime var byte bank0
asm
banksel 0
movf _ppm_n, W
...
movf _pausetime, W
Warning I'm not a teacher
Bookmarks