SpartaDOS X Reference Manual |
Programming with SpartaDOS X |
Page Seven "Kernel" Values |
Several page seven locations allow "kernel" operation to be accessed. While it is beyond the scope of this manual to document all of these locations, a few may prove to be of interest.
The "kernel" routine is called by doing a subroutine jump (JSR) to address $703 with the desired command in the 6502 Y register and the desired device number in device. For example, with a $10 in device, a value of 100 in Y will cause the current time and date to be placed in the variables time and date. A 101 will cause the current time to be set to the values contained in the variables time and date.
The following is a list of valid "misc" vector commands. These should be loaded into the A register before executing a JSR $709. The Y register is used as an index into COPYBUF for those operations using COPYBUF.
The low nibble of the device number is the unit number of the device, such as 2 for D2:. The high nibble is one of the following:
Whenever a file is opened the time and date for that file will be placed in time and date. When a file is opened for write only and dateset equals 0, the current time and date will be read into time and date and assigned to the file. If dateset is -1 ($FF), the file will get the time and date that are in the variables when the open is executed. Dateset, unlike the old COMTAB location TDOVER from previous versions of SpartaDOS, will automatically clear after use. This is how a copy of a file can retain the time and date of the original. This is also how a program like ARC assigns stored time/date information to a new file. |
Previous page |