CALLD and LOC assembler question
Surac
Posts: 176
in Propeller 2
reading the assembler instruction table i stumbled across these 2 instructions
CALLD PA/PB/PTRA/PTRB,#{\}A EEEE 11100WW RAA AAAAAAAAA AAAAAAAAA Call to A by writing {C, Z, 10'b0, PC[19:0]} to PA/PB/PTRA/PTRB (per W). If R = 1 then PC += A, else PC = A. LOC PA/PB/PTRA/PTRB,#{\}A EEEE 11101WW RAA AAAAAAAAA AAAAAAAAA Get {12'b0, address[19:0]} into PA/PB/PTRA/PTRB (per W). If R = 1, address = PC + A, else address = A.
in the description the tern (per W) is used. does this mean:
- WW = 00 means CALLD PA
- WW = 01 means CALLD PB
- WW = 10 means CALLD PTRA
- WW = 11 means CALLD PTRB
?
Comments
WW does select PA/PB/PTRA/PTRB but I am not sure where the codes 0-3 are defined.
For confirmation, just compile a simple set of instructions with flexprop and look at the listing.
That's correct.
ww is offset from PA register.