Hey there,
I have a question regarding labels in Octo. I want to have a look-up table of labels that point to data:
: my-data image-1 image-2 image-3 : image-1 0xFF 0x00 0xFF # Et cetera
I use this table to look up the address of the right image and load that in "i" with some self-modifying code that adds a 0xA0 (load i) prefix. And it seemed to be working quite well so far.
However, now that my program has passed the 3,5k mark I'm getting an error "Value '<much>' for label 'image-1' cannot not fit in 12 bits!" (there's a small spelling mistake in that error, by the way). This has lead me to realise that my table of labels doesn't really compile to a table of addresses, but to a table of call statements. And the fact that I AND those statements with the right nibble in my self-modifying code has kept that fact hidden from me.
So the question is... does Octo have a way to just put the address of a given label in the output binary? I looked through the manual, but didn't really find anything.
This example shows a table like this:
: table i := 0x123 ; i := 0x456 ; i := 0x789 ; i := 0xABC ; i := 0xDEF ;
Which would work with "i := long <label>;" too, I guess. But that would be six bytes per entry, instead of two. Seems like a waste :)