cc65: crashes loading to $0800 on ProDOS system prg.

6 posts / 0 new
Last post
Offline
Last seen: 1 month 2 weeks ago
Joined: Nov 12 2022 - 16:50
Posts: 202
cc65: crashes loading to $0800 on ProDOS system prg.
AttachmentSize
Binary Data apple2enh-system_aux_prodosi.cfg3.32 KB
File loadmain.c1.04 KB

Hi!  I am working on a version of MadLib for AuxMemApple.  It is a ProDOS system program.  I load some code to the unused space between $0800 and $1000.  Excuting this code seems to crash the system: I get the monitor at location $A504.  I can just store this code in the main module, but I like using extra unused system memory via my Cubbyhole optimization technique.  :)  When I check the size of the data loaded to this memory, I get the number 65088.   I'm using ProDOSi to load the data.  I attached the config file and the code that loads the data.  

Offline
Last seen: 1 month 2 weeks ago
Joined: Nov 12 2022 - 16:50
Posts: 202
Never mind: I found the bug:

Never mind: I found the bug: I was misreading the numbers.  The OPEN function was returning Error 64: Invalid Pathname Syntax.  The filename accessed was "/SYSTEM/LOWMEM."  I will now check if the function is reading the filename properly.

Offline
Last seen: 1 month 2 weeks ago
Joined: Nov 12 2022 - 16:50
Posts: 202
It isn't.  :(

It isn't.  :(

Offline
Last seen: 1 month 2 weeks ago
Joined: Nov 12 2022 - 16:50
Posts: 202
The line that calls the load

The line that calls the load function follows:

 

loadstub ("/SYSTEM/LOWMEM", 0x800);

Offline
Last seen: 1 month 2 weeks ago
Joined: Nov 12 2022 - 16:50
Posts: 202
I think there's a bug in the

I think there's a bug in the compiler, as I had a similar issue on another program of a similar purpose.  :(  I'm wondering if there is an error in the passing of the parameter, as a memory enhancer for the Plus4 gives me an unknown device error, when I was passing the right device # to the function.

Offline
Last seen: 1 month 2 weeks ago
Joined: Nov 12 2022 - 16:50
Posts: 202
I'm wondering if maybe I'm

I'm wondering if maybe I'm not protecting the memoy used to store the extra data.  I checked the docs. and found the information I need but have one issue: does value 1 determine whether the memory is used or free?

Log in or register to post comments