PDA

View Full Version : ICCV7 Assemby File problems



tellurian
03-16-2009, 12:45 AM
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)

jazzed
03-16-2009, 01:05 AM
Any ".long" must be preceeded by a TAB. This very annoying bug may be fixed in the latest version ICCV704C.

There are other issues with the assembler that I've run into working on the kernel.s file ... the assembler program crashes (not the ide) with certain things there because of hardcoded addresses (not unreasonable for that file) ... I don't know how common it is with non-kernel.s files, but any program crash with no reason at some point should be fixed.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve


Propalyzer: Propeller PC Logic Analyzer (http://www.brouhaha.com/~sdenson/Propalyzer)
http://forums.parallax.com/showthread.php?p=788230 (http://forums.parallax.com/showthread.php?p=788230)

tellurian
03-16-2009, 01:16 AM
jazzed said...
Any ".long" must be preceeded by a TAB. This very annoying bug may be fixed in the latest version ICCV704C.

There are other issues with the assembler that I've run into working on the kernel.s file ... the assembler program crashes (not the ide) with certain things there because of hardcoded addresses (not unreasonable for that file) ... I don't know how common it is with non-kernel.s files, but any program crash with no reason at some point should be fixed.


I turn off tabs, but I guess I will have to turn them back on. I hoped that ICCV704C would solve my problem but after downloading it I cannot compile anything, even previous unchanged code that built fine with ICCV704B. Richard Man at Imagecraft will look into this when he gets back.

OK, I just tried it, it worked, thanks. I hope to get back to no tab characters soon though.

Your basic outline of ICCV7 "object" content looks good to me.

regards,
Allen