Memory Location

Basic and Machine Language

Moderator: Moderators

Post Reply
goog
Vic 20 Newbie
Posts: 4
Joined: Fri Aug 20, 2010 2:12 pm

Memory Location

Post by goog »

Hi everyone,

Been working on the Vic-20 version of the "V-1541" virtual disk drive program (currently available on the C64 for CommodoreServer.com). It basically allows you to load files directly from the Internet, taking over the LOAD and SAVE commands. Works great on the C64 and now I'm getting the Vic-20 version going. I have a working version, but it starts from BASIC (a program that SYS's to an ML program).

I was wondering if I could get your opinions on where to put this in memory on the Vic? It can't be in the way of loading programs. On the C64, there's two copies - a high memory location and a low memory location, in case you want to load programs in one space or the other.

This program, while currently small (approx. 250 bytes), doesn't currently fit in the cassette buffer (at 828). That might be an ideal spot if I could shrink it down, but might also compete a lot with other ML programs.

I'm not an avid Vic-20 developer and don't know all of the tricks, so I would appreciate any input you have.

Thanks,
Goog
User avatar
Diddl
Vic 20 Afficionado
Posts: 426
Joined: Wed Jun 10, 2009 3:18 am
Website: https://oe7twj.at/
Location: Austria
Occupation: software engineer

Post by Diddl »

I would set this code either into the kernel (kernel replacement) or as a $9 cartridge with autostart.
User avatar
rmelick
Vic 20 Hobbyist
Posts: 134
Joined: Sat Mar 26, 2005 7:29 pm
Website: http://www.geocities.ws/cbm/
Location: Bay Area
Occupation: IT

Post by rmelick »

To start out I would think the top of BASIC would be fine for a TSR/driver type of program. This can be variable depending on how the user has configure their memory for that particular VIC-20 session.

The trick is to figure out the top of BASIC RAM and lower it such that the memory can be set aside for your code.

In general, BLK3 and BLK5 are usually kept free to accommodate cartridge ROM images loaded from disk. Users have different techniques to sneak these memory locations in after the computer boots (if required) depending on their use case.

If you publish the source code, folks (smarter than me) will likely modify it over time to occupy various memory locations -- as has been done with Programmer's Aid and Vicmon ML Monitor cartridge ROM images.

http://www.8bitcentral.com/vicram.htm
Post Reply