-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmulticomp09_flex_io.asm
119 lines (100 loc) · 3.77 KB
/
multicomp09_flex_io.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
*******************************************************************
* FLEX DRIVERS FOR MULTICOMP6809 SYSTEM
*
* CONSOLE I/O DRIVER PACKAGE FOR MULTICOMP VDU
*
* Neal Crook May2015. Based on Appendix G of 6809 FLEX Adaption Guide
*
* MOVED THE JUMP TABLE FROM THE START OF THE SOURCE TO THE END
* SO THAT THE ADDRESSES WERE SEQUENTIAL (REMOVED ONE WARNING FROM
* THE FLOW TO BINARY)
*******************************************************************
* MULTICOMP I/O REGISTERS FOR VDU TERMINAL
UARTDAT EQU $FFD1
UARTSTA EQU $FFD0
* FLEX ENTRY POINT FOR WARM START
FLEXWRM EQU $CD03
ORG $D370
*******************************************************************
* SUBROUTINE INIT
*
* INITIALIZE HARDWARE
* FOR MULTICOMP, THERE IS NOTHING TO DO. BESIDES, THE TERMINAL
* WAS ALREADY INITIALIZED BY THE BOOT LOADER
INIT RTS
*******************************************************************
* SUBROUTINE INNECH
*
* WAIT FOR CHARACTER, NO ECHO
* ALLOWED TO DESTROY A, CC
INNECH LDA UARTSTA VDU/UART STATUS
BITA #1 CHARACTER AVAILABLE?
BEQ INNECH NOT YET..
LDA UARTDAT CHARACTER
ANDA #$7F STRIP PARITY
RTS
*******************************************************************
* SUBROUTINE INPUT
*
* WAIT FOR CHARACTER, ECHO. CALLS INNECH THEN FALLS THROUGH TO
* SUBROUTINE OUTPUT.
* ALLOWED TO DESTROY A, CC
INPUT BSR INNECH
* PUT NO CODE HERE!! ROUTINE ABOVE FALLING THROUGH!!
*******************************************************************
* SUBROUTINE OUTPUT
*
* OUTPUT CHARACTER IN A
* ALLOWED TO DESTROY CC
OUTPUT PSHS A SAVE CHARACTER
OUTPU2 LDA UARTSTA VDU/UART STATUS
BITA #2
BEQ OUTPU2 BUSY
PULS A GET CHARACTER BACK
STA UARTDAT OUTPUT IT
RTS
*******************************************************************
* SUBROUTINE STATUS
*
* CHECK FOR INPUT CHARACTER. Z SET IF NO CHARACTER AVAILABLE
* ALLOWED TO DESTROY CC
STATUS PSHS A PRESERVE
LDA UARTSTA VDU/UART STATUS
BITA #1 CHARACTER AVAILABLE?
PULS A RESTORE
RTS Z FLAG IF NO CHARACTER
*******************************************************************
* SUBROUTINE MONITOR
*
* TRANSFER CONTROL BACK TO ROM MONITOR. FOR MULTICOMP THIS COULD
* CHANGE THE PAGING AND PIVOT BACK TO THE ROM? FOR NOW, IT DOES
* NOTHING, THE VECTOR SIMPLY POINTS TO FLEX WARM BOOT.
*******************************************************************
* SUBROUTINES FOR INTERRRUPT-DRIVEN PRINTER SPOOLING.
*
* ALL OF THESE ARE DISABLED FOR NOW
TINT
TON
TOFF RTS
IHND RTI
*******************************************************************
* CONSOLE I/O DRIVER VECTOR TABLE
*
ORG $D3E5 TABLE STARTS AT $D3E5
INCHNE FDB INNECH INPUT CHAR - NO ECHO
IHNDLR FDB IHND IRQ INTERRUPT HANDLER
SWIVEC FDB $DFC2 SWI3 VECTOR LOCATION
IRQVEC FDB $DFC8 IRQ VECTOR LOCATION
TMOFF FDB TOFF TIMER OFF ROUTINE
TMON FDB TON TIMER ON ROUTINE
TMINT FDB TINT TIMER INITIALIZE ROUTINE
MONITR FDB FLEXWRM MONITOR RETURN ADDRESS
TINIT FDB INIT TERMINAL INITIALIZATION
STAT FDB STATUS CHECK TERMINAL STATUS
OUTCH FDB OUTPUT TERMINAL CHAR OUTPUT
INCH FDB INPUT TERMINAL CHAR INPUT
*******************************************************************
*******************************************************************
* END STATEMENT HAS FLEX TRANSFER ADDRESS
*
END $CD00