The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Declaring arrays with constants (*solved*)
#6
LTee Wrote:...
Code:
'constants const DGMAXX as ubyte = 10 const DGMAXY as ubyte = 10 'dungeon data dim dgConnected(DGMAXY, DGMAXX) as ubyte
...

well, i think what i’m really missing is this:
Code:
dim dgConnected(DGMAXY, DGMAXX) as ubyte at $E000
(just like as we do for allocating variables to different memory addresses)

so that would take around 121 bytes (11*11 (i guess it’s 11, because it is an array from 0 to 10?) ) starting from $E000 - i’m needing this a lot, because when we patch ZX-Basic resulting binaries to rom files (such as on cartridge roms for Sega 8-bit consoles, ColecoVision, MSX, etc.), we really need to use peeks and pokes instead of arrays, since we can’t allocate arrays outside the rom area

i really have no idea how difficult would be implementing it
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)