Tr-Dos v5.xx variables in Beta 128 Disk interface ----------------------------------------------------- … SOS system variables called "system variables" in this document … Some of Tr-Dos variables has multiple meaning depending on issued command … "*" sign mean that this variable should not be changed during work … This description is result of long time programming under Tr-Dos … Tr-Dos occupies 112 bytes of 48k RAM for its own variables … Without Beta 128 Disk interface activated user RAM begins from the following addresses: (a) - 23755 if no "Interface I" attached (b) - 23812 if "Interface I" attached … With Beta 128 Disk interface activated user RAM begins from the following addresses: (a) - 23867 if no "Interface I" attached (b) - 23925 if "Interface I" attached … Tr-Dos error code returned in BC register pair of Z80 CPU Address|Size|Purpose(s) ---------+----+--------------------------------------------------------------- 23734 | 1* | Used only if "Interface I" add-on attached. If there is #F4 | | value then system variables not moved, if there is #00 then | | 23832 will be checked. 23746 | 1* | Contains #C9 byte ( RET instruction op-code ). This variable | | used by Tr-Dos ROM for calling routines from SOS ROM. 23752 | 1 | code which define disk drive "A" mode: | | 7th bit = 1 - there is 80-tracks disk drive used | | = 0 - there is 40-tracks disk drive used | | 6th bit = 1 - there is double sided disk drive used | | = 0 - Tr-Dos must use 80-tracks drive as 40-tracks 23753 | 1 | code which define disk drive "B" mode: | | 7th bit = 1 - there is 80-tracks disk drive used | | = 0 - there is 40-tracks disk drive used | | 6th bit = 1 - there is double sided disk drive used | | = 0 - Tr-Dos must use 80-tracks drive as 40-tracks 23754 | 1 | code which define disk drive "C" mode: | | 7th bit = 1 - there is 80-tracks disk drive used | | = 0 - there is 40-tracks disk drive used | | 6th bit = 1 - there is double sided disk drive used | | = 0 - Tr-Dos must use 80-tracks drive as 40-tracks 23755 | 1 | code which define disk drive "D" mode: | | 7th bit = 1 - there is 80-tracks disk drive used | | = 0 - there is 40-tracks disk drive used | | 6th bit = 1 - there is double sided disk drive used | | = 0 - Tr-Dos must use 80-tracks drive as 40-tracks 23756 | 1* | Current sector number when disk catalogue reading 23757 | 1* | #80 - disk drive ready 23758 | 1* | #00 - sector reading; #FF - sector writting 23759 | 2* | Temporary copy of STACK_SP system variable 23761 | 2 | BASIC programm auto-start parameter ( on BASIC programm save ) 23764 | 1 | Number of deleted file for MOVE command 23765 | 1 | Sector number of first sector of deleted file for MOVE command 23766 | 1 | Track number of first track of deleted file for MOVE command; | | you must clear this byte before use "disk format" routine. And | | after formatting completion here will be number of bad sectors | | found on disk ( same for #15 function of Tr-Dos ). Will have | | #FF if command was not completed. 23767 | 2* | Used to store "start" parameter of and files; Contains | | number of tracks after reading this value from system sector 23769 | 2* | Analog of CH_ADD system variable; Contains lenght in bytes of | | and files 23771 | 2* | Contains size of the program 23773 | 8 | File name in ASCII 23781 | 1 | File type ( , , , <#> etc ) 23782 | 2 | Start address for files; BASIC program size for files 23784 | 2 | File lenght ( in bytes ) 23786 | 1 | File size ( in 256 bytes long sectors ) 23787 | 1 | Number of the first sector of the current file ( 0...15 ) 23788 | 1 | Number of the first track of the current file ( 0...160 ) 23789 | 2* | Start address for files; BASIC program size for files 23791 | 1* | File lenght ( in bytes ); #01 if "Interface I" add-on present 23793 | 1* | File size ( in 256 bytes long sectors ) 23794 | 1* | Number of the first sector of the current file ( 0...15 ) 23795 | 1* | Number of the first track of the current file ( 0...160 ) 23796 | 1* | Current sector number 23797 | 1* | Current track number 23798 | 1 | Drive number for temporarty operations 23799 | 2 | Cleared on return from 15616 23800 | 1 | Drive number for operations over two files; #FF if stream | | open 23801 | 1 | Drive number for operations over two files; READ/VERIFY flag; | | Drive number for #07 Tr-Dos function 23802 | 1 | Stepping rate for disk drive "A" 23803 | 1 | Stepping rate for disk drive "B" 23804 | 1 | Stepping rate for disk drive "C" 23805 | 1 | Stepping rate for disk drive "D" 23806 | 1* | Code of last issued FDC command 23807 | 1* | Sector number for sector read/write Tr-Dos functions 23808 | 2* | Current address of buffer for Tr-Dos #05 and #06 functions 23810 | 2* | Copy of HL register pair for internal use 23812 | 2* | Copy of DE register pair for internal use 23814 | 1 | Number of used symbols for Tr-Dos #0A "find file" operation, | | initialised with #09 value 23815 | 1* | Number of deleted files 23816 | 1* | First symbol of the file name for Tr-Dos #12 function 23820 | 1* | Tr-Dos buffer condition flag ( 257 bytes from 23846 address ), | | #00 - no buffer exist, #FF - buffer exist 23821 | 1 | Temporarty file number for double drive file copying 23822 | 1* | Command mode: #FF - BASIC, any other - Tr-Dos 23823 | 1* | Tr-Dos error code. In Tr-Dos CLI will execute RETURN command | | if there is not #00 byte or EMPTY LINE from #20EF address 23824 | 1* | MSB of Tr-Dos error code, cleared on 15616 calling, should be | | cleared when you call 15635 23825 | 2* | Address of command line for Tr-Dos; On calling 15616 has same | | value as E.LINE system variable; On calling 15619 has same | | value as CH_ADD system variable 23827 | 2* | Copy of ERR_SP system variable; If MSB = #AA then RUN "boot" | | Tr-Dos CLI command will be executed and #FE will be written to | | 23833 Tr-Dos variable 23829 | 1* | If there #00 then show Tr-Dos screen 23830 | 1 | Copy of System register (555TM9 latch chip) 23831 | 1 | If not equal #AA then show Tr-Dos title; If equal #FF then | | do not match to error if wrong IAM readed from disk 23832 | 1* | Used if "Interface I" add-on attached: if equal to #FF then | | two 45 bytes long parts of memory 23747-23859 will be swapped, | | should be set to #FF when calling Tr-Dos 23833 | 1 | Default disk drive number ( 0...3 ) 23834 | 2* | Internal addres of finishing procedure 23836 | 2* | Saves SP 23838 | 1 | File number if it was found by Tr-Dos #0A find file function 23840 | 3 | Three first symbols of entered line 23843 | 1 | Number of 256 byte blocs for MOVE command ( 4k minimun ) 23845 | 1 | Address for temporarty buffer ( #FF after initialisation ) 23846 | 5 | CHANS-DOS - CHANNEL "K" ( 2348,4264 ) 23851 | 5 | CHANS-DOS - CHANNEL "S" ( 2548,5572 ) 23856 | 5 | CHANS-DOS - CHANNEL "R" ( 3969,5577 ) 23861 | 5 | CHANS-DOS - CHANNEL "P" ( 2548,5572 ) 23867 | xx | Beginning of BASIC programm if no files were opened ---------+----+--------------------------------------------------------------- History of changes: --------------------- … 10 Sep 1999 - first version completed … 19 Sep 1999 - following variables description added: 23766,23791,23831,23843,23845,23846,23851,23856,23861,23867 - following variables descriptions corrected: 23761,23764,23765,23789,23793,23794,23795 … 02 Mar 2000 - "BetaDisk 128" and "BetaDisk" were changed to "Beta 128 Disk interface" - all "0x" changed to "#" (c) 2000 by Mac Buster^Extreme