Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
INK 8 and DIM issues (*solved*)
#1
Hi - I posted these in the blog comments before I realised that this forum existed, so I've reposted them here in case they go unnoticed "out there". :-D

----

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.

e.g.
Code:
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.

e.g.
Code:
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.


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)