Where to locate large ML program?

Started by MIRKOSOFT, November 15, 2009, 04:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MIRKOSOFT

Hi!

I have 'think big problem.
I don't know which bank to select. I want to programming BASIC7 extension of disk acces commands.
So, where's problem?
1. For my solution is space $1300-$1C00 too small.
2. I want to leave some space for BASIC programming free.
3. I don't know which bank select, 'cause I need to have KERNAL, I/O available - yes ideal is bank #15 but...

...where to put the code of my program?

I wanted to use BANK1 (higher 64kB of C128 RAM) - there's variables, arrays, etc. - so I can to reduce it in this location...
...but when I have routine in BANK1 I can't access KERNAL, I/O...

Or can I load whole program first and then copy routines to other locations and when is routine calling, copy it and the execute?

So, please explain me somebody how to do it.

Thanks for all replies.

Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

Hydrophilic

My post was lost!

Ok, here is the quick version:


10 A=DEC("8001"):BANK0:POKE 45,A-32768 AND 1:POKE 46,A/256:POKE A-1,0
20 U=PEEK(186):RUN"PROGRAM",U(U)

I couldn't attach this "HiBasicLoader" because I think Lance is upgrading the server today.  It does the following for you:
 

  • DLOAD and RUN the BASIC "PROGRAM" at $8001 which can be upto 31.75kiB (about 128 Blocks) in size
  • Reserves 26.25kiB (about 105 Blocks) for you to BLOAD your ML program in area $1300~$7FFF
  • Your programs (BASIC and ML) can use BANK12 or BANK13 which gives you access to RAM Bank 0 below $8000, plus Editor ROM, I/O registers, and KERNAL ROM.
This is what you want right?

Import things to avoid:
 

  • "PROGRAM" should not use BASIC to allocate VIC Bitmap (you can use GRAPHIC [0,5] no problem)
  • "PROGRAM" should never use GRAPHIC CLR
  • If "PROGRAM" needs BASIC VIC Bitmap, use GRAPHIC [1,2,3,4] in the HiBasicLoader, but this will split your ML area in two: $1300~$1BFF (2.25kiB) and $3F40~$7FFF (16kiB).
  • ML program should not use KERNAL JSRFAR unless it is below $4000 because it always returns to BANK15 instead of BANK12 or 13 like it should.
I hope this helps!
I'm kupo for kupo nuts!