need help understanding " cognew "
TC
Posts: 1,019
I am having troble understanding cognew. using page 190 of the Propeller manual 1.0 as an example. How dose " X " becomes " XAddr "? I am not putting 2 & 2 together
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
We all make mistakes when we are young………That’s why paste is edible!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
We all make mistakes when we are young………That’s why paste is edible!
Comments
In the manual, they're passing the address of 'X' to the 'Square' function, which calls it 'XAddr'. To get the long variable at XAddr, they use 'long[noparse][[/noparse]XAddr]', which they multiply times itself.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
We all make mistakes when we are young………That’s why paste is edible!
PUB Start (backlight, rate)
· cognew ( Flash_BL(backlight, rate),@stack)
PUB Flash_BL
· repeat
··· outa [noparse][[/noparse]backlight] := 1
··· waitcnt(((CLKFREQ * rate)/ 32) + CNT)
··· outa [noparse][[/noparse]backlight] := 0
··· waitcnt(((CLKFREQ * rate)/ 64) + CNT)
"Propeller Tool" keeps cumming up saying that there should be a "," between "Flash_BL" & "(". everywhere I look in the manual for "cognew" there is the same setup that I am using. what am I doing wrong?
thanks
TC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
We all make mistakes when we are young………That’s why paste is edible!
TC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
We all make mistakes when we are young………That’s why paste is edible!