PDA

View Full Version : asm in PBP



rastan
- 19th February 2005, 21:50
hey again, i asked this before but people are seeming to avoid my last post so ill put things a bit clearer.

is it possible to use variables that were defined in assembler, in picbasic. if so, how?

in the manual it state that it is not possible but then says something about defining the variable in assambler AND in basic. is this the case?

cheers

phil

mister_e
- 19th February 2005, 22:05
YES... use it like if it was declare in PBP.

I mean if you have declare MYASMVAR in assembler....

if MYASMVAR=XYZ then DoSomething

BUT if you want to access to your PBP VAR in ASM, you'll have to add an underscore character before

ASM
SWAPF _MyPBPVAR,0
'
'
'
END ASM

look at this thread that use R2 to recall the remainder of a DIV32
http://www.picbasic.co.uk/forum/showthread.php?s=&threadid=48&highlight=remainder

Same as for FLAGS to clear LCD initial setup:
http://www.picbasic.co.uk/forum/showthread.php?s=&threadid=631&highlight=connect+and+lcd%2A

and how many other ;)

rastan
- 19th February 2005, 23:00
thanks again steve. keep up the good work :D