tellurian
03-15-2009, 11:45 PM
I decided to delve into PASM but with ICCV7. I can create assembler source files and compile OK (still at the blinky LED stage) but when I try to add some data no matter what I do the compiler rejects it as an invalid mnemonic. Note that the syntax is slightly different between the Prop Tool and ICCV7.
for example: (the blinky LED)
.area cog(abs)
_blink::
rdlong USER1, par ; read in the pin to toggle
mov USER0, #1 ; convert pin to bit mask
shl USER0, USER1
or DIRA, USER0 ; set the pin to output
mov USER1, #1 ; create wait delay
shl USER1, #23 ; = 8388608 ~ 0.1048576 sec
mov USER2, cnt ; setup wait count
add USER2, USER1
lp: xor OUTA, USER0 ; xor pin state to toggle
waitcnt USER2, USER1 ; wait delay time
jmp #lp ; repeat
If I try to add some data (clock delay value in this case) using:
dat1: .long 8000000
or
dat1: long 8000000
It always fails with and "illegal mnemonic specified" error.
I can't find any code examples for ICCV7 and the documentation is, well, poor (non existent with regard to ASM).
This is a silly thing to get stuck on (I feel foolish) but I am stuck. Hopefully someone can send me some samples or info.
thanks,
-tellurian (Allen)
for example: (the blinky LED)
.area cog(abs)
_blink::
rdlong USER1, par ; read in the pin to toggle
mov USER0, #1 ; convert pin to bit mask
shl USER0, USER1
or DIRA, USER0 ; set the pin to output
mov USER1, #1 ; create wait delay
shl USER1, #23 ; = 8388608 ~ 0.1048576 sec
mov USER2, cnt ; setup wait count
add USER2, USER1
lp: xor OUTA, USER0 ; xor pin state to toggle
waitcnt USER2, USER1 ; wait delay time
jmp #lp ; repeat
If I try to add some data (clock delay value in this case) using:
dat1: .long 8000000
or
dat1: long 8000000
It always fails with and "illegal mnemonic specified" error.
I can't find any code examples for ICCV7 and the documentation is, well, poor (non existent with regard to ASM).
This is a silly thing to get stuck on (I feel foolish) but I am stuck. Hopefully someone can send me some samples or info.
thanks,
-tellurian (Allen)