	TITLE	"BIOS.CON   HT68K BIOS: CONSTANTS"
****************************************************************
***************** ASSEMBLE TIME CONSTANTS **********************
****************************************************************

********************** ADDRESSES *******************************
BIOS_CONST	EQU	00002D00H	;BIOS RUN TIME CONSTANTS
BIOS_CODE	EQU	00000A00H	;BIOS CODE
BIOS_DATA	EQU	00001C00H	;BIOS DATA
BIOS_STACK	EQU	00003B00H	;BIOS STACK
STACK_4		EQU	00003A00H	;A4 STACK
JMP_TBL		EQU	00003B00H	;JUMP TABLE INTO BIOS
OPSYS_CODE	EQU	00003C00H	;K-OS ONE CODE
COMM_CODE	EQU	0000CC00H	;COMMAND PROCESSOR
USER_CODE	EQU	00010000H	;USER PROGRAM
NMISAVE		EQU	00000400H	;BIOS VARS COPIED HERE ON NMI
TERM_C		EQU	00FFC073H	;TERMINAL USART CONTROL
TERM_S		EQU	00FFC073H	;TERMINAL USART STATUS
TERM_I		EQU	00FFC071H	;TERMINAL CHARACTER IN	
TERM_O		EQU	00FFC071H	;TERMINAL CHARACTER OUT
REM_C		EQU	00FFC033H	;AUX USART CONTROL
REM_S		EQU	00FFC033H	;AUX USART STATUS
REM_I		EQU	00FFC031H	;AUX USART CHARACTER IN
REM_O		EQU	00FFC031H	;AUX USART CHARACTER OUT
BRATE		EQU	00FFC001H	;BAUDRATE 8253 BASE ADDRESS
BAUDC		EQU	00FFC007H	;8253 BAUD RATE CONTROL
BAUD1D		EQU	00FFC003H	;TERMINAL BAUD RATE DATA
BAUD2D		EQU	00FFC005H	;AUX BAUD RATE DATA
TIMER		EQU	00FFC081H	;8253 CLOCK TIMMER
DIPSWT		EQU	00FFC021H	;DIP SWITCH
P8259		EQU	00FFC041H	;INTERRUPT ENCODER
F8255		EQU	00FFC027H	;8255 FLOPPY CONTROL
C8255		EQU	00FFC061H	;8255 FOR CENTRONICS
SI8255		EQU	00FFC067H	;8255 SOFTWARE INTERUPT
FDMSR		EQU	00FFC051H	;FLOPPY DISK MASTER RESET
FDDATA		EQU	00FFC053H	;FLOPPY DISK DATA REGISTER
DEBUG		EQU	00FE0010H	;DEBUG ENTRY
DRIVE_VAR	EQU	000005F8H	;BOOT DRIVE VARIABLE
************************** VALUES ******************************
					;*** DISK OPERATION CONSTANTS
READREPS	EQU	32		;MAX READ TRIES
WRITREPS	EQU	8		;MAX WRITE TRIES
SEEKREPS	EQU	4		;MAX SEEK TRIES
TOTRACK		EQU	4		;TRACK POSITION IN TABLE
TOTSECT		EQU	0		;SECTOR POSITION IN TABLE
TOTSIDE		EQU	8		;SIDE POSITION IN TABLE
DBLSTEP		EQU	12		;DBL STEP FLAG IN TABLE
PRCMPTK		EQU	16		;PRECOMP FLAG IN TABLE
					;*** MISCELLANEOUS CONSTANTS
SUPERSR		EQU	2000H		;STATUS REGISTER WITH IRQ MASK
BS		EQU	08H		;BACKSPACE  (^H)
CAN		EQU	18H		;CANCEL  (^X)
CR		EQU	0DH		;CARRIAGE RETURN (^M)
DEL		EQU	7FH		;DELETE
ESC		EQU	1BH		;ESCAPE  (^[)
ETX		EQU	03H		;END OF TEXT  (^C)
FF		EQU	0CH		;FORMFEED (^L)
LF		EQU	0AH		;LINE FEED (^J)
SPACE		EQU	20H		;ASCII SPACE
TRUE		EQU	-1		;BOOLEAN TRUE
FALSE		EQU	0		;BOOLEAN FALSE

	PAGE
****************************************************************
******************** RUN TIME CONSTANTS ************************
****************************************************************

	ORG	BIOS_CONST

****************** INTERRUPT VECTORS ***************************
	DC.L	BIOS_STACK			;RESET STACK
	DC.L	BIOS_CODE			;RESET VECTOR
	DC.L		V02,V03,V04,V05,V06,V07
	DC.L	V08,V09,V10,V11,V12,V13,V14,V15
	DC.L	V16,V17,V18,V19,V20,V21,V22,V23
	DC.L	V24
	DC.L	INTCNT				;AUTOVECTOR 1
	DC.L	V26,V27,V28
	DC.L	KEYINT				;AUTOVECTOR 5
	DC.L	FLOPPY				;AUTOVECTOR 6
	DC.L	NMI				;AUTOVECTOR 7
	DC.L	V32
	DC.L	TRAP1				;TRAP 1 VECTOR
	DC.L		V34,V35,V36,V37,V38,V39
	DC.L	V40,V41,V42,V43,V44,V45,V46,V47
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48
	DC.L	V48,V48,V48,V48,V48,V48,V48,V48


******************* STRING CONSTANTS ********************************
SYSNAM	DC.B	"OPERATE BIN",0
COMNAM	DC.B	"COMMAND BIN",0
BIOSMES	DC.B	"KIBLER & HAWTHORNE TECHNOLOGY  SAGE BIOS   C 1987",CR,LF,0
ERRMES	DC.B	CR,LF,"ERROR",CR,LF,0
LDMES	DC.B	"LOAD COMPLETE",CR,LF,0
NFMES	DC.B	"FILE NOT FOUND",CR,LF,0
DKMES	DC.B	"DISK READ OR WRITE ERROR",CR,LF,0
EQMES	DC.B	"MEMORY BLOCKS ARE EQUAL",CR,LF,0
NEMES	DC.B	"MEMORY BLOCKS ARE NOT EQUAL",CR,LF,0
PRNMES	DC.B	CR,LF,SPACE,'!','"',"#$%&'()*+,_./0123456789:;<=>?",CR,LF
	DC.B	"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^-",CR,LF
	DC.B	"`abcdefghijklmonpqrstuvwxyz{|}~",CR,LF,0
CRLFMES	DC.B	CR,LF,0
MISCMES	DC.B	"BUS ERROR",0,"ADDRESS ERROR",0,"ILLEGAL INSTRUCTION",0
	DC.B	"ZERO DIVIDE",0,"CHK INSTRUCTION",0,"TRAPV INSTRUCTION",0
	DC.B	"PRIVILEGE VIOLATION",0,"TRACE",0,"LINE 1010 EMULATOR",0
	DC.B	"LINE 1111 EMULATOR",0,"VECTOR 12",0,"VECTOR 13",0
	DC.B	"FORMAT ERROR",0,"UNINITIALIZED INTERRUPT VECTOR",0
	DC.B	"VECTOR 16",0,"VECTOR 17",0,"VECTOR 18",0,"VECTOR 19",0
	DC.B	"VECTOR 20",0,"VECTOR 21",0,"VECTOR 22",0,"VECTOR 23",0
	DC.B	"SPURIOUS INTERRUPT",0,"LEVEL 1 AUTOVECTOR",0
	DC.B	"LEVEL 2 AUTOVECTOR",0,"LEVEL 3 AUTOVECTOR",0
	DC.B	"LEVEL 4 AUTOVECTOR",0,"LEVEL 5 AUTOVECTOR",0
	DC.B	"LEVEL 6 AUTOVECTOR",0,"LEVEL 7 AUTOVECTOR",0
	DC.B	"TRAP 0",0,"TRAP 1",0,"TRAP 2",0,"TRAP 3",0
	DC.B	"TRAP 4",0,"TRAP 5",0,"TRAP 6",0,"TRAP 7",0
	DC.B	"TRAP 8",0,"TRAP 9",0,"TRAP 10",0,"TRAP 11",0
	DC.B	"TRAP 12",0,"TRAP 13",0,"TRAP 14",0,"TRAP 15",0
	DC.B	"VECTOR 48 THROUGH 255",0
	DC.L	0

***************** BIOS ROUTINE JUMP TABLE **********************
	ORG	JMP_TBL

	JMP	OSINIT.L
	JMP	USER.L
	JMP	CLOCKSET.L
	JMP	EXSET.L
	JMP	WAIT.L
	JMP	GETCON.L
	JMP	PUTCON.L
	JMP	INITCON.L
	JMP	STATCON.L
	JMP	CNTRLCON.L
	JMP	GETPRN.L
	JMP	PUTPRN.L
	JMP	INITPRN.L
	JMP	STATPRN.L
	JMP	CNTRLPRN.L
	JMP	DSKREAD1.L
	JMP	DSKWRITE1.L
	JMP	DSKSTAT1.L
	JMP	DSKCNTRL1.L
	JMP	DSKFLSH1.L
	JMP	DSKREAD2.L
	JMP	DSKWRITE2.L
	JMP	DSKSTAT2.L
	JMP	DSKCNTRL2.L
	JMP	DSKFLSH2.L
	JMP	DSKREAD3.L
	JMP	DSKWRITE3.L
	JMP	DSKSTAT3.L
	JMP	DSKCNTRL3.L
	JMP	DSKFLSH3.L
	JMP	DSKREAD4.L
	JMP	DSKWRITE4.L
	JMP	DSKSTAT4.L
	JMP	DSKCNTRL4.L
	JMP	DSKFLSH4.L
	JMP	GETAUX.L
	JMP	PUTAUX.L
	JMP	INITAUX.L
	JMP	STATAUX.L
	JMP	CNTRLAUX.L
	JMP	DEBUG

	END	;BIOS.CON
