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
WLDR Instruction
Moderator: 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.
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
Experimental Noize
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?
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
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
Experimental Noize