Battle Bunny wrote: »
In the Compendium, file Plus3.TXT, section "+3 BASIC DOS_Demo". This provides 19 DOS functions from a BASIC menu. The accompanying assembler listing shows how to code them in assembler.
Zup wrote: »
In this thread I made a "generic" loader capable of loading chunks of data into memory.
My loader has evolved (to include compressed blocks, jump to a position and pauses between blocks), but still works the same:
- Page +3DOS (that means ROM2, RAM5, RAM2, RAM 7)
- (Optional) Set cache size
- Open file
- (Optional) Set file position (seek)
- Read data
- (Optional) Do more things with file
- Close file
- Page BASIC (that means ROM3, RAM5, RAM2, RAM 0)
But remember some important things:
- If you're going to load data into the start of RAM1, cache size must set to zero to prevent data corruption in RAM1.
- You should check for errors every time after a DOS call.
- Loading data into RAM7 should be avoided or your computer may hang/reset (it's not entirely true... there are places where you can store data).
- You may do a DOS call with or without interrupts enabled, but interrupts will be enabled after that.