plato:source:plaopl:asc1rom
Table of Contents
ASC1ROM
Table Of Contents
Source Code
- ASC1ROM.txt
- ASC1ROM
- IDENT ASC1ROM
- *
- * 'REVISION 'B005
- *
- ************************************************************************
- *
- * OUTPUT FUNCTION DEFINITIONS
- *
- ************************************************************************
- *
- * CHANNEL FUNCTION DESCRIPTION
- *
- * 0 0 OPERATORS PANEL DATA
- *
- * OUTPUT FROM A REGISTER
- * BIT 1 OUTPUT REGISTER BIT 1
- * BIT 2 OUTPUT REGISTER BIT 2
- * BIT 3 OUTPUT REGISTER BIT 3
- * BIT 4 OUTPUT REGISTER BIT 4
- * BIT 5 OUTPUT REGISTER BIT 5
- * BIT 6 OUTPUT REGISTER BIT 6
- * BIT 7 COMMUNICATION ERROR INDICATOR
- * BIT 8 UNUSED
- *
- * 1 0 COMMUNICATION CHANNEL DATA
- *
- * OUTPUT FROM A REGISTER
- * BIT 1 COMMUNICATION OUTPUT BIT 1
- * BIT 2 COMMUNICATION OUTPUT BIT 2
- * BIT 3 COMMUNICATION OUTPUT BIT 3
- * BIT 4 COMMUNICATION OUTPUT BIT 4
- * BIT 5 COMMUNICATION OUTPUT BIT 5
- * BIT 6 COMMUNICATION OUTPUT BIT 6
- * BIT 7 COMMUNICATION OUTPUT BIT 7
- * BIT 8 COMMUNICATION OUTPUT BIT 8
- *
- * 1 1 COMMUNICATION CHANNEL DATA
- *
- * OUTPUT FROM A REGISTER
- * BIT 1 COMUNICATION OUTPUT BIT 9
- * BIT 2 COMUNICATION OUTPUT BIT 10
- * BIT 3-8 UNUSED
- *
- * 1 2 COMMUNICATION CHANNEL CONTROL
- *
- * OUTPUT FROM A REGISTER
- * BIT 1 ENABLE CHARACTER READY INTERRUPT
- * BIT 2 ENABLE CHARACTER REQUEST INTERRUPT
- * BIT 3 ENABLE LOOP BACK
- * BIT 4-8 UNUSED
- *
- * 2 0 KEYBOARD CONTROL
- *
- * OUTPUT FROM A REGISTER
- * BIT 1 ENABLE CHARACTER READY INTERRUPT
- * BIT 2-8 UNUSED
- * 3 0 TOUCH PANEL CONTROL
- *
- * OUTPUT FROM A REGISTER
- * BIT 1 ENABLE CHARACTER READY INTERRUPT
- * BIT 2-8 UNUSED
- *
- * 3 1 SLIDE PROJECTOR CONTROL
- * OUTPUT FROM A REGISTER
- *
- * BIT 1 SHUTTER OPEN=/ CLOSED=1
- * BIT 2 LAMP OFF=0 ON=1
- *
- * 3 2 SLIDE PROJECTOR DATA
- *
- * OUTPUT FROM A REGISTER
- * BIT 1 Y IMAGE COORDINATE BIT 1
- * BIT 2 Y IMAGE COORDINATE BIT 2
- * BIT 3 Y IMAGE COORDINATE BIT 3
- * BIT 4 Y IMAGE COORDINATE BIT 4
- * BIT 5 X IMAGE COORDINATE BIT 1
- * BIT 6 X IMAGE COORDINATE BIT 2
- * BIT 7 X IMAGE COORDINATE BIT 3
- * BIT 8 X IMAGE COORDINATE BIT 4
- * 4 3 DISPLAY DATA
- *
- * OUTPUT FROM A REGISTER
- * BIT 1 CHARACTER DATA BIT
- * BIT 2-7 UNUSED
- * BIT 8 VECTOR DATA BIT
- *
- * 4 4 DISPLAY X COORDINATE
- *
- * OUTPUT FROM A REGISTER
- * BIT 1 X COORDINATE BIT 1
- * BIT 2 X COORDINATE BIT 2
- * BIT 3 X COORDINATE BIT 3
- * BIT 4 X COORDINATE BIT 4
- * BIT 5 X COORDINATE BIT 5
- * BIT 6 X COORDINATE BIT 6
- * BIT 7 X COORDINATE BIT 7
- * BIT 8 X COORDINATE BIT 8
- *
- * 4 5 DISPLAY Y COORDINATE
- *
- * OUTPUT FROM A REGISTER
- * BIT 1 Y COORDINATE BIT 1
- * BIT 2 Y COORDINATE BIT 2
- * BIT 3 Y COORDINATE BIT 3
- * BIT 4 Y COORDINATE BIT 4
- * BIT 5 Y COORDINATE BIT 5
- * BIT 6 Y COORDINATE BIT 6
- * BIT 7 Y COORDINATE BIT 7
- * BIT 8 Y COORDINATE BIT 8
- *
- * 4 6 DISPLAY CONTROL 1
- *
- * OUTPUT FROM A REGISTER
- * BIT 1 X COORDINATE BIT 9
- * BIT 2 Y COORDINATE BIT 9
- * BIT 3 ENABLE LOAD X/Y COORDINATE BITS
- * BIT 4 X DIRECTION DEC EQUALS 1
- * BIT 5 Y DIRECTION DEC EQUALS 1
- * BIT 6 SHORT AXIS Y AXIS EQUALS 1
- * BIT 7 INHIBIT WRITE/ERASE INHIBIT EQUAL 1
- * BIT 8 VECTOR/CHARACTER VECTOR EQUALS 1
- *
- * 4 7 DISPLAY CONTROL 2
- *
- * OUTPUT FROM A REGISTER
- * BIT 1 BULK ERASE
- * BIT 2 W/E0
- * BIT 3 W/E1
- * BIT 4 ENABLE SELECT INVERSE VIDEO
- * BIT 5 SELECT INVERSE VIDEO
- * BIT 6 ENABLE CHARACTER ORIENTATION
- * BIT 7 CHARACTER ORIENTATION
- * BIT 8 UNUSED
- *
- ************************************************************************
- ************************************************************************
- *
- * INPUT FUNCTION DEFINITIONS
- *
- ************************************************************************
- *
- * CHANNEL FUNCTION DESCRIPTION
- *
- * 0 1 OPERATORS PANEL DATA
- *
- * BIT 1 INPUT REGISTER BIT 1
- * BIT 2 INPUT REGISTER BIT 2
- * BIT 3 INPUT REGISTER BIT 3
- * BIT 4 INPUT REGISTER BIT 4
- * BIT 5 INPUT REGISTER BIT 5
- * BIT 6 INPUT REGISTER BIT 6
- * BIT 7 UNUSED
- * BIT 8 UNUSED
- *
- * 1 0 COMMUNICATION CHANNEL DATA
- *
- * BIT 1 COMMUNICATION INPUT BIT 13
- * BIT 2 COMMUNICATION INPUT BIT 14
- * BIT 3 COMMUNICATION INPUT BIT 15
- * BIT 4 COMMUNICATION INPUT BIT 16
- * BIT 5 COMMUNICATION INPUT BIT 17
- * BIT 6 COMMUNICATION INPUT BIT 18
- * BIT 7 COMMUNICATION INPUT PARITY BIT
- * BIT 8 COMMUNICATION INPUT BIT 19
- *
- *
- * 1 1 COMMUNICATION CHANNEL DATA
- *
- * BIT 1 COMMUNICATION INPUT BIT 7
- * BIT 2 COMMUNICATION INPUT BIT 8
- * BIT 3 COMMUNICATION INPUT BIT 9
- * BIT 4 COMMUNICATION INPUT BIT 10
- * BIT 5 COMMUNICATION INPUT BIT 11
- * BIT 6 COMMUNICATION INPUT BIT 12
- * BIT 7 ZERO
- * BIT 8 ZERO
- *
- * 1 2 COMMUNICATION CHANNEL DATA
- *
- * BIT 1 COMMUNICATION INPUT BIT 1
- * BIT 2 COMMUNICATION INPUT BIT 2
- * BIT 3 COMMUNICATION INPUT BIT 3
- * BIT 4 COMMUNICATION INPUT BIT 4
- * BIT 5 COMMUNICATION INPUT BIT 5
- * BIT 6 COMMUNICATION INPUT BIT 6
- * BIT 7 UNUSED
- * BIT 8 UNUSED
- *
- * 1 3 COMMUNICATION CHANNEL STATUS
- *
- * BIT 1-4 UNUSED
- * BIT 5 OVERRUN
- * BIT 6 PARITY ERROR
- * BIT 7 CHARACTER REQUEST
- * BIT 8 CHARACTER READY
- *
- * 2 2 KEYBOARD DATA
- *
- * BIT 1 KEYBOARD INPUT DATA BIT 1
- * BIT 2 KEYBOARD INPUT DATA BIT 2
- * BIT 3 KEYBOARD INPUT DATA BIT 3
- * BIT 4 KEYBOARD INPUT DATA BIT 4
- * BIT 5 KEYBOARD INPUT DATA BIT 5
- * BIT 6 KEYBOARD INPUT DATA BIT 6
- * BIT 7 KEYBOARD INPUT DATA BIT 7
- * BIT 8 ZERO
- *
- * 2 1 KEYBOARD STATUS
- *
- * BIT 1 CHARACTER READY
- * BIT 2-8 UNUSED
- *
- * 3 0 TOUCH PANEL DATA
- *
- * BIT 1 Y POSITION BIT 1
- * BIT 2 Y POSITION BIT 2
- * BIT 3 Y POSITION BIT 3
- * BIT 4 Y POSITION BIT 4
- * BIT 5 X POSITION BIT 1
- * BIT 6 X POSITION BIT 2
- * BIT 7 X POSITION BIT 3
- * BIT 8 X POSITION BIT 4
- *
- * 3 1 TOUCH PANEL STATUS
- *
- * BIT 1 CHARACTER READY
- * BIT 2-8 UNUSED
- *
- * 4 0 DISPLAY READ X REGISTER
- *
- * BIT 1 X REGISTER BIT 1
- * BIT 2 X REGISTER BIT 2
- * BIT 3 X REGISTER BIT 3
- * BIT 4 X REGISTER BIT 4
- * BIT 5 X REGISTER BIT 5
- * BIT 6 X REGISTER BIT 6
- * BIT 7 X REGISTER BIT 7
- * BIT 8 X REGISTER BIT 8
- *
- * 4 1 DISPLAY READ Y REGISTER
- *
- * BIT 1 Y REGISTER BIT 1
- * BIT 2 Y REGISTER BIT 2
- * BIT 3 Y REGISTER BIT 3
- * BIT 4 Y REGISTER BIT 4
- * BIT 5 Y REGISTER BIT 5
- * BIT 6 Y REGISTER BIT 6
- * BIT 7 Y REGISTER BIT 7
- * BIT 8 Y REGISTER BIT 8
- *
- * 4 2 DISPLAY READ X/Y
- *
- * BIT 1 X REGISTER BIT 9
- * BIT 2 Y REGISTER BIT 9
- * BIT 3-8 UNUSED
- ************************************************************************
- ************************************************************************
- *
- * EQUATE STATEMENTS
- *
- ************************************************************************
- * VIDEO DISPLAY
- DISCHAN EQU 4 DISPLAY CHANNEL NUMBER
- DISDATA EQU 3 DISPLAY DATA
- DISCON1 EQU 6 DISPLAY CONTROL 1 FUNCTION
- DISCON2 EQU 7 DISPLAY CONTROL 2 FUNCTION
- YCOORD EQU 5 DISPLAY Y COORDINATE DATA
- XCOORD EQU 4 DISPLAY X COORDINATE DATA
- XYREAD EQU 2 DISPLAY READ XY BIT 9 FUNCTION
- ************************************************************************
- *
- * INTERRUPT AREA
- *
- * THE TERMINAL HAS EIGHT PRIORITY ENCODED INTERRUPT LINES.
- * LOWER NUMBERED INTERRUPT LINES HAVE A HIGHER PRIORITY THAN
- * HIGHER NUMBERED INTERRUPT LINES. THE PROCESSOR RECOGNIZES THE
- * INTERRUPT AT THE END OF THE CURRENT INSTRUCTION. THE
- * CURRENT VALUE OF THE PROGRAM COUNTER IS PUSHED INTO THE
- * PUSHDOWN STACK AND THE PROGRAM COUNTER IS SET TO THE TRAP
- * LOCATION DEFINED BY THE ACTIVATED INTERRUPT LINE.
- *
- * INTERRUPT LOCATION DEVICE
- * 0 HEX 00 MASTER CLEAR
- * 1 HEX 08 COMMUNICATION CHANNELS
- * 2 HEX 10 KEYBOARD
- * 3 HEX 18 TOUCH PANEL
- * 4 HEX 20 RESERVED
- * 5 HEX 28 EXTERNAL INTERFACE
- * 6 HEX 30 OPTIONS
- * 7 HEX 38 OPTIONS
- *
- ************************************************************************
- START EQU $
- *
- TRAP0 EQU $
- DI
- JMP RST.SEC0 MASTER RESET
- DB #00,#00,#00,#00
- *
- TRAP1 EQU $
- IN RSF.COMM*32+COMMSTAT
- XRA A TURN OFF THIS INT.
- OUT RSF.COMM*32+COMMCONT
- EI ENABLE SYSTEM INT.S
- RET
- DB #00
- *
- TRAP2 EQU $
- PUSH PSW KEYBOARD
- PUSH B
- PUSH D
- PUSH H
- JMP KEYINP
- *
- DB #00
- *
- TRAP3 EQU $
- PUSH PSW TOUCH PANEL
- PUSH B
- PUSH D
- PUSH H
- JMP TOUCHINP
- *
- DB #00
- *
- TRAP4 EQU $
- RET UNASSIGNED
- *
- DB #00,#00,#00,#00,#00,#00,#00
- *
- TRAP5 EQU $
- PUSH PSW
- PUSH B
- PUSH D
- PUSH H
- JMP EXT.PR EXTERNAL INTERRUPT
- DB #00
- *
- TRAP6 EQU $
- PUSH PSW
- PUSH B
- PUSH D
- PUSH H
- JMP EXT.PR EXTERNAL INTERRUPT
- DB #00
- *
- TRAP7 EQU $
- PUSH PSW
- PUSH B
- PUSH D
- PUSH H
- JMP EXT.PR EXTERNAL INTERRUPT
- DB #00
- * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * USER JUMP TABLE TO ACCESS RESIDENT ROUTINES.
- *
- * * * * * * * * * * * * * * * * * * * * * * * *
- R.INIT JMP #4051 PLATO INITIALIZE
- R.DOT JMP #4003 WRITE/ERASE DOT
- R.LINE JMP #4006 DRAW LINE
- R.CHARS JMP CHARS DISPLAY CHARACTERS
- R.BLOCK JMP #400C BLOCK WRITE/ERASE
- R.INPX JMP #400F READ DISPLAY X COORD
- R.INPY JMP #4012 READ DISPLAY Y COORD
- R.OUTX JMP OUTX SETS NEW X COORD
- R.OUTY JMP OUTY SETS NEW Y COORD
- R.XMIT JMP #401B TRANSMIT DATA TO HLP
- R.MODE JMP MODESET SETS MODE,W/E,BULK ERASE
- R.STEPX JMP #4021 STEPS X AXIS COORD
- R.STEPY JMP #4024 STEPS Y AXIS COORD
- R.WE JMP #4027 W/E CURRENT POSITION
- R.DIR JMP #402A SET DIRECTION OF XY STEP
- R.INPUT JMP #402D DIRECTS DEVICE INPUT
- R.SSF JMP #4030 SELECT SPECIAL FUNCTION
- R.CCR JMP CCR SET CHARACTER INFO.
- R.EXTOUT JMP #4036 TO R.RETURN FOR NOW
- R.EXEC JMP #4039
- R.GJOB JMP #403C
- R.XJOB JMP #403F
- R.RETURN JMP #4042 RESTORE, ENABLE, RETURN
- JMP #4045 EXPANSION
- EXT.PR JMP #4048
- KEYINP JMP #404B
- TOUCHINP JMP #404E
- A.INIT JMP #4000 ASCII INITIALIZE
- DB #00,#00
- M0ADR DW M0CODE00
- M1ADR DW M1CODE00
- *
- * EXTERNAL ENTRY TO VARIOUS ROUTINES
- * BEGINNING AT ADDRESS #009A
- JMP SUPER
- JMP SUB
- JMP SELECTM0
- JMP SELECTM1
- JMP SELECTMM
- JMP HORZ
- JMP VERTICAL
- JMP FORWARD
- JMP REVERSE
- JMP SIZE.1
- JMP SIZE.2
- JMP BKSPACE
- JMP RETURN
- JMP TAB
- JMP LINEFEED
- JMP VERTAB
- JMP FORMFEED
- * MODE 3 - CHARACTER MODE USER ENTRY
- *
- CHARS EQU $
- MOV A,M LOAD DATA BYTE.
- INX H INCREMENT ADDRESS TO NEXT BYTE.
- SHLD M.ORG AND STORE FOR NEXT BYTE.
- ANI #7F MASK FOR SEVEN BIT CHARACTER CODES.
- MOV C,A SAVE CHARACTER CODE
- CPI #1B TEST FOR ESCAPE SEQ.
- JZ CHARACT4 SET FLAG FOR CONTROL CODE.
- *
- LXI H,M.CCR LOAD ADDRESS OF UNCOVER FLAG
- MVI A,#80 AND TEST FOR
- ANA M UNCOVER CODE IN PREVIOUS CHARACTER
- JZ CHARACT3 NOT CONTROL, PROCESS DATA.
- MVI A,#7F CLEAR ESCAPE FLAG
- ANA M
- MOV M,A
- MOV A,C EXIT IF ESC ASCII ZERO
- CPI #30
- RZ
- *
- * EXECUTE CONTROL FUNCTION DEFINED BY CHARACTER CODE
- *
- MOV A,C LOAD CHARACTER CODE
- CPI #40
- JC CHARACT2 CHARACT2, SEQ OUT OF RANGE
- CPI #50
- JNC CHARACT2 CHARACT2, SEQ OUT OF RANGE
- SUI #40 IN RANGE
- LXI H,CHARESC BASE ADDR ESC TBL
- CALL CONTROL
- JMP CHARACT2
- CHARACT2 EQU $
- LHLD M.ORG LOAD FWA OF DATA
- JMP CHARS LOAD NEXT CHARACTER CODE.
- *
- *
- CHARACT3 EQU $
- MOV A,C LOAD CHARACTER CODE
- CPI #20
- JNC CHAR3.A CHAR3.A, NOT CTL CODE
- CPI #08 TEST FOR CTL RANGE
- JC CHARACT2 CHARACT2, CTL OUT OF RANGE
- CPI #0E
- JP CHARACT2 CHARACT2, CTL OUT OF RANGE
- SUI #08 IN RANGE
- LXI H,CHARCTL BASE ADDR CTL TBL
- CALL CONTROL
- JMP CHARACT2
- CHAR3.A EQU $
- SUI #20
- CALL CHAREN AND DISPLAY CHARACTER.
- JMP CHARACT2
- *
- CHARACT4 EQU $
- LXI B,#7F80
- CALL UD.CCR
- JMP CHARACT2
- CHARCTL EQU $
- DW BKSPACE
- DW TAB
- DW LINEFEED
- DW VERTAB
- DW FORMFEED
- DW RETURN
- *
- CHARESC EQU $
- DW SUPER
- DW SUB
- DW SELECTM0
- DW SELECTM1
- DW SELECT SELECT M2, M3
- DW SELECT
- DW SELECT M4, M5, M6, OR M7
- DW SELECT
- DW SELECT CHARACTER SET.
- DW SELECT
- DW HORZ
- DW VERTICAL
- DW FORWARD
- DW REVERSE
- DW SIZE.1 8 X 16 CHARACTERS
- DW SIZE.2 16 X 32 CHARACTERS
- *
- CONTROL EQU $
- RLC
- MVI B,#00 CLEAR REGISTER B
- MOV C,A LOAD CHARACTER CODE
- DAD B FORM JUMP TABLE TABLE POINTER
- MOV E,M LOAD LEAST SIGN BYTE
- INX H INCREMENT ADDRESS
- MOV D,M LOAD MOST SIGN BYTE
- XCHG
- LXI D,HOR LOAD HOR PLOT FLAG ADDRESS.
- PCHL
- BKSPACE EQU $
- LDA FWD.REV LOAD FORWARD REVERSE FLAG
- CMA AND COMPLIMENT IT.
- STA FWD.REV
- CALL CH.PLOT CALCULATE VARIABLES FOR OPPOSITE PLOT
- CALL DISP.TAB TAB TO NEXT CHARACTER POSITION.
- LDA FWD.REV LOAD FORWARD REVERSE FLAG
- CMA AND RESTORE TO
- STA FWD.REV THE ORIGINAL .
- JMP CH.PLOT RESET PLOTTING VARIABLES.
- *
- TAB EQU $
- JMP DISP.TAB TAB TO NEXT CHARACTER POSITION.
- *
- LINEFEED EQU $
- LDAX D LOAD HOR. PLOT FLAG
- ANA A AND TEST FOR ZERO.
- LXI B,#FFF0 LOAD TAB ADJUSTMENT
- JNZ V.ADJ ADJUST VERTICAL
- LXI B,16 LOAD HOR. ADJUST
- JMP H.ADJ AMD ADJUST HOR.
- *
- VERTAB EQU $
- LDAX D LOAD HOR. PLOT FLAG
- ANA A AND TEST.
- LXI B,16 LOAD TAB ADJUST
- JNZ V.ADJ AND ADJUST VERT.
- LXI B,#FFF0 LOAD TAB ADJUST
- JMP H.ADJ AND ADJUST HOR.
- *
- FORMFEED EQU $
- LXI H,0000 LOAD COORDINATE 00
- LDA FWD.REV TEST FLAG FOR
- ORA A FORWARD OR REVRESE PLOT.
- CNZ FF.3 LOAD REVERSE PLOT COORDINATE.
- *
- * FORWARD PLOT SETTING.
- *
- LDAX D LOAD HOR. PLOT FLAG
- ORA A OR HORIZONTAL PLOT.
- JZ FF.2 GO TO VERTICAL SETTING.
- *
- * HORIZONTAL PLOT SETTING.
- *
- FF.1 EQU $
- CALL OUTX OUTPUT X COORDINATE.
- LXI H,512 LOAD FULL SCREEN COORDINATE
- LXI B,#FFF0 LOAD 2 " SIZE
- CALL SIZE.ADJ AND ADJUST FOR CHARACTER SIZE.
- JMP OUTY OUTPUT Y COORDINATE.
- *
- * VERTICAL PLOT SETTING.
- *
- FF.2 EQU $
- CALL OUTY OUTPUT Y COORDINATE.
- LXI H,#FFFF LOAD ADJUST VALUE
- LXI B,16 LOAD 2 X SIZE.
- CALL SIZE.ADJ ADJUST FOR CHARACTER SIZE.
- JMP OUTX OUTPUT X COORDINATE
- *
- * REVERSE PLOT SETTING.
- *
- FF.3 EQU $
- LXI H,512 LOAD FULL SCREEN COORDINATE.
- LXI B,#FFF8 LOAD NEGATIVE SIZE
- JMP SIZE.ADJ ADJUST FOR CHARACTER SIZE.
- *
- RETURN EQU $
- LHLD M.MARGIN LOAD DISPLAY MARGIN.
- LDAX D LOAD HOR. PLOT FLAG
- ANA A AND TEST.
- JZ RETURN1 NOT HORIZONTAL.
- *
- CALL OUTX OUTPUT X COORDINATE.
- LXI B,#FFF0 LOAD VERTICAL ADJUST
- JMP V.ADJ
- *
- RETURN1 EQU $
- CALL OUTY OUTPUT Y COORDINATE.
- LXI B,16 LOAD HORIZONTAL ADJUST VALUE.
- JMP H.ADJ
- *
- SUPER EQU $
- LDAX D LOAD HOR. PLOT FLAG
- ANA A AND TEST
- LXI B,05 LOAD SUPERSCRIPT ADJUST FOR HOR.
- JNZ V.ADJ ADJUST VERT.
- LXI B,#FFFB LOAD SUPERSCRIPT ADJUST
- JMP H.ADJ
- *
- SUB EQU $
- LDAX D LOAD HOR. PLOT FLAG
- ANA A AND TEST.
- LXI B,#FFFB LOAD SUBSCRIPT ADJUST
- JNZ V.ADJ ADJUST VERT.
- LXI B,05 LOAD ADJUST FOR SUBSCRIPT FOR VERT.
- JMP H.ADJ GO ADJUST HOR.
- *
- SELECTM0 EQU $
- LHLD M0ADR LOAD ADDRESS OF M0
- JMP SELECT.1
- SELECTM1 EQU $
- LHLD M1ADR LOAD ADDRESS OF M1
- JMP SELECT.1
- *
- SELECTMM EQU $
- MOV A,C
- SUI #44
- RLC
- JMP SELECT.0
- *
- SELECT EQU $
- RRC ADJUST CODE FOR INDEX
- SUI #08
- SELECT.0 EQU $
- MOV E,A ADDRESS STORE.
- *
- LXI H,MEMORY.2 LOAD ADDR. OF MEM2 POINTER
- MVI D,00
- DAD D AND ADD INDEX.
- *
- MOV E,M LOAD CHARACTER SET
- INX H ADDRESS FROM
- MOV D,M STORE AREA.
- XCHG
- *
- SELECT.1 EQU $
- SHLD MEMSEL CHARACTER SET
- MOV A,C GET BIT PATTERN SET UP
- ADI #0C FOR SETTING M.CCR WITH
- MOV C,A CORRECT CHARACTER SET
- MVI A,#0E MASK BITS
- ANA C FOR MEMORY SELECTED.
- MOV C,A
- MVI B,#F1
- JMP UD.CCR GO SET FLAG.
- HORZ EQU $
- XCHG LOAD HOR FLAG ADDRESS
- MVI M,#FF AND SET TO ALL ONES FOR HOR. PLOT.
- INX H INCREMENT ADDRESS TO VERT.
- MVI M,00 AND CLEAR VERT PLOT FLAG.
- *
- CALL CH.PLOT CALL ROUTINE TO CALCULATE PLOTTING.
- LXI B,#FE00 LOAD MASK AND HOR BITS
- CALL UD.CCR GO UPDATE PLOT FLAG
- MVI A,#20 SET HORIZONTAL CHARACTER ORIENTATION.
- JMP VERTICA1
- VERTICAL EQU $
- XCHG LOAD HOR FLAG ADDRESS
- MVI M,00 CLEAR HOR PLOT FLAG.
- INX H INCREMENT ADDRESS
- MVI M,#FF AND SET FLAG FOR VERT. PLOT.
- CALL CH.PLOT CALL ROUTINE TO CALCULATE PLOTTING.
- LXI B,#FE01 LOAD MASK AND VERT BIT
- CALL UD.CCR GO UPDATE PLOT FLAG
- XRA A CLEAR A REGISTER.
- VERTICA1 EQU $
- ORI #40 SET ORIENTATION ENABLE BIT
- MOV B,A SAVE ORIENTATION BITS
- LDA D.CNTL2 LOAD DISPLAY CONTROL 2
- ANI 06 AND MASK WRITE EREASE BITS.
- ORA B ADD ORIENTATION BITS TO CONTROL
- STA D.CNTL2 AND STORE FOR CHARACTER GENERATOR.
- RET
- REVERSE EQU $
- MVI A,#FF LOAD REVERSE FLAG
- JMP FRWD.1
- FORWARD EQU $
- XRA A LOAD FORWARD FLAG
- *
- FRWD.1 EQU $
- STA FWD.REV STORE FORWARD REVERSE FLAG
- LXI B,#BF40 LOAD MASK AND REVERSE BIT
- ANA C SET REVERSE FOR FORWARD OR REVERSE
- MOV C,A
- CALL UD.CCR GO UPDATE PLOT FLAG
- JMP CH.PLOT CALL ROUTINE TO CALCULATE PLOTTING.
- SIZE.2 EQU $
- MVI A,16 LOAD SIZE TWO
- LXI H,CHAR.S2 LOAD CHARACTER GENERATOR FOR SIZE 2
- JMP SIZE.11
- SIZE.1 EQU $
- MVI A,8 LOAD SIZE ONE.
- LXI H,CHAR.S1 LOAD CHARACTER GENERATOR FOR SIZE 1
- SIZE.11 EQU $
- SHLD CHAR.GEN STORE CHARACTER GENERATOR ADDRESS.
- STA SIZE IN SIZE REGISTER.
- MVI B,#DF LOAD MASK
- RLC ROTATE SIZE BIT
- ANI #20 AND MASK FOR SIZE TWO
- MOV C,A
- CALL UD.CCR GO UPDATE PLOT FLAG
- JMP CH.PLOT CALL ROUTINE TO CALCULATE PLOTTING.
- *
- * UPDATE OF M.CCR
- *
- UD.CCR EQU $
- LDA M.CCR LOAD CURRENT FLAG.
- ANA B MASK BIT BEING CHANGED
- ORA C SET NEW VALUE OF BIT
- STA M.CCR STORE UPDATED FLAG.
- RET RETURN TO CALLER
- ************************************************************************
- *
- * CHARACTER GENERATOR
- *
- ************************************************************************
- * THE FORMAT OF MODE 3 DATA WORDS CONTAINS THREE 6 BIT CHARACTER
- * THESE CODES DEFINES THE MEMORY ADDRESSES OF THE CHARACTERS TO B
- * PLOTTED. FOUR 64 CHARACTER MEMORIES ARE CONTAINED IN THE TERMI
- * MEMORIES M0 AND M1 CONTAIN FIXED CHARACTERS AND MEMORIES M2 AND
- * CONTAIN VARIABLE CHARACTERS LOADED BY MODE 1 WORDS AND ARE PROC
- * BY MODE 3 AS 64 ARRAYS OF 8X16 MATRIX. THE TOP THREE ROWS AND T
- * BOTTOM ROW OF THE MATRICES FOR ALL CHARACTERS FROM M0 AND M1 AR
- * ALWAYS UNFILLED. LIKEWISE THE EIGHTH COLOMN IS ALSO UNFILLED T
- * PROVIDE INTERCHARACTER SPACING. AS A RESULT THE BASIC CHARACTE
- * IS 7X9 FOR THE CHARACTERS FROM M0 AND M1 MEMORIES
- *
- * CHARACTER WRITE/ERASE IS CONTROLLED BY THE WRITE/ERASE BITS IN
- * LDM INSTRUCTION WORD. IF BIT 2=1,CHARACTERS ARE WRITTEN IN
- * ACCORDANCE WITH DATA STORED IN M0 AND M1.IF BIT 2=0,CHARACTERS
- * ARE ERASED. IF BIT 3=0,THE BACKGROUND OF EACH CHARACTER MATRIX
- * ERASED.IF BIT 3=1,THE BACKGROUND REMAINS UNALTERED(OVERSTRIKE).
- *
- * WHEN A CHARACTER HAS BEEN COMPLETELY PLOTTED THE X/Y ADDRESS IS
- * AT THE LOWER LEFT HAND CORNER OF THE NEXT MATRIX READY FOR THE
- * PLOT. IN THIS WAY,CHARACTER PLOTTING PROCEEDS FROM LEFT TO RIG
- * ACROSS THE SCREEN. UP TO 32 LINES OF 64 CHARACTERS EACH MAY BE
- * FOR A TOTAL OF 2048 CHARACTERS
- *
- ************************************************************************
- *
- * INITIALIZE MEMORY ADDRESS OF CHARACTER
- *
- CHAREN MVI H,#00 CLEAR H REGISTER
- MOV L,A PLACE CHARACTER CODE IN REGISTER
- DAD H SHIFT LEFT ONE PLACE
- DAD H SHIFT LEFT ONE PLACE
- DAD H SHIFT LEFT ONE PLACE
- DAD H SHIFT LEFT ONE PLACE
- XCHG SAVE CHARACTER INDEX
- LHLD MEMSEL LOAD CHARACTER MEMORY.
- DAD D ADD INDEX FOR CHARACTER ADDRESS
- XCHG SAVE CHARACTER ADDRESS IN DE
- *
- *
- LDA FWD.REV LOAD FORWARD REVERSE FLAG
- ANA A AND TEST PLOTTING DIRECTION.
- JZ CHAR6 FORWARD, CONTINUE.
- PUSH D SAVE DE REGISTERS
- CALL DISP.TAB AND TAB TO REVERSE CHARACTER
- POP D POSITION BEFORE CHARACTER.
- CHAR6 EQU $
- LDA D.CNTL2 LOAD CONTROL 2 FOR CHARACTER
- OUT DISCHAN*32+DISCON2 ND OUT PUT ORIENTATION AND W/E
- LDA VER LOAD VERTICAL PLOT FLAG
- ANI 08 AND MASK FOR VERTICAL PLOT BIT.
- OUT DISCHAN*32+DISCON1 ND OUTPUT FOR CHARACTER PLOT.
- RLC
- MOV B,A SAVE X DIRECTION BIT
- LHLD YREG LOAD CURRENT Y COORD.
- SHLD YSAVE AND SAVE
- MOV C,L SAVE LOWER 8 BITS OF Y
- LHLD XREG LOAD CURRENT X COORD.
- SHLD XSAVE AND SAVE
- IN DISCHAN*32+XYREAD READ UPPER X,Y BITS
- ANI #3
- MOV H,A TEMP SAVE
- RLC SHIFT Y BIT UP 1 POSITION
- XRA H INSERT X BIT
- ANI #5 MASK FOR X,Y BITS ONLY
- XRI #08 AND ENABLE BIT,SETS NZ FLG
- XRA B ADD X DIRECTION BIT
- MOV H,A
- LDA SIZE LOAD CHARACTER SIZE
- MOV B,A AND SAVE AS COLUMN COUNT
- ************************************************************
- *
- * CHARACTER GENERATOR ENTRY
- * REG B COLUMN COUNT
- * REG C LOWER 8 BITS OF Y COORDINATE
- * REG L LOWER 8 BITS OF X COORDINATE
- * REG H ENABLE,Y,0,X
- * REG DE CHARACTER DATA WORD ADDRESS
- ************************************************************
- CHAR7 EQU $
- PUSH H
- LHLD CHAR.GEN LOAD CHARACTER GENERATOR ADDRESS
- CALL INDIRECT
- POP H
- *
- LDA VER TEST FOR VERTICAL OR
- RAL HORIZONTAL CHARACTER PLOT.
- JC CHAR9 GO TO VERTICAL PLOT.
- *
- * HORIZONTAL CHARACTER PLOTTING
- *
- INX H INCREMENT X COORDINATE
- CHARH MOV A,L
- OUT DISCHAN*32+XCOORD OUTPUT LOWER 8 OF X
- MOV A,C
- OUT DISCHAN*32+YCOORD OUTPUT LOWER 8 OF Y
- MOV A,H
- ANI #1D CLEAR X OVERFLOW BIT
- INR A MOVES X BIT RIGHT 1
- RAR MOVE WORD RIGHT ONE
- OUT DISCHAN*32+DISCON1 OUTPUT UPPER X,Y BITS
- DCR B DECREMENT COLUMN COUNT
- JNZ CHAR7 CHECK FOR CHAR. COMPLETE
- * LOCATE FOR NEXT CHARACTER.
- CHAR10 EQU $
- MOV E,C SAVE LOWER 8 OF Y COORD.
- MOV A,H
- RRC
- RRC
- ANI 1
- MOV D,A SAVE UPPER BIT OF Y COORD.
- MOV A,H
- ANI 1
- MOV H,A SAVE UPPER X COORD.
- SHLD XREG
- XCHG
- SHLD YREG
- LDA FWD.REV TEST FOR FORWARD OR REVERSE
- ANA A CHARACTER PLOTTING.
- RZ FORWARD, GET NEXT CHARACTER.
- *
- LHLD YSAVE LOAD Y AND X
- XCHG COORDINATES FOR
- LHLD XSAVE FOR POSITIONING
- JMP OUTCOORD FOR REVERSE PLOTTING.
- *
- * VERTICAL CHARACTER PLOTTING.
- *
- CHAR9 EQU $
- INR C INCREMENT Y COORD.
- JNZ CHARH JUMP IF NO OVERFLOW
- MOV A,H
- XRI #04 TOGGLE UPPER BIT OF Y
- MOV H,A SAVE UPPER BITS
- JMP CHARH
- ************************************************************************
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * S U B R O U T I N E S
- *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * SIZE ONE CHARACTER GENERATOR
- *
- * THIS ROUTINE OUTPUTS TWO BYTES OF A 8 X 16 CHARACTER
- * TO THE DISPLAY.
- *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- TWICE XRA A SET ZERO FLAG
- CHAR.S1 EQU $
- LDAX D LOAD BYTE OF CHARACTER DATA
- INX D INCREMENT CHARACTER ADDRESS
- OUT DISCHAN*32+DISDATA OUTPUT BYTE
- RAR
- OUT DISCHAN*32+DISDATA OUTPUT
- RAR
- OUT DISCHAN*32+DISDATA CHARACTER
- RAR
- OUT DISCHAN*32+DISDATA DATA
- RAR
- OUT DISCHAN*32+DISDATA
- RAR
- OUT DISCHAN*32+DISDATA
- RAR
- OUT DISCHAN*32+DISDATA
- RAR
- OUT DISCHAN*32+DISDATA
- RZ RETURN AFTER SECOND PASS
- JMP TWICE
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * SIZE TWO CHARACTER GENERATOR
- *
- * THIS ROUTINE OUTPUTS TWO BYTES OF A 16 X 32 CHARACTER
- * TO THE DISPLAY.
- *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- TWICE1 XRA A SET ZERO FLAG
- CHAR.S2 EQU $
- LDAX D LOAD CHARACTER DATA BYTE
- INX D INCREMENT DATA ADDRESS
- OUT DISCHAN*32+DISDATA
- OUT DISCHAN*32+DISDATA
- RAR
- OUT DISCHAN*32+DISDATA
- OUT DISCHAN*32+DISDATA
- RAR
- OUT DISCHAN*32+DISDATA
- OUT DISCHAN*32+DISDATA
- RAR
- OUT DISCHAN*32+DISDATA
- OUT DISCHAN*32+DISDATA
- RAR
- OUT DISCHAN*32+DISDATA
- OUT DISCHAN*32+DISDATA
- RAR
- OUT DISCHAN*32+DISDATA
- OUT DISCHAN*32+DISDATA
- RAR
- OUT DISCHAN*32+DISDATA
- OUT DISCHAN*32+DISDATA
- RAR
- OUT DISCHAN*32+DISDATA
- OUT DISCHAN*32+DISDATA
- JNZ TWICE1 CHECK FOR SECOND PASS
- MOV A,B LOAD COLUMN COUNT
- RAR AND TEST FOR
- RC
- DCX D DECREMENT THE DATA
- DCX D POINTER
- RET
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * DISPLAY TAB ROUTINE.
- *
- * THIS ROUTINE SET THE X AND Y REGISTERS TO TAB FOR
- * THE NEXT CHARACTER POSITION.
- *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- DISP.TAB EQU $
- LHLD XREG LOAD CURRENT X
- XCHG AND SAVE IN DE
- LHLD X.PLOT LOAD X CHARACTER PLOT
- DAD D ADD TO CURRENT X
- CALL OUTX OUTPUT X COORDINATE.
- LHLD YREG LOAD CURREMT Y
- XCHG AND SAVE IN DE
- LHLD Y.PLOT LOAD Y CHARACTER PLOT
- DAD D ADD TO CURRENT Y
- JMP OUTY OUTPUT Y COORDINATE.
- *
- *
- * HORIZONTAL AND VERTICAL COORDINATE ADJUST ROUTINE
- *
- V.ADJ EQU $
- LHLD YREG LOAD CURRENT Y COORDINATE
- CALL SIZE.ADJ AND ADJUST WITH CHARACTER SIZE.
- JMP OUTY OUTPUT Y COORDINATE.
- *
- H.ADJ EQU $
- LHLD XREG LOAD CURRENT X COORDINATE
- CALL SIZE.ADJ AND ADJUST WITH CHARACTER SIZE.
- JMP OUTX OUTPUT X COORDINATE.
- *
- SIZE.ADJ EQU $
- LDA SIZE LOAD CHARACTER SIZE
- CPI 08 AND TEST FOR SIZE 1.
- JZ S.ADJ.1 SIZE 1 , CONTINUE.
- MOV A,C LOAD LOWER BYTE OF ADJUST
- ADD A AND DOUBLE IT.
- MOV C,A
- *
- S.ADJ.1 EQU $
- DAD B ADD ADJUST TO COORDINATE
- RET
- * * * * * * * * * * * * * * * * * * * * *
- *
- * INITIALIZE PLOTTING FLAG FOR HORIZONTAL, SIZE 0
- * CHARACTERS IN THE FORWARD DIRECTION.
- *
- INIT.PLT EQU $
- MVI L,#1A SET CHARACTER MODE
- CALL R.MODE AND WRITE BITS
- MVI L,00 SET CHAR. PLOT PARAMS
- *
- * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * M.CCR AND CHARACTER PLOTTING PARAMETERS ARE SET IN ACCORDANCE
- * WITH THE CONTENTS OF HL REGISTERS.
- *
- * BIT FUNCTION
- * 1 1=VERTICAL, 0=HORIZONTAL
- * 2,3,4 CHARACTER MEMORY SELECTED, 0-7
- * 5 UNUSED
- * 6 1=SIZE TWO CHARACTERS, 0=SIZE ONE CHARACTERS
- * 7 1=REVERSE, 0=FORWARD
- * 8 UNUSED
- *
- * * * * * * * * * * * * * * * * * * * * * * * *
- CCR EQU $
- SHLD M.CCR STORE PARAMETERS
- MOV A,L
- *
- ANI 01 MASK HOR/VERT BIT
- ADI #0A ADD CONSTANT TO RUN
- LXI H,CHARESC THIS THRU CONTROL
- CALL CONTROL
- *
- LDA M.CCR LOAD FLAG BITS
- RRC ADD ROTATE TO CHAR SET BITS.
- ANI 07 MASK OFF CHAR SET BITS
- ADI #02 ADD CONSTANT TO RUN
- LXI H,CHARESC THIS THRU CONTROL AGAIN
- CALL CONTROL
- *
- LDA M.CCR LOAD UP BITS AGAIN
- RLC AND ROTATE
- RLC TO FORWARD/REVERSE BITS
- ANI 01 MASK FORWARD/REVERSE BIT
- ADI #0C ADD CONSTANT TO RUN
- LXI H,CHARESC THIS THRU CONTROL AGAIN
- CALL CONTROL
- *
- LDA M.CCR LOAD FLAG BITS
- RLC NOW ROTATE
- RLC TO THE
- RLC SIZE BIT
- ANI 01 MASK HIM OFF
- ADI #0E ADD CONSTANT TO RUN
- LXI H,CHARESC THIS THRU CONTROL AGAIN
- CALL CONTROL
- RET
- * LOAD TERMINAL OPERATING MODE INSTRUCTION
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * CHARACTER PLOTTING CALCULATIONS.
- *
- * THIS SUBROUTINE CALCULATES THE VALUES TO PLOT CHARACTERS
- * AS TO HORIZONTAL, VERTICAL, FORWARD, REVERSE, AND SIZE.
- *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- CH.PLOT EQU $
- MVI B,#FF
- LXI H,SIZE LOAD CHARACTER
- MOV A,M SIZE AND ADD
- INX H TO FORWARD/REVERSE
- ADD M TO SET DIRECTION OF PLOT.
- JNC CH.PLOT1 IF CARRY IS SET
- CMA COMPLIMENT RESULT FOR NEGATIVE.
- CH.PLOT1 EQU $
- MOV C,A SAVE RESULT.
- INX H
- ANA M AND RESULT TO DETERMINE
- MOV E,A VALUE OF X AXIS PLOTTING.
- MOV D,B AND LOAD FOR STORING.
- JM CH.PLOT2 IF RESULT IS POSITIVE,
- INR D CLEAR UPPER BYTE.
- CH.PLOT2 EQU $
- XCHG STORE THE RESULT
- SHLD X.PLOT FOR X AXIS
- XCHG CHARACTER PLOTTING.
- MOV A,C LOAD SIZE AND DIRECTION RESULT
- INX H
- ANA M AND RESULT TO DETERMINE
- MOV E,A VALUE OF Y AXIS PLOTTING,
- MOV D,B AND LOAD FOR STORE.
- JM CH.PLOT3 IF RESULT IS POSITIVE
- INR D CLEAR UPPER BYTE.
- CH.PLOT3 EQU $
- XCHG STORE RESULT FOR
- SHLD Y.PLOT Y AXIS CHARACTER PLOTTING.
- RET
- *
- * THIS INSTRUCTION PERFORMS THE FOLLOWING FOUR FUNCTIONS
- *
- * 1. INHIBIT TOUCH PANEL IF INHIBIT BIT IS SET
- * 2. LOAD WORD COUNT IF WORD COUNT ENABLE BIT IS SET
- * 3. BULK ERASE IF BULK ERASE BIT IS SET
- * 4. LOAD MODE WORD
- *
- ************************************************************************
- *
- * MODE SELECTION
- *
- * BIT 1 BULK ERASE
- *
- * BIT 3 BIT 2
- * 0 0 ERASE WRITE CHARACTER BACKGROUND
- * 0 1 WRITE ERASE CHARACTER BACKGROUND
- * 1 0 ERASE NO OPERATION
- * 1 1 WRITE NO OPERATION
- *
- * BIT 6 BIT 5 BIT 4
- * 0 0 0 MODE 0 POINT PLOT
- * 0 0 1 MODE 1 DRAW LINE
- * 0 1 0 MODE 2 LOAD MEMORY
- * 0 1 1 MODE 3 CHARACTER
- * 1 0 0 MODE 4 BLOCK ERASE
- * 1 0 1 MODE 5 USER PROGRAM
- * 1 1 0 MODE 6 USER PROGRAM
- * 1 1 1 MODE 7 USER PROGRAM
- *
- * BIT 7-13 WORD COUNT
- *
- * BIT 14 LOAD WORD COUNT
- *
- * BIT 15 INHIBIT
- *
- ************************************************************************
- MODESET EQU $
- MOV A,L
- ANI #07
- OUT DISCHAN*32+DISCON2 OUTPUT DISPLAY CONTROL 2
- ANI 06 SAVE WRITE ERASE BITS
- MOV B,A IN B REG.
- LDA D.CNTL2 LOAD DISPLAY CONTROL 2
- ANI #60 AND MASK ORIENTATION BITS.
- ORA B ADD WRITE ERASE BITS
- STA D.CNTL2 AND STORE FOR CHARACTER GENERATOR
- *
- MVI A,#3E MASK MODE AND
- ANA L W/E BITS
- RRC
- STA M.MODE AND STORE.
- RET
- * * * * * * * * * * * * * * * * * * * * * * * *
- OUTX EQU $
- MVI A,01 CHOP OFF UNWANTED
- ANA H BITS THAT WILL
- MOV H,A SCREW THINGS UP.
- SHLD XREG STORE NEW X COORDINATE.
- MOV A,L LOAD LOWER 8 BITS
- OUT DISCHAN*32+XCOORD ND OUTPUT TO DISPLAY.
- IN DISCHAN*32+XYREAD PUT UPPER BITS OF X AND Y
- ANI 02 MASK Y
- ORA H INCLUDE NEW X BIT
- ORI 04 SET LOAD ENABLE
- OUT DISCHAN*32+DISCON1 OUTPUT UPPER BITS OF X AND Y.
- RET RETURN TO CALLER
- * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * SUBROUTINE TO OUTPUT Y COORDINATE TO THE DISPLAY.
- *
- * * * * * * * * * * * * * * * * * * * * * * * *
- OUTY EQU $
- MVI A,01 CHOP OFF UNWANTED
- ANA H BITS THAT WILL
- MOV H,A SCREW THINGS UP.
- SHLD YREG STORE NEW Y COORDINATE.
- MOV A,L LOAD LOWER 8 BITS
- OUT DISCHAN*32+YCOORD ND OUTPUT TO DISPLAY.
- IN DISCHAN*32+XYREAD NPUT CURRENT UPPER BITS
- ANI 01 MASK X COORDINATE BIT
- RRC SHIFT IN
- ORA H NEW Y BIT
- RLC
- ORI 04 SET LOAD ENABLE BIT
- OUT DISCHAN*32+DISCON1 OUTPUT NEW UPPER BITS
- RET RETURN TO CALLER.
- * * * * * * * * * *
- *
- * OUTPUT X AND Y COORDINATES
- * Y COORDINATE DE REGISTER PAIR
- * X COORDINATE HL REGISTER PAIR
- *
- * * *@*@ * * * * * * *
- OUTCOORD EQU $
- CALL OUTX SET X COORDINATE
- XCHG
- JMP OUTY SET Y COORDINATE
- * * * * * * * * * *
- *
- * USED TO CALL A ROUTINE WITH CONTENTS OF HL REGISTER
- *
- * * * * * * * * * *
- *
- INDIRECT EQU $
- PCHL
- *
- ***
- * 1.0 GENERAL-
- *
- * RIST - RESIDENT DIAGNOSTIC FOR INFORMATION SYSTEMS
- * TERMINAL (IST)
- *
- * COPYRIGHT CONTROL DATA CORP., 1975
- *
- * M.C. FEGELY
- * SUPAL ASSEMBLY LANGUAGE
- * FIELD DIAGNOSTIC
- *
- * 2.0 PURPOSE-
- *
- * THIS DIAGNOSTIC WILL VERIFY CORRECT OPERATION OF THE
- * SUB-MINI CONTROLLER (SMC) AND THE IST TERMINAL. THE
- * TESTING WILL PERFORM A COMMAND TEST
- * TEST THE DISPLAY INTERFACE, TEST THE
- * KEYBOARD AND TOUCH PANEL.
- *
- * 3.0 APPLICABLE DOCUMENTS
- *
- * 16031600 PROCESSOR MODULE SPECIFICATION
- * - IST DIAGNOSTIC PLAN
- * ARH750 - EXTERNAL REFERENCE SPECIFICATION - SUPAL
- * ASSEMBLER
- * - INTEL 8080 PROGRAMMING MANUAL
- * 16040600 EXTERNAL SPECIFICATION - INFORMATION
- * SYSTEMS TERMINAL (REV. C)
- * 62964500 QLIA - QUICKLOOK CONFIDENCE TEST FOR
- * THE SMC (SUB-MINI CONTROLLER) - ERS
- *
- *
- * 4.0 REQUIREMENTS
- *
- * 4.1 HARDWARE-
- *
- * IST CONFIGURATION:
- *
- * PROCESSOR MODULE
- * 16K RAM BOARD
- * ROM MODULE (6K)
- * DISPLAY INTERFACE
- * MAINTENANCE PANEL FOR EXECUTION SELECTION AND
- * DISPLAYING OF ERRORS
- * KEYBOARD/TOUCH PANNEL
- *
- * 4.2 SOFTWARE-
- *
- * THE DIAGNOSTIC WILL TEST THE HARDWARE OF THE IST
- * TERMINAL. IF AN ERROR OCCURS, THE ERROR
- * CODE WILL BE DISPLAYED ON THE
- * MAINENANCE PANEL LEDS.
- *
- * UPON SUCCESSFUL EXECUTION OF THE RESIDENT DIAGNOSTIC,
- * CONTROL WILL BE GIVEN TO THE CONTROLWARE.
- *
- * 4.3 ACCESORIES-
- *
- * NONE
- *
- * 4.4 TIME LIMIT
- *
- * EXECUTION TIME SHALL NOT EXCEED 1 MIN. EXCLUDING
- * THE MANUAL INTERVENTION SECTION (SEC. 4 - KEYBOARD/
- * TOUCH PANEL TEST).
- *
- * 4.5 DETECTION/ISOLATION
- *
- * THE DETECTION LEVEL WILL BE 95 PER CENT. THE
- * ISOLATION WILL BE 90 PER CENT.
- *
- * 5.0 OPERATIONAL PROCEDURE-
- *
- * 5.1 LOADING-
- *
- * NO LOADING IS REQUIRED IN THAT THE DIAGNOSTIC
- * RESIDES IN ROM.
- *
- * 5.2 PARAMETERS-
- *
- * MAINTENANCE SWITCHES MAY BE SELECTED AS DESCRIBED
- * IN 5.4 (EXECUTION) BELOW.
- *
- * SWITCH SUMMARY
- *
- * SWITCH 1 OFF - EXECUTE DIAGNOSTIC
- * ON - BYPASS DIAGNOSTIC
- *
- * SWITCH 2 OFF - 300 BAUD
- * ON - 1200 BAUD
- *
- * SWITCH 3 OFF - BYPASS KYBD-TOUCH PANEL SECTION
- * ON - EXECUTE KYBD-TOUCH PANEL SECTION
- *
- * SWITCH 4 OFF - DO NOT LOOP DIAGNOSTIC
- * ON - LOOP ENTIRE DIAGNOSTIC
- *
- * SWITCH 5 OFF - CHECK KYBD ONLY
- * ON - CHECK KYBD AND TOUCH PANEL
- *
- * 5.3 SECTION DESCRIPTION INDEX-
- *
- * SECTION 1 COMMAND TEST
- * SECTION 3 DISPLAY INTERFACE TEST
- * SECTION 4 KEYBOARD/TOUCH PANEL TEST
- *
- * 5.4 EXECUTION-
- *
- * THERE ARE TWO (2) WAYS TO EXECUTE THE RESIDENT
- * DIAGNOSTIC:
- * 1) POWER-ON
- * 2) MASTER CLEAR
- *
- * TO BY-PASS THE RESIDENT TEST COMPLETLY, SET SWITCH 1
- * ON THE MAINTENANCE SWITCHES BEFORE MASTER CLEAR.
- *
- *
- * TO EXECUTE THE KEYBOARD-TOUCH PANEL TEST, SET
- * SWITCHES 3,5 ON THE MAINTENANCE SWITCHES
- * SET SWITCH 3 ONLY TO BYPASS THE TOUCH PANEL
- *
- * 6.0 OPERATOR COMMUNICATION-
- *
- * 6.1 ERRORS AND RESPONSES-
- *
- * WHEN AN ERROR IS ENCOUNTERED, THE RESIDENT TEST
- * WILL EXECUTE A HALT INSTRUCTION. ERROR CODES WILL
- * BE DISPLAYED ON THE MAINTENANCE PANEL LEDS WHICH
- * WILL INDICATE WHICH BOARD IS BELIEVED TO BE BAD
- * VIA THE MOST SIGNIFICANT DIGIT OF THE ERROR CODE
- * DESCRIBED BELOW INDICATING THE LOCATION OF THE
- * BOARD BELIEVED TO BE BAD.
- *
- * OCTAL CODE FAILURE
- * ADDRESS
- * RANGE
- *
- * 30 COMMAND FAILURE
- *
- *
- * 42 TOUCH PANEL ERROR
- *
- * 70 DISPLAY INTERFACE ERROR
- * 71 KEYBOARD ERROR
- *
- * 77 INDICATES TERMINATION OF THE DIAGNOSTIC
- *
- *E
- * 7.0 DESCRIPTION
- *
- * 7.1 GENERAL
- *
- * THIS PROGRAM CONSISTS OF 3 SECTIONS OF
- * RESIDENT DIAGNOSTICS. THE TESTING
- * INCLUDES THE COMMAND REPERTOIRE,
- * DISPLAY INTERFACE TEST, KEYBOARD AND
- * TOUCH PANEL TESTS.
- * 7.2 SECTION 1 COMMAND TEST
- *
- * THIS SECTION WILL EXECUTE ALL OF THE COMMAND
- * REPERTOIRE OF THE SUB-MINI CONTROLLER EXCLUDING THE
- * EIN,DIN,RST,HLT INSTRUCTIONS. THE TESTING OF THE
- * INSTRUCTIONS IS BASIC AND DOES NOT DIAGNOSE THE
- * SETTING OR CLEARING OF ALL POSSIBLE FLAG CONDITIONS
- * FOR A PARTICULAR INSTRUCTION.
- *
- * ERROR CODES ARE:
- * 30 COMMAND FAILURE
- *
- *E
- * 7.3 SECTION 2 DISPLAY INTERFACE TEST
- *
- * THIS SECTION PERFORMS A BASIC CHECK ON THE DISPLAY
- * INTERFACE TEST. THE DISPLAY INTERFACE MODULE
- * CONTAINS TWO REGISTERS, ONE FOR THE X-COORDINATE
- * AND ONE FOR THE Y-COORDINATE. THESE REGISTERS CAN
- * BE LOADED, INCREMENTED AND DECREMENTED, AND
- * READ VIA ISSUING FUNCTION COMMANDS TO THE MODULE.
- * THE FOLLOWING TYPE OF CHECKS SHALL BE MADE IN THIS
- * SECTION CONSISTING OF THREE DISTINCT CONDITIONS:
- *
- * 1) LOAD X AND Y REGISTERS, READ BACK AND COMPARE
- *
- * OUTPUT - CH=4,DV=0,FN=7 (BULK ERASE, WRITE/ERASE)
- * * OUTPUT - ,FN=4 (X COOR.)
- * * OUTPUT - ,FN=5 (Y COOR.)
- * * OUTPUT - ,FN=6 (X/Y 2-8)
- * * INPUT - ,FN=0 (X COOR.)
- * * INPUT - ,FN=1 (Y COOR.)
- * * INPUT - ,FN=2 (X/Y 2-8)
- * ... CONTINUE THRU DATA TABLE - DEFINED IN SEC 2
- *
- *
- *
- *
- * 2) INCREMENT/DECREMENT X,Y REGISTERS IN VECTOR MODE
- *
- * C
- * <.................
- * . .>.
- * . . .
- * . F . .
- * . . . .
- * D . . .E . B
- * .< . .
- * . . .
- * . . .
- * . . .
- * .................>
- * A
- *
- *
- * MOVE TO LOWER LEFT CORNER
- *
- * OUTPUT - CH=4,DV=0,FN=7 (BULK ERASE, WRITE/ERASE)
- * OUTPUT - ,FN=4 (X COOR. = 00)
- * OUTPUT - ,FN=5 (Y COOR. = 00)
- *
- *
- * A) OUTPUT - ,FN=6 (Y SHT VTR,X/Y 2-8,INC X,
- * VECTOR MODE)
- * * OUTPUT - ,FN=3 (DATA) VECTOR BIT (A=00)
- * * INPUT - ,FN=0 (X REG)
- * COMPARE
- * * INPUT - ,FN=1 (Y REG)
- * COMPARE
- * * INPUT - ,FN=2 (X/Y 2-8)
- * COMPARE
- * ... CONTINUE TO END OF VECTOR
- *
- *
- * B) OUTPUT - ,FN=6 (X SHT VTR, INC Y,
- * VECTOR MODE)
- * * OUTPUT - ,FN=3 (DATA) VECTOR BIT (A=00)
- * * INPUT - ,FN=0 (X REG)
- * COMPARE
- * * INPUT - ,FN=1 (Y REG)
- * COMPARE
- * * INPUT - ,FN=2 (X/Y 2-8)
- * COMPARE
- * ... CONTINUE TO END OF VECTOR
- *
- *
- * C) OUTPUT - ,FN=6 (Y SHT VTR, DEC X,
- * VECTOR MODE)
- * * OUTPUT - ,FN=3 (DATA) VECTOR BIT (A=00)
- * * INPUT - ,FN=0 (X REG)
- * COMPARE
- * * INPUT - ,FN=1 (Y REG)
- * COMPARE
- * * INPUT - ,FN=2 (X/Y 2-8)
- * COMPARE
- * ... CONTINUE TO END OF VECTOR
- *
- *
- * D) OUTPUT - ,FN=6 (X SHT VTR, DEC Y,
- * VECTOR MODE)
- * * OUTPUT - ,FN=3 (DATA) VECTOR BIT (A=00)
- * * INPUT - ,FN=0 (X REG)
- * COMPARE
- * * INPUT - ,FN=1 (Y REG)
- * COMPARE
- * * INPUT - ,FN=2 (X/Y 2-8)
- * COMPARE
- * ... CONTINUE TO END OF VECTOR
- *
- *
- * E) OUTPUT - ,FN=6 (Y SHT VTR,INC,X,INC Y,
- * VECTOR MODE)
- * * OUTPUT - ,FN=3 (DATA) VECTOR BIT (A=80)
- * * INPUT - ,FN=0 (X REG)
- * COMPARE
- * * INPUT - ,FN=1 (Y REG)
- * COMPARE
- * * INPUT - ,FN=2 (X/Y 2-8)
- * COMPARE
- * ... CONTINUE TO END OF VECTOR
- *
- *
- * F) OUTPUT ,FN=6 (Y SHT VTR,DEC X,VTR MODE
- * DEC Y EVERY OTHER TIME)
- * * OUTPUT - ,FN=3 (DATA) VECTOR BIT (A=80)
- * * INPUT - ,FN=0 (X REG)
- * COMPARE
- * * INPUT - ,FN=1 (Y REG)
- * COMPARE
- * * INPUT - ,FN=2 (X/Y 2-8)
- * COMPARE
- * ... CONTINUE TO END OF VECTOR
- *
- *
- *
- *
- * 3) INCREMENT/DECREMENT X,Y REGISTERS IN CHARACTER
- * MODE.
- *
- *
- *
- * MOVE TO LOWER LEFT
- *
- * OUTPUT - ,FN=4 (X COOR. = 00)
- * OUTPUT - ,FN=5 (Y COOR. = 00)
- *
- * A) OUTPUT - ,FN=6 (X/Y 2-8,INC X,CHAR MODE)
- * OUTPUT - ,FN=7 (BULK ERASE, 90 DEG ORNT,
- * WRITE/ERASE)
- * * OUTPUT - ,FN=3 (DATA) CHAR BIT (A=01)
- * * INPUT - ,FN=0 (X REG)
- * COMPARE
- * * INPUT - ,FN=1 (Y REG)
- * COMPARE
- * * INPUT - ,FN=2 (X/Y 2-8)
- * COMPARE
- * ... CONTINUE TO END OF VECTOR
- *
- *
- * B) OUTPUT - ,FN=7 (NORMAL ORNT,WRITE/ERASE)
- * OUTPUT - ,FN=6 (INC Y, CHAR MODE)
- * * OUTPUT - ,FN=3 (DATA) CHAR BIT (A=01)
- * * INPUT - ,FN=0 (X REG)
- * COMPARE
- * * INPUT - ,FN=1 (Y REG)
- * COMPARE
- * * INPUT - ,FN=2 (X/Y 2-8)
- * COMPARE
- * ... CONTINUE TO END OF VECTOR
- *
- *
- * C) OUTPUT - ,FN=7 (90 DEG ORNT,WRITE/ERASE)
- * OUTPUT - ,FN=6 (DEC X, CHAR MODE)
- * * OUTPUT - ,FN=3 (DATA) CHAR BIT (A=01)
- * * INPUT - ,FN=0 (X REG)
- * COMPARE
- * * INPUT - ,FN=1 (Y REG)
- * COMPARE
- * * INPUT - ,FN=2 (X/Y 2-8)
- * COMPARE
- * ... CONTINUE TO END OF VECTOR
- *
- *
- * D) OUTPUT - ,FN=7 (NORMAL ORNT,WRITE/ERASE)
- * OUTPUT - ,FN=6 (DEC Y, CHAR MODE)
- * * OUTPUT - ,FN=3 (DATA) CHAR BIT (A=01)
- * * INPUT - ,FN=0 (X REG)
- * COMPARE
- * * INPUT - ,FN=1 (Y REG)
- * COMPARE
- * * INPUT - ,FN=2 (X/Y 2-8)
- * COMPARE
- * ... CONTINUE TO END OF VECTOR
- *
- * ERROR CODES ARE:
- * 70 DISPLAY INTERFACE ERROR
- *
- *
- *E
- * 7.6 SECTION 4 - KEYBOARD/TOUCH PANEL TEST
- *
- * THIS SECTION PERFORMS A BASIC CHECK ON THE KEYBOARD
- * AND TOUCH PANEL BY INPUTTING THE CODE AFTER A
- * CHARACTER READY HAD BEEN DETECTED. THE CODE IS THEN
- * DISPLAYED ON THE LEDS LOCATED ON THE MAINTENANCE
- * PANEL. THIS SECTION OF THE TEST WILL BE BY-PASSED
- * IF SWITCH 3 OF THE MAINTENANCE SWITCHES IS OFF.
- * IF SWITCH 5 IS OFF ONLY THE KEYBOARD WILL BE CHECKED.
- *
- *
- * 1. CHECK IF SWITCH 3 IS SET ON MAINT PANEL
- * 2. IF NOT, THEN EXIT SECTION
- * 3. IF SWITCH 5 IS OFF CONTINUE AT STEP 7
- * ELSE STATUS TOUCH PANEL
- * IF NO CHAR ROY, THEN CONTINUE AT STEP 7
- * 4. ELSE INPUT TOUCH PANEL X,Y DATA
- * 5. DISPLAY SAME DATA VIA CONTROLWARE ON DISPLAY
- * 6. CONTINUE AT STEP 3
- * 7. STATUS KEYBOARD
- * IF NO CHAR ROY, THEN CONTINUE AT STEP 3
- * 8. ELSE INPUT KEYBOARD DATA
- * 9. DISPLAY KYEBOARD DATA AS TWO (2) HEX DIGITS VIA
- * CONTROLWARE ON DISPLAY
- * 10. IF KEYBOARD DATA IS A SHIFT/STOP CODE
- * THEN EXIT SECTION (EXIT DIAGNOSTIC)
- * 11. ELSE CONTINUE AT STEP 3
- *
- * ERROR CODES ARE:
- * 42 TOUCH PANEL ERROR
- * 71 KEYBOARD ERROR
- *
- *E
- * 7.7 END OF DIAGNOSTIC
- *
- * CODE 77 IS DISPLAYED ON MAINTENANCE PANEL LEDS
- * INDICATING COMPLETION OF DIAGNOSTIC.
- *
- * CONTROL IS THEN GIVEN TO CONTROLWARE WHICH WILL
- * BEGIN BY INDICATING TERMIANL IS READY ON DISPLAY.
- *
- RST.SEC0 EQU $
- IN RSF.PANL*32+PANLSWCH
- ANI RSM.EXIT CHECK FOR EXIT DIAG.
- JNZ RST.DONE SET, EXIT DIAGNOSTICS
- JMP RST.S000 DO ROM/RAM TESTS
- * RST.VXY VERIFY X,Y REGISTERS
- *
- * ENTRY BY CALL FROM SECTION THREE
- *
- * CALLS NONE
- *
- * ALTERS A,B,C REGISTERS
- *
- * EXIT BY RETURN TO CALLER
- *
- * ERRORS REPORTED
- * NONE
- RST.VXY SHLD RSV.SRAM SAVE HL
- XCHG
- SHLD RSV.SRAM+2 SAVE DE
- POP H GET RETURN ADDRESS
- POP D GET X COR
- POP B GET Y COR
- IN RSF.DISP*32+DISPXREG
- CMP E COMPARE X COR 0-7
- JZ RST.VXY2
- HLT ERROR HALT
- RST.VXY2 IN RSF.DISP*32+DISPYREG
- CMP C COMPARE Y COR 0-7
- JZ RST.VXY4
- HLT ERROR HALT
- RST.VXY4 PUSH B RESTORE Y
- PUSH D RESTORE X
- PUSH H RESTORE RETURN ADDRESS
- MOV A,B
- ANI 1 SAVE Y COR 2**8
- RLC
- MOV B,A
- MOV A,D
- ANI 1 SAVE X COR 2**8
- ORA B
- MOV B,A SAVE EXPECTED XY 2**8
- LHLD RSV.SRAM+2
- XCHG RESTORE DE
- LHLD RSV.SRAM RESTORE HL
- IN RSF.DISP*32+DISPXY28
- ANI 3
- CMP B COMPARE XY 2**8
- RZ RETURN IF EQUAL
- HLT ERROR HALT
- RST.DATT DB #04,#00
- DB #84,#01
- DB #84,#02
- DB #84,#04
- DB #84,#08
- DB #84,#10
- DB #84,#20
- DB #84,#40
- DB #84,#80
- DB #85,#00
- DB #86,#00
- DB #07,#FF
- DB #04,#00
- DB #85,#55
- DB #86,#AA
- DB #04,#00
- RST.MSG DB #14,#22,#0B,#0D,#36,#1D,#19,#36,#1D,#0E,#1C,#1D
- RST.CON1 DB 255
- RST.CON2 DB 1,0
- RST.CON3 DB 255
- RST.CON4 DB 0,0
- RST.TPAL LXI H,40 OUTPUT X,Y = 1,15
- LXI D,488 TO ALLIGN
- MVI C,#1F TOUCH PANEL
- CALL RST.OCHR
- LXI H,296 OUTPUT X,Y = 9,7
- LXI D,232
- MVI C,#97
- CALL RST.OCHR
- LXI H,456 OUTPUT X,Y = 14,0
- LXI D,8
- MVI C,#E0
- CALL RST.OCHR
- RET
- INDI.1 JMP INIT.PLT INDIRECT TO INITIALIZE CHARACTER PLOT.
- INDI.2 JMP OUTCOORD INDIRECT TO OUTPUT COORDINATES.
- INDI.3 JMP CHAREN INDIRECT TO CHARACTER GENERATOR.
- DB #00,#00,#00,#00
- DB #00,#00,#00
- EJECT
- **
- *E
- * RST.SEC1 COMMAND TEST
- *
- * ENTRY CONTROL IS GIVEN TO SECTION ONE UPON
- * COMPLETION OF SECTION ZERO.
- *
- * CALLS NONE
- *
- * ALTERS ALL REGISTERS
- *
- * EXIT TO RST.SEC3 UPON COMPLETION
- *
- * ERRORS REPORTED (OCTAL CODE)
- *
- * 30 - COMMAND FAILURE
- RST.SEC1 MVI A,#18
- OUT RSF.PANL*32+PANLDATA UT ERROR CODE FOR COMMAND FAIL
- MVI A,#55 A=55
- MOV B,A LOAD ALL REGISTERS FROM A
- MOV C,A
- MOV D,A
- MOV E,A
- MOV H,A
- MOV L,A
- RLC A=AA
- ORA B A=FF
- XRA C A=AA
- ANA D A=00
- SUB E A=AB
- XRI #AB A=00
- INR H H=56
- DCR L L=54
- ADD H A=56
- ADD L A=AA
- ADI #55 A=FF
- SUI #AA A=55
- ORI #22 A=77
- ANI #AA A=22
- XRI #22 A=0
- STC SET CARRY
- ACI #0E A=0F
- CMA A=F0
- RRC A=78 CARRY=0
- CMC CARRY=1
- ADC B A=CE
- CMC CARRY=1
- SBB B A=78
- CMC CARRY=1
- SBI #07 A=70
- CMC CARRY=1
- RAR A=B8 CARRY=0
- RAL A=70 CARRY=1
- NOP
- JC RST.S105 IF CARRY NOT SET REPORT ERROR
- *
- * ERROR 50 - COMMAND FAILURE
- *
- HLT ERROR HALT
- RST.S105 CPI #70
- JZ RST.S110
- HLT ERROR HALT
- RST.S110 MVI A,#EE
- STA RST.CON5
- MVI B,#EE
- LXI H,RST.CON5+1
- MOV M,B
- CMP M VERIFY B STORED CORRECTLY
- JZ RST.S112
- HLT ERROR HALT
- RST.S112 LDA RST.CON5
- CPI #EE VERIFY A STORED CORRECTLY
- JZ RST.S114
- HLT ERROR HALT
- RST.S114 LXI B,RST.CON1
- LXI H,RST.CON3
- LXI SP,RST.STAK
- LDAX B
- CMP M
- JZ RST.S116
- HLT ERROR HALT
- RST.S116 LHLD RST.CON1 LOAD HL
- SHLD RST.CON5 STORE HL INTO MEMORY
- PUSH H STORE HL INTO STACK
- LXI H,RST.STAK LOAD HL WITH STACK ADDRESS
- SPHL
- DCX SP DECREMENT SP
- DCX SP DECREMENT SP
- DCX SP DECREMENT SP
- INX SP INCREMENT SP
- POP D LOAD DE FROM STACK
- LDA RST.CON5
- CMP E
- JZ RST.S118
- HLT ERROR HALT
- RST.S118 LDA RST.CON5+1
- CMP D
- JZ RST.S120
- HLT ERROR HALT
- RST.S120 LXI H,#AAAA LOAD HL
- LXI D,#5555 LOAD DE
- PUSH D STORE DE INTO STACK
- XTHL EXCHANGE STACK AND HL
- POP D
- MOV A,D
- CPI #AA VERIFY EXCHANGE
- JZ RST.S122
- HLT ERROR HALT
- RST.S122 MOV A,H
- CPI #55 VERIFY EXCHANGE
- JZ RST.S124
- HLT ERROR HALT
- RST.S124 LHLD RST.CON2 LOAD HL FROM MEMORY HL=0001
- LXI D,#0001
- DAD D HL=0002
- INX H HL=0003
- MOV A,H
- CPI 0 VERIFY H=0
- JZ RST.S126
- HLT ERROR HALT
- RST.S126 MOV A,L
- CPI 3 VERIFY L=3
- JZ RST.S128
- HLT ERROR HALT
- RST.S128 LXI H,#0001 HL=0001
- SHLD RST.CON6 STORE HL INTO MEMORY
- LXI H,RST.CON6 SET HL TO ADDRESS
- MVI A,0
- ADD M A=1
- STC
- ADC M A=3
- INR M MEMORY = 2
- SUB M A=1
- DCR M
- DCR M MEMORY=0
- STC
- SBB M A=0
- ADI #0F A=0F
- ORA M A=0F
- MVI M,#01 MEMORY=1
- ANA M A=1
- XRA M A=0
- CPI 0 VERIFY A = 0
- JZ RST.SEC3
- HLT ERROR HALT
- * EXIT SECTION ONE
- * RST.SEC3 DISPLAY INTERFACE TEST
- *
- * ENTRY CONTROL IS GIVEN TO SECTION THREE UPON
- * COMPLETION OF SECTION ONE
- *
- * CALLS RST.VXY VERIFY X,Y REGISTERS
- *
- * ALTERS ALL REGISTERS
- *
- * EXIT TO RST.SEC4 UPON COMPLETION
- *
- * ERRORS REPORTED (OCTAL CODE)
- *
- * 70 - DISPLAY INTERFACE ERROR
- RST.SEC3 MVI A,#38 ERROR CODE FOR DISPLAY TEST
- OUT RSF.PANL*32+PANLDATA
- *
- * CONDITION 1
- *
- MVI A,#03 BULK ERASE, WRITE/ERASE
- OUT RSF.DISP*32+DISPCON2
- LXI H,RST.DATT SET UP TABLE POINTER
- MVI E,16 SET UP COUNTER
- RST.S305 MOV B,M DO UNTIL COUNTER=0
- INX H
- MOV C,M FORM X COR IN BC
- INX H
- LXI SP,RST.STAK SET STACK POINTER
- PUSH B SAVE Y COR IN STACK
- PUSH B SAVE X COR IN STACK
- MOV A,C
- OUT RSF.DISP*32+DISPXCOR TPUT XCOR 0-7
- OUT RSF.DISP*32+DISPYCOR TPUT YCOR 0-7
- MOV A,B
- ANI 1 SAVE XCOR 2**8
- MOV B,A
- RLC
- ORA B
- ADI #04 FORM - ENABLE XY 2**8 LOAD
- OUT RSF.DISP*32+DISPCON1
- CALL RST.VXY GO VERIFY XY
- DCR E UPDATE COUNTER
- JNZ RST.S305 END DO
- *
- * CONDITION 2
- *
- MVI A,#03 BULK ERASE, WRITE/ERASE
- OUT RSF.DISP*32+DISPCON2
- LXI H,0
- PUSH H STORE Y COR
- PUSH H STORE X COR
- MVI A,#A4 VECTOR,Y=SHORT,INC X,LOAD XY
- OUT RSF.DISP*32+DISPCON1
- LXI H,511 SET UP COUNTER
- RST.S310 MVI A,0 DO UNTIL COUNTER=0
- OUT RSF.DISP*32+DISPDATA TPUT INC X COMMAND
- POP D GET X COR
- INX D UPDATE
- PUSH D SAVE X
- CALL RST.VXY GO VERIFY XY
- DCX H UPDATE COUNTER
- MOV A,H
- ORA L
- JNZ RST.S310 END DO
- MVI A,#80 VECTOR,X=SHORT,INC Y
- OUT RSF.DISP*32+DISPCON1
- LXI H,511 SET UP COUNTER
- RST.S315 MVI A,0 DO UNTIL COUNTER=0
- OUT RSF.DISP*32+DISPDATA TPUT INC Y COMMAND
- POP D GET X COR
- POP B GET Y COR
- INX B MODIFY Y
- PUSH B SAVE Y
- PUSH D SAVE X
- CALL RST.VXY GO VERIFY XY
- DCX H UPDATE COUNTER
- MOV A,H
- ORA L
- JNZ RST.S315 END DO
- MVI A,#A8 VECTOR,Y=SHORT,DEC X
- OUT RSF.DISP*32+DISPCON1
- LXI H,511 SET UP COUNTER
- RST.S320 MVI A,0 DO UNTIL COUNTER=0
- OUT RSF.DISP*32+DISPDATA TPUT DEC X COMMAND
- POP D GET X COR
- DCX D MODIFY
- PUSH D SAVE
- CALL RST.VXY GO VERIFY XY
- DCX H
- MOV A,H
- ORA L
- JNZ RST.S320 END DO
- MVI A,#90 VECTOR,X=SHORT,DEC Y
- OUT RSF.DISP*32+DISPCON1
- LXI H,511 SET UP COUNTER
- RST.S325 MVI A,0 DO UNTIL COUNTER=0
- OUT RSF.DISP*32+DISPDATA TPUT DEC Y COMMAND
- POP D GET X COR
- POP B GET Y COR
- DCX B MODIFY Y
- PUSH B SAVE Y
- PUSH D SAVE X
- CALL RST.VXY GO VERIFY XY
- DCX H UPDATE COUNTER
- MOV A,H
- ORA L
- JNZ RST.S325 END DO
- MVI A,#A0 VECTOR,Y=SHORT,INC X,INC Y
- OUT RSF.DISP*32+DISPCON1
- LXI H,511 SET UP COUNTER
- RST.S330 MVI A,#80 DO UNTIL COUNTER=0
- OUT RSF.DISP*32+DISPDATA TPUT INC X, INC Y COMMAND
- POP D GET X COR
- POP B GET Y COR
- INX D
- INX B
- PUSH B SAVE Y
- PUSH D SAVE X
- CALL RST.VXY GO VERIFY XY
- DCX H UPDATE COUNTER
- MOV A,H
- ORA L
- JNZ RST.S330 END DO
- MVI A,#B8 VECTOR,Y=SHORT,DECX,(DEC Y)
- OUT RSF.DISP*32+DISPCON1
- LXI H,511 SET UP COUNTER
- RST.S335 MOV A,L DO UNTIL COUNTER=0
- ANI 1
- RRC FORM DATA OUTPUT CONTROL
- OUT RSF.DISP*32+DISPDATA
- POP D GET X COR
- POP B GET Y COR
- DCX D MODIFY X COR
- JNC RST.S340
- DCX B CONDITIONALLY MODIFY Y
- RST.S340 PUSH B SAVE Y
- PUSH D SAVE X
- CALL RST.VXY GO VERIFY XY
- DCX H MODIFY COUNTER
- MOV A,H
- ORA L
- JNZ RST.S335 END DO
- *
- * CONDITION 3
- *
- MVI A,0
- OUT RSF.DISP*32+DISPXCOR UT XCOR=0
- OUT RSF.DISP*32+DISPYCOR UT YCOR=0
- MVI A,#43 BULK ERASE, WRITE/ERASE, 90 DEG
- OUT RSF.DISP*32+DISPCON2
- MVI A,#04 CHAR, INC X, LOAD XY 2**8
- OUT RSF.DISP*32+DISPCON1
- LXI H,0
- PUSH H INIT. Y COR
- PUSH H INIT. X COR
- LXI H,511 SET UP COUNTER
- RST.S345 MVI A,1 DO UNTIL COUNTER=0
- OUT RSF.DISP*32+DISPDATA TPUT INC X COMMAND
- POP D GET X COR
- INX D UPDATE
- PUSH D SAVE X COR
- CALL RST.VXY GO VERIFY XY
- DCX H UPDATE COUNTER
- MOV A,H
- ORA L
- JNZ RST.S345 END DO
- MVI A,#62 WRITE/ERASE, NORMAL
- OUT RSF.DISP*32+DISPCON2
- MVI A,#00 CHAR, INC Y
- OUT RSF.DISP*32+DISPCON1
- LXI H,511 SET UP COUNTER
- RST.S350 MVI A,1 DO UNTIL COUNTER=0
- OUT RSF.DISP*32+DISPDATA TPUT INC Y COMMAND
- POP D GET X COR
- POP B GET Y COR
- INX B UPDATE Y
- PUSH B SAVE Y
- PUSH D SAVE X
- CALL RST.VXY GO VERIFY XY
- DCX H UPDATE COUNTER
- MOV A,H
- ORA L
- JNZ RST.S350 END DO
- MVI A,#42 WRITE/ERASE, 90 DEG
- OUT RSF.DISP*32+DISPCON2
- MVI A,#08 CHAR, DEC X
- OUT RSF.DISP*32+DISPCON1
- LXI H,511 SET UP COUNTER
- RST.S355 MVI A,1 DO UNTIL COUNTER=0
- OUT RSF.DISP*32+DISPDATA TPUT DEC X COMMAND
- POP D GET X COR
- DCX D UPDATE
- PUSH D SAVE X
- CALL RST.VXY GO VERIFY XY
- DCX H UPDATE COUNTER
- MOV A,H
- ORA L
- JNZ RST.S355 END DO
- MVI A,#62 WRITE/ERASE, NORMAL
- OUT RSF.DISP*32+DISPCON2
- MVI A,#10 CHAR, DEC Y
- OUT RSF.DISP*32+DISPCON1
- LXI H,511 SET UP COUNTER
- RST.S360 MVI A,1 DO UNTIL COUNTER=0
- OUT RSF.DISP*32+DISPDATA TPUT DEC Y COMMAND
- POP D GET X COR
- POP B GET Y COR
- DCX B MODIFY Y
- PUSH B SAVE Y
- PUSH D SAVE X
- CALL RST.VXY GO VERIFY XY
- DCX H UPDATE COUNTER
- MOV A,H
- ORA L
- JNZ RST.S360 END DO
- * EXIT SECTION THREE
- **
- *E
- * RST.SEC4 KEYBOARD - TOUCH PANEL TEST
- *
- * ENTRY CONTROL IS GIVEN TO SECTION FOUR UPON
- * COMPLETION OF SECTION THREE
- *
- * CALLS RST.OCHR OUTPUT CHAR. TO CONTROLWARE
- *
- * ALTERS ALL REGISTERS
- * MODE FLAG IN CONTROLWARE
- *
- * EXIT TO RST.EXIT UPON COMPLETION
- *
- * ERRORS REPORTED
- *
- * 42 - TOUCH PANEL ERROR
- * 71 - KEYBOARD ERROR
- RST.SEC4 IN RSF.PANL*32+PANLSWCH
- ANI RSM.SEC4 CHECK FOR BYPASS OF SECTION
- JZ RST.EXIT IF NOT SET - BYPASS SECTION
- LXI SP,IST.STK INITIALIZE STACK POINTER.
- MVI A,0 OUTPUT X-YCORDS
- OUT RSF.DISP*32+DISPXCOR
- OUT RSF.DISP*32+DISPYCOR
- MVI A,#A4 VECTOR Y%SHORT LOAD XY 2**8
- OUT RSF.DISP*32+DISPCON1
- LXI H,511 SET UP COUNTER
- RST.S430 MVI A,#80 DO UNTIL COUNTER = 0
- OUT RSF.DISP*32+DISPDATA C X - INC Y COMMAND
- DCX H
- MOV A,H
- ORA L
- JNZ RST.S430 END DO
- MVI A,0
- OUT RSF.DISP*32+DISPXCOR
- MVI A,#FF
- OUT RSF.DISP*32+DISPYCOR
- MVI A,#B6
- OUT RSF.DISP*32+DISPCON1
- LXI H,511
- RST.S440 MVI A,#80
- OUT RSF.DISP*32+DISPDATA
- DCX H
- MOV A,H
- ORA L
- JNZ RST.S440
- CALL INIT.PLT INITIALIZE FOR CHARACTER PLOT
- LXI H,208 LOAD X COORDINATE
- LXI D,80 LOAD Y COORDINATE.
- CALL OUTCOORD SET DISPLAY COORDINATES
- MVI D,12
- LXI H,RST.MSG GET ADDRESS OF MSG
- RST.S402 PUSH H SAVE HL
- PUSH D SAVE DE
- MOV A,M GET NEXT CODE
- CALL RST.OUT OUTPUT TO FIRMWARE
- POP D RESTORE DE
- POP H RESTORE HL
- INX H UPDATE INDEX
- DCR D UPDATE COUNTER
- JNZ RST.S402 LOOP FOR COMPLETE TABLE
- CALL RST.TPAL
- RST.S404 IN RSF.PANL*32+PANLSWCH PUT SWITCHES
- ANI RSM.TOCH CHECK FOR TOUCH PANEL PRESENT
- JZ RST.S420 JUMP IF NOT
- RST.S405 MVI A,#22 OUTPUT TOUCH PANEL ERROR CODE
- OUT RSF.PANL*32+PANLDATA
- IN RSF.TOCH*32+TOCHSTAT PUT TOUCH PANEL STATUS
- ANI 1 CHECK FOR CHAR RDY
- JZ RST.S420 JUMP IF NOT
- IN RSF.TOCH*32+TOCHDATA PUT DATA (X,Y)
- MOV C,A SAVE DATA IN C
- LXI H,244
- LXI D,32
- CALL RST.OCHR GO TO OUTPUT SUBROUTINE
- MVI A,#1D
- CALL RST.OUT OUTPUT -T- FOR TOUCH PANEL
- JMP RST.S405 LOOP
- RST.S420 MVI A,#39 OUTPUT KYBD ERROR CODE
- OUT RSF.PANL*32+PANLDATA
- IN RSF.KYBD*32+KYBDSTAT PUT KYBD STATUS
- ANI 1 CHECK FOR CHAR RDY
- JZ RST.S404 JUMP IF NOT SET
- IN RSF.KYBD*32+KYBDDATA PUT DATA (KYBD CODE)
- CMA
- ANI #7F
- MOV C,A SAVE IN C
- CPI #3A CHECK FOR SHIFT-STOP
- JZ RST.EXIT IF MATCH EXIT SECTION
- LXI H,244
- LXI D,32
- CALL RST.OCHR GO TO OUTPUT SUBROUTINE
- MVI A,#14
- CALL RST.OUT OUTPUT -K- FOR KYBD
- MOV A,C GET DATA
- JMP RST.S404
- EJECT
- **
- *E
- * RST.EXIT DIAGNOSTIC EXIT ROUTINE
- *
- * ENTRY BY JUMP FROM SECTION ZERO OR SECTION FOUR
- *
- * CALLS NONE
- *
- * ALTERS A REGISTER
- *
- * EXIT CONTROL IS GIVEN TO -START1- IN CONTROLWARE
- *
- * ERRORS REPORTED
- * NONE
- RST.EXIT IN RSF.PANL*32+PANLSWCH PUT SWITCHES
- ANI RSM.LOOP CHECK FOR LOOP OPTION
- JNZ RST.SEC0 LOOP IF SET
- RST.DONE MVI A,#3F OUTPUT TERMINATION CODE
- OUT RSF.PANL*32+PANLDATA
- IN RSF.PANL*32+PANLSWCH SWITCH SETTING
- ANI #02
- JZ RST.HI NOT SET, 1200 BAUD
- MVI A,#3E SET, SO 300 BAUD
- JMP RST.BD
- RST.HI EQU *
- MVI A,#7E SET UP FOR 1200
- RST.BD EQU *
- STA SC.OC
- LXI SP,IST.STK
- CALL INIT.PLT INITIALIZE CHAR. PLOT
- MVI A,0
- STA M.HALT INITIALIZE SOME VARAIBLES
- STA M.STATUS
- MVI A,3
- STA M.SBTYPE
- LXI H,M0CODE00
- SHLD M.M0
- *
- * CHECKSUM RAM
- * IF BAD, RELOAD AND JUMP TO ASCII INIT
- * OTHERWISE, CHECK MODE AND GO TO CORRESPONDING INIT
- *
- RAMCK EQU *
- MVI C,00 INITIALIZE SUM AND
- LXI H,#3FFF RAM MEMORY ADDRESS POINTER.
- LDA LWA+1 LOAD UPPER BITS FOR LWA
- CMP H AND TEST FOR VALUE.
- JC RST.LDR INCORRECT ADDRESS STORED.
- CS1 EQU *
- MOV A,C LOAD CHECKSUM RESULTS
- INX H INCREMENT MEMORY POINTER
- ADD M ADD BYTE TO CHECKSUM
- MOV C,A AND SAVE
- LDA LWA LOAD LOWER HALF OF LWA
- DCR A
- CMP L AND TEST.
- JNZ CS1 JUMP IF NOT END.
- MOV A,H TEST UPPER BITS OF LOADING
- CPI #5F ADDRESS FOR MAX.
- JZ RST.LDR ADDRESS TOO HIGH, LOAD.
- LDA LWA+1 LOAD UPPER HALF OF ADDR.
- CMP H AND TEST.
- JNZ CS1 JUMP IF NOT END.
- LDA CKSM LOAD CHECKSUM
- CMP C AND TEST AGAINST CAL.
- JNZ RST.LDR LOAD RAM IF NOT CORRECT.
- *
- * TEST FOR ASCII MODE OR PLATO
- *
- LDA MODE
- ANI #80
- JZ A.INIT
- *
- *
- LXI H,IST.STK
- PLATO.1 EQU $
- MVI M,00
- INX H
- MVI A,#23
- XRA H
- JNZ PLATO.1
- LDA #34
- STA M.TYPE
- JMP R.INIT
- EJECT
- *
- * RAM RESIDENT LOAD ROUTINE
- *
- RST.LDR EQU $
- LDA SC.OC LOAD SERIAL CHAN. CONTROL
- OUT COMSTAT
- * INITIALIZE FOR LOAD ROUTINE.
- S100 XRA A
- STA SEQ1
- STA SEQ2
- STA A1
- STA A3
- STA FLAGREG
- STA CNTR
- STA CHAR
- STA CKSM CLEAR CHECKSUM
- IN RSF.PANL*32+PANLSWCH
- ANI #E0 GET LOAD NUMBER
- RLC FROM THE TOP THREE
- RLC SWITCH SETTINGS.
- RLC
- STA LDN
- LXI H,DISP4 LOAD MESSAGE STORE ADDRESS
- MVI M,SPACE
- INX H LOAD BLOCK
- MVI M,SPACE NUMBER DATA.
- INX H
- MVI M,SPACE
- INX H
- MVI M,SPACE
- INX H
- MVI M,ESC
- INX H
- MVI M,ASC0
- INX H
- MVI M,ASCL LOAD
- INX H
- INX H L,N,N,CR
- INX H
- MVI M,CR MESSAGE.
- INX H
- MVI M,DLE LOAD DLE,EOT
- INX H
- MVI M,EOT
- INX H
- MVI M,NAK LOAD NAK,XXYY MESSAGE.
- MVI A,#40
- STA A2
- MVI L,#1B
- CALL R.MODE BULK ERASE, MODE 05
- *
- * LXI H,SAVE
- * MVI A,#3A LOAD SHIFT STOP CODE
- * MOV M,A AND SEND FOUR TIMES
- * MVI B,4 TO TAKE TERMINAL OUT
- *S100A CALL OUTDATA OF PLATO MODE.
- * DCR B
- * JNZ S100A
- *
- S101 CALL S107 SEND LOAD REQUEST
- S101A LXI H,0000 INITIALIZE 30 SEC TIME-OUT.
- MVI B,#0F 30 SEC TIMEOUT
- S102 CALL INDATA
- JC S104
- DAD D
- JNC S102
- DCR B
- JZ S109
- S103 JMP S102
- S104 DAD D
- JNC S105
- DCR B
- JZ S109
- S105 LDA CHAR
- CPI SLASH TEST FOR / CODE.
- JNZ S102
- D.LOOP INX H TIME DELAY
- MOV A,L
- ORA H
- JNZ D.LOOP
- LXI D,#00 DISP ',LOADING BLOCK',
- LXI H,#B8
- CALL R.OUTX
- XCHG
- CALL R.OUTY
- MVI L,#1B
- CALL R.MODE BULK ERASE AND MODE 5
- LXI H,DISP1
- CALL R.CHARS
- CALL L.DISP DISPL BLOCK NO.
- S106 EQU *
- LDA FLAGREG
- ANI #01
- JNZ A.INIT EOT FLAG SET, JUMP
- MVI A,#03
- STA CNTR
- CALL S107 SEND LOAD REQUEST
- JNC TERLD LOADING TERMINATED
- JMP S200
- S109 LDA FLAGREG
- ANI #01
- JZ TERLD
- LDA CNTR
- ORA A
- JZ TERLD
- DCR A
- STA CNTR
- JMP E006
- F000 EQU *
- LDA CNTR
- ORI #00
- JZ TERLD
- DCR A
- STA CNTR
- LDA FLAGREG
- ANI #04 NAK FLAG
- JNZ C000
- CALL S107 SEND LOAD REQUEST.
- JNC TERLD LOADING TERMINATED
- S200 EQU * DLE-STX
- MVI B,#0F 30 SEC TIMEOUT
- LXI H,#0000
- S201 CALL INDATA
- JC S203
- DAD D
- JNC S201
- DCR B
- JZ F000 TIMEOUT, JUMP
- JMP S201
- S203 DAD D
- JNC S204
- DCR B
- JZ F000
- S204 LDA CHAR
- S205 CPI DLE TEST FOR DLE CODE
- JNZ S201
- S206 CALL INDATA
- JC S208
- DAD D
- JNC S206
- DCR B
- JZ F000
- JMP S206
- S208 DAD D
- JNC S209
- DCR B
- JZ F000
- S209 LDA CHAR
- CPI STX TEST FOR STX CODE
- JNZ S205
- S210 XRA A
- STA CRC1
- STA CRC2
- STA CNTR
- STA FLAGREG
- B000 EQU * HEADER ROUTINE
- LXI H,SEQ1
- MVI B,#06
- MVI A,#02 LOAD DLE COUNT
- STA SAVE
- B001 CALL INDATA
- JNC B001
- MOV C,A SAVE CHAR.
- CPI DLE TEST FOR DLE CODE
- JZ B004
- B002 LDA SAVE GET DLE COUNT
- ORA A AND TEST FOR ZERO.
- JNZ B005
- MOV C,M
- LDA CHAR
- CMP C
- JNZ C000
- B003 CALL CRCGEN
- DCR B
- JZ D000
- INX H
- JMP B001
- B004 CALL INDATA
- JNC B004
- MOV C,A SAVE CHAR.
- CPI DLE TEST FOR DLE CODE
- JZ B002
- JMP E000
- B005 MOV A,M
- CMP C
- JNZ B006
- LDA SAVE GET DLE COUNT
- DCR A AND DECREMENT IT.
- STA SAVE
- JMP B003
- B006 EQU *
- JNC S201
- C000 EQU * NAK ARQ
- LXI H,OUT4+1
- LDA SEQ1
- MOV M,A
- CMA
- MOV D,A
- INX H
- LDA SEQ2
- MOV M,A
- CMA
- INX H
- MOV M,D
- INX H
- MOV M,A
- LXI H,OUT4
- MVI B,#05
- C001 CALL OUTDATA
- JNC TERLD
- INX H
- DCR B
- JNZ C001
- LDA FLAGREG
- ANI #04
- JNZ C002
- MVI A,#02
- STA CNTR
- LDA FLAGREG
- ORI #04
- STA FLAGREG
- C002 JMP S200
- EJECT
- *
- * LOAD RAM RESIDENT DATA
- * B REG. BYTE COUNT
- * HL REG. DATA STORE ADDR.
- *
- D000 EQU * DATA SECTION
- LDA A3
- MOV L,A
- LDA A2
- MOV H,A
- XRA A
- MOV B,A CLEAR BYTE COUNTER
- STA CNTR
- D001 CALL INDATA
- JNC D001
- CPI DLE TEST FOR DLE CODE
- JZ D003
- D002 MOV A,B
- CPI #F0
- JZ C000
- LDA CHAR
- MOV M,A
- LDA CKSM LOAD CHECKSUM
- ADD M AND ADD LAST BYTE
- STA CKSM AND SAVE.
- CALL CRCGEN
- INX H
- SHLD LWA SAVE LAST STORE ADDRESS
- INR B
- LDA CNTR
- INR A
- STA CNTR
- JMP D001
- D003 CALL INDATA
- JNC D003
- CPI DLE TEST FOR DLE CODE
- JNZ D004 JUMP IF NOT DLE
- INR B ELSE INC. BYTE COUNT.
- JMP D002
- D004 INX H INC. STORE ADDRESS
- EJECT
- E000 EQU * ETB/ETX DETECTION
- CPI ETB TEST FOR ETB CODE
- JNZ E005
- MVI A,#02 SET ETB FLAG
- STA FLAGREG
- E001 CALL CRCGEN DO CRC CALCULATION
- *
- * TEST CRC CALCULATION WITH CRC RECEIVED
- *
- E001A CALL INDATA
- JNC E001A
- LXI H,CRC1 LOAD ADDRES OF CRC
- CMP M AND TEST AGAINST REC.
- JNZ C000 JUMP IF BAD CRC
- E001B CALL INDATA
- JNC E001B
- LXI H,CRC2 LOAD ADDRESS OF CRC
- CMP M AND TEST AGAINST REC
- JNZ C000 JUMP IF BAD CRC
- LDA CNTR
- LXI H,A3
- ADD M
- MOV M,A
- JNC E002
- DCX H
- INR M
- E002 EQU * INCREMENT DATA STORE ADDR.
- LDA SEQ2
- ADI #01
- STA SEQ2
- JNC E003
- LDA SEQ1
- ADI #01
- STA SEQ1
- E003 LDA FLAGREG
- ANI #02 TEST FOR ETB FLAG
- JZ E003A
- CALL L.DISP DISP LOADING BLOCK
- JMP S200
- E003A LDA FLAGREG
- ORI #01
- STA FLAGREG
- MVI A,#02
- STA CNTR
- E006 LXI H,OUT3 OUTPUT ',DLE EOT',
- MVI B,#02
- E004 CALL OUTDATA
- JNC TERLD
- INX H
- DCR B
- JNZ E004
- JMP E007
- E005 CPI ETX TEST FOR ETX CODE
- JZ E001
- CPI STX TEST FOR STX CODE#
- JNZ C000
- JMP S210
- E007 EQU *
- MVI L,#1B DO BULK ERASE,
- CALL R.MODE AND SET MODE 5.
- JMP S101A RETURN TO LOOK FOR SLASHES
- TERLD EQU *
- LXI D,#00
- LXI H,#B8
- CALL R.OUTX OUTPUT COORDINATES
- XCHG TO THE DISPLAY.
- CALL R.OUTY
- MVI L,#1B DO BULK ERASE,
- CALL R.MODE AND SET MODE 5.
- LXI H,DISP2 DISPLAY '7SYSTEM
- CALL R.CHARS NOT ESTABLISHED'7.
- JMP S101
- EJECT
- S107 LXI H,OUT1 OUTPUT ',LNN ',
- INX H
- LDA LDN
- CALL CONVERT CONVERT HEX TO ASCII
- LXI H,OUT1
- MVI B,#04
- S108 CALL OUTDATA
- RNC ERROR, TERMINATE LOADING
- INX H
- DCR B
- JNZ S108
- RET
- *
- * INPUT COMM. DATA
- * DATA INPUT IS DONE USING COMM. STATUS.
- *
- INDATA EQU *
- LXI D,#0000
- IN1 INX D
- MVI A,#0A
- SUB D
- RZ
- IN COMSTAT
- ANI #04 TEST FOR CHAR. RDY. STATUS
- JZ IN1
- IN COMDATA
- STA CHAR
- STC SET '7RECEIVED DATA'7 FLAG.
- RET
- OUTDATA EQU *
- LXI D,#0A00
- O100 DCX D
- MOV A,D
- ORA E
- RZ
- IN COMSTAT
- ANI #02 TEST FOR CHAR. REQ. STATUS
- JZ O100
- MOV A,M
- OUT COMDATA
- STC SET DATA TRANSMITTED FLAG.
- RET
- *
- * CODE CONVERTION ROUTINE
- * A BINARY BYTE IS CONVERTED TO TWO
- * ASCII CHARACTERS.
- *
- CONVERT EQU *
- MOV B,A
- RAR
- RAR
- RAR
- RAR
- ANI #0F CONVERT LOWER 4 BITS
- CALL C.CON BINARY TO ASCII
- MOV M,A
- INX H
- MOV A,B
- ANI #0F CONVERT UPPER 4 BITS
- CALL C.CON
- MOV M,A
- RET
- *
- * ENTRY LOWER FOUR BITS OF A IS HEX CODE
- * EXIT A REG IS ASCII EQUIVALENT
- * C REG. IS CHANGED
- *
- C.CON EQU * BINARY TO ASCII
- MOV C,A
- SUI #09
- JZ CON01
- JP CON02
- CON01 MOV A,C
- ADI #30
- JMP CON03
- CON02 MOV A,C
- ADI #37
- CON03 JPE CON04
- XRI #80
- CON04 RET
- *
- * CRC GENERATOR
- * THE POLYNOMIAL DIVISOR IS
- * X**16+X**15+X**2+1
- *
- CRCGEN EQU *
- LDA CRC1
- MOV C,A
- LDA CHAR
- XRA C
- MOV C,A
- RAR
- ANI #7F
- XRA C
- MOV C,A
- RAR
- RAR
- XRA C
- MOV D,A
- RAR
- RAR
- RAR
- RAR
- XRA D
- ANI #03
- MOV D,A
- MOV A,C
- RLC
- RLC
- MOV E,A
- ANI #FC
- ORA D
- MOV D,A
- MOV A,E
- RLC
- ANI #06
- MOV E,A
- MOV A,D
- RAR
- MOV A,E
- RAR
- MOV C,A
- LDA CRC2
- XRA C
- STA CRC1
- MOV A,D
- STA CRC2
- RET
- EJECT
- L.DISP EQU * DISPL LOADING BLOCK
- LXI D,#00
- LXI H,#0120
- CALL R.OUTX OUTPUT COORDINATES
- XCHG TO THE DISPLAY.
- CALL R.OUTY
- LXI H,DISP4
- LDA SEQ1
- CALL CONVERT CONVERT HEX TO ASCII
- INX H
- LDA SEQ2
- CALL CONVERT CONVERT HEX TO ASCII
- LXI H,DISP4
- CALL R.CHARS
- RET
- SPACE 6
- BSSZ #0BF9+START-*
- *
- * ROM CHECKSUM TABLE
- *
- RST.CHP0 BSSZ 1 ROM 0 CHECKSUM
- RST.CHP1 BSSZ 1 ROM 1 CHECKSUM
- RST.CHP2 BSSZ 1 ROM 2 CHECKSUM
- RST.CHP3 BSSZ 1 ROM 3 CHECKSUM
- RST.CHP4 BSSZ 1 ROM 4 CHECKSUM
- RST.CHP5 BSSZ 1 ROM 5 CHECKSUM
- RST.CKSM BSSZ 1 ROM TABLE CHECKSUM
- *
- * * * * * * * * * * * *
- *
- * 'R'O'M 'CHECKSUM AND 'R'A'M 'TESTS
- *
- * 'THIS SECTION WILL CHECKSUM 6'K OF 'R'O'M WHICH INCLUDES
- * LOADER, DIAGNOSTIC AND CHARACTER GENERATORS. 'THE
- * CHECKSUM IS GENERATED AS FOLLOWS'; STARTING WITH THE
- * HIGHEST 'R'O'M ADDRESS AND THE 'A REGISTER EQUAL TO ZERO
- * AN EXCLUSIVE-OR BETWEEN THE CONTENTS OF MEMORY AND
- * THE A REGISTER WILL BE PERFORMED. 'THE RESULT IS THEN
- * LEFT-SHIFTED END-AROUND. 'THE 'R'O'M ADDRESS IS DECREMENTED
- * AND THE PROCEDURE CONTINUES UNTIL A CHIP
- * BOUNDARY IS REACHED. 'THE RESULTING CHECKSUM IS
- * VERIFIED AGAINST A TABLE OF EXPECTED CHECKSUM
- * BYTES. 'THIS PROCEDURE IS REPEATED FOR ALL SIX
- * CHIPS.
- *
- * 'THE RAM MEMORY TEST WILL TEST A 2000H TO 3000H
- * AND 4000H TO 8000H
- *
- * 'ERROR CODES ARE';
- * 20 ROM FAILURE - CHIP 0
- * 21 ROM FAILURE - CHIP 1
- * 22 COMMAND/ROM FAILURE - CHIP 2
- * 23 ROM FAILURE - CHIP 3
- * 24 ROM FAILURE - CHIP 4
- * 25 ROM FAILURE - CHIP 5
- * 26 COMMAND/RAM FAILURE
- *
- * * * * * * * * * * * * *
- *
- RST.S000 EQU *
- MVI A,#12 ERROR CODE FOR CHIP 2
- OUT RSF.PANL*32+PANLDATA
- LXI H,RST.CHP5 SET HL TO ADDR OF CHECKSUM TABLE
- MVI D,6
- MVI A,0
- RST.S002 EQU *
- XRA M DO UNTIL CHKSUM TABLE IS CHECKSUMMED
- RLC
- DCX H
- DCR D
- JNZ RST.S002
- MOV C,A
- LDA RST.CKSM GET EXPECTED RESULT
- CMP C COMPARE
- JZ RST.S004 JUMP IF CORRECT
- HLT
- RST.S004 EQU *
- LXI H,RSV.HROM SET HL TO FIRST ADR. TO CHECKSUM
- LXI D,RSV.ROML SET DE TO LENGTH OF CHECKSUM
- LXI SP,RST.CHP5-1 SET SP TO EXPECTED CHECKSUM
- RST.S005 EQU *
- MOV A,H
- ANI #1C
- RRC
- RRC FORM NUMBER OF CURRENT CHIP
- ORI #10 FORM ERROR CODE
- OUT RSF.PANL*32+PANLDATA OUTPUT ERROR CODE
- MVI C,0 ZERO PARTIAL RESULT
- RST.S010 EQU *
- MOV A,C DO UNTIL CURRENT CHIP IS DONE
- XRA M CHECKSUM NEXT BYTE
- RLC
- MOV C,A SAVE PARTIAL RESULT
- DCX H UPDATE INDEX
- DCX D UPDATE COUNTER
- MOV A,D CHECK FOR CHIP BOUNDARY
- ANI #03
- ORA E
- JNZ RST.S010 END DO
- MOV A,C GET ACTUAL CHECK SUM
- POP B GET EXPECTED CHECKSUM IN B
- DCX SP
- DCX SP MODIFY SP FOR NEXT CHIP
- DCX SP
- CMP B
- JZ RST.S015
- *
- * ERROR 2X - CHECKSUM ERROR ON CHIP X
- *
- HLT
- *
- RST.S015 EQU *
- MOV A,D END IF NEXT CHIP = 2
- CPI #0C
- JNZ RST.S016
- DCX D
- DCX D THEN UPDATE DE AND HL TO SKIP
- DCX D OVER CHECKSUMMING LAST
- DCX D 4 LOCATIONS OF CHIP 2
- DCX D
- DCX D
- DCX D
- DCX H
- DCX H
- DCX H
- DCX H
- DCX H
- DCX H
- DCX H
- RST.S016 EQU *
- MOV A,D END IF
- ORA E CHECK FOR COUNT = 0
- JNZ RST.S005
- *
- * 'R'A'M CHECK
- *
- MVI A,#16
- OUT RSF.PANL*32+PANLDATA OUTPUT ERROR CODE
- MVI B,#55 LOAD DATA PATTERN
- RST.S030 EQU *
- LXI H,#2000 STARTING ADDRESS
- LXI D,#1000 LENGTH
- RST.S020 EQU *
- MOV M,B
- MOV A,M
- CMP B
- JNZ RST.S050 JUMP IF ERROR
- INX H
- DCX D
- MOV A,D
- ORA E
- JNZ RST.S020 REPEAT IF NOT DONE ALL BYTES
- MOV A,H
- XRI #80
- JZ RST.S025 IF DONE HL = 8000H
- LXI H,#4000
- LXI D,#4000
- JMP RST.S020
- RST.S025 EQU *
- LDA #7FFF
- XRI #AA
- JZ RST.SEC1
- MVI B,#AA
- JMP RST.S030
- RST.S050 EQU *
- HLT ERROR 26
- EJECT
- BSSZ #0D00-*+START
- **
- *E
- * RST.OCHR DISPLAY CHAR ON DISPLAY VIA CONTROLWARE
- *
- * ENTRY BY CALL FROM SECTION FOUR
- *
- * CALLS CHAREN CONTROLWARE ENTRY POINT
- *
- * ALTERS MEMSEL FLAG IN CONTROLWARE
- *
- * EXIT BY RETURN TO CALLER
- *
- * ERRORS REPORTED
- * NONE
- RST.OCHR PUSH B SAVE BC
- CALL OUTCOORD SET DISPLAY COORDINATES
- MOV A,C GET CHAR TO OUTPUT
- RRC
- RRC
- RRC
- RRC
- ANI #0F SAVE UPPER DIGIT
- CALL RST.OUT GO TO COMMON CODE
- POP B RESTORE BC
- PUSH B
- MOV A,C
- ANI #0F SAVE LOWER DIGIT
- CALL RST.OUT
- POP B RESTORE BC
- RET RETURN TO CALLER
- RST.OUT EQU $
- LHLD M0ADR LOAD ADDRESS OF M0
- SHLD MEMSEL CHARACTER SET.
- CPI #0A
- JC RST.OUT5 JUMP IF 0-9
- CPI #36
- JNZ RST.OUT3
- XRA A SET TO 00 FOR SPACE
- JMP RST.OUT4
- RST.OUT3 EQU $
- ADI #17
- RST.OUT4 EQU $
- CALL CHAREN CALL CHARACTER GENERATOR
- RET RETURN TO CALLER
- RST.OUT5 EQU $
- ADI #10
- CALL CHAREN CALL CHARACTER GENERATOR
- RET RETURN TO CALLER
- RSV.HROM EQU #17FF LWA OF ROM
- RSV.ROML EQU #1800 LENGTH OF ROM
- RSV.RAML EQU #1000 LENGTH OF 4K RAM
- RSV.SRAM EQU #2000 FWA OF RAM
- RST.STAK EQU #205D
- RST.CON5 EQU #2055
- RST.CON6 EQU #2056
- RSM.EXIT EQU #01
- RSM.RAM EQU #02
- RSM.SEC4 EQU #04
- RSM.LOOP EQU #08
- RSM.TOCH EQU #10
- RSM.CCLR EQU #02
- RSM.CSET EQU #D7
- RSF.PANL EQU 0
- RSF.COMM EQU 1
- RSF.KYBD EQU 2
- RSF.TOCH EQU 3
- RSF.DISP EQU 4
- COMMDAT1 EQU 0
- COMMDAT2 EQU 1
- COMMDAT3 EQU 2
- COMMCONT EQU 2
- COMMSTAT EQU 3
- KYBDCONT EQU 0
- KYBDSTAT EQU 1
- KYBDDATA EQU 2
- TOCHCONT EQU 0
- TOCHSTAT EQU 1
- TOCHDATA EQU 0
- DISPDATA EQU 3
- DISPXCOR EQU 4
- DISPYCOR EQU 5
- DISPCON1 EQU 6
- DISPCON2 EQU 7
- DISPXREG EQU 0
- DISPYREG EQU 1
- DISPXY28 EQU 2
- PANLDATA EQU #10
- PANLSWCH EQU #11
- * EQUATES USED FOR LOADER
- CONT1 EQU #A1
- COMSTAT EQU #E3
- COMDATA EQU #E2
- DUMPY EQU #00
- ETX EQU #03 ETX CODE
- ETB EQU #17 ETB CODE
- ESC EQU #1B ESCAPE CODE
- SPACE EQU #20 SPACE CODE
- DLE EQU #90 DLE CODE
- STX EQU #82 STX CODE
- EOT EQU #84 EOT CODE
- CR EQU #8D CR CODE
- NAK EQU #95 NAK CODE
- ASCL EQU #CC ASCII L
- ASC0 EQU #30 ASCII 0
- SLASH EQU #AF / CODE
- EJECT
- FIX EQU *
- BSSZ #0DAB-*+START
- *
- * LOADER DISPLAY MESSAGES
- *
- SPACE 2
- DISP3 EQU *
- DB #4C,#4F,#41,#44 L O A D
- DB #49,#4E,#47,#20 I N G
- DB #44,#4F,#4E,#45 D O N E
- DB #1B,#30
- DISP2 EQU *
- DB #4C,#4F,#41,#44 'L 'O 'A 'D
- DB #49,#4E,#47,#20 'I 'N 'G SP
- DB #46,#41,#49,#4C 'F 'A 'I 'L
- DB #55,#52,#45,#20 'U 'R 'E SP
- DB #1B,#30
- DISP1 EQU *
- DB #4C,#4F,#41,#44 L O A D
- DB #49,#4E,#47,#20 I N G
- DB #42,#4C,#4B,#20 B L K
- DB #20,#1B,#30
- EJECT
- *
- * PLATO M0 CHARACTER SET
- *
- M0CODE00 DB #00,#00,#00,#00 SPACE
- DB #00,#00,#00,#00
- DB #00,#00,#00,#00
- DB #00,#00,#00,#00
- M0CODE01 DB #00,#00,#00,#00 EXCLAMATION MARK
- DB #00,#00,#90,#1F
- DB #00,#00,#00,#00
- DB #00,#00,#00,#00
- M0CODE02 DB #00,#00,#00,#00 DOUBLE QUOTES
- DB #00,#1C,#00,#00
- DB #00,#1C,#00,#00
- DB #00,#00,#00,#00
- M0CODE03 DB #00,#05,#00,#05 NUMBER SIGN
- DB #C0,#1F,#00,#05
- DB #C0,#1F,#00,#05
- DB #00,#05,#00,#00
- M0CODE04 DB #40,#06,#20,#09 DOLLAR SIGN
- DB #20,#09,#F0,#1F
- DB #20,#09,#20,#09
- DB #C0,#04,#00,#00
- M0CODE05 DB #20,#0C,#40,#12 PERCENT SIGN
- DB #80,#0C,#00,#01
- DB #60,#02,#90,#04
- DB #60,#08,#00,#00
- M0CODE06 DB #E0,#00,#10,#0D AMPER SIGN
- DB #10,#13,#90,#0C
- DB #60,#00,#60,#00
- DB #90,#01,#00,#00
- M0CODE07 DB #00,#00,#00,#00 SINGLE QUOTE
- DB #00,#00,#00,#1C
- DB #00,#00,#00,#00
- DB #00,#00,#00,#00
- M0CODE08 DB #00,#00,#00,#00 LEFT PAREN
- DB #00,#00,#00,#00
- DB #E0,#07,#10,#08
- DB #08,#10,#00,#00
- M0CODE09 DB #08,#10,#10,#08 RIGHT PAREN
- DB #E0,#07,#00,#00
- DB #00,#00,#00,#00
- DB #00,#00,#00,#00
- M0CODE0A DB #00,#00,#40,#02 ASTERISK
- DB #80,#01,#60,#06
- DB #80,#01,#40,#02
- DB #00,#00,#00,#00
- M0CODE0B DB #00,#00,#80,#00 PLUS
- DB #80,#00,#E0,#03
- DB #80,#00,#80,#00
- DB #00,#00,#00,#00
- M0CODE0C DB #00,#00,#00,#00 COMMA
- DB #34,#00,#38,#00
- DB #00,#00,#00,#00
- DB #00,#00,#00,#00
- M0CODE0D DB #00,#00,#80,#00 MINUS
- DB #80,#00,#80,#00
- DB #80,#00,#80,#00
- DB #00,#00,#00,#00
- M0CODE0E DB #00,#00,#00,#00 PERIOD
- DB #30,#00,#30,#00
- DB #00,#00,#00,#00
- DB #00,#00,#00,#00
- M0CODE0F DB #10,#00,#20,#00 SLASH
- DB #40,#00,#80,#00
- DB #00,#01,#00,#02
- DB #00,#04,#00,#00
- M0CODE10 DB #10,#00,#E0,#07 NUMERAL ZERO
- DB #50,#08,#90,#09
- DB #10,#0A,#E0,#07
- DB #00,#08,#00,#00
- M0CODE11 DB #00,#00,#00,#00 NUMERAL ONE
- DB #10,#04,#F0,#0F
- DB #10,#00,#00,#00
- DB #00,#00,#00,#00
- M0CODE12 DB #00,#00,#30,#04 NUMERAL TWO
- DB #50,#08,#90,#08
- DB #10,#09,#10,#06
- DB #00,#00,#00,#00
- M0CODE13 DB #00,#00,#20,#04 NUMERAL THREE
- DB #10,#08,#10,#09
- DB #10,#09,#E0,#06
- DB #00,#00,#00,#00
- M0CODE14 DB #00,#00,#80,#00 NUMERAL FOUR
- DB #80,#01,#80,#02
- DB #80,#04,#F0,#0F
- DB #80,#00,#00,#00
- M0CODE15 DB #00,#00,#10,#0F NUMERAL FIVE
- DB #10,#09,#10,#09
- DB #20,#09,#C0,#08
- DB #00,#00,#00,#00
- M0CODE16 DB #00,#00,#E0,#03 NUMERAL SIX
- DB #10,#05,#10,#09
- DB #10,#09,#E0,#00
- DB #00,#00,#00,#00
- M0CODE17 DB #00,#00,#00,#08 NUMERAL SEVEN
- DB #30,#08,#C0,#08
- DB #00,#0B,#00,#0C
- DB #00,#00,#00,#00
- M0CODE18 DB #00,#00,#E0,#06 NUMERAL EIGHT
- DB #10,#09,#10,#09
- DB #10,#09,#E0,#06
- DB #00,#00,#00,#00
- M0CODE19 DB #00,#00,#00,#07 NUMERAL NINE
- DB #90,#08,#90,#08
- DB #A0,#08,#C0,#07
- DB #00,#00,#00,#00
- M0CODE1A DB #00,#00,#00,#00 COLON
- DB #30,#03,#30,#03
- DB #00,#00,#00,#00
- DB #00,#00,#00,#00
- M0CODE1B DB #00,#00,#00,#00 SEMICOLON
- DB #34,#03,#38,#03
- DB #00,#00,#00,#00
- DB #00,#00,#00,#00
- M0CODE1C DB #00,#00,#80,#00 LESS THAN
- DB #40,#01,#20,#02
- DB #10,#04,#00,#00
- DB #00,#00,#00,#00
- M0CODE1D DB #00,#00,#40,#01 EQUALS
- DB #40,#01,#40,#01
- DB #40,#01,#40,#01
- DB #00,#00,#00,#00
- M0CODE1E DB #00,#00,#00,#00 GREATER THAN
- DB #10,#04,#20,#02
- DB #40,#01,#80,#00
- DB #00,#00,#00,#00
- M0CODE1F DB #00,#00,#00,#0C QUESTION MARK
- DB #00,#10,#D0,#10
- DB #00,#11,#00,#0E
- DB #00,#00,#00,#00
- M0CODE20 DB #E0,#01,#10,#02 COMMERCIAL AT
- DB #C8,#04,#28,#05
- DB #E8,#05,#20,#02
- DB #C0,#01,#00,#00
- M0CODE21 DB #F0,#07,#00,#09 UPPER CASE A
- DB #00,#11,#00,#11
- DB #00,#11,#00,#09
- DB #F0,#07,#00,#00
- M0CODE22 DB #F0,#1F,#10,#12 UPPER CASE B
- DB #10,#12,#10,#12
- DB #10,#12,#10,#0E
- DB #E0,#01,#00,#00
- M0CODE23 DB #C0,#07,#20,#08 UPPER CASE C
- DB #10,#10,#10,#10
- DB #10,#10,#10,#10
- DB #20,#08,#00,#00
- M0CODE24 DB #F0,#1F,#10,#10 UPPER CASE D
- DB #10,#10,#10,#10
- DB #10,#10,#20,#08
- DB #C0,#07,#00,#00
- M0CODE25 DB #F0,#1F,#10,#11 UPPER CASE E
- DB #10,#11,#10,#11
- DB #10,#10,#10,#10
- DB #10,#10,#00,#00
- M0CODE26 DB #F0,#1F,#00,#11 UPPER CASE F
- DB #00,#11,#00,#11
- DB #00,#10,#00,#10
- DB #00,#10,#00,#00
- M0CODE27 DB #C0,#07,#20,#08 UPPER CASE G
- DB #10,#10,#10,#10
- DB #90,#10,#90,#10
- DB #E0,#08,#00,#00
- M0CODE28 DB #F0,#1F,#00,#01 UPPER CASE H
- DB #00,#01,#00,#01
- DB #00,#01,#00,#01
- DB #F0,#1F,#00,#00
- M0CODE29 DB #00,#00,#10,#10 UPPER CASE I
- DB #10,#10,#F0,#1F
- DB #10,#10,#10,#10
- DB #00,#00,#00,#00
- M0CODE2A DB #20,#00,#10,#00 UPPER CASE J
- DB #10,#10,#10,#10
- DB #E0,#1F,#00,#10
- DB #00,#10,#00,#00
- M0CODE2B DB #F0,#1F,#80,#00 UPPER CASE K
- DB #00,#01,#80,#02
- DB #40,#04,#20,#08
- DB #10,#10,#00,#00
- M0CODE2C DB #F0,#1F,#10,#00 UPPER CASE L
- DB #10,#00,#10,#00
- DB #10,#00,#10,#00
- DB #10,#00,#00,#00
- M0CODE2D DB #F0,#1F,#00,#08 UPPER CASE M
- DB #00,#04,#00,#02
- DB #00,#04,#00,#08
- DB #F0,#1F,#00,#00
- M0CODE2E DB #F0,#1F,#00,#08 UPPER CASE N
- DB #00,#06,#00,#01
- DB #C0,#00,#20,#00
- DB #F0,#1F,#00,#00
- M0CODE2F DB #C0,#07,#20,#08 UPPER CASE O
- DB #10,#10,#10,#10
- DB #10,#10,#20,#08
- DB #C0,#07,#00,#00
- M0CODE30 DB #F0,#1F,#00,#11 UPPER CASE P
- DB #00,#11,#00,#11
- DB #00,#11,#00,#11
- DB #00,#0E,#00,#00
- M0CODE31 DB #C0,#07,#20,#08 UPPER CASE Q
- DB #10,#10,#18,#10
- DB #14,#10,#24,#08
- DB #C0,#07,#00,#00
- M0CODE32 DB #F0,#1F,#00,#11 UPPER CASE R
- DB #00,#11,#80,#11
- DB #40,#11,#20,#11
- DB #10,#0E,#00,#00
- M0CODE33 DB #20,#0E,#10,#11 UPPER CASE S
- DB #10,#11,#10,#11
- DB #10,#11,#10,#11
- DB #E0,#08,#00,#00
- M0CODE34 DB #00,#10,#00,#10 UPPER CASE T
- DB #00,#10,#F0,#1F
- DB #00,#10,#00,#10
- DB #00,#10,#00,#00
- M0CODE35 DB #E0,#1F,#10,#00 UPPER CASE U
- DB #10,#00,#10,#00
- DB #10,#00,#10,#00
- DB #E0,#1F,#00,#00
- M0CODE36 DB #00,#18,#00,#07 UPPER CASE V
- DB #C0,#00,#30,#00
- DB #C0,#00,#00,#07
- DB #00,#18,#00,#00
- M0CODE37 DB #E0,#1F,#10,#00 UPPER CASE W
- DB #20,#00,#C0,#03
- DB #20,#00,#10,#00
- DB #E0,#1F,#00,#00
- M0CODE38 DB #30,#18,#40,#04 UPPER CASE X
- DB #80,#02,#00,#01
- DB #80,#02,#40,#04
- DB #30,#18,#00,#00
- M0CODE39 DB #00,#18,#00,#04 UPPER CASE Y
- DB #00,#02,#F0,#01
- DB #00,#02,#00,#04
- DB #00,#18,#00,#00
- M0CODE3A DB #30,#18,#50,#10 UPPER CASE Z
- DB #90,#10,#10,#11
- DB #10,#12,#10,#14
- DB #30,#18,#00,#00
- M0CODE3B DB #00,#00,#00,#00 LEFT BRACKET
- DB #00,#00,#00,#00
- DB #F8,#1F,08,#10
- DB 08,#10,00,00
- M0CODE3C DB #00,#04,#00,#02 REVERSE SLASH
- DB #00,#01,#80,#00
- DB #40,#00,#20,#00
- DB #10,#00,#00,#00
- M0CODE3D DB #08,#10,#08,#10 RIGHT BRACKET
- DB #F8,#1F,#00,#00
- DB #00,#00,#00,#00
- DB #00,#00,#00,#00
- M0CODE3E DB #00,#00,#00,#10 HAT
- DB #00,#20,#00,#40
- DB #00,#20,#00,#10
- DB #00,#00,#00,#00
- M0CODE3F DB #04,#00,#04,#00 UNDERLINE
- DB #04,#00,#04,#00
- DB #04,#00,#04,#00
- DB #04,#00,#00,#00
- M0CODE40 DB #00,#00,#00,#40 SINGLE LEFT QUOTE
- DB #00,#20,#00,#10
- DB #00,#00,#00,#00
- DB #00,#00,#00,#00
- M0CODE41 DB #60,#00,#90,#02 LOWER CASE A
- DB #90,#02,#90,#02
- DB #90,#02,#E0,#01
- DB #10,#00,#00,#00
- M0CODE42 DB #F0,#1F,#20,#01 LOWER CASE B
- DB #10,#02,#10,#02
- DB #10,#02,#20,#01
- DB #C0,#00,#00,#00
- M0CODE43 DB #C0,#00,#20,#01 LOWER CASE C
- DB #10,#02,#10,#02
- DB #10,#02,#10,#02
- DB #20,#01,#00,#00
- M0CODE44 DB #C0,#00,#20,#01 LOWER CASE D
- DB #10,#02,#10,#02
- DB #10,#02,#20,#01
- DB #F0,#1F,#00,#00
- M0CODE45 DB #C0,#00,#A0,#01 LOWER CASE E
- DB #90,#02,#90,#02
- DB #90,#02,#90,#02
- DB #90,#01,#00,#00
- M0CODE46 DB #00,#00,#00,#00 LOWER CASE F
- DB #10,#02,#F0,#0F
- DB #10,#12,#00,#10
- DB #00,#08,#00,#00
- M0CODE47 DB #A8,#01,#54,#02 LOWER CASE G
- DB #54,#02,#54,#02
- DB #54,#02,#94,#01
- DB #08,#02,#00,#00
- M0CODE48 DB #00,#10,#F0,#1F LOWER CASE H
- DB #00,#01,#00,#02
- DB #00,#02,#00,#02
- DB #F0,#01,#00,#00
- M0CODE49 DB #00,#00,#00,#00 LOWER CASE I
- DB #10,#02,#F0,#13
- DB #10,#00,#00,#00
- DB #00,#00,#00,#00
- M0CODE4A DB 00,00,02,00 LOWER CASE J
- DB 02,02,#FC,#13
- DB #00,#00,#00,#00
- DB #00,#00,#00,#00
- M0CODE4B DB #10,#10,#F0,#1F LOWER CASE K
- DB #80,#00,#40,#01
- DB #20,#02,#10,#02
- DB #10,#00,#00,#00
- M0CODE4C DB 00,00,00,00 LOWER CASE L
- DB #10,#10,#F0,#1F
- DB #10,00,00,00
- DB #00,#00,#00,#00
- M0CODE4D DB #F0,#03,#00,#02 LOWER CASE M
- DB #00,#02,#F0,#01
- DB #00,#02,#00,#02
- DB #F0,#01,#00,#00
- M0CODE4E DB #00,#02,#F0,#03 LOWER CASE N
- DB #00,#01,#00,#02
- DB #00,#02,#00,#02
- DB #F0,#01,#00,#00
- M0CODE4F DB #C0,#00,#20,#01 LOWER CASE O
- DB #10,#02,#10,#02
- DB #10,#02,#20,#01
- DB #C0,#00,#00,#00
- M0CODE50 DB #FE,#03,#20,#01 LOWER CASE P
- DB #10,#02,#10,#02
- DB #10,#02,#20,#01
- DB #C0,#00,#00,#00
- M0CODE51 DB #C0,#00,#20,#01 LOWER CASE Q
- DB #10,#02,#10,#02
- DB #10,#02,#20,#01
- DB #FE,#03,#00,#00
- M0CODE52 DB #00,#02,#F0,#03 LOWER CASE R
- DB #00,#01,#00,#02
- DB #00,#02,#00,#02
- DB #00,#01,#00,#00
- M0CODE53 DB #20,#01,#90,#02 LOWER CASE S
- DB #90,#02,#90,#02
- DB #90,#02,#90,#02
- DB #60,#00,#00,#00
- M0CODE54 DB #00,#02,#00,#02 LOWER CASE T
- DB #E0,#1F,#10,#02
- DB #10,#02,#10,#02
- DB #00,#00,#00,#00
- M0CODE55 DB #E0,#03,#10,#00 LOWER CASE U
- DB #10,#00,#10,#00
- DB #10,#00,#E0,#03
- DB #10,#00,#00,#00
- M0CODE56 DB #00,#02,#00,#03 LOWER CASE V
- DB #C0,#00,#30,#00
- DB #C0,#00,#00,#03
- DB #00,#02,#00,#00
- M0CODE57 DB #E0,#03,#10,#00 LOWER CASE W
- DB #20,#00,#C0,#01
- DB #20,#00,#10,#00
- DB #E0,#03,#00,#00
- M0CODE58 DB #00,#02,#10,#02 LOWER CASE X
- DB #20,#01,#C0,#00
- DB #C0,#00,#20,#01
- DB #10,#02,#00,#00
- M0CODE59 DB #82,#03,#44,#00 LOWER CASE Y
- DB #28,#00,#10,#00
- DB #20,#00,#40,#00
- DB #80,#03,#00,#00
- M0CODE5A DB #10,#03,#30,#02 LOWER CASE Z
- DB #50,#02,#90,#02
- DB #10,#03,#30,#02
- DB #00,#00,#00,#00
- M0CODE5B DB #00,#00,#00,#00 LEFT BRACE
- DB #00,#00,#80,#00
- DB #78,#0F,#04,#10
- DB #04,#10,#00,#00
- M0CODE5C DB #00,#00,#E0,#3D ELONGATED COLON
- DB #E0,#3D,#E0,#3D
- DB #00,#00,#00,#00
- DB #00,#00,#00,#00
- M0CODE5D DB #04,#10,#04,#10 RIGHT BRACE
- DB #78,#0F,#80,#00
- DB #00,#00,#00,#00
- DB #00,#00,#00,#00
- M0CODE5E DB #00,#00,#80,#00 APPROXIMATE
- DB #00,#01,#00,#01
- DB #80,#00,#80,#00
- DB #00,#01,#00,#00
- M0CODE5F DB #F0,#1F,#F0,#1F RUBOUT
- DB #F0,#1F,#F0,#1F
- DB #F0,#1F,#F0,#1F
- DB #F0,#1F,#F0,#1F
- M0CODE60 DB #01,#00,#01,#00 CURSOR
- DB #01,#00,#01,#00
- DB #01,#00,#01,#00
- DB #01,#00,#01,#00
- M0CODE61 DB #00,#00,#00,#00 CHCURSOR
- DB #00,#00,#00,#01
- DB #80,#03,#00,#01
- DB #00,#00,#00,#00
- *
- * PLATO M1 CHARACTER SET
- *
- M1CODE00 DB #00,#00,#00,#00 SPACE
- DB #00,#00,#00,#00
- DB #00,#00,#00,#00
- DB #00,#00,#00,#00
- M1CODE01 DB #00,#00,#40,#00 SHORTER SLASH
- DB #80,#00,#00,#01
- DB #00,#02,#00,#04
- DB #00,#08,#00,#00
- M1CODE02 DB #00,#00,#A0,#02 EQUIVALENT
- DB #A0,#02,#A0,#02
- DB #A0,#02,#A0,#02
- DB #00,#00,#00,#00
- M1CODE03 DB #00,#00,#00,#10 SPANISH N
- DB #00,#20,#00,#20
- DB #00,#10,#00,#10
- DB #00,#20,#00,#00
- M1CODE04 DB #80,#00,#40,#01 REPLACEMENT ARROW
- DB #20,#02,#70,#07
- DB #40,#01,#40,#01
- DB #40,#01,#00,#00
- M1CODE05 DB #50,#01,#60,#01 NOT EQUAL
- DB #40,#01,#C0,#01
- DB #40,#01,#40,#03
- DB #40,#05,#00,#00
- M1CODE06 DB #00,#00,#00,#01 UP ARROW
- DB #00,#03,#F0,#07
- DB #00,#03,#00,#01
- DB #00,#00,#00,#00
- M1CODE07 DB #80,#00,#80,#00 RIGHT ARROW
- DB #80,#00,#80,#00
- DB #E0,#03,#C0,#01
- DB #80,00,00,00
- M1CODE08 DB #00,#00,#40,#00 DOWN ARROW
- DB #60,#00,#F0,#07
- DB #60,#00,#40,#00
- DB #00,#00,#00,#00
- M1CODE09 DB #80,#00,#C0,#01 LEFT ARROW
- DB #E0,#03,#80,#00
- DB #80,#00,#80,#00
- DB #80,#00,#00,#00
- M1CODE0A DB #00,#00,#00,#00 STAR
- DB #40,#02,#80,#01
- DB #80,#01,#40,#02
- DB #00,#00,#00,#00
- M1CODE0B DB #10,#10,#30,#18 CAPITAL SIGMA
- DB #50,#14,#90,#12
- DB #10,#11,#10,#10
- DB #10,#10,#00,#00
- M1CODE0C DB #30,#00,#D0,#00 CAPITAL DELTA
- DB #10,#03,#10,#0C
- DB #10,#03,#D0,#00
- DB #30,#00,#00,#00
- M1CODE0D DB #00,#00,#80,#03 CUP
- DB #40,#00,#40,#00
- DB #40,#00,#80,#03
- DB #00,#00,#00,#00
- M1CODE0E DB #00,#00,#C0,#01 CAP
- DB #00,#02,#00,#02
- DB #00,#02,#C0,#01
- DB #00,#00,#00,#00
- M1CODE0F DB #00,#00,#80,#00 DIVIDE
- DB #80,#00,#A0,#02
- DB #80,#00,#80,#00
- DB #00,#00,#00,#00
- M1CODE10 DB #E0,#01,#10,#02 ALPHA
- DB #10,#02,#A0,#01
- DB #60,#00,#90,#00
- DB #10,#03,#00,#00
- M1CODE11 DB #02,#00,#FC,#03 BETA
- DB #10,#05,#10,#09
- DB #10,#09,#90,#06
- DB #60,#00,#00,#00
- M1CODE12 DB #00,#00,#E0,#0C SMALL DELTA
- DB #10,#13,#10,#11
- DB #90,#08,#60,#04
- DB #00,#00,#00,#00
- M1CODE13 DB #00,#00,#30,#10 LAMDA
- DB #C0,#0C,#00,#03
- DB #C0,#00,#30,#00
- DB #00,#00,#00,#00
- M1CODE14 DB #02,#00,#02,#00 MU
- DB #FC,#03,#10,#00
- DB #10,#00,#E0,#03
- DB #10,#00,#00,#00
- M1CODE15 DB #00,#01,#00,#02 PI
- DB #F0,#03,#00,#02
- DB #F0,#03,#00,#02
- DB #00,#04,#00,#00
- M1CODE16 DB #06,#00,#38,#00 RHO
- DB #E0,#00,#10,#01
- DB #10,#02,#20,#02
- DB #C0,#01,#00,#00
- M1CODE17 DB #E0,#00,#10,#01 SMALL SIGMA
- DB #10,#02,#10,#03
- DB #E0,#02,#00,#02
- DB #00,#02,#00,#00
- M1CODE18 DB #E0,#01,#10,#02 OMEGA
- DB #10,#00,#E0,#00
- DB #10,#00,#10,#02
- DB #E0,#01,#00,#00
- M1CODE19 DB #20,#02,#20,#02 LESSOR OR EQUAL
- DB #20,#05,#20,#05
- DB #A0,#08,#A0,#08
- DB #00,#00,#00,#00
- M1CODE1A DB #00,#00,#A0,#08 GREATER OR EQUAL
- DB #A0,#08,#20,#05
- DB #20,#05,#20,#02
- DB #20,#02,#00,#00
- M1CODE1B DB #C0,#07,#20,#09 THETA
- DB #10,#11,#10,#11
- DB #10,#11,#20,#09
- DB #C0,#07,#00,#00
- M1CODE1C DB 00,00,#80,00 EMBEDDED LEFT PAREN
- DB #40,01,#20,02
- DB #F0,07,#10,08
- DB #08,#10,00,00
- M1CODE1D DB #00,#00,#00,#0C DEGREE SIGN
- DB #00,#12,#00,#12
- DB #00,#0C,#00,#00
- DB #00,#00,#00,#00
- M1CODE1E DB 08,#10,#10,08 EMBEDDED RIGHT PAREN
- DB #F0,07,#20,02
- DB #40,01,#80,00
- DB #00,00,00,00
- M1CODE1F DB #1C,#1C,#24,#12 RIGHT ARROW HEAD
- DB #48,#09,#90,#04
- DB #20,#02,#40,#01
- DB #80,#00,#00,#00
- M1CODE20 DB #84,#21,#44,#22 PART OF COPYRIGHT
- DB #24,#24,#24,#24 CENTER
- DB #24,#24,#24,#24
- DB #44,#22,#00,#00
- M1CODE21 DB #00,#00,#00,#00 2 DOTS
- DB #00,#10,#00,#00
- DB #00,#10,#00,#00
- DB #00,#00,#00,#00
- M1CODE22 DB #00,#00,#C0,#03 SQUARE
- DB #40,#02,#40,#02
- DB #40,#02,#C0,#03
- DB #00,#00,#00,#00
- M1CODE23 DB 00,00,#80,01 MATRIX MULTIPLY
- DB #40,02,#40,02
- DB #80,01,00,00
- DB #00,00,00,00
- M1CODE24 DB #80,#00,#C0,#01 DIAMOND
- DB #E0,#03,#F0,#07
- DB #E0,#03,#C0,#01
- DB #80,#00,#00,#00
- M1CODE25 DB #10,04,#20,02 VECTOR PRODUCT
- DB #40,01,#80,00
- DB #40,01,#20,02
- DB #10,04,00,00
- M1CODE26 DB 00,00,00,00 SINGLE RIGHT QUOTE
- DB 00,00,00,#10
- DB 00,#20,00,#40
- DB 00,00,00,00
- M1CODE27 DB 00,00,00,00 CEDILLA
- DB 00,00,08,00
- DB #10,00,#20,00
- DB #00,00,00,00
- M1CODE28 DB #00,00,00,#40 MAD HAT
- DB 00,#20,00,#10
- DB 00,#20,00,#40
- DB 00,00,00,00
- M1CODE29 DB 00,00,#40,01 UP AND DOWN ARROWS
- DB #60,03,#F0,#07
- DB #60,#03,#40,01
- DB 00,00,00,00
- M1CODE2A DB 00,00,00,00 VERTICAL LINE
- DB 00,00,#F0,#1F
- DB 00,00,00,00
- DB 00,00,00,00
- BSSZ #2000-*+START
- ORG #2000
- LWA BSS 2 LWA OF RAM RESIDENT
- CKSM BSS 1 RAM RESIDENT CHECKSUM
- BSS 36
- BSS 41 STACK STORAGE AREA
- IST.STK EQU $ *****STACK INITIALIZATION ADDRESS*****
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * TERMINAL VARIABLES AND SCRATCH AREA
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- D.CNTL2 BSS 1 DISPLAY CONTROL 2 FOR CHARACTER GEN.
- SIZE BSS 1 CHARACTER SIZE REGISTER
- FWD.REV BSS 1 CHARACTER PLOT FORWARD OR REVERSE
- HOR BSS 1 HORIZONTAL PLOTTING FLAG
- VER BSS 1 VERTICAL PLOTTING FLAG.
- X.PLOT BSS 2 X CONSTANT FOR NEXT CHARACTER.
- Y.PLOT BSS 2 Y CONSTANT FOR NEXT CHARACTER.
- CHAR.GEN BSS 2 CHARACTER GENERATOR ADDRESS
- XREG BSS 2 CURRENT X COORDINATE
- YREG BSS 2 CURRENT Y POSITION
- XSAVE BSS 2 X POSITION SCRATCH REGISTER
- YSAVE BSS 2 Y POSITION SCRATCH REGISTER
- MEMSEL BSS 2 CHARACTER MEMORY SELECTED ADDRESS
- M.ORG BSS 2 BASE ADDRESS OF DATA
- ORG #22E6
- * * * * * * * * * * * * * * * * * * * * * * * *
- M.SBTYPE DB 03
- M.CONFIG DB 0
- M.M0 DW M0CODE00
- M.VERS DB 01
- M.TYPE BSS 1 TERMINAL TYPE
- M.CLOCK BSS 2 CLOCK
- M.EXTPA BSS 2 EXTERNAL INTERRUPT PROCESSOR ADDRESS
- M.MARGIN BSS 2 MARGIN USED FOR CARRIAGE RETURNS
- M.DIFF BSS 2 INPUT FIFO DIFFERANCE COUNT.
- M.CCR BSS 2
- M.MODE BSS 2 WRITE/ERASE/MODE
- M.DIR BSS 2 DIRECTION OF STEPY/X, 0=FWD, 1=REV
- M.KSW BSS 2
- M.ENAB BSS 2
- M.SELECT BSS 2
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * COMPUTER LOADED MODE ADDRESSES
- MODE5A BSS 2 MODE 5 ADDRESS
- MODE6A BSS 2 MODE 6 ADDRESS
- MODE7A BSS 2 MODE 6 ADDRESS
- * COMPUTER LOADED CHARACTER SET STORAGE
- MEMORY.2 BSS 2 CHARACTER SET M2 STORE ADDRESS
- MEMORY.3 BSS 2 CHARACTER SET M3 STORE ADDRESS
- MEMORY.4 BSS 2 CHARACTER SET M4 STORE ADDRESS
- MEMORY.5 BSS 2 CHARACTER SET M5 STORE ADDRESS
- MEMORY.6 BSS 2 CHARACTER SET M6 STORE ADDRESS
- MEMORY.7 BSS 2 CHARACTER SET M7 STORE ADDRESS
- BSS 2
- M.HALT DW 0000
- M.STATUS DW 0000
- MODE BSSZ 1
- SC.OC BSSZ 1
- *
- *FOLLOWING FLAGS USED FOR LOAD AND MUST BE IN THIS ORDER
- *
- FLAGREG BSSZ 1
- CNTR BSSZ 1
- CHAR BSSZ 1 INPUT DATA SAVE
- CRC1 BSSZ 1 16 BIT CYCLIC
- CRC2 BSSZ 1 REDUNDENCY CHECK.
- SEQ1 BSSZ 1 16 BIT LOAD BLOCK
- SEQ2 BSSZ 1 SEQUEANCE NUMBER.
- LDN BSSZ 1 LOAD FILE IDENTIFIER.
- A1 BSSZ 1 24 BIT STARTING
- A2 BSSZ 1 ADDRESS OF THE
- A3 BSSZ 1 LOAD DATA.
- SAVE BSSZ 1 SAVE DLE COUNT
- *
- * OUTPUT MESSAGE STORE FOR LOAD PROTOCOL
- *
- DISP4 EQU *
- BSS 6 BLOCK NUMDER
- OUT1 EQU *
- BSS 4 MSG L,N,N,CR
- OUT3 EQU *
- BSS 2 MSG DLE,EOT
- OUT4 EQU *
- BSS 5 MSG NAK,XXYY
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- END START
plato/source/plaopl/asc1rom.txt ยท Last modified: 2023/08/05 18:54 by Site Administrator