ORG 0100H
START:	LXI D,INAY
	CALL DISST
	CALL KEY
	LXI D,INBY
	CALL DISST
	CALL KEY
	LXI D,IN3Y
	CALL DISST
	CALL KEY
	LXI D,IN4Y
	CALL DISST
	CALL KEY
	LXI D,IN5Y
	CALL DISST
	CALL KEY
	LXI D,IN6Y
	CALL DISST
	CALL KEY
	LXI D,IN7Y
	CALL DISST
	CALL KEY
	LXI D,IN8Y
	CALL DISST
	CALL KEY
	LXI D,IN9Y
	CALL DISST
	CALL KEY
	LXI D,INAY
	CALL DISST
	CALL KEY
	JMP START
DISST: MVI C,09H	;BDOS CODE
	CALL 5
	RET
KEY:	MVI C,01H
	CALL 5
	RET
IN1Y:	
DB' 3273-K211/212/213/801 RS232 INTERFACE DIAGNOSTIC PROGRAM',0AH,0DH
DB'==========================================================',0AH,0DH
DB'                     (Version PDR 001 )',0AH,0DH,0DH,0DH
DB'     SELECT YOUR UNIT UNDER TEST :',0AH,0DH,0AH
DB'       1   K211        MODEM',0AH,0DH
DB'       2   K212        PRINTER',0AH,0DH
DB'       3   K213        PLOTTER',0AH,0DH
DB'       4   K801        SWITCH RS232 IF',0AH,0DH,0AH,0AH,0AH
DB' EXIT TO OPERATING SYSTEM : ^C',0AH,0DH,'$'
IN2Y:
DB' 3273-K211  RS-232 MODEM  IF DIAGNOSTIC PROGRAM',0AH,0DH
DB'------------------------------------------------',0AH,0DH 
DB'                    (Version PDR 001 )',0AH,0DH,0AH,0AH
DB'    THE K211 BASE PORT ADDRESS MUST BE: 70 HEX',0AH,0DH
DB'                                 IFSEL: 1',0AH,0DH,0AH,0AH
DB' FOR DETAILS SEE YOUR K211 RS-232 IF INSTALLATION DOCUMENTATION',0AH,0DH,0AH,0AH
DB' CONNECT THE K211 TURNAROUND ADAPTER TO THE K211 CABLE',0AH,0DH
DB' (ACC. DIAGNOSTIC PROGRAM DESCRITION)',0AH,0DH,0AH,0AH,0AH
DB' CONTINUE                : CR',0AH,0DH
DB' EXIT TO OPERATING SYSTEM: ^C ',0AH,0DH,'$'
IN3Y:
DB' 3273-K212  RS-232 PRINTER  IF DIAGNOSTIC PROGRAM',0AH,0DH
DB'--------------------------------------------------',0AH,0DH 
DB'                    (Version PDR 001 )',0AH,0DH,0AH,0AH
DB'    THE K212 BASE PORT ADDRESS MUST BE: 60 HEX',0AH,0DH
DB'                                 IFSEL: 0',0AH,0DH,0AH,0AH
DB' FOR DETAILS SEE YOUR K212 RS-232 IF INSTALLATION DOCUMENTATION',0AH,0DH,0AH,0AH
DB' CONNECT THE K212 TURNAROUND ADAPTER TO THE K212 CABLE',0AH,0DH
DB' (ACC. DIAGNOSTIC PROGRAM DESCRITION)',0AH,0DH,0AH,0AH,0AH
DB' CONTINUE                : CR ',0AH,0DH
DB' EXIT TO OPERATING SYSTEM: ^C ',0AH,0DH,'$'
IN4Y:
DB' 3273-K213  RS-232 PLOTTER  IF DIAGNOSTIC PROGRAM',0AH,0DH
DB'--------------------------------------------------',0AH,0DH 
DB'                    (Version PDR 001 )',0AH,0DH,0AH,0AH
DB'    THE K213 BASE PORT ADDRESS MUST BE: 60 HEX',0AH,0DH
DB'                                 IFSEL: 0',0AH,0DH,0AH,0AH
DB' FOR DETAILS SEE YOUR K213 RS-232 IF INSTALLATION DOCUMENTATION',0AH,0DH,0AH,0AH
DB' CONNECT THE K213 TURNAROUND ADAPTER TO THE K213 CABLE',0AH,0DH
DB' (ACC. DIAGNOSTIC PROGRAM DESCRITION) ',0AH,0DH,0AH,0AH,0AH
DB' CONTINUE                : CR ',0AH,0DH
DB' EXIT TO OPERATING SYSTEM: ^C ',0AH,0DH,'$'
IN5Y:
DB' 3273-K801  SWITCH.RS-232 IF DIAGNOSTIC PROGRAM',0AH,0DH
DB'------------------------------------------------',0AH,0DH 
DB'                    (Version PDR 001 )',0AH,0DH,0AH,0AH
DB' SELECT   YOUR TEST ENVIRONMENT:',0AH,0DH,0AH
DB'     IFSEL     BADD     CABLE CONVERTER',0AH,0DH
DB'     -----------------------------------',0AH,0DH
DB'  1   1A        70      CC01 COMUNICATION/MODEM',0DH,0AH
DB'  2   0A        60      CC02 PRINTER',0AH,0DH
DB'  3   0A        60      CC03 PLOTTER',0AH,0DH
DB'  X   XX        XX      CC04 BLANK (USER DEFINED)',0AH,0DH
DB'                             INSERT CC01,CC02, OR CC03',0AH,0DH,0AH,0AH 
DB' FOR DETAILS SEE YOUR K801 RS-232 IF INSTALLATION DOCUMENTATION',0AH,0AH,0DH,0AH,0AH
DB' XXXXXXXXXXXXXXXX a, b, c XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',0AH,0DH,0AH
DB' CONTINUE                :  CR',0AH,0DH
DB' EXIT TO OPERATING SYSTEM: ^C',0AH,0DH,'$'
IN6Y:DB' (a) CONNECT THE K211 TURNAROUND ADAPTER TO K801 CABLE',0AH,0DH,'$'
IN7Y:DB' (b) CONNECT THE K212 TURNAROUND ADAPTER TO K801 CABLE',0AH,0DH,'$'
IN8Y:DB' (c) CONNECT THE K213 TURNAROUND ADAPTER TO K801 CABLE',0AH,0DH,'$'
IN9Y:
DB' CONTINUE ON ERROR ? (Y/N)',0AH,0DH
DB' PROGRAM LOOP ? (Y/N)',0AH,0DH
DB' QUIT PROGRAM LOOP ? (Q)',0AH,0DH,'$'
INAY:
DB'DM V BUS TEST               OK           **ERROR**',0AH,0DH
DB'LOCAL LOOP BACK             OK           **ERROR**',0AH,0DH
DB'REMOTE LOOP BACK            OK           **ERROR**',0AH,0DH
DB'BAUD RATE GEN.TEST          OK           **ERROR**',0AH,0DH
DB'STOP BIT,PARITY,CHAR.LENGHT OK           **ERROR**',0AH,0DH,0AH,0AH
DB'NOT CHECKED SIGNAL LINES:  TSET,RSET,DSRS',0AH,0DH
DB'CHECK -8V, +12V  BY A MULTIMETER',0AH,0DH,0AH,0DH,0AH
DB' CONTINUE    (RESTART)    : CR',0AH,0DH
DB' EXIT TO OPERATING SYSTEM : ^C $' 
INBY:
DB'  DM V BUS ERROR',0AH,0DH
DB'  OR WRONG BASE PORT ADDRESS VIA IFSEL SWITCH SELECTED',0AH,0AH,0DH
DB'        SWITCH      PORT ADDRESS',0AH,0DH
DB'        0A          60 HEX    Reserved for K212/211',0ah,0dh
DB'        0B          68 HEX    Reserved for K212/211',0AH,0DH
DB'        1A          70 HEX    ',0AH,0DH
DB'        1B          78 HEX    ',0AH,0DH
DB'        2A          30 HEX    Reserved for DSA',0AH,0DH
DB'        2B          38 HEX    ',0AH,0DH
DB'        3A          B0 HEX    ',0AH,0DH
DB'        3B          B8 HEX    ',0AH,0DH
DB'        4A          C0 HEX    Reserved for Hard disk',0AH,0DH
DB'        4B          C8 HEX    ',0AH,0DH,0AH,0AH
DB' Check your K-804 IFSEL Switch setting.',0ah,0dh
DB' For details see your K-804 IEEE 488 Installation documentation.',0ah,0dh,0AH
DB' CONTINUE : CR $'        
;END