SpartaDOS X Reference Manual

Programming with SpartaDOS X




Vectors Under the OS ROM

Index


The following vectors are only available on XL/XE computers. They reside under the Operating System ROM and will be invalidated by any program using this space, such as Turbo BASIC XL. It would be a good idea to check _800FLG to be sure it is an XL/XE computer and to check each vector before access to be sure that it is still there.

Since these vectors are under the OS ROM, it is necessary to enable the RAM instead of the ROM in this memory area. One possible method follows:

        lda $D301   ; PIA, responsible for bank
        pha         ; selecting. Store status.
        and #$FE    ; RESET bit 0.
        sta $D301   ; enable RAM under OS ROM.
        jsr VGETTD  ; call the vector.
        pla
        sta $D301   ;restore PIA to previous state.

Those functions each contain a jump (JMP) followed by the address of the function. It is a good idea to always check for this JMP before assuming that the vector is still there.
 

      
VGETTD $FFC0
Returns the current time and date to COMTAB locations TIMER and DATER.
 
VSETTD $FFC3
Sets the current time and date to the values held in COMTAB locations TIMER and DATER.
 
VTDON $FFC6
Turns the time/date display on and off. If the 6502 Y register contains a 1 on entry, the time/date line will be turned on. If it contains a 0 on entry, the time/date line will be turned off. The 6502 carry flag will be set on return if the operation failed (TD.COM had not been run to install this routine).
 
VFMTTD $FFC9
Returns a formatted time/date line to a specified buffer. On entry, the 6502 x register should hold the high byte of the buffer address. The Y register should hold the low byte of the buffer address. The 6502 carry flag will be set on return if the operation failed (TD.COM had not been run to install this routine).
 
VXCOMLI $FFD2
Will cause the line contained in COMTAB buffer LBUF to be executed. BUFOFF should be 0 on entry.
 
VKEYON $FFDB
Turns the key buffer on and off. If the 6502 Y register contains a 1 on entry, the key buffer line will be turned on. If it contains a 0 on entry, the key buffer line win be turned off.

Previous page

Next page