Screenshot 1
3000 662e 0000 S ... Z1013_MO.A
Monitoraufrufe:
keine:
Verwendete IO-Ports bzw. Hardware:
keine []
;******************************
;* BETRIEBSSYSTEM FÜR  Z 1013 *
;* VERSION 1.2, (Verwaltung)  *
;* DIRK AMBRAS , 23.11.1989   *
;******************************
;
	ORG	08000H
BEGIN:	JMP	CAOS
	JMP	PRNST
	JMP	PRKEY
	JMP	PKEY
	JMP	ERR1
	JMP	ZLEN
CAOS:	LD	A,(JPM)
;
BSST:	EQU	0EB00H
JPM:	EQU	BSST+0FFH
AME:	EQU	BSST
DATA:	EQU	BSST+1
HLM:	EQU	01BH
DEM:	EQU	01DH
BCM:	EQU	023H
MEMA:	EQU	BSST+16
MEMHL:	EQU	BSST+17
MEMDE:	EQU	BSST+19
FLAG:	EQU	BSST+21
MEBL:	EQU	BSST+22
KEYTA:	EQU	BSST+23
R20:	EQU	0F0E8H
R38:	EQU	0F058H
FKZ:	EQU	18
STMEB:	EQU	06DH
PDR:	EQU	050H
PFL:	EQU	052H
;
	CMP	0BBH
	JPZ	R38
	CMP	0EEH
	JRZ	WST-#
	LD	SP,0B0H
	LD	HL,BSST
	LD	DE,BSST+1
	LD	BC,0FFH
	LD	M,L
	LDIR
	LD	DE,KEYTA
	LD	HL,MKEY
	LD	BC,EKEY-MKEY
	LDIR
	LD	BC,001FBH
LIVE:	CALL	GTON
	LD	A,B
	ADD	4
	LD	B,A
	LD	A,C
	SUB	45
	LD	C,A
	JRNC	LIVE-#
	LD	A,STMEB
	LD	(MEBL),A
	LD	A,1
	LD	(FLAG),A
WST:	LD	SP,0B0H
	CALL	ADRM
	JMP	MENU
SUCH:	LD	A,(FLAG)
	BIT	3,A
	JRNZ	MOLD-#
	LD	HL,CAOS
	LD	BC,0
SH2:	LD	A,(MEBL)
SH1:	CPIR
	JPPO	SRET
	CPI
	JRNZ	SH1-#
	CALL	SUCH2
	LD	DE,CRL
	CALL	PRNST
	JR	SH2-#
SRET:	RET
SUCH2:	LD	A,M
	CM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E,3D,16,39,38
	HEX	00,00,00,00,00,00,00,00
	HEX	00,36,35,00,33,32,31,30
	HEX	52,51,50,4F,4E,4D,4C,4B
	HEX	42,41,E8,2F,2E,2C,1A,5C
	HEX	E3,E0,E1,E7,E4,17,06,11
;
	HEX	10,19,00,0A,00,00,00,7F
	HEX	EF,18,03,1B,0C,1E,74,1C
	HEX	0D,01,7E,1F,13,EE,15,04
	HEX	14,05,24,60,2D,26,EB,0F
	HEX	6A,69,68,67,66,65,64,63
	HEX	7A,79,78,77,76,75,1D,73
	HEX	3A,7D,7B,0E,2B,16,28,2A
	HEX	00,00,00,00,00,00,00,00
	HEX	00,5E,25,00,23,22,21,29
	HEX	72,71,70,6F,6E,6D,6C,6B
	HEX	62,61,F1,3F,3E,3C,1A,7C
	HEX	EC,E9,EA,F0,ED,17,06,11
TEXTM:	DB	12,'* Z1013 '
	DB	'DOS 1.2 *'
CRL:	DB	13,'%',0
MSHW:	DB	2,11,0
ERM1:	DB	'not under'
	DB	'standable'
	DB	13,7,0
ERM2:	DB	'not found'
	DB	13,7,0
MKEY:	DB	2,'%LOAD',13
	DB	0
	DB	2,'%SAVE :',13
	DB	0
	DB	'LIST '
	DB	0
	DB	'?AT('
	DB	0
	DB	'GOSUB'
	DB	0
	DB	'RETURN'
	DB	0
	DB	'WINDOW'
	DB	0
	DB	'EDIT '
	DB	0
	DB	2,'DLOAD',13
	DB	0
	DB	'WINDOW:'
	DB	'CLS',13,0
EKEY:	DB	0
MST01:	DB	8,32,8,0
KEYM2:	DB	' : '
	DB	0
MST:	DA	STE1
	DA	ST01
	DA	ST02
	DA	STE1
	DA	ST04
	DA	ST05
	DA	ST06
	DA	ST07
	DA	ST08
	DA	ST09
	DA	ST0A
	DA	ST0B
	DA	ST0C
	DA	ST0D
	DA	ST0E
	DA	STE1
	DA	ST10
	DA	ST11
	DA	ST12
	DA	ST13
	DA	ST14
	DA	ST15
	DA	ST16
	DA	ST17
	DA	ST18
	DA	ST19
	DA	ST1A
	DA	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