;WS-PAT.ASM V1 AS OF 10-11-84
;
; THIS FILE ALLOWS YOU TO PATCH WORDSTAR FOR TURBODOS.
; TWO OPTIONS ARE AVAILABLE:
;
; 1. REROUTE PRINTING TO SPECIFIED QUEUE
; 2. SIGNAL END OF PRINT
;
; CHANGE WSQUE TO THE DESIRED PRINT QUEUE (A=1, B=2...) AND CHANGE
; QUER TO 1 TO REROUTE PRINTING, OR LEAVE QUER EQU 0 IF YOU DO NOT
; WANT TO REROUTE PRINTING.
; NEXT, ASSEMBLE THE FILE INTO A HEX FILE AND USE A CP/M DEBUGGER
; SUCH AS SID VERSION 3 TO OVERLAY WORDSTAR.
;
; (YOU MAY USE TURBODOS' MONITOR.COM IF NOTHING ELSE IS AVAILABLE, BUT
; YOU'LL HAVE TO GET A LISTING OF THE ASSEMBLED CODE AND PATCH IT IN
; MANUALLY WITH THE "E" COMMAND)
;
TDOS	EQU	50H		;TURBODOS ENTRY POINT
SETQ	EQU	27		;SET QUEUE CALL
EOP	EQU	28		;END OF PRINT
;
INITP	EQU	711H		;INIT PRINT LOCATION IN WS 3.3
DNITP	EQU	714H		;DEINIT PRINT
;
INPRP	EQU	300H		;CHANGE TO SUIT, LOCATION OF INIT CODE
DNPRP	EQU	310H		;CHANGE TO SUIT, LOCATION OF DEINIT CODE
;
WSQUE	EQU	2		;CHANGE TO YOUR QUEUE FOR WS PRINTER
;
QUER	EQU	0		;CHANGE TO 1 TO REROUTE PRINTING,
				;OR LEAVE TO NOT REROUTE
;
; MAKE NO CHANGES TO CODE BELOW UNLESS YOU KNOW WHAT YOU'RE DOING!
;
	ORG	DNITP
	JMP	DNPRP
;
	IF	QUER
;
	ORG	INITP
	JMP	INPRP
;
	ORG	INPRP
;
	MVI	C,SETQ
	MVI	E,1
	MVI	B,0FFH
	MVI	D,WSQUE
	CALL	TDOS
	RET
;
	ORG	DNPRP
;
	MVI	C,SETQ
	MVI	E,1
	MVI	B,0FFH
	MVI	D,1
	CALL	TDOS
	RET
	ENDIF
;
	IF	NOT QUER
;
	ORG	DNPRP
	MVI	C,EOP
	CALL	TDOS
	RET
	ENDIF
;
	END
