PASM Question for register Indirect
Surac
Posts: 176
given the following code that should print out the COG ram on serial port in PASM
serOutCog jmprel #+1 .counter long 1 mov .counter, #0 .loop call #serCRNL mov _serOutAddr_Arg0,.counter 'this will print the Address call #serOutAddr call #serSeperator mov _serOutLong_Arg0,.counter 'Wrong. How to copy the value IN the COG register number .counter?? call #serOutLong add .counter,#1 cmp .counter,#$1FF wc IF_C jmp #.loop ret
how to mov the value inside Memory location .counter to _serOutLong_Arg0 ?
_serOutLong_Arg0 is defined as long 1 in the COG
Comments
Use the ALTx instructions. The documentation has the details.
This works only with cog ram, right?
Tor LUT and HUB there are other ways, right?
Addresses will warp if i go over $1FF, right?
Yes, ALTx is for cog RAM only.
For LUT you use RDLUT/WRLUT, for hub you use all the other RD/WR instructions (and WMLONG)
yes
Thank you very much
Does this mean that the P2 has a built in Warp drive and you can activate it if you access the cogram behind $1FF ?
yes
But only after this instruction:
ENGAGE