Compucolor.org – Virtual Media

Listing of file='CPYRGT.MAC;08' on disk='vmedia/asm_utility_3-sector.ccvf'

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;	PRINT/CHECK COPYRIGHT NOTICE
;
;	VALUES ON ENTRY:
;	   HL => BUFFER FOR TEMPORARY USE (128 BYTES)
;
	EXTRN	OSTR
	EXTRN	FCS
	EXTRN	HEXOUT
	EXTRN	FCSSP

ESC	EQU	27
FSBK	EQU	8103H
FDRV	EQU	8114H


	ENTRY	CPYRGT

CPYRGT:	SHLD	BUFPTR
	XCHG
	MOV	A,D
	LXI	H,RDADR
	CALL	HEXOUT
	MOV	A,E
	LXI	H,RDADR+2
	CALL	HEXOUT

	LDA	FDRV
	ADI	'0'
	STA	RDDRV
	STA	WRDRV

	LXI	H,READ
	CALL	FCS
	MOV	A,B
	ORA	A
	JZ	NOERR
	LXI	H,ERRMSG
	CALL	OSTR
	JMP	EXIT

NOERR:	LHLD	BUFPTR
	XCHG
	LXI	H,NOTICE
	MVI	B,NTCLEN
CHECK:	LDAX	D
	CMP	M
	JNZ	KILL
	INX	D
	INX	H
	DCR	B
	JNZ	CHECK
	LXI	H,NOTICE
	CALL	OSTR
	RET

KILL:	LXI	D,NOTICE
	MOV	A,D
	LXI	H,WRADR
	CALL	HEXOUT
	MOV	A,E
	LXI	H,WRADR+2
	CALL	HEXOUT

	LHLD	FSBK
	XCHG
	MOV	A,D
	LXI	H,WRBLK
	CALL	HEXOUT
	MOV	A,E
	LXI	H,WRBLK+2
	CALL	HEXOUT

	LXI	H,WRITE
	CALL	FCS

	LXI	H,BADMSG
	CALL	OSTR

EXIT:	LHLD	FCSSP
	SPHL
	MVI	B,0
	RET

DRVMSG:	DB	11,6,3,'DRIVE: ',6,2,239

READ:	DB	'READ CD'
RDDRV:	DB	'0'
	DB	': 18F,'
RDADR:	DB	'A000'
	DB	',80',0

WRITE:	DB	'WRITE CD'
WRDRV:	DB	'0'
	DB	': '
WRBLK:	DB	'0000'
	DB	','
WRADR:	DB	'A000'
	DB	',200',0

BADMSG:	DB	6,41H,12,14,3,15,15
	DB	'ILLEGAL COPY - FILE DESTROYED',13,10,10,239

ERRMSG:	DB	6,1,13,10,'*** FILE READ ERROR ***',239

NOTICE:	DB	15,6,6,'COPYRIGHT (C) ',6,5,'1980 ',6,6,'BY '
	DB	6,4,'TREVOR TAYLOR',13,10,239

NTCLEN	EQU	$-NOTICE
	DB	0

BUFPTR:	DB	2

	END