Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dim At Issue? (1.15.0-beta4)
#2
(03-09-2021, 08:07 PM)Ljg701 Wrote: Hello Boriel,

The following array initiation code I don't think is initiating the array data at the correct address. In the example below, the peek returns a value of 255 rather than 1, also @test doesn't return a value of $c000  (Version  1.15.0-beta4 + NextBuild)

Code:
'!ORG=24576
'!OPT=4

dim test(0 to 3) as ubyte => {1,2,3,4} at $C000

'this should return 1
print at 0,0;peek($c000)

do
loop until inkey$<>""

This is a bug in the sense that the compiler should report a syntax error.

It's not allowed to initialize an array with DIM AT (i.e. what if you initialize it into a ROM address?).
Allocation at a given memory address is not allowed (unless you declare asm code with ORG, which is NOT recommended).
Declaring things at given locations will be done outside the compiler (with a linker, and config files, and compiling to .obj, etc).

It's an effort that will take time, be patient, since this is required also for pagination, and interruptions.
Implementing things like this would make the compiler very architecture-dependent, and I want to move to a multi-architecture scheme.
Reply


Messages In This Thread
Dim At Issue? (1.15.0-beta4) - by Ljg701 - 03-09-2021, 08:07 PM
RE: Dim At Issue? (1.15.0-beta4) - by boriel - 03-14-2021, 06:38 PM
RE: Dim At Issue? (1.15.0-beta4) - by Ljg701 - 03-14-2021, 09:51 PM
RE: Dim At Issue? (1.15.0-beta4) - by boriel - 03-18-2021, 07:26 PM
RE: Dim At Issue? (1.15.0-beta4) - by Ljg701 - 04-06-2021, 09:24 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)