Compiler Error with ZX24 and MemCopy

Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
Post Reply
mikep
Posts: 796
Joined: 24 September 2005, 15:54 PM

Compiler Error with ZX24 and MemCopy

Post by mikep »

The following problem only fails with the ZX24 and the 2.4.1 compiler:

Code: Select all

Public dataOut As Byte
Public dataIn As Byte

Public Sub Main()
	Call MemCopy(dataOut.DataAddress, dataIn.DataAddress, 1)
End Sub
The compiler error message is

Code: Select all

Error: statically allocated variables consume all available RAM, see 'Option HeapSize'
It works fine with a ZX24e or ZX24a device, or with the 2.3.10 compiler. The original problem copied byte arrays but I used a single byte to highlight the problem.

BTW It took me 15 minutes to gradually cut code out of my larger program to isolate this problem. It is worth the effort to give Don a very simple testcase that he can use to recreate the problem.
Mike Perks
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Compiler Error with ZX24 and MemCopy

Post by dkinzer »

mikep wrote:The following problem only fails with the ZX24 and the 2.4.1 compiler
I believe that that problem was fixed in the v2.4.2 compiler that was posted on 11 March.
- Don Kinzer
mikep
Posts: 796
Joined: 24 September 2005, 15:54 PM

Re: Compiler Error with ZX24 and MemCopy

Post by mikep »

dkinzer wrote:I believe that that problem was fixed in the v2.4.2 compiler that was posted on 11 March.
Yes it is fixed with that version of the compiler. I don't remember seeing an announcement for that update.
Mike Perks
Post Reply