LT. KERNAL DOS COMMANDS - Version 7.2

RUN-Mode Features and Commands


Autoaccess (feature)

Autoaccess allows transfer of a load request to the floppy disk when a file-not-found condition arises on the hard disk.

If the hard disk is defined as device #8 (this is user definable), and the floppy,is also defined as device #8, then all Commodore syntax

LOAD's will first be referred to the hard disk. If the file is not found, than an attempt to LOAD that same file from the floppy will be made.

This feature may be disabled via CONFIG if it interferes with your application software.


autostart (feature)

Mode: Power-up or hardware re set

Autostart is almost self-explanatory. Simply stated, any program saved under the name "AUTOSTART" will be automatically loaded and run upon power-up or after a hardware reset. Autostart functions for both BASIC and machine language programs, and is one of the best features any turn-key business system can have available.

Autostart may be overridden by holding down the space bar during a power-up or reset start.


bell (feature)

Mode: Direct or Run

Bell offers programmers a method of issuing an audible prompt without having to maintain SID drivers in their programs. Any PRINT from BASIC or CHROUT from machine language of the ASCII Bell character [CHR$(7) or hex, 07] will cause a beep on the monitor or television set if the BEEPER option is selected by the user in the CONFIG mode described later.


BUILDKEY command

From BASIC

Syntax: SYS 64628:0,lfn,directory,Stringvar,recl,rech,status

Ifn is not used, but a dummy variable must be provided

directory is the NUMBER OF DIRECTORIES you wish to have built in the new KEY file

Stingvar contains the KEY FILE NAME and the KEY LENGTHS for each directory you wish to create

recl and rech are the low and high order bytes of the number of keys in the largest directory.

status is the value returned from the SYS indicating the success or failure of the BUILDKEY operation


DELETE key command

From BASIC

Syntax: SYS 64628:2,lfn,directory,Stringvar,recl,rech, status

lfn is the logical file number of a KEY file already OPENed on the hard drive,

directory is the number (1-5) of the selected key DIRECTORY within the KEY file.

Stringvar contains the EXACT key you wish to delete.

recl and rech are the Low and High bytes of the EXACT double precision record number associated with the key to be deleted.

status is the value returned from the SYS to indicate the success or failure of the DELETE to occur.


INSERT key command

From BASIC

Syntax: SYS 64628:1,lfn,directory,Stringvar,recl,rech,status

lfn is the logical file number of a KEY file already OPENed on the hard drive.

directory is the number (1-5) of the selected key DIRECTORY within the KEY file.

Stringvar contains the EXACT key you wish to insert.

recl and rech are the Low and High bytes of the EXACT double precision record number to be associated with the key being inserted.

status is a value returned from the SYS to indicate the success or failure of the INSERT to occur.


LDLU command

Syntax: OPEN #lfn,dev,sa,"Ldev#LU#USR#" Mode: Direct or RUN via channel 15

dev# is a single hexadecimal digit expressing the NEW Lt. Kernal device number.

LU# is a single HEXADECIMAL digit expressing the NEW Lt. Kernal operating LU.

USR# is a single HEXADECIMAL digit expressing the NEW Lt. Kernal operating USER partition.

LDLU permits you to change the operating characteristics of the Lt. Kernal on the fly. Any values provided which are illegal will be ignored. There is NO error status returned from the LDLU command except SYNTAX ERROR. A syntax error will be returned if ANY of the values are illegal, or not provided. BUT THE VALUES WHICH WERE LEGAL, will be acted upon, even if a syntax error exists.

Example:

To change the operation of the Lt. Kernal from

Device #8

LU 0

USER 2

to

Device #9

LU 10

USER 15 issue

OPEN 15,8,15,"L9AF":CLOSE15

Always remember that if you change the operating DEVICE number of the Lt. Kernal , all files OPENed under the OLD device will still remain OPEN, but now under the NEW number.

The LDLU command will permit you to open files across LU and USER boundaries then to switch back to your 'normal' operating LU, keeping those files open.

There is no DEFAULT setting for LDLU.


LG command

Syntax: Open 15,8,15, "LG" or

Open 15,8,15, "LG#"

LG# is a single HEXADECIMAL digit representing the LU# for which LG is to be performed.

LG 'gets' the current STATUS of the currently-logged or expressly requested LU.

The status of the LU is refunded via the command/error channel in an error message format. The status is read via the following syntax:

Input#15,E,E$,D,L,U,BF,BU

  • where E = 6 (command successful) or other than 6 (command not successful)

    E$ = "STATUS"

    D = current device#

    L = current or requested LU#

    U = current user #

    BF = current BLOCKS FREE (hard drive blocks)

    BU = current BLOCKS USED (hard drive blocks)

  • LG will return this status in one second or less, regardless of the size or fullness of the LU. Approximate CBM blocks are computed as INT (Hardblocks/254*512)


    LOAD command

    Syntax: LOAD "[lu:][user:]filename",dev[,sa]

    dev is the drive selected

    sa is the secondary address where:

    0 or none = BASIC load

    and I = machine-language load

    Mode: Director or Run on the hard drive, LOAD may be abbreviated to

    L_["][lu:][user:]filename["]

    With optional quotation marks about the name and without specifying either device number or secondary address.

    When used in this abbreviated syntax, LOAD will load the file at its correct load address depending on the filetype.

    Example: L 1:MYFILE - LOADs the program MYFILE from the hard disk logical unit #1.


    OPEN command

    Syntax: OPEN lfn,dev,sa,"[lu:]filename"

    lfn is the logical file number

    dev is the physical address (number) of the disk accessed

    sa is the DOS channel associated with this logical file (channel 15 is reserved for the command/error channel).

    Mode: Direct or Run

    OPEN retains exactly the same syntax as when used with the 1541 floppy disk, but now allows up to SEVEN logical FILES regardless of type, to be OPEN for reading and writing simultaneously on the hard disk. The Commodore ROM operating system will allow you to have as many as three more files open on a floppy disk, as well, for a total of ten open files.

    Some 1541 file types occupy more than one channel when OPENed. All Lt. Kernal files use only one channel. This enhancement does NOT increase the open channel capability of the 1541 floppy disk.

    Note that the "user" number is NOT an option in OPEN.


    SAVE command

    Syntax: SAVE "[ <range >][lu:]filename",dev

    Where dev is the disk selected onto which to save the file

    Mode: Direct or Run

    SAVE may be abbreviated on the hard disk (only in the Direct Mode) to

    S-["][< range >][Iu:]filename["]

    without optional quotation marks about the filename and range, and without specifying the disk's device number.

    Where <range> is specified, the range may be stated either in hexadecimal or decimal and is an INCLUSIVE range.

    Examples:

    S <$2000-3FFF>MYFILE - saves the area of memory from Hex 2000 through and including Hex 3FFF to the hard disk.

    SAVE "< 1024-4096>MYFILE",8 - Saves the area of memory from decimal address 1024 through and including location 4096 to drive #8.

    Note that USER# is NOT presently a SAVE operation.


    SCRATCH command

    Syntax: OPEN lfn,dev,sa, "S[lu][user:]: filename"

    Mode: Direct or Run via channel 15

    The SCRATCH command is available in the Run mode only via the command/error channel.

    Note that the colon following the LU number is NOT optional.

    In the Direct mode, the ERA command discussed later in this manual performs the SCRATCH function.

    SCRATCH deletes the NEXT file encountered on the hard disk which qualifies according to the filename. This mode differs from the 1541 floppy disk equivalent in that the 1541 SCRATCH command deletes ALL filenames qualifying according to the filename given.

    This limitation may be overridden via CONFIG for applications which require pattern-match scratching capabilities.


    SEARCH command

    From BASIC

    Syntax: match search SYS 64628:3,lfn,directory,Stringvar,recl,rech,status

    greater-than search

    SYS 64628:4,lfn,directory,Stringvar,recl,rech,status

    less-than search

    SYS 64628:5,lfn,directory,Stringvar,recl,rech,status

    Ifn is the logical file number of a KEY file already OPENed on the hard drive.

    directory is the number (1-5) of the selected key DIRECTORY within the KEY file.

    Stringvar contains the key for which you wish to search.

    On return from the SYS:

    recl and rech will contain the double-precision record number associated with the first key to satisfy the SEARCH criteria. status will contain a value to indicate the success or failure of the SEARCH.


    SHUFFLE key directory command

    From BASIC

    Syntax: SYS 64628:7,lfn,directory,Stringvar,recl,rech,status

    lfn is the logical file number of a KEY file already OPENed on the hard drive.

    directory is the number (1-5) of the selected key DIRECTORY you wish to SHUFFLE.

    On return from the SYS:

    status will contain a value to indicate the success or failure of the SHUFFLE.