3000 58a5 0000 S ... VIDEOTEX.A
Monitoraufrufe:
keine:
Verwendete IO-Ports bzw. Hardware:
keine []
ähnlich [f665b6a92491f043ed4704051cfc38b1]
	PN	VIDEOTEXT
;
	ORG	00100H
MFREE:	EQU	01800H
ANZS:	EQU	50
ZANF:	EQU	00E00H
PDR:	EQU	050H
PFL:	EQU	052H
PIIC:	EQU	056H
;
BEGIN:	JMP	ANF
	JMP	PGET
	JMP	DISP
	JMP	STAT
	JMP	CTON
	JMP	CTOFF
	JMP	PSEIT
;
	JMP	INIT
	JMP	RUFE
	JMP	READ
	JMP	SEND
ICADR:	DB	022H
;
ANF:	CALL	INIT
	CALL	CTON
	LD	HL,LOGO
	CALL	SEND
MAIN:	LD	SP,000B0H
	LD	HL,R11
	CALL	SEND
	LD	HL,EVSS
	CALL	SEND
	RST	020H
	DB	2,12,13,13
	DB	13,'     '
	DB	'Z 1013 - '
	DB	'Videotext'
	DB	' 1.1'
	DB	13,'    '
	DB	'*********'
	DB	'*********'
	DB	'******'
	DB	13,13,13
	DB	' S ... '
	DB	'Lesen ein'
	DB	'er Seite'
	DB	13,13
	DB	' U ... '
	DB	'Lesen ein'
	DB	'er Unter'
	DB	'seite'
	DB	13,13
	DB	' L ... '
	DB	'Laden von'
	DB	' 50 Seite'
	DB	'n'
	DB	13,13
	DB	' l ... '
	DB	'Laden von'
	DB	' Seiten '
	DB	'maskiert'
	DB	13,13
	DB	' D ... '
	DB	'Druck aus'
	DB	' Seitensp'
	DB	'eicher'
	DB	13,13
	DB	' T ... '
	DB	'Wandeln '
	DB	'in Textfi'
	DB	'le'
	DB	13,13
	DB	' B ... '
	DB	'Bildschir'
	DB	'manzeige'
	DB	13,13
	DB	' V ... '
	DB	'Druckvari'
	DB	'anten'
	DB	13,13
	DB	08DH
TAST:	RST	020H
	DB	2
	DB	13,13
	DB	' Wahl'
	DB	': >_<',8
	DB	088H
NKPL:	LD	HL,00300H
WKEYP:	RST	020H
	DB	4
	OR	A
	JRNZ	KEYPR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ALL	PGET
LML2:	POP	BC
	CALL	COUNT
	POP	AF
	DJNZ	LML-#
	RET
CLPG:	CALL	LPGET
	JR	LML2-#
MASK:	RST	020H
	DB	2
	DB	'Maske:'
	DB	0A0H
	RST	020H
	DB	16
	LD	DE,(016H)
	LD	B,7
	LD	HL,SIDE
MAL:	PUSH	HL
	RST	020H
	DB	3
	LD	A,L
	POP	HL
	LD	M,A
	INC	HL
	DJNZ	MAL-#	
	RET
COUNT:	INC	C
	PUSH	BC
	XOR	A
	INC	C
TCAD:	INC	A
	DAA
	DEC	C
	JRNZ	TCAD-#
	PUSH	AF
	RST	020H
	DB	2,8,088H
	POP	AF
	RST	020H
	DB	6
	POP	BC
	RET
LPGET:	PUSH	HL
	LD	HL,R11
	CALL	SEND
	LD	HL,SSUCH
	CALL	SEND
FPW1:	CALL	ARRIV
	JRNZ	FPW1-#
	LD	HL,SREAD
	CALL	SEND
	POP	HL
	LD	DE,40
	CALL	RTXT
	PUSH	HL
	LD	HL,RARR
	CALL	SEND
FPW2:	LD	HL,ARRD
	CALL	SEND
	CALL	RR11
	CMP	'#'
	JRZ	FPW2-#
	CALL	CTOFF
	LD	HL,SRE2
	CALL	SEND
	POP	HL
	LD	DE,920
	CALL	RTXT
	CALL	CTON
	RET
PGET:	PUSH	HL
	LD	HL,R11
	CALL	SEND
	LD	HL,SSUCH
	CALL	SEND
	POP	HL
PW1:	CALL	ARRIV
	JRNZ	PW1-#
	PUSH	HL
	CALL	W100
	CALL	CTOFF
	LD	HL,SREAD
	CALL	SEND
	POP	HL
	LD	DE,960
	CALL	RTXT
	CALL	CTON
	RET
ARRIV:	PUSH	HL
	RST	020H
	DB	4
	CMP	3
	JPZ	MAIN
	LD	HL,DARR
	CALL	SEND
	CALL	RR11
	POP	HL
	BIT	5,A
	RET
TVGET:	NOP
DISP:	PUSH	HL
	LD	HL,TVD
	CALL	SEND
	POP	HL
	RET
STAT:	LD	HL,R11B
	CALL	SEND
RR11:	LD	HL,SPACE
	LD	DE,1
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SH	BC
	LD	B,8
	LD	C,A
	XOR	A
SLOOP:	SET	1,A
	RLC	C
	JRC	SHI-#
	RES	1,A
SHI:	OUT	PIIC
	SET	0,A
	OUT	PIIC
	RES	0,A
	OUT	PIIC
	DJNZ	SLOOP-#
	POP	BC
	SET	1,A
	OUT	PIIC
	SET	0,A
	OUT	PIIC
	IN	PIIC
	CPL
	BIT	3,A
	CPL
	RES	0,A
	OUT	PIIC
	RET
START:	PUSH	AF
	LD	A,1
	OUT	PIIC
	XOR	A
	OUT	PIIC
	POP	AF
	RET
STOP:	PUSH	AF
	XOR	A
	OUT	PIIC
	OR	1
	OUT	PIIC
	OR	3
	OUT	PIIC
	POP	AF
	RET
INIT:	LD	A,0FFH
	OUT	PIIC
	OUT	PIIC+1
	LD	A,0FCH
	OUT	PIIC+1
	CALL	STOP
	RET
PRHL:	PUSH	AF
PR2:	LD	A,M
	OR	A
	JRZ	PRE-#
	CMP	32
	JRNC	PR3-#
	LD	A,32
PR3:	RST	020H
	DB	0
	INC	HL
	JR	PR2-#
PRE:	POP	AF
	RET
ERROR:	RST	020H
	DB	2
	DB	13
	DB	'Fehler.'
	DB	08DH
	CALL	STOP
	RST	038H
NOIC:	LD	A,(ICADR)
	LD	D,A
	CALL	IDM
	RST	020H
	DB	2
	DB	'nicht.'
	DB	08DH
	CALL	STOP
	RST	038H
IDENT:	CALL	IDM
	RST	020H
	DB	2,8
	DB	'.',08DH
	RET
IDM:	CALL	NAME
	RST	020H
	DB	2
	DB	' meldet'
	DB	' sich'
	DB	0A0H
	RET
NAME:	RST	020H
	DB	2
	DB	'IC'
	DB	0A0H
	LD	A,D
	RST	020H
	DB	6
	RET
;
;	Grundroutinen für
;	Druckerausgabe
;
DVAR:	LD	B,0
	RST	020H
	DB	2
	DB	'Vollgraf'
	DB	'ik  '
	DB	0A0H
	CALL	ASK
	JRZ	DRVG-#
	LD	B,1
DRVG:	RST	020H
	DB	2
	DB	'alle Zei'
	DB	'chen'
	DB	0A0H
	CALL	AS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RD:	DB	4,8,0
	DB	0,8
SZ25:	DB	4,8,0
	DB	25,0
TVD:	DB	5,4
TVDS:	DB	0
TVDM:	DB	0AAH,0AAH
	DB	7
LOGO:	DB	11,8,0
	DB	0,0
	DB	3,'*Z-VT*'
;
SPACE:	DB	0
	END
;
	END

Kopf für Endfassung:

	PN	VIDEOTEXT
;
	ORG	00100H
MFREE:	EQU	01800H
ANZS:	EQU	50
ZANF:	EQU	00E00H
PDR:	EQU	050H


Hardware-Anschluß:

Pin 0:	SCL out
Pin 1:	SDA out
Pin 2:	SCL in
Pin 3:	SDA in

erste Meldungen des SAA 5243
(022H) am 16.9.93 !

