Need a translation for some asm used in Flexgui
evil_aaronm
Posts: 11
in Propeller 2
Hi! I'm using Chip's FFT asm example* from within a Flexgui C program. The inclusion of the assembler in the C code seems to be Ok except for the following:
* forums.parallax.com/discussion/170948/1024-point-fft-in-79-longs/p2
Here are those lines in particular:
I copied everything from the "' Fast Fourier Transform, 1024-point" line and below from the example. It's pretty clear Flexgui doesn't like the "encode" construct - though this call doesn't seem to cause any problems:
I don't know enough about Propeller asm to modify this to prevent the compiler from choking on it. Any suggestions? If Chip's FFT routine works well as-is, I'd rather not rewrite it to C, if I can avoid it.
Thanks!
Aaron
* forums.parallax.com/discussion/170948/1024-point-fft-in-79-longs/p2
P2_pin_pulse.c:130: error: syntax error, unexpected asm instruction P2_pin_pulse.c:145: error: syntax error, unexpected asm instruction P2_pin_pulse.c:225: error: syntax error, unexpected asm instruction
Here are those lines in particular:
135 shl i2,#32-(encod 1024) 145 decod i1,#encod(1024 >> 1) //init counters 225 shr ptra,#32 - (encod 1024) - 3 //3 for two longs per pair)
I copied everything from the "' Fast Fourier Transform, 1024-point" line and below from the example. It's pretty clear Flexgui doesn't like the "encode" construct - though this call doesn't seem to cause any problems:
152 encod shift,i1
I don't know enough about Propeller asm to modify this to prevent the compiler from choking on it. Any suggestions? If Chip's FFT routine works well as-is, I'd rather not rewrite it to C, if I can avoid it.
Thanks!
Aaron
Comments
So just replace all the terms with 10. It's anyway not configurable because 1024 is also written as a constant.
It may be that flexC does not support encod or the old form: >| in constant expressions.
Andy