FIX_REFERENCES: Value ($114) of "DURATION" is too How can I fix and error "FIX_REFERENCES: Value ($114) of "DURATION" is too much to be a 8bit value."?
Do I need to use banks or something?
BillW- 07-30-2005
It means you're trying to store a 16-bit value ($114=276 decimal) into an 8 bit register.
You either need to use an 8 bit value, or you need to store $14 in one register and $01 in the next and use 16 bit arithmetic.
zapped- 07-30-2005
actually there are just very small numbers in duration
RANDSEQ: .DSB 256 $00
SEQPOS:
.DB $00
PLAYERPOS:
.DB $00
NOTES:
.DB $46,$4f,$58,$4f,$46,$46,$46,$4f,$4f,$4f,$46,$46,$46,$46,$4f,$58,$4f,$46,$46,$46,$46,$4f,$4f,$46,$4f,$58,$58,$00,$FF
DURATION:
.DB $03,$03,$03,$03,$03,$03,$06,$03,$03,$06,$03,$03,$06,$03,$03,$03,$03,$03,$03,$03,$03,$03,$03,$03,$03,$06,$06,$33
however there is a fairly large amount of code and other data. when I decrease the number of bytes of RANDSEQ to say 25, it compiles just fine
BillW- 07-30-2005
Ah, I see. The problem is that you've used the duration label in register load, and it's at a location that's not 8-bit. A quick solution is to move the duration data to the top of the program and just JMP over it. This has the weakness that none of your data can excede the first 256 bytes.
Ultimately, it's more universal to manually break apart the 16-bit address of the data into 2 8-bit registers. (there's no way to break apart a label into 8 bit components in pv2ass)
Then if you need to increment the registers to walk through the data, use the UPP command.
zapped- 07-30-2005
Ah, I see. The problem is that you've used the duration label in register load, and it's at a location that's not 8-bit. A quick solution is to move the duration data to the top of the program and just JMP over it. This has the weakness that none of your data can excede the first 256 bytes.
Ultimately, it's more universal to manually break apart the 16-bit address of the data into 2 8-bit registers. (there's no way to break apart a label into 8 bit components in pv2ass)
Then if you need to increment the registers to walk through the data, use the UPP command.
ok, so would it make sense to put all data that I knew would fit in the first 256 bytes first, followed by the data that would exceed the 256 limit (probably RANDSEQ and NOTES and DURATION). I am just not sure how I would go about reading or writing the data. How do I break apart the 16-bit data address and then read the data there?
Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.