Hi Boriel, just been messing around with the compiler a little with an old BASIC game I had lying around and I’m having a little trouble with the INK and PAPER commands.
In ZX Basic you can use INK 8 and PAPER 8 when printing to specify that the character should be printed in ‘whatever colour the screen currently is’, but this doesn’t seem to be supported at the minute by the compiler.
PRINT AT 0,0; INK 8; PAPER 8; “X”
… would be red/blue if position 0,0 was already red/blue, green/yellow if position 0,0 was already green/yellow, etc.
The code for setting ink and paper in the compiler appears to do an AND 7; on the passed parameter so it always gets printed as ‘black/black’.
Is there a way around this? I’m using the very latest dev version, btw.
Thanks for all your hard work!
Actually, while I’m here…
–array-base=1 seems to be broken in the latest dev build. If you use that parameter it is impossible to set the very first entry in the array (position 1) although subsequent positions are okay. A compiler warning is generated but the code crashes when it runs.
10 DIM p$(2)
20 LET p$(1) = “A”
30 LET p$(2) = “B”
The compiler generates a warning for line 20 (but not line 30) when given –array-base=1. The code works okay if line 20 is removed.