WLDR Instruction

Software questions and issues with the FV-1

Moderator: frank

Post Reply
Colin
Posts: 8
Joined: Thu Oct 23, 2014 9:58 am

WLDR Instruction

Post by Colin »

I'm trying to make sense of the WLDR instruction in rom_pitch.spn:

wldr 0, 0, 4096

The notes say:
'''
wldr rmp0,freq,amp

There are two RAMP generators in the FV-1, RMP0 and RMP1
The frequency variable is a 16 bit value
The frequency variable is a 2 bit value 00 (0)=512, 01 (1)=1024, 10 (2)=2048 and 11 (3)=4096
'''

Conflicting information about the freq variable... Should it say "The amplitude variable is a 2 bit value..." But then, in rom_pitch the amp=4096 (not a 2 bit value).

Any insights would be greatly appreciated!
-Colin
--Colin
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

Which note says "The frequency variable is a 2 bit value "? That must be a typo I need to fix. Amp is a 2-bit value.

Yes, 4096 is larger than 2-bits but the assembler is treating it as a symbol in this instruction not a literal value so it sees 4096 and uses the proper 2-bit value in the assembled instruction.
Frank Thomson
Experimental Noize
Colin
Posts: 8
Joined: Thu Oct 23, 2014 9:58 am

Post by Colin »

That typo is under Knowledge Base -> SpinAsm instructions and syntax -> WLDR

Thanks for clearing this up!

-Colin 8)
--Colin
Colin
Posts: 8
Joined: Thu Oct 23, 2014 9:58 am

Post by Colin »

If the 4096 is interpreted as a symbol, could you use %11 to get the same result?

From Knowledge Base -> Programming the FV-1:
"Labels may be equated with equations, numbers in decimal, binary (preceded by the % symbol) or hexadecimal (preceded with the $ symbol)."

I also take it that for hex you can use 0x prefix as well?
--Colin
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

I've never tried it and I did not write the assembler so I say give it a try. If it works then great! If not then we all learned something new about it. If the parser was written correctly it should recognize the % or 0x
Frank Thomson
Experimental Noize
Post Reply