	.IF	LISTA
	.LIST
	.PAGE
	.ELSE
	.NOLIST
	.ENDC
;****************************************************************************
;
;	Permanent Tables:
;
;	File:	SAGE.PROMA.TEXT
;	Date:	 7-Nov-83
;	Issue:	3B
;
;****************************************************************************
;
;	Release History:
;
;	1	13-Jun-82  Initial release.
;	2	18-Nov-82  Modified messages.
;	2a	27-Dec-82  Added version numbers
;	3	23-Mar-83  Initial SAGE IV release
;	3A	 7-Jul-83  Changed startup message.
;	3B	 7-Nov-83  Changed startup message again.
;
;****************************************************************************



.PAGE
;****************************************************************************
;
;	Trap Initialization Table
;
;	This table contains Trap routine offsets into the PROM area.
;	If the most significant (sign) bit of a word is on, the entry
;	is a replicate count which indicates that the next table entry
;	should be stored (count+1) times.  The table is terminated by
;	a zero entry.
;
;****************************************************************************

TRAPTBL .WORD	TRAP1-PROM	;Bus error vector
	.WORD	TRAP2-PROM	;Address error vector
	.WORD	TRAP3-PROM	;Illegal instruction vector
	
	.WORD	8000H+3.-1	;Replicate next entry 3 times
	.WORD	TRAP4-PROM	;Zero divide, CHK, TRAPV

	.WORD	TRAP5-PROM	;Privilege violation vector
	.WORD	TRAP11-PROM	;Trace vector
	.WORD	TRAP3-PROM	;Line 1010 emulator vector
	.WORD	TRAP3-PROM	;Line 1111 emulator vector
	
	.WORD	8000H+12.-1	;Replicate next entry 12 times
	.WORD	TRAP6-PROM	;Vectors reserved by 68000 manufacturer

	.WORD	8000H+7.-1	;Replicate next entry 7 times
	.WORD	TRAP8-PROM	;Spurious interrupt &
				;User autovector interrupts

	.WORD	TRAP9-PROM	;Auto vector #7 (unmaskable) - Parity error

	.WORD	8000H+15.-1	;Replicate next entry 15 times
	.WORD	TRAP7-PROM	;Unassigned trap vectors

	.WORD	TRAP10-PROM	;Debugger entry trap vector

	.WORD	8000H+16.-1	;Replicate next entry 16 times
	.WORD	TRAP6-PROM	;Vectors reserved by 68000 manufacturer

	.WORD	0		;Table terminator



	.PAGE
;****************************************************************************
;
;	Message text for terminal output
;
;****************************************************************************

MSG1	.BYTE	BELL,CR,LF
	.ASCII	"EXCEPTION:  "
	.BYTE	0
MSG3	.BYTE	BELL,CR,LF
	.ASCII	" NO Memory at: "
	.BYTE	0
MSG7	.BYTE	CR,LF
	.ASCII	"Load Done"
	.BYTE	0
MSG8	.BYTE	BELL,CR,LF
	.ASCII	"Bad Load Character"
	.BYTE	0
MSG9	.BYTE	BELL
	.ASCII	"Bad Checksum"
	.BYTE	0
MSG10	.BYTE	BELL
	.ASCII	"Drive Error "
	.BYTE	0
MSG11	.BYTE	BELL
	.ASCII	"Not BOOT Disk"
	.BYTE	0
MSG12	.ASCII	" on drive "
	.BYTE	0
MSG13	.BYTE	BELL
	.ASCII	"BAD Memory at "
	.BYTE	0
MSG14	.ASCII	"RAM Size = "
	.BYTE	0
MSG15	.ASCII	" is "
	.BYTE	0
MSG16	.ASCII	" instead of "
	.BYTE	0
MSG18E	.BYTE	CR
	.BYTE	LF
	.ASCII	"SAGE Startup Test ["
	.BYTE	"0"+VERMAJ
	.BYTE	"."
	.BYTE	"0"+VERMIN
	.BYTE	"]"
	.BYTE	CR,LF,LF
	.ASCII	"Copyright 1983	 Sage Computer Technology"
	.BYTE	CR,LF
	.ASCII	"All Rights Reserved"
MSG17	.BYTE	CR
	.BYTE	LF
	.BYTE	0
MSG19	.ASCII	"Booting from Floppy"
	.BYTE	0
MSG20	.ASCII	"Put in BOOT disk and press a key (Q - quits)"
	.BYTE	0
MSG21	.BYTE	BELL
	.ASCII	"Boot Aborted"
	.BYTE	0
MSG22	.ASCII	" (Test Aborted)"
	.BYTE	0
MSG23	.ASCII	"  Filling memory..."
	.BYTE	0
MSG24	.ASCII	"  Loading..."
	.BYTE	0
MSG25	.ASCII	"  Writing..."
	.BYTE	0
MSG26	.ASCII	"  Moving memory..."
	.BYTE	0
MSG27A	.BYTE	BELL
	.ASCII	"PROM 1 Bad"
	.BYTE	CR,LF,0
MSG27B	.BYTE	BELL
	.ASCII	"PROM 2 Bad"
	.BYTE	CR,LF,0
MSG28	.ASCII	"Bypassed Init"
	.BYTE	CR,LF,0
MSG29	.ASCII	"Looped Tests"
	.BYTE	CR,LF,0
MSG30	.ASCII	"RAM write loop"
	.BYTE	CR,LF,0
MSG31	.ASCII	"Booting from Hard Drive"
	.BYTE	0
MSG32	.ASCII	"Could not find "
	.BYTE	0
MSG33	.ASCII	"Waiting for Drive Ready <Q-quits>"
	.BYTE	0
MSG34	.BYTE	CR,LF
	.ASCII	"No Match found"
	.BYTE	0
MSG35	.ASCII	"  Searching..."
	.BYTE	0
MSG36	.BYTE	CR,LF
	.ASCII	"Match at "
	.BYTE	0
MSG37	.ASCII	" - Continue search (C = Yes)? "
	.BYTE	0

	.ALIGN	2


.PAGE
;****************************************************************************
;
;	Exception Error Message Table
;
;****************************************************************************

EMSGTBL .WORD	EMSG0-EMSGTBL	;Unknown Error
	.WORD	EMSG1-EMSGTBL	;Bus Error
	.WORD	EMSG2-EMSGTBL	;Address Error
	.WORD	EMSG3-EMSGTBL	;Illegal Instruction Error
	.WORD	EMSG4-EMSGTBL	;Arithmetic TRAP Error
	.WORD	EMSG5-EMSGTBL	;Privilege Error
	.WORD	EMSG6-EMSGTBL	;Reserved TRAP Error
	.WORD	EMSG7-EMSGTBL	;Unassigned TRAP Error
	.WORD	EMSG8-EMSGTBL	;Unassigned Interrupt Error
	.WORD	EMSG9-EMSGTBL	;RAM Parity Error
	
;****************************************************************************
;
;	Exception Error Messages
;
;****************************************************************************

EMSG	.ASCII	" Error at "
	.BYTE	0
EMSG0	.ASCII	"Unknown"
	.BYTE	0
EMSG1	.ASCII	"Bus"
	.BYTE	0
EMSG2	.ASCII	"Address"
	.BYTE	0
EMSG3	.ASCII	"Illegal Instruction"
	.BYTE	0
EMSG4	.ASCII	"Arithmetic"
	.BYTE	0
EMSG5	.ASCII	"Privilege"
	.BYTE	0
EMSG6	.ASCII	"Reserved TRAP"
	.BYTE	0
EMSG7	.ASCII	"Unassigned TRAP"
	.BYTE	0
EMSG8	.ASCII	"Unassigned Interrupt"
	.BYTE	0
EMSG9	.ASCII	"RAM Parity"
	.BYTE	0
	
BEMSG1	.ASCII	"Function: "
	.BYTE	0
BEMSG2	.ASCII	"  Access: "
	.BYTE	0
BEMSG3	.ASCII	"  Inst: "
	.BYTE	0
	
	
	.PAGE
;****************************************************************************
;
;	Floppy command sequences.
;
;****************************************************************************

;	Specify command
FC_SPEC .BYTE	3		;Number of bytes in command
	.BYTE	3		;Command byte
	.BYTE	0D1H		;Head unload time = 32 milliseconds (unused)
				;Step rate = 6 milliseconds.
	.BYTE	7		;Head load time = 16 milliseconds
				;  (used for step settle time)
				;Selected non-DMA operation

;	Recalibrate command
FC_RCAL .BYTE	2		;Number of bytes in command
	.BYTE	7		;Command byte
	.BYTE	0		;Unit selects don't matter
	
;	Sense interrupt status command
FC_SIS	.BYTE	1		;Number of bytes in command
	.BYTE	8		;Command byte

;	Read ID field
FC_RDID .BYTE	2		;Number of bytes in command
	.BYTE	4AH		;Command byte + MFM mode
	.BYTE	0		;Unit selects don't matter, head 0

	.ALIGN	2

                                                                                                                                                                                                                                