My first ASM dosent work
This is my first try at Assembly but it is not working out so well. I am trying to launch a new cog add two floating point numbers and display the result on the terminal. The following is the spin portion of the code and attached is the ASM routine.
If i run the spin code without the cognew everything displays on the terminal as expected (other than the answer) but when I try to run the Spin with ASM code random characters are displayed on the terminal. It seems like my ASM code is causing problems with the fullduplexserial. I need help finding the bug.
OBJ
ss : "floatstring"
debug : "fullduplexserial"
PUB Main
Num1 := 10.0
Num2 := 100.00
Debug.start(31, 30, 0, 9600)
repeat while Input <>= 13 'wait until enter is pressed in terminal
Input := Debug.rx
debug.str(string("RUNNING"))
debug.tx(13)
cognew(@start,@Num1) 'start the addition in a new cog ~~~causes all the problems~~
waitcnt(clkfreq +cnt)
debug.str(ss.floattostring(num1)) 'does not work with @
debug.tx(13)
debug.str(ss.floattostring(num2))
debug.tx(13)
debug.str(ss.floattostring(Ans))
debug.tx(13)
debug.str(string("DONE"))
If i run the spin code without the cognew everything displays on the terminal as expected (other than the answer) but when I try to run the Spin with ASM code random characters are displayed on the terminal. It seems like my ASM code is causing problems with the fullduplexserial. I need help finding the bug.

Comments
or
cogid mem cogstop memafter the WRLONG.