Accessing LKDOS from Machine Code

See all articles from Update April 1988
Author(s): Larry Kenny
Publication: Update Magazine
Pub Details: Update April 1988
Date: April 1988
Pages: 34

The dos is easy to access from machine code using the internal jump table starting at address 120 in the cartridge.

The jump table is a list of 20 or so entry points to the most often used sub-routines in the dos.

Any changes or different versions of the dos in the future, do not affect these addresses, so utility programs dont need to be modified incase a different version of Lkdos is ever used.

Any machine code program (or Basic program) written for Lkdos is compatible with any Lkdos cartridge useing a different disk interface, (Aerco, Ramex or Oliger).

The routines can be used to load or save complete files or just load or save 1 block etc.

A complete list of all the Subroutines and variables in the Lkdos is supplied with the Disk Editor package. ($10.00)

Note – all numbers in the programs below are in decimal

Two Small Utility Programs for LKDOS

-- Addresses and dos routines used by  FREEBL and MOVCAT --
data EQU 8328 - Address of data in the disk buffer
curtrk EQU 8221 - block number for TRACK to seek

-- Commonly used subroutines in the Lkdos jump table --
SAVEBF EQU 120 - Save the buffer to current block
LOADBF EQU 123 - Load the buffer from the cur block
TRACK EQU 126 - Restore to track 0 the seek (curtrk)