Trailing-Edge
-
PDP-10 Archives
-
red405a2
-
red/kns10.ver-5-2
There are no other files named kns10.ver-5-2 in the archive.
.MAIN. CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51
CONDEF.M80 TABLE OF CONTENTS
30 *CONSOLE ERROR CODES DEFINED*
85 *NUMERICAL VALUE ASSIGNMENTS*
113 *ASCII CHARACTER VALUE ASSIGNMENTS*
212 *MACROS FOR CODE OFT USED OR SUBJECT TO REPEATED CHANGES*
531 *KS10 CONSOLE HARDCORE*
532 *"RST" INSTRUCTION CODE*
629 *POWER UP START LOCATON*
666 *INITIALIZE UARTS*
730 *8080 PROM CHECKSUMMER*
997 *BEGINNING OF BASIC CONSOLE NULL JOB... BEGINS WITH PROMPT*
1185 *TYPEIN COMMAND DECODER AND DISPATCHER*
1227 *CTY SERVICE*
1383 *COMMAND DECODER CONTINUED*
1650 *COMMAND DISPATCH LIST*
1797 *CHECKSUMS AS COMPUTED BY SPECIAL 10-BASED PROGRAM*
1820 *** "MR" CMD ***
1848 *INTERRUPT HANDLER*
2229 *8080 TO KS10 CHARACTER SERVICE*
2272 *KS10 TO 8080 CHARACTER SERVICE*
2403 *TTY HANDLER FOR SPECIAL CHARACTERS*
2698 *CONSOLE COMMANDS AS IMPLEMENTED*
2699 *"EB" CMD*
2763 *** "DB" CMD ***
2850 *** "EM" CMD ***
2927 *** "EN" CMD ***
2952 *** "DM" CMD ***
2953 *** "DN" CMD ***
3014 *** "DN" CMD ***
3033 *** "EI" CMD ***
3057 *** "DI" CMD ***
3058 *** "DN" CMD ***
3082 *** "EK" CMD ***
3108 *** "EN" CMD ***
3115 *** "LA" CMD ***
3122 *** "LI" CMD ***
3128 *** "LK" CMD ***
3137 *** "DN" CMD ***
3146 *** "DK" CMD ***
3160 *** "CP" CMD ***
3184 *** "ER" CMD ***
3236 *** "LR" CMD ***
3248 *** "DR" CMD ***
3263 *** "LC" CMD ***
3272 *** "CE" CMD ***
3311 *** "TE" CMD ***
3335 *** "SC" CMD ***
3363 *** "TP CMD" ***
3386 *** "LT" CMD ***
3413 *** "MM" CMD ***
3428 *** "SI" CMD ***
3442 *** "CS" CMD ***
3453 *** "CH" CMD ***
3465 *** "LF" CMD ***
3476 *** "DF" CMD ***
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51
CMDS.M80 TABLE OF CONTENTS
3577 *** "RC" ***
3625 *** "EJ" CMD ***
3668 *** "TR" CMD ***
3704 *** "PM" CMD ***
3716 *** "EC" CMD ***
3821 *** "EN" CMD ***
3829 *** "DC" CMD ***
3830 *** "DN TO DC" CMD ***
3885 *** "SM" CMD ***
3971 *** "PE" CMD ***
4015 *** "EX" CMD ***
4052 *** "ST" CMD ***
4082 *** "CO" CMD ***
4102 *** "HA" CMD ***
4111 *** "SH" CMD ***
4127 *** "KL" CMD ***
4165 *** "TT" CMD ***
4179 *** "PW" CMD ***
4226 *** "MK" & "UM" CMD ***
4260 *** "ZM" CMD ***
4294 *** "RP" CMD ***
4382 *** "DS" CMD ***
4417 *** "MS" CMD ***
4524 *** "BT" CMD ***
4558 *** "LB" CMD ***
4604 *** "MT" CMD ***
4702 *** "MB" CMD ***
4729 FILE SYSTEM
4849 CRAM LOADER CODE
4959 *** "FI" CMD ***
5020 *** "B2" CMD ***
5029 *** "VD" CMD ***
5041 *** "VT" CMD ***
5055 VERIFY CRAM CODE
5256 CHANNEL COMMAND LIST EXECUTOR
5497 *** "BC" CMD ***
5704 ****KS10 CONSOLE SUBROUTINE FILE
6468 **** CLRB EXECUTE CODE ****
6476 **** SOME ERROR CODES ****
6857 SUBROUTINE TIME DELAY
6875 STRING COMPARE ROUTINE
6941 UART MODE MODIFICATIONS
7135 MODE 4 FOR DECIDING TO COLLECT AN ENVELOPE OR CTY OUT
7163 ENVELOPE COLLECTOR
7371 **** MORE ERROR ESCAPES ****
7394 ****DISK TRANSFER CHANNEL COMMAND LIST****
7439 TAPE TRANSFER CHANNEL COMMAND LIST
7550 *SM10 DATA STORAGE PARAMETERS*
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 1
CONDEF.M80
1 ;>>;WCONDEF.M80
2
3 ; VERSION 5.2 OF CONSOLE CODE - ALL OF THE CHANGES BETWEEN VERSION 4.2
4 ; AND 5.2 ARE NOTED WITH A (5.2X) AT THE CHANGE WHERE X IDENTIFIES THE
5 ; CATEGORY OF CHANGE. X CAN BE:
6 ;
7 ; A - KLINIK FIXES
8 ; B - UART FIXES
9 ; C - ?NXM FIXES
10 ; D - PW RECODING
11 ; E - HSB FIXES
12 ; F - FORCED RELOAD FIXES
13 ; G - POWER FAIL CODE
14 ; H - ADDITION OF COMMENT CAPABILITY
15 ;----------------------------------------------------------------------
16 ; ALSO, THIS FILE (KS.MAS) CONSISTS OF 6 INDIVIDUAL M80 FILES WHICH ARE
17 ; SEPARATED INTO THE INDIVIDUAL FILES BEFORE BEING ASSEMBLED BY CROSS.
18 ; THESE INDIVIDUAL FILES SEPARATE THE CODE INTO MAJOR DIVISIONS AND FOR
19 ; EASE IN MAKING CHANGES, ETC.. THEY ARE ALL COMBINED INTO ON MASTER FILE
20 ; KS.MAS. THESE ARE:
21 ; CONDEF.M80 - DEFINITIONS, ETC.
22 ; CHKSMS.M80 - PROM CHECKSUMS
23 ; HCORE.M80 - HARDCORE CONSOLE STUFF
24 ; CMDS.M80 - CONSOLE COMMANDS
25 ; SUBRTN.M80 - SUBROUTINE FILE
26 ; DR.M80 - DISK/TAPE ROUTINES
27 ; MSG.M80 - MESSAGE FILE
28 ; STORE.M80 - STORAGE AREA
29
30 .SBTTL *CONSOLE ERROR CODES DEFINED*
31
32 ; LISTING CONTROLS
33
34 .NLIST BEX
35 .LIST MD,MC,MEB
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 2
CONDEF.M80 *CONSOLE ERROR CODES DEFINED*
37
38 ; SYMBOL ASSIGNMENTS
39
40 020000 RAMST = 8192. ; FIRST "RAM" MEMORY ADDRESS
41 003244 KPAINI = 1700. ; VALUE FOR .44 SEC BETWEEN WORD31 CHECKS
42 000043 KATIMX = 35. ; NUMBER OF TIME IN A ROW KA HAS TO BE THE SAME
43 ; KATIMX = 14. IS 6 SECONDS, = 35. IS 15 SEC
44 000300 RUNFP = ^O300 ; I/O REG CONTAINING CPU "RUN FLOP"
45 000300 TTYSW = ^O300 ; I/O REG FOR TTY FRONT PANEL SWITCHES
46 000301 SMSTS = ^O301 ; I/O REG FOR KS10 STATUS BITS
47 000301 BOOTSW = ^O301 ; I/O REG FOR HARDWARE "BOOT" SWITCH
48 000302 CARRIER = ^O302 ; I/O REG FOR READING KLINIK CARRIER
49 000100 SMPAR = ^O100 ; I/O REG FOR ENABLING KS10 PARITY DETECT
50 000100 RESET = ^O100 ; I/O REG FOR ISSUEING KS10 BUS RESET
51 000101 REFERR = ^O101 ; I/O REG FOR READING MOS MEM REFRESH ERR FLAG
52 000101 LIGHTS = ^O101 ; I/O REG FOR WRITING THE PANEL LIGHTS
53 000101 DTR = ^O101 ; I/O REG FOR WRITING THE DATA TERMINAL READY
54 000102 R.BUSY = ^O102 ; I/O REG FOR READING "MEM BUSY" OR "I/O BUSY"
55 000102 R.RESET = ^O102 ; I/O REG FOR READY IF RESET WENT TRUE (VIA AC LO)
56 000204 CRMCTL = ^O204 ; I/O REG FOR ACCESSING CRAM
57 000205 DIAG = ^O205 ; I/O REG FOR DIAG FUNCTION BITS
58 000206 CLKCTL = ^O206 ; I/O REG FOR SETTING KS10 CLK CTL BITS
59 000210 BUSCTL = ^O210 ; I/O REG FOR KS10 BUS COMM.
60 000212 CPUCTL = ^O212 ; I/O REG FOR KS10 "RUN,EXECUTE,CONTINUE"
61 000201 CTYCTL = ^O201 ; I/O REG FOR UART CONTROL/STATUS
62 000200 CTYDAT = ^O200 ; I/O REG FOR UART DATA BUFFER
63 000203 REMCTL = ^O203 ; REMOTE UART CONTROL REGISTER
64 000202 REMDAT = ^O202 ; REMOTE UART DATA REGISTER
65 000114 DTARB = ^O114 ; I/O REG FOR DATA CYCLE OF BUS ARB..
66 000115 BUSARB = ^O115 ; I/O REG FOR BUS ARBITRATION SIGNALS
67 000116 INT2KS = ^O116 ; I/O REG FOR INTERRUPTING KS-10
68 000000 D2835 = ^O0 ; R DATA BITS 28-35
69 000001 D2027 = ^O1 ; R DATA BITS 20-27
70 000002 D1219 = ^O2 ; R DATA BITS 12-19
71 000003 D0411 = ^O3 ; R DATA BITS 04-11
72 000103 D0003 = ^O103 ; R DATA BITS 0-3
73 000103 A2835 = ^O103
74 000105 A2027 = ^O105
75 000107 A1219 = ^O107
76 000111 A0411 = ^O111
77 000113 A0003 = ^O113
78 000102 W2835 = ^O102
79 000104 W2027 = ^O104
80 000106 W1219 = ^O106
81 000110 W0411 = ^O110
82 000112 W0003 = ^O112
83
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 3
CONDEF.M80 *NUMERICAL VALUE ASSIGNMENTS*
85 .SBTTL *NUMERICAL VALUE ASSIGNMENTS*
86
87 002000 BPI16 = ^O2000 ; "DENSITY/SLAVE" DEFAULT FOR 1600 BPI TAPES
88 001000 BPI8 = ^O1000 ; "DENSITY/SLAVE" DEFAULT FOR 800 BPI TAPES
89 000377 EOLCH = ^O377 ; END-OF-LINE CODE
90 000020 ARBRESP = ^O20 ; BIT FOR "BUS REQ"
91 000001 DATACK = 01 ; BIT FOR "DATA ACKNOWLEDGE"
92 000100 NONXMEM = ^O100 ; BIT FOR "NON-EXISTANT MEMORY"
93 000020 TRPDEF = ^O20 ; BIT SAYS DEFAULT TRAP ENABLE ON
94 000174 DEFLTE = ^O174 ; BITS SAY DEFAULT: CACHE ENABLE, 1MSEC CLK ENA
95 ; ALL PARITY ON
96 100000 BIT15 = ^O100000 ; THIS IS BIT 15 (IF YOU COUNT RIGHT TO LEFT)
97 000001 BT.BIT = 1 ; BIT SAYS DOING BOOTSTRAP FROM DISK
98 000002 MT.BIT = 2 ; BIT SAYS DOING BOOTSTRAP FROM MAGTAPE
99 000001 .MODE0 = 1 ; FLAG SAYS KLINIK MODE 0
100 000002 .MODE1 = 2 ; FLAG SAYS KLINIK MODE 1
101 000004 .MODE2 = 4 ; FLAG SAYS KLINIK MODE 2
102 000010 .MODE3 = ^O10 ; FLAG SAYS KLINIK MODE 3
103 000020 .MODE4 = ^O20 ; FLAG SAYS KLINIK MODE 4 (MANUFACTURING MODE)
104 000003 CARRLOSS = ^O3 ; INTERRUPT CODE FOR "KLINIK CARRIER LOSS"
105 000002 KL.ACTIVE = ^O2 ; INTERRUPT CODE FOR WHEN KLINIK BECOMES ACTIVE
106 000373 STMSK = ^O373 ; MASK FOR THE STATE LIGHT
107 000004 STBIT = ^O4 ; STATE BIT
108 000333 .IN = ^O333 ; THE "IN" INSTRUCTION
109 000323 .OUT = ^O323 ; THE "OUT" INSTRUCTION
110 000311 .RET = ^O311 ; THE "RET" INSTRUCTION
111
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 4
CONDEF.M80 *ASCII CHARACTER VALUE ASSIGNMENTS*
113 .SBTTL *ASCII CHARACTER VALUE ASSIGNMENTS*
114
115 000000 Q.OUT = 00 ; NULL CHAR..STANDS FOR "QUICK.OUT"
116 000001 SYNC = 01 ; SYNC CHAR FOR APT MESSAGES
117 000015 CRCHR = ^O15 ; CARRIAGE RETURN
118 000012 LFCHR = ^O12 ; LINE FEED
119 000054 COMMA = ^O54 ; ASCII FOR COMMA
120 000073 SEMIC = ^O73 ; (5.2H) ASCII FOR SEMI-COLON
121 000034 CNBCK = ^O34 ; CONTROL-BACKSLASH
122 000007 BELL = ^O7 ; A BELL FOR WHEN HOST SYSTEMS GIVE ME GRIEF
123 000052 STAR = ^O52 ; A STAR *
124 000042 QUO = ^O42 ; DOUBLE QUOTES "
125 000043 LBSIGN = ^O43 ; POUND SIGN #
126 000051 RPAREN = ^O51 ; RIGHT PAREN )
127 000033 ALT = ^O33 ; ALTMODE
128 000032 CNTLZ = ^O32 ; CONTROL-Z
129 000031 CNTLY = ^O31 ; CONTROL-Y ENDS MODE 4
130 000025 CNTLU = ^O25 ; CONTROL-U
131 000023 CNTLS = ^O23 ; CONTROL-S
132 000021 CNTLQ = ^O21 ; CONTROL-Q
133 000017 CNTLO = ^O17 ; CONTROL-O
134 000003 CNTLC = ^O3 ; CONTROL-C
135 000177 RBOUT = ^O177 ; RUB-OUT
136 000103 CCHR = ^O103 ; "C"
137 000104 DCHR = ^O104 ; "D"
138 000011 TAB = ^O11 ; HORIZONTAL TAB
139 000040 SPACE = ^O40 ; SPACE
140 000057 SLASH = ^O57 ; SLASH "/"
141 000134 BSLASH = ^O134 ; BACKSLASH "\"
142 000044 DOLLAH = ^O44 ; DOLLAR SIGN "$"
143 000045 PERCNT = ^O45 ; "%"
144 000077 QUES = ^O77 ; "?"
145 000076 ARROW = ^O76 ; "^"
146 000125 UCHR = ^O125 ; "U"
147 000117 OCHR = ^O117 ; "O"
148 000136 UPARR = ^O136 ; "^"
149 000001 ONE = ^O01 ; "1"
150 000002 TWO = ^O02 ; "2"
151 000003 THREE = ^O03 ; "3"
152 000004 FOUR = ^O04 ; "4"
153 000005 FIVE = ^O05 ; "5"
154 000006 SIX = ^O06 ; "6"
155 000007 SEVEN = ^O07 ; "7"
156 000070 EIGHT = ^O70 ; "8" THE ASCII NUMBER
157 000071 NINE = ^O71 ; "9" THE ASCII NUMBER
158 000012 TEN = ^O12 ; "10"
159
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 5
CONDEF.M80 *ASCII CHARACTER VALUE ASSIGNMENTS*
161
162 ; NUMERICAL ASSIGNMENTS TO GENERATE THE OFFSETS USED IN COMPUTING
163 ; DEVICE ADDRESSES FROM ANY RH BASE ADDRESS.
164
165 .RADIX 8
166 000000 P.00 = 0
167 000002 P.02 = 2
168 000004 P.04 = 4
169 000006 P.06 = 6
170 000010 P.10 = 10
171 000012 P.12 = 12
172 000014 P.14 = 14
173 000016 P.16 = 16
174 000020 P.20 = 20
175 000022 P.22 = 22
176 000024 P.24 = 24
177 000026 P.26 = 26
178 000030 P.30 = 30
179 000032 P.32 = 32
180 000034 P.34 = 34
181 000036 P.36 = 36
182 000040 P.40 = 40
183 000042 P.42 = 42
184 000044 P.44 = 44
185 000046 P.46 = 46
186 000776 D776 = 776
187 000772 D772 = 772
188
189 .RADIX 10
190
191 ; DRIVE CONTROLLER REGISTER IS 776440..FOLLOWING COMMANDS APPLY
192 ; 7 = REWIND
193 ; 11 = DRIVE CLEAR
194 ; 25 = ERASE
195 ; 27 = WRITE TAPE MARK
196 000031 SKP.TAPE=^O31 ; 31 = SPACE FORWARD (SKIP A FILE)
197 ; 33 = SPACE REVERSE (SKIP A FILE)
198 ; 51 = WRITE CHECK FORWARD
199 ; 57 = WRITE CHECK REVERSE
200 ; 61 = WRITE FORWARD
201 000071 READ.TAPE=^O71 ; 71 = READ FORWARD(GO!)
202 ; 77 = READ REVERSE(GO!)
203
204 ; DEFAULT VALUES FOR CHECKSUM COUNTS, SO THAT ASSEMBLIES WITH 3 PROMS WILL WORK
205
206 000000 CHKSM0 = 0
207 000000 CHKSM1 = 0
208 000000 CHKSM2 = 0
209 000000 CHKSM3 = 0
210
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 6
CONDEF.M80 *MACROS FOR CODE OFT USED OR SUBJECT TO REPEATED CHANGES*
212 .SBTTL *MACROS FOR CODE OFT USED OR SUBJECT TO REPEATED CHANGES*
213
214 ; PCHAR: PRINTS A SINGLE CHARACTER, WHICH IT FINDS IN THE TRAILING BYTE.
215 ; CLOBBERS ACCUM.
216
217 .MACRO PCHAR XCHR
218 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
219 .BYTE XCHR ; CHAR TO PRINT
220 .ENDM
221
222 ; KCHAR: PRINT A SINGLE CHARACTER ON THE KLINIK LINE ONLY. CHAR TO BE
223 ; PRINTED IS PASSED AS A TRAILING ARGUMENT.
224
225 .MACRO KCHAR XCHR
226 CALL KCHR ; GO PRINT THE CHARACTER
227 .BYTE XCHR
228 .ENDM
229
230 ; PLINE: PRINTS A LINE OF CHARACTERS, POINTER PASSED AS TRAILING ARGUMENT.
231 ; AND END OF LINE SIGNALED BY A "0" BYTE.
232
233 .MACRO PLINE XMS
234 RST 3 ; PRINT LINE OF CHARS
235 .ADDR XMS ; BUFF TO PRINT
236 .ENDM
237
238 ; KLINE: PRINTS A LINE OF CHARACTERS, POINTER PASSED AS TRAILING ARGUMENT
239 ; AND END OF LINE SIGNALED BY A "0" BYTE.
240
241 .MACRO KLINE XMS
242 CALL KLINE ; PRINT LINE OF CHARS
243 .ADDR XMS ; BUFF TO PRINT
244 .ENDM
245
246 ; INTOFF: EXECUTES THE OLD "INTERNAL MODE OFF" SUBROUTINE.., BUT BY
247 ; USING RESTART INSTRUCTION CALL, WE SAVE 30.+ BYTES OVER "CALL INTOFF".
248
249 .MACRO INTOFF
250 RST 6 ; GO EXIT FROM INTERNAL MODE
251 .ENDM
252
253 ; INTON: EXECUTES THE OLD "INTERNAL MODE ON" SUBROUTINE.., BUT BY USING
254 ; RESTART INSTRUCTION CALL, WE SAVE 30.+ BYTES OVER "CALL INTON".
255
256 .MACRO INTON
257 RST 2 ; GO SET INTERNAL MODE
258 .ENDM
259
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 7
CONDEF.M80 *MACROS FOR CODE OFT USED OR SUBJECT TO REPEATED CHANGES*
261
262 ; CLINE: PRINTS A LINE OF CHARACTERS, POINTER PASSED IN (H,L),
263 ; AND END OF LINE SIGNALED BY A "0" BYTE.
264
265 .MACRO CLINE XMS
266 LXI H,XMS ; PASS POINTER TO THE CHARACTERS
267 CALL CLINE ; PRINT LINE OF CHARS
268 .ENDM
269
270 ; PCRLF: PRINTS CARRIAGE RETURN-LINE FEED. LEAVES ALL REGISTERS INTACT.
271
272 .MACRO PCRLF
273 CRLF ; GO PRINT CARRIAGE RETURN LINE FEED
274 .ENDM
275
276 ; SSCLK: ISSUES A SINGLE KS10 CLOCK..CLOBBERS THE ACCUMULATOR.
277
278 .MACRO SSCLK
279 MVI A,02 ; BIT TO SET "SINGLE CLK" TO KS10
280 OUT CLKCTL ; ISSUE THE SINGLE CLOCK
281 .ENDM
282
283 ; PTAB: PRINTS A TAB. CLOBBERS ACCUM.
284
285 .MACRO PTAB
286 PCHAR TAB ; GO PRINT A TAB
287 .ENDM
288
289 ; PSPACE: PRINTS A " " SPACE. CLOBBERS ACCUM.
290
291 .MACRO PSPACE
292 PCHAR SPACE ; GO PRINT A SPACE
293 .ENDM
294
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 8
CONDEF.M80 *MACROS FOR CODE OFT USED OR SUBJECT TO REPEATED CHANGES*
296
297 ; PSLSH: PRINTS A "/" SLASH. CLOBBERS ACCUM.
298
299 .MACRO PSLASH
300 PCHAR SLASH ; GO PRINT A SLASH
301 .ENDM
302
303 ; ENDCMD: MACRO TO DO THE RIGHT STUFF AT THE END OF A COMMAND.
304 ; COMMON CODE FOR FINISHING ALL INSTRUCTIONS.
305
306 .MACRO ENDCMD
307 RET ; RETURN TO CALLER
308 .ENDM
309
310 ; BUSRESP:
311 ; MACRO TO READ I/O REG 301 IN ORDER TO CHECK ANY OF THE BITS WHICH
312 ; ARE READABLE IN THAT REGISTER.. THE BIT OR BITS TO BE CHECKED IS
313 ; PASSED AS A TRAILING ARGUEMENT "DB" TO A RST INSTRUCTION. THE
314 ; EXECUTION OF THE RESTART ACCOUNTS FOR THE 2 "NOP" TIME REQUIRED
315 ; FOR THE BUS ARBITRATOR TO GRANT THE BUS. THIS MACRO RETURNS
316 ; MAINLINE WITH THE Z-BIT SET. IF THE REG 301 DOES !NOT! MATCH THE
317 ; TRAILING ARG THAT WAS PASSED AND WITH THE Z-BIT CLEAR IF THERE IS
318 ; A "TRUE" IN ANY OF THE BIT POSITIONS PASSED...
319
320 .MACRO BUSRESP XXX
321 CALL BUSRESP ; DO A CALL TO EXECUTE THIS CODE
322 .BYTE XXX ; BITS TO BE CHECKED
323 .ENDM
324
325 .MACRO D ARG,ARG1,NUL,ARG2,ARG3
326 .NLIST
327 .RADIX 8
328 .BYTE ARG3 & 377
329 Q.1 = <<ARG3/400> & 1> ! <<ARG2*2> & 376>
330 Q.2 = <<ARG2/200> & 3> ! <<ARG1*4> & 374>
331 Q.3 = <<ARG1/100> & 7> ! <<ARG*10> & 370>
332 Q.4 = <ARG/40> & 17
333 .BYTE Q.1
334 .BYTE Q.2
335 .BYTE Q.3
336 .BYTE Q.4
337 .RADIX 10
338 .LIST
339
340 .ENDM
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 9
CONDEF.M80 *MACROS FOR CODE OFT USED OR SUBJECT TO REPEATED CHANGES*
342
343 .MACRO LI. ARG2,ARG3
344 .RADIX 8
345 ARG = 0
346 ARG1 = 0
347 NUL = 0
348 Q.1 = <<ARG3/400> & 1> ! <<ARG2*2> & 376>
349 Q.2 = <<ARG2/200> & 3> ! <<ARG1*4> & 374> ! <2*4>
350 .BYTE Q.1
351 .BYTE ARG3 & 377
352 .BYTE Q.2
353 .RADIX 10
354 .ENDM
355
356
357 .MACRO EI. ARG2,ARG3
358 .RADIX 8
359 ARG = 0
360 ARG1 = 0
361 NUL = 0
362 Q.1 = <<ARG3/400> & 1> ! <<ARG2*2> & 376>
363 Q.2 = <<ARG2/200> & 3> ! <<ARG1*4> & 374> ! <4*4>
364 .BYTE Q.1
365 .BYTE ARG3 & 377
366 .BYTE Q.2
367 .RADIX 10
368 .ENDM
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 10
CONDEF.M80 *MACROS FOR CODE OFT USED OR SUBJECT TO REPEATED CHANGES*
370
371 .MACRO DI. ARG2,ARG3
372 .RADIX 8
373 ARG = 0
374 ARG1 = 0
375 NUL = 0
376 .BYTE ARG3 & 377
377 Q.1 = <<ARG3/400> & 1> ! <<ARG2*2> & 376>
378 Q.2 = <<ARG2/200> & 3> ! <<ARG1*4> & 374>
379 .BYTE Q.1
380 .BYTE Q.2
381 .RADIX 10
382 .ENDM
383
384
385 .MACRO DI.INDIRECT ARG3
386 .RADIX 8
387 .ADDR ARG3
388 .BYTE ^O200
389 .RADIX 10
390 .ENDM
391
392 .MACRO TWAIT ARG3
393 .RADIX 8
394 .ADDR ARG3
395 .BYTE <14*4>
396 .RADIX 10
397 .ENDM
398
399 .MACRO WAIT ARG3
400 .RADIX 8
401 .ADDR ARG3
402 .BYTE <6*4>
403 .RADIX 10
404 .ENDM
405
406 .MACRO ERRTST ARG3
407 .RADIX 8
408 .ADDR ARG3
409 .BYTE <10*4>
410 .RADIX 10
411 .ENDM
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 11
CONDEF.M80 *MACROS FOR CODE OFT USED OR SUBJECT TO REPEATED CHANGES*
413
414 .MACRO UBA. ARG2,ARG3
415 .RADIX 8
416 ARG = 0
417 ARG1 = 0
418 NUL = 0
419 .BYTE ARG3 & 377
420 Q.1 = <<ARG3/400> & 1> ! <<ARG2*2> & 376>
421 Q.2 = <<ARG2/200> & 3> ! <<ARG1*4> & 374> ! <16*4>
422 .BYTE Q.1
423 .BYTE Q.2
424 .RADIX 10
425 .ENDM
426
427 .MACRO ENDLST
428 .RADIX 8
429 .BYTE 0
430 .BYTE 0
431 .BYTE <12*4>
432 .RADIX 10
433 .ENDM
434
435 .MACRO MOV5B
436 RST 4
437 .BYTE 0
438 .ENDM
439
440 .MACRO CRLF
441 RST 4
442 .BYTE 2
443 .ENDM
444
445 .MACRO ARG16
446 RST 4
447 .BYTE 4
448 .ENDM
449
450 .MACRO RUN..
451 RST 4
452 .BYTE 6
453 .ENDM
454
455 .MACRO ARG36
456 RST 4
457 .BYTE 8
458 .ENDM
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 12
CONDEF.M80 *MACROS FOR CODE OFT USED OR SUBJECT TO REPEATED CHANGES*
460
461 .MACRO CLRRM FOO
462 RST 4
463 .BYTE 10.
464 .ADDR FOO+5
465 .ENDM
466
467 .MACRO EXAM FOO
468 .RADIX 8
469 CALL EXAMSH ; AND DO EXAM ASSUMING SHORT ADDRESS
470 .ADDR FOO ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
471 .RADIX 10
472 .ENDM
473
474 .MACRO DEPOS FOO
475 .RADIX 8
476 ANA A ; CLR "C-BIT" FOR USE BY COMMON CODE
477 CALL DEPSHT ; AND DO THE DEPOSIT ASSUMING SHORT ADDR
478 .ADDR FOO ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
479 .RADIX 10
480 .ENDM
481
482 .MACRO RD.REG FOO
483 IN FOO ; READ AN I/O REG
484 CMA ; AND ALWAYS COMPLEMENT
485 .ENDM
486
487 .MACRO SETZM FOO
488 CLRRM DMDAT
489 DEPOS FOO
490 .ENDM
491
492 .MACRO TSTRDY FOO
493 .RADIX 8
494 IN FOO ; READ DESIRED UART STATUS
495 ANI 01 ; CHECK IF SET? ZBIT=0/1 READY/NOT YET READY
496 .RADIX 10
497 .ENDM
498
499 .MACRO LONG.DELAY ARG
500 LXI H,200. * ARG ; SET UP THE TIMING COUNT IN H,L REG
501 CALL LTLOOP ; AND GO DELAY ABOUT 1 SEC FOR EACH (300 COUNT)
502 .ENDM
503
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 13
CONDEF.M80 *MACROS FOR CODE OFT USED OR SUBJECT TO REPEATED CHANGES*
505
506 ; MACRO TO SAVE SPACE ON OPERATIONS THAT WANT TO CLEAR A LOCATION IN
507 ; THE RAM.. ELIMINATES EVERY XRA/STA PAIR, AND INSERTS INSTEAD AN RST/BYTE
508 ; PAIR.. AT BEST, AN XRA AND AN STA ARE ELIMINATED. AT WORST, A 3 BYTE STA
509 ; IS REPLACED WITH A 2 BYTE RST/BYTE.
510
511 .MACRO CLRB XX
512 .NLIST
513 OFFSET= XX - ^O20000
514 .IF LE, ^O400-OFFSET
515 .IFF
516 RST 5
517 .BYTE OFFSET
518 .IFT
519 .ERROR OFFSET, ; BYTE OUT OF RANGE ON CLRB MACRO
520 .ENDC
521 .LIST
522 .ENDM
523
524
525 112317 CHKSM0=-^O65461
526 141417 CHKSM1=-^O36361
527 161563 CHKSM2=-^O16215
528 002015 CHKSM3=-^O175763
529 ;>>;WHCORE.M80
530
531 .SBTTL *KS10 CONSOLE HARDCORE*
532 .SBTTL *"RST" INSTRUCTION CODE*
533
534 ; AT POWER UP, ALWAYS BEGIN AT 0000
535
536 000000 .= 0000
537 000000 000 NOP ; NO-OPS FOR 2 INSTR CYCLES
538 000001 000 NOP ; LETS 8080 SETTLE DOWN
539 000002 363 DI ; GUARANTEE INTERRUPTS DISABLED
540 000003 303 100 000 JMP PWRUP ; BEGIN WITH INITIALIZATION CODE
541
542 ; *** RESERVE "RESTART" MEMORY BLOCKS FOR INTERRUPTS
543 ; *** AND SPECIAL PURPOSE "RST" INSTRUCTIONS
544 ; BEGIN CODE FOR "PCHAR" WITH A "RST 1"
545
546 000010 .= ^O10
547 000010 343 XTHL ; GET POINTER TO TRAILING ARG
548 000011 176 MOV A,M ; CHAR INTO ACCUM
549 000012 043 INX H ; UPDATE POINTER TO RETURN ADDRESS
550 000013 343 XTHL ; RESTORE RETURN ADDRESS TO STACK
551 000014 303 343 003 JMP PCHR ; AND GO....
552
553 ; *** RESERVE "RESTART" MEMORY BLOCKS FOR INTERRUPTS
554 ; *** AND SPECIAL PURPOSE "RST" INSTRUCTIONS
555 ; SUBROUTINE TO SET INTERNAL STATUS (I.E. DON'T TYPE ON TTY)
556
557 000020 .= ^O20
558 000020 345 INTON: PUSH H ; SAVE THE LIL BUGGER
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 13-1
HCORE.M80 *"RST" INSTRUCTION CODE*
559 000021 041 120 040 LXI H,NOPNT ; GET VALUE OF FLAG
560 000024 064 INR M ; INCREMENT BY ONE
561 000025 341 POP H ; RESTORE THE REG WE SAVED
562 000026 311 RET ; AND RETURN
563
564 ; *** RESERVE "RESTART" MEMORY BLOCKS FOR INTERRUPTS
565 ; *** AND SPECIAL PURPOSE "RST" INSTRUCTIONS
566 ; BEGIN CODE FOR "PLINE"
567
568 000030 .= ^O30
569 000030 343 XTHL ; GET PNTR TO TRAILING ARG
570 000031 136 MOV E,M ; GET LO ORDER PIECE
571 000032 043 INX H ; UPDATE PNTR
572 000033 126 MOV D,M ; GET HI ORDER PIECE
573 000034 043 INX H ; UPDATE PNTR
574 000035 303 111 004 JMP PLNE ; AND GO TO ACTUAL ROUTINE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 14
HCORE.M80 *"RST" INSTRUCTION CODE*
576
577 ; *** RESERVE "RESTART" MEMORY BLOCKS FOR INTERRUPTS
578 ; *** AND SPECIAL PURPOSE "RST" INSTRUCTIONS
579 ; BEGIN CODE FOR "TRAP" OR "UUO" TYPE SUBROUTINE CALLS
580
581 000040 .= ^O40
582 000040 343 XTHL ; SAVE "H,L" WHILE GETTING PC
583 000041 176 MOV A,M ; GET INDEX INTO SUBROUTINE DISPATCH LIST
584 000042 043 INX H ; UPDATE "PC" TO POINT AT RETURN
585 000043 343 XTHL ; PUT BACK RETURN AND RESTORE "H,L"
586 000044 345 PUSH H ; NOW SAVE "H,L" WHILE WE SET UP DISPATCH
587 000045 303 061 032 JMP RTNDIS ; GO CALCULATE SUBROUTINE TO DISPATCH TO..
588
589 ; *** RESERVE "RESTART" MEMORY BLOCKS FOR INTERRUPTS
590 ; *** AND SPECIAL PURPOSE "RST" INSTRUCTIONS
591 ; THIS CODE CLEARS A SINGLE BYTE OF RAM SPACE, IN THE RANGE FROM 20000-20377
592
593 000050 .= ^O50
594 000050 343 XTHL ; SAVE "H,L" WHILE GETTING PC
595 000051 176 MOV A,M ; GET INDEX INTO SUBROUTINE DISPATCH LIST
596 000052 043 INX H ; UPDATE "PC" TO POINT AT RETURN
597 000053 343 XTHL ; PUT BACK RETURN AND RESTORE "H,L"
598 000054 345 PUSH H ; NOW SAVE "H,L" WHILE WE SET UP DISPATCH
599 000055 303 117 032 JMP CLRBYT ; GO CALCULATE SUBROUTINE TO DISPATCH TO..
600
601 ; *** RESERVE "RESTART" MEMORY BLOCKS FOR INTERRUPTS
602 ; *** AND SPECIAL PURPOSE "RST" INSTRUCTIONS
603 ; THIS CODE EXECUTES THE "INTERNAL MODE OFF" FUNCTION, TURNING OFF
604 ; THE PRINTING OF 8080 FUNCTIONS EXECUTED INTERNALLY. "INTOFF" IS
605 ; CALLED AT LEAST 15 TIMES, SO THIS RESTART CODE SAVES AT LEAST 30
606 ; BYTES OVER "CALLS INTOFF".
607
608 000060 .= ^O60
609 000060 345 PUSH H ; SAVE THE LIL BUGGER
610 000061 041 120 040 LXI H,NOPNT ; CLEAR ACCUM
611 000064 065 DCR M ; DECREMENT PRINT FLAG
612 000065 341 POP H ; RESTORE THE REG WE SAVED
613 000066 311 RET ; AND RETURN
614
615 ; *** RESERVE "RESTART" MEMORY BLOCKS FOR INTERRUPTS
616 ; *** AND SPECIAL PURPOSE "RST" INSTRUCTIONS
617 ; BEGIN CODE FOR HANDLING INTERRUPTS
618
619 000070 .= ^O70
620 000070 363 DI ; GUARANTEE INTERRUPTS DISABLED
621 000071 365 PUSH PSW ; SAVE
622 000072 305 PUSH B ; EVERYTHING
623 000073 325 PUSH D ; ON THE STACK
624 000074 345 PUSH H
625
626 000075 303 221 005 JMP INTRP ; AND GO TO PROCESS THE INTERRUPT...
627
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 15
HCORE.M80 *POWER UP START LOCATON*
629 .SBTTL *POWER UP START LOCATON*
630
631 ; MAINLINE CODE BEGINS HERE
632
633 000100 .= ^O100
634
635 ; BEGIN BY SETTING UP 8080 STACK POINTER
636
637 000100 061 000 044 PWRUP: LXI SP,RAMST+^O2000 ; LOAD STACK PNTR WITH TOP RAM LOC
638
639 ; MUST SET DISPATCH LIST AND CLEAR RAM
640
641 000103 041 000 040 LXI H,RAMST ; SET "H,L" REGISTER TO RAM START ADDR
642 000106 021 000 004 LXI D,^O2000 ; COUNTER TO FILL REST OF RAM WITH 0'S
643
644 000111 066 000 CLRLP: MVI M,00 ; CLEAR A RAM LOC
645 000113 043 INX H ; NEXT RAM LOCATION
646 000114 033 DCX D ; DOWN COUNTER
647 000115 173 MOV A,E ; LO ORDER PIECE TO ACCUM
648 000116 262 ORA D ; THROW IN THE HI ORDER PIECE
649 000117 302 111 000 JNZ CLRLP ; CONTINUE TILL DONE
650
651 ; BEGIN PROCEEDURE FOR INITIALIZING KS10. MUST INDIVIDUALLY CLEAR
652 ; KS10 FLOPS "RUN","EXECUTE",& "CONTINUE" BECAUSE THEY ARE NOT RESET
653 ; BY KS10 BUS RESET.
654
655 000122 257 XRA A ; SET ACCUM=0
656
657 ; SET 0'S TO "RUN,EXECUTE,CONT"
658
659 000123 323 212 OUT CPUCTL ; ***** I/O WRT 212/0 *****
660
661 ; ISSUE KS10 BUS RESET
662
663 000125 315 172 005 CALL MRINT ; DOES RESET AND SETS DEFAULT PARITY & TRAPS
664
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 16
HCORE.M80 *INITIALIZE UARTS*
666 .SBTTL *INITIALIZE UARTS*
667
668 ; RAM BUFFERS HAVE BEEN INITIALIZED.. NOW MUST READ FRONT PANEL
669 ; SWITCHES & INITIALIZE "UART".
670
671 000130 333 300 IN TTYSW ; ***** I/O READ 300Q *****
672 000132 057 CMA ; FIX INVERSION
673
674 000133 001 200 004 LXI B,^O2200 ; THIS SETS B=^O4 AND C=^O200
675 000136 147 MOV H,A ; H WILL HOLD CTY STOP BIT FOR US. @BIT POS 7
676 000137 037 RAR ; BIT 4 MOVES TO BIT 3
677 000140 037 RAR ; BIT MOVES TO BIT 2
678 000141 137 MOV E,A ; E WILL HOLD KLINIK LENGTH BIT. @BIT POS 2
679 000142 037 RAR ; BIT 6 IS AT 4 FROM OTHER SHIFTS, NOW TO BIT 3
680 000143 037 RAR ; AND TO BIT 2
681 000144 157 MOV L,A ; L WILL HOLD CTY LENGTH BIT. @BIT POS 2
682 000145 174 MOV A,H ; ORIGINAL BACK TO ACCUM
683 000146 027 RAL ; BIT 5 TO BIT 6
684 000147 027 RAL ; AND TO BIT 7
685 000150 127 MOV D,A ; D WILL HOLD KLINIK STOP BIT. @BIT POS 7
686
687 ; NOW BEGIN MASKING OPERATIONS TO ISOLATE THE DESIRED UART BIT SETTINGS
688
689 000151 171 MOV A,C ; MASK OF OCTAL 200 INTO ACCUM
690 000152 244 ANA H ; ACCUM HAS ONLY CTY STOP BIT
691 000153 147 MOV H,A ; COPY BACK TO H
692 000154 171 MOV A,C ; MASK TO ACCUM
693 000155 242 ANA D ; ACCUM HAS ONLY A STOP BIT
694 000156 127 MOV D,A ; COPY BACK TO D
695
696 ; NOW MASK FOR THE LENGTH BITS
697
698 000157 170 MOV A,B ; MASK OF OCTAL 4 INTO ACCUM
699 000160 245 ANA L ; ACCUM NOW HAS CTY LENGTH BIT ONLY
700 000161 264 ORA H ; THROW IN THE CTY STOP BIT
701 000162 366 112 ORI ^B01001010 ; ADD IN THE CONSTANT BITS
702 000164 323 201 OUT CTYCTL ; SET THE UART MODE..........
703
704 ; NOW SET MODE FOR THE KLINIK STUFF
705
706 000166 170 MOV A,B ; MASK OF OCTAL 4 INTO ACCUM
707 000167 243 ANA E ; ACCUM NOW HAS KLINIK LENGTH BIT ONLY
708 000170 262 ORA D ; THROW IN THE KLINIK STOP BIT
709 000171 366 112 ORI ^B01001010 ; ADD IN THE CONSTANT BITS
710 000173 323 203 OUT REMCTL ; SET THE KLINIK UART MODE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 17
HCORE.M80 *INITIALIZE UARTS*
712
713 ; NOW ENABLE THE UART TO RECEIVE AND TRANSMIT
714
715 000175 076 025 MVI A,^B00010101 ; BITS FOR UART CONTROL
716
717 ; SET UART TO RECEIVE AND TRANSMIT
718
719 000177 323 201 OUT CTYCTL ; ***** I/O WRT 200/025 *****
720
721 000201 076 020 MVI A,^O20 ; ONE BIT TO SAY RESET THE UART
722 000203 323 203 OUT REMCTL ; RESET THE KLINIK UART BUT DO NOT ENABLE IT!!
723
724 000205 333 200 IN CTYDAT ; ** I/O RD 201** READ 1 DUMMY CHAR OUT OF UART
725 000207 333 202 IN REMDAT ; ** I/O RD 203** READ 1 DUMMY CHAR OUT OF UART
726
727 000211 315 115 010 CALL BFRST ; INIT TTY INPUT BUFFER
728
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 18
HCORE.M80 *8080 PROM CHECKSUMMER*
730 .SBTTL *8080 PROM CHECKSUMMER*
731
732 ; CODE TO COMPUTE A CHECKSUM FOR EACH OF THE 2K 8080 PROM PIECES. FIRST
733 ; COMPUTE THE CHECKSUMS FOR EACH PROM, THEN DO SIMPLE TEST ON THE 8080
734 ; RAM.. BEGIN WITH THE PROMS.
735
736 000214 041 000 000 LXI H,00 ; START AT PROM ADDRESS 0
737 000217 257 LCHKR: XRA A ; CLEAR ACCUM
738 000220 117 MOV C,A ; CLEAR B,C PAIR
739 000221 107 MOV B,A ; "B,C" TO BE USED AS ADDEND
740 000222 137 MOV E,A ; CLEAR D,E PAIR
741 000223 127 MOV D,A ; "D,E" TO HOLD CURRENT COUNT OF CHECKSUM
742
743 000224 116 A256: MOV C,M ; GET A BYTE
744 000225 043 INX H ; UPDATE MEM POINTER
745 000226 353 XCHG ; PUT CURRENT CHECKSUM SUB TOTAL INTO H,L
746 000227 011 DAD B ; THROW IN AN ADDEND
747 000230 353 XCHG ; RETURN H,L TO RIGHTFUL PLACE
748
749 ; NOW QUICK CHECK FOR THE END OF PROM
750
751 000231 175 MOV A,L ; GET LO ORDER OF CURRENT PROM ADDRESS
752 000232 247 ANA A ; SET CONDITION CODES
753 000233 302 224 000 JNZ A256 ; IF = 0, WE'VE DONE 256 LOCS, IF # 0, DO MORE
754
755 ; FALL TO HERE WHEN DONE A CHUNK OF 256..SEE IF ITS ON A PROM BOUNDARY NOW
756
757 000236 174 MOV A,H ; GET HI ORDER PIECE OF ADDRESS
758 000237 346 007 ANI ^O7 ; IF THIS .EQ. 0, THEN WE ARE AT A BOUNDARY
759 000241 302 224 000 JNZ A256 ; IF .NE 0, THEN KEEP TRYING
760
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 19
HCORE.M80 *8080 PROM CHECKSUMMER*
762
763 ; FALL THRU HERE WHEN WE'VE COMPLETED A PROMS WORTH
764
765 000244 174 MOV A,H ; GET HI ORDER (CORRESPONDS TO "WHICH PROM")
766 000245 017 RRC ; JUSTIFY AT EDGE OF THE ACCUM
767 000246 017 RRC
768 000247 017 RRC
769 000250 075 DCR A ; DECREMENT MAKES "0-3" INSTEAD OF "1-4"
770 000251 207 ADD A ; DOUBLE THIS VALUE TO MAKE IT ON 16 BYTE BOUNDARIES
771
772 000252 365 PUSH PSW ; SAVE THIS VALUE FOR A BIT
773 000253 345 PUSH H ; AND SAVE OUR CURRENT POINTER
774 000254 302 315 000 JNZ DEV ; IF DOING PROM 0, ELIMINATE ACTUAL CHECKSUM CNT
775
776 ; FELL THRU TO HERE TO DO ACTUAL CHECKSUM ELIMINATION EXECUTED WHEN
777 ; CHECKSUMMING PROM 0. IT REMOVES THE ACTUAL CHECKSUM VALUES FROM
778 ; THE COMPUTED CHECKSUM, AS WE CANNOT SOLVE THE CHECKSUM FEEDBACK
779 ; LOOP PROBLEM.
780
781 000257 365 PUSH PSW ; SAVE ACCUM
782 000260 041 134 005 LXI H,CHECKS ; H,L GETS A POINTER TO THE LIST OF CHECKSUMS
783 000263 076 010 MVI A,8. ; START WITH A COUNT OF 8, FOR THE EIGHT BYTES WE MUST SUB
784 000265 062 275 040 DEVLP: STA T80DT ; SAVE COUNT IN RAM, SO WE CAN USE ACCUM
785 000270 006 377 MVI B,^O377 ; IN B,C PAIR, ENSURE UPPER HALF .EQ. -1
786 000272 176 MOV A,M ; GET CHECKSUM BYTE TO ACCUM
787 000273 057 CMA ; NEGATE IT
788 000274 117 MOV C,A ; THROW IT INTO A 16 BIT ENTITY
789 000275 003 INX B ; AND MAKE B,C PAIR 2'S COMPLEMENT
790
791 000276 353 XCHG ; GET CURRENT COMPUTED CHECKSUM TO H,L
792 000277 011 DAD B ; "SUBTRACT" THE BYTE ASSEMBLED. (2'S COMP ADDITION)
793 000300 353 XCHG ; PUT H,L/D,E PAIR RIGHT
794 000301 043 INX H ; AND UPDATE THE POINTER INTO THE LIST
795 000302 072 275 040 LDA T80DT ; GET OUR CURRENT COUNT FROM THE RAM
796 000305 075 DCR A ; DECREMENT
797 000306 302 265 000 JNZ DEVLP ; CONTINUE IN THE LOOP
798
799 000311 001 000 000 LXI B,00 ; NOW GUARANTEE B,C PAIR IS ALL GONE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 20
HCORE.M80 *8080 PROM CHECKSUMMER*
801
802 ; FALL THRU WHEN FINISHED
803
804 000314 361 POP PSW ; RESTORE ACCUM
805
806 000315 117 DEV: MOV C,A ; GET CURRENT PROM NUMBER INTO C
807 000316 041 134 005 LXI H,CHECKS ; H,L POINTS TO THE TABLE OF CHECKSUM
808 000321 011 DAD B ; ADD INDEX, AND NOW (M) POINTS TO EXPECTED CHECKSUM
809 000322 116 MOV C,M ; COPY EXPECTED CHECKSUM INTO C
810 000323 043 INX H
811 000324 106 MOV B,M ; AND B, MAKES "B,C" PAIR
812 000325 043 INX H ; AND KEEP COUNT UP
813
814 ; NOW D,E HAS CALCULATED CHECKSUM AND B,C HAS EXPECTED CHECKSUM
815
816 000326 353 XCHG ; H,L NOW HAS CALCULATED CHECKSUM
817 000327 011 DAD B ; IF CHECKSUM OK, RESULT OF THIS SHOULD .EQ. 0
818 000330 175 MOV A,L ; GET LO PIECE
819 000331 264 ORA H ; THROW IN HI PIECE..CONDITION CODE FLAGS
820 ; ARE NOW SET
821
822 000332 353 XCHG ; D,E NOW HAS THE RESULTS OF THE ADDITION
823 000333 341 POP H ; BEFORE JUMPING ON CONDITION CODES, FIRST
824 ; FIX REGISTER
825 000334 302 355 000 JNZ CHKERR ; IF H,L NON-0, THEN HAD PROM CHECKSUM ERROR...
826
827 ; FALL THRU IF CHECKSUM WAS OK
828
829 000337 361 POP PSW ; RESTORE INDEX INTO "WHICH PROM" WE ARE IN
830 000340 376 006 CPI 6 ; SEE IF DONE ALL
831 000342 302 217 000 JNZ LCHKR ; JUMP BACK TO BEGINNING IF NOT DONE ALL
832
833 ; FALL THRU IF DONE ALL..PROMS CHECKSUM OK
834
835 000345 303 372 000 JMP XXX230 ; SO AVOID THE ERROR PRINTOUT CODE
836
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 21
HCORE.M80 *8080 PROM CHECKSUMMER*
838
839 ; YOU JUMPED TO HERE IF YOU ENCOUNTERED A CHECKSUM ERROR.
840
841 000350 077 103 110 ROMMSG: .ASCIZ /?CHK/ ; IF PROM CHECKSUM FAILS, USE THIS MESSAGE
842 000355 CHKERR: PLINE ROMMSG ; PRINT "?CHK "
(1) 000355 337 RST 3 ; PRINT LINE OF CHARS
(1) 000356 350 000 .ADDR ROMMSG ; BUFF TO PRINT
843 000360 361 POP PSW ; RETRIEVE PROM NUMBER
844 000361 017 RRC ; DIVIDE DOWN, SINCE WE DOUBLED IT BEFORE
845 000362 074 INR A ; MAKE PROM TYPE-OUT BE 1-4
846 000363 366 060 ORI ^O60 ; MAKE IT ASCII
847 000365 315 343 003 CALL PCHR ; GO PRINT IT
848 000370 PCRLF ; <CR-LF>
(2) 000370 347 RST 4
(2) 000371 002 .BYTE 2
849
850 ; FINAL STEP IS TO ENABLE PARITY DETECTION IN THE KS10.
851 ; DEFAULT IS: PARITY DETECTION ON.. DATA PATH PARITY DETECTION ENABLED
852
853 000372 076 174 XXX230: MVI A,DEFLTE ; INIT ENABLES TO BE ON
854 000374 323 100 OUT SMPAR ; ***** I/O WRT 100/174 *****
855
856 ; LITTLE ROUTINE TO LOAD ALL DEFAULT CONSTANTS INTO THE 8080 RAM.
857 ; THIS ROUTINE SAVES ABOUT 40. BYTES OF PROM, OVER USING LXI'S,SHLD'S
858 ; MVI'S & STA'S.
859
860 000376 041 342 040 LXI H,KATIM1 ; LIST OF DESTINATION LOCATIONS BEGINS HERE
861 000401 021 020 001 LXI D,PRMLST ; LIST OF DATUMS FOR THE RAM INIT
862 000404 032 RAMMER: LDAX D ; GET BYTE FROM THE DATA LIST
863 000405 376 252 CPI ^O252 ; TEST FOR END OF LIST
864 000407 312 061 001 JZ XXX235 ; CONTINUE PROM INIT
865
866 ; ELSE MORE RAM TO INITIALIZE
867
868 000412 167 MOV M,A ; PUT GOOD STUFF IN RAM
869 000413 043 INX H ; UPDATE POINTERS
870 000414 023 INX D
871 000415 303 004 001 JMP RAMMER
872
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 22
HCORE.M80 *8080 PROM CHECKSUMMER*
874
875 000420 PRMLST:
876 000420 244 006 .ADDR KPAINI ; KATIM1(2) KEEP ALIVE INITIAL COUNTER
877 000422 377 .IIF DF,SCECOD, .BYTE -1 ; FOR SCE ADR INIT
878 000423 377 .IIF DF,SCECOD, .BYTE -1 ; FOR SCE ADR INIT
879 000424 135 010 .ADDR MODE0 ; MODDIS(2) INIT THE KLINIK LINE TO MODE 0
880 000426 200 001 .ADDR REINI ; NORMAL INSTR ENDS WILL GO TO REINIT
881 000430 013 042 .ADDR ENVBUF ; ENVPNT(2) APT PNTER FOR ENVELOPES SENT TO THE HOST
882 000432 174 .BYTE DEFLTE ; PARBT(1) INIT ENABLES TO BE ON
883 000433 020 .BYTE TRPDEF ; TRAPEN(1) INIT ENABLES THE HARDWARE TRAPS
884 000434 014 .BYTE ^O14 ; MTAUBA(1) DEFAULT MAGTAPE UBA NUMBER IS "3"
885 000435 004 .BYTE ^O4 ; DSKUBA(1) DEFAULT DISK UBA NUMBER IS "1"
886 000436 010 .BYTE ^O10 ; STATE(1) STATE BEGINS WITH DTR TRUE
887 000437 041 .BYTE ^O41 ; LSTMSG(1) FIRST APT MSG SHOULD BE 136 (NOT OF 41)
888 000440 D 0,0,,2,0 ; DEN.SLV(5) GET DEFAULT VALUE FOR ALL TAPES
889 000445 .MTBASE: D 0,0,,772,440 ; MTBASE(5) INITIAL DEFAULT MTA RHBASE ADDRESS
890 000452 .DSBASE: D 0,0,,776,700 ; DSBASE(5) INITIAL DEFAULT DSK RHBASE ADDRESS
891 000457 377 .BYTE -1 ; RPINI(1) SO CAN MAKE IT -1
892 000460 252 .BYTE ^O252 ; END OF LIST MARKER
893
894 000461 076 025 XXX235: MVI A,^O25 ; BIT TO RESET THE UART
895 000463 323 203 OUT REMCTL ; RESET THE KLINIK UART AND ENABLE IT!!
896 000465 076 010 MVI A,^O10 ; GET A BIT TO SET "DATA TERMINAL READY"
897 000467 323 101 OUT DTR ; SET IT.
898
899 000471 PLINE INIMS ; PRINT VERSION AND ID
(1) 000471 337 RST 3 ; PRINT LINE OF CHARS
(1) 000472 144 005 .ADDR INIMS ; BUFF TO PRINT
900 000474 INTON ; SET INTERNAL MODE
(1) 000474 327 RST 2 ; GO SET INTERNAL MODE
901
902 ; CLEAR ?NXM IF THIS BIT IS CURRENTLY SET FOR SOME REASON
903
904 000475 257 XRA A ; (5.2C) CLR ACCUM
905 000476 323 210 OUT BUSCTL ; (5.2C) *** I/O WRT 210/0 *** CLR NXM BIT
906 000500 315 355 011 CALL EM1 ; DO PSEUDO EXAMINE TO SET MEM LATCHES
907 000503 315 036 011 CALL EBCMD ; EXAMINE THE BUS, TO SEE IF ZERO
908 000506 373 EI ; ENABLE INTERRUPTS
909
910 000507 315 016 033 CALL CMP36 ; NOW CHECK RESULTS OF THE "EB" CMD
911 000512 012 040 .ADDR EMBUF ; THE RESULTS READ FROM THE BUS
912 000514 333 016 .ADDR MAD000 ; VERSUS A WORD OF ALL ZEROES
913
914 000516 312 130 001 JZ PWRCHK ; IF OK, GO TO AUTO BOOT
915
916 ; FALL THRU IF ERRORS ENCOUNTERED
917
918 000521 INTOFF ; LEAVE INTERNAL MODE
(1) 000521 367 RST 6 ; GO EXIT FROM INTERNAL MODE
919 000522 PLINE INIER ; SAY "INITIALIZE ERROR"
(1) 000522 337 RST 3 ; PRINT LINE OF CHARS
(1) 000523 002 037 .ADDR INIER ; BUFF TO PRINT
920 000525 303 200 001 JMP REINI ; AND GO OUT
921
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 23
HCORE.M80 *8080 PROM CHECKSUMMER*
923
924 ;(5.2G) THIS CODE WAS FOR HANDLING POWER FAIL RESTART - WITH BATTERY
925 ; BACKUP. SINCE THERE IS NO BATTERY BACKUP ANY MORE, IT IS TAKEN OUT.
926 ;
927 ; JUMP TO HERE IF DOING PWR FAIL RESTART
928 ;
929 ;PWR.FAIL: CALL MICROP ; READ IN POINTERS AND READY TO GO
930 ; JC C.BTERR ; IF BOMBED, GIVE UP
931 ; CALL DMEM2CRAM ; GO READIN THE MICRO-CODE
932 ;
933 ; CALL BT.GO ; START MICRO-CODE
934 ; CLRRM TMPBF2 ; CLEAR A BUFFER
935 ; MVI M,^O70 ; POWER FAIL START ADDRESS IS "70"
936 ;
937 ; MVI A,4 ; CODE 4 INDICATES PWR FAIL
938 ; STA GOCODE ; SAVE IN RESTART INDICATOR
939 ; CALL STINT ; GO START MACHINE, USE INTERNAL MODE
940 ; JMP REINI ; AND GO LET THINGS HAPPEN
941
942 ;(5.2G) SINCE POWER FAIL RESTART (RECOVERY) IS NO LONGER SUPPORTED BY
943 ; THIS CODE, THERE IS NO REASON TO READ THE MEM STATUS REGISTER TO
944 ; DETERMINE IF THE MEMORY CONTENTS ARE STILL VALID. SO THIS SECTION
945 ; IS DELETED.
946 ;
947 ; FIRST THING TO DO IS TO CHECK IF THIS IS A POWER FAIL RESTART.
948 ; NOTE: WE ARE STILL IN "INTERNAL" MODE HERE..THINGS WON'T PRINT.
949 ;
950 ;PWRCHK:CLRRM IOAD ; CLEAR A BUFFER..WE WILL GENERATE A "100000"
951 ; INX H ; CLRRM PASSES PNTR..WE MAKE IT "IOAD+1"
952 ; MVI M,^O200 ; SET BIT THAT MAKES IT "100000"
953 ; CALL EI1 ; GO EXAMINE I/O ADDRESS - READ MEM STAT REG
954
955 000530 PWRCHK: INTOFF ; (5.2G - LABEL MOVED) CLEAR INTERNAL MODE
(1) 000530 367 RST 6 ; GO EXIT FROM INTERNAL MODE
956
957 000531 016 226 SYSUP: MVI C,150. ; NOW DO AN AUTO BOOT SEQUENCE
958 000533 041 031 000 SYSUP1: LXI H,25. ; WILL DO A DELAY LOOP
959 000536 315 076 014 CALL LTLOOP ; BY HAND, BY-PASSING USUAL MACRO GENERATION
960
961 000541 072 157 040 LDA RPEND ; SEE IF A CHAR WAS TYPED TO END THE AUTO BOOT
962 000544 247 ANA A ; SET CONDITION FLAGS
963 000545 302 200 001 JNZ REINI ; IF A CHAR WAS TYPED, NO AUTO STUFF, GO NULL JOB
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 24
HCORE.M80 *8080 PROM CHECKSUMMER*
965
966 ; WHILE WE HAVEN'T GOT ANYTHING TO DO, MIGHT AS WELL CHECK BOOT SWITCH
967 ; TO SEE IF THAT GOT PUSHED WHILE WE WERE SITTING HERE.
968
969 000550 333 301 IN BOOTSW ; ***** I/O RD/301 *****
970 000552 346 002 ANI 2 ; "BOOT" BUTTON PUSHED IS "TRUE .LO."
971 000554 312 366 001 JZ N0.5 ; SO, IF RESULTS = Z-BIT, THEN BUTTON PUSHED
972
973 000557 333 102 IN ^O102 ; READ AND SEE IF "AC PWR LO" HAPPENED
974 000561 346 100 ANI ^O100 ; CHECK THE RESET SIGNAL
975 000563 312 000 000 JZ 0000 ; ITS TRUE .LO., SO IF TRUE, RESTART MACHINE
976
977 ; FALL THROUGH IF NO BOOT BUTTON PUSHED
978
979 000566 015 DCR C ; STILL TIMING OUT.. WAIT LONGER
980 000567 302 133 001 JNZ SYSUP1 ; BACK WHILE WAITING
981
982 ; NOW SEE IF NEED AUTO BOOT, OR POWER FAIL RECOVERY..
983
984 ;(5.2G) THIS CODE HANDLES POWER FAIL RECOVERY - IT CHECKS THE POWER SAVED
985 ; BIT IN MEM STAT REGISTER TO SEE IF THE MEMORY IS STILL VALID. IT IS
986 ; TAKEN OUT
987 ; LDA EMBUF+2 ; FETCH UP BITS 12-19
988 ; ANI ^O200 ; CHECK THE PWR SAVED BIT
989 ; JZ PWR.FAIL ; IF BIT SET, GO TRY A POWER FAIL RECOVERY
990
991 ; FELL THROUGH IF THIS MUST BE AN AUTO BOOT SEQUENCE
992
993 000572 PLINE AUTOMS ; SAY "BT AUTO"
(1) 000572 337 RST 3 ; PRINT LINE OF CHARS
(1) 000573 360 037 .ADDR AUTOMS ; BUFF TO PRINT
994 000575 315 220 021 CALL BTAUT ; CALL THE BOOT
995
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 25
HCORE.M80 *BEGINNING OF BASIC CONSOLE NULL JOB... BEGINS WITH PROMPT*
997 .SBTTL *BEGINNING OF BASIC CONSOLE NULL JOB... BEGINS WITH PROMPT*
998
999 000600 061 000 044 REINI: LXI SP,RAMST+^O2000 ; RESET STACK POINTER TO RE-INIT
1000 000603 CLRB EOL ; GUARANTEE END-OF-LINE CNTR RESET
1001 000605 CLRB ERRCD ; CLEAR CURRENT ERROR CODE
1002 000607 CLRB ERRCD+1 ; CLEAR CURRENT ERROR CODE
1003 000611 CLRB RPTON ; ALWAYS CLEAR THE REPEAT FLAG
1004 000613 CLRB NOPNT ; CLR THE "NO PRINT" FLAG
1005 000615 041 001 041 LXI H,RPINI ; GET POINTER TO BUFFER WHERE WE SAVE THE
1006 000620 042 211 040 SHLD RPLST ; COMMAND DISPATCH ADDRESSES.USED BY REPEAT
1007 000623 041 200 001 LXI H,REINI ; IF GOT HERE, IT IS SAFE TO GUARANTEE THAT
1008 ; YOU ALWAYS GET HERE
1009 000626 042 350 040 SHLD NOREND ; PASS REINIT LOCATION TO NORMAL END DISPATCH
1010 000631 315 115 010 CALL BFRST ; RESET TTY INPUT BUFFER
1011 000634 373 EI ; MAKE SURE THAT BOMBS RESTORE THE INTERRUPTS
1012
1013 000635 072 156 040 LDA USRMD ; GRAB USER MODE FLAG
1014 000640 247 ANA A ; SET CONDITION CODES
1015 000641 302 260 001 JNZ NULLJ ; IF USER MODE, NO PROMPTS, NO CR-LF, NOTHING
1016
1017 000644 072 251 040 LDA MMFLG ; IF MM MODE WE WILL PRINT NO PROMPTS
1018 000647 247 ANA A ; SET 8080 FLAGS
1019 000650 302 260 001 JNZ NULLJ ; SKIP PROMPT IF MM
1020
1021 000653 PCRLF ; START FRESH WITH CR-LF
(2) 000653 347 RST 4
(2) 000654 002 .BYTE 2
1022 000655 PLINE KSPRMT ; PROMPT IS "KS10>"
(1) 000655 337 RST 3 ; PRINT LINE OF CHARS
(1) 000656 042 037 .ADDR KSPRMT ; BUFF TO PRINT
1023
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 26
HCORE.M80 *BEGINNING OF BASIC CONSOLE NULL JOB... BEGINS WITH PROMPT*
1025
1026 ; HERE BEGINS THE NULL STATE LOOP.... CHECK FRONT PANEL BOOT SWITCH.
1027
1028 000660 041 145 002 NULLJ: LXI H,DCODE ; NULLJ JOB PROCESSES COMMANDS ON "END-OF-LINE"
1029 000663 333 102 NULLW: IN ^O102 ; READ AND SEE IF "AC PWR LO" HAPPENED
1030 000665 346 100 ANI ^O100 ; CHECK THE RESET SIGNAL
1031 000667 312 000 000 JZ 0000 ; ITS TRUE .LO., SO IF TRUE, RESTART MACHINE
1032
1033 000672 333 302 IN ^O302 ; READ THE STATE OF THE KLINIK SWITCHES
1034 000674 057 CMA ; FIX THE HARDWARE INVERSION
1035 000675 117 MOV C,A ; SAVE RESULTS OF READ IN REG "C"
1036 000676 346 014 ANI ^O14 ; OFF ALL BUT THE 2 KLINIK BITS
1037 000700 017 RRC ; JUSTIFY "WORD-WISE"
1038 000701 107 MOV B,A ; SAVE THE KLINIK BITS FOR A SEC.
1039 000702 072 124 040 LDA KLNKSW ; GET THE CURRENT KLINIK SWITCH STATE
1040 000705 270 CMP B ; SEE IF KLINIK SWITCH CHANGED SINCE LAST TIME
1041 000706 345 PUSH H ; SAVE H,L IT HAS OUR DISPATCH ADDRESS
1042 000707 304 323 033 CNZ KLNKLT ; IF COMPARE # 0, THEN WE MUST CHANGE LIGHTS
1043 000712 341 POP H ; RETRIEVE H,L SO WE HAVE THE REAL DISPATCH
1044
1045 ; OK, NOW SEE IF WE ARE WATCHING CARRIER FROM THE KLINIK LINE, AND IF
1046 ; WE ARE, SEE IF IT HAS GONE AWAY.. IF KLINIK CARRIER GOES AWAY FOR 2
1047 ; SECONDS, THEN WE WILL HANGUP THE LINE.
1048
1049 000713 171 MOV A,C ; GET STATE OF THE CARRIER INTO ACCUM
1050 000714 346 001 ANI 1 ; SEE IF IT IS SET
1051 000716 312 327 001 JZ N00 ; IF THERE IS NO CARRIER, THEN SEE IF WE CARE
1052
1053 ; CARRIER WAS TRUE IF WE GOT HERE, SET FLAG SAYING THAT WE MUST WATCH
1054 ; IF IT DECIDES TO GO AWAY ON US
1055
1056 000721 062 130 040 STA WATCHC ; SET FLAG SAYING WATCH THE KLINIK
1057 000724 303 357 001 JMP N0 ; AND PROCEED WITH THE NULL JOB
1058
1059 ; GOT HERE IF CARRIER WAS FALSE, SEE IF WE CARE
1060
1061 000727 072 130 040 N00: LDA WATCHC ; FETCH UP THE "WATCH" FLAG
1062 000732 247 ANA A ; SET FLAGS
1063 000733 312 357 001 JZ N0 ; WE DON'T CARE, JUMP
1064
1065 ; CARRIER WENT AWAY ON US. WAIT 2 SECONDS, IF STILL GONE, HANG EM UP
1066
1067 000736 345 PUSH H ; BEST SAVE DISPATCHER TYPE ADDRESS
1068 000737 LONG.DELAY 2 ; WAIT 2 SECONDS
(1) 000737 041 220 001 LXI H,200. * 2 ; SET UP THE TIMING COUNT IN H,L REG
(1) 000742 315 076 014 CALL LTLOOP ; AND GO DELAY ABOUT 1 SEC FOR EACH (300 COUNT)
1069 000745 333 302 IN CARRIER ; ***** I/O RD 302 *****
1070 000747 346 001 ANI 1 ; SEE IF TRUE(LOW) OR FALSE(HIGH)
1071 000751 304 121 034 CNZ KILL.KLINIK ; (5.2A) STILL FALSE (HIGH), HANGUP THE LINE
1072 000754 341 POP H ; NOW RESTORE
1073 000755 CLRB WATCHC ; AND SAY TO LEAVE THIS ALONE FOR A WHILE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 27
HCORE.M80 *BEGINNING OF BASIC CONSOLE NULL JOB... BEGINS WITH PROMPT*
1075
1076 ; ELSE FALL THRU CAUSE ALL OK
1077
1078 000757 333 301 N0: IN BOOTSW ; ***** I/O READ 301 *****
1079 000761 346 002 ANI 2 ; BOOT SW SET? (TRUE LO, BECAUSE OF INVERSION)
1080 000763 302 374 001 JNZ N1 ; SKIP NEXT INSTR IF FALSE(I.E HIGH)
1081
1082 000766 315 215 021 N0.5: CALL BOOT ; OTHERWISE...GO TO BOOT COMMAND
1083 000771 303 260 001 JMP NULLJ ; AFTER BOOT, ALL TTY INPUT WAITS ARE KILLED
1084
1085 ; CONTINUE NULL STATE STATUS CHECK.
1086 ; CHECK FOR SYSTEM PARITY ERRORS.
1087
1088 000774 333 301 N1: IN BOOTSW ; ***** I/O RD 301 *****
1089 000776 346 010 ANI ^O10 ; IS PARITY ERR SIGNAL SET(TRUE .LO.)
1090 001000 302 015 002 JNZ NX2 ; SKIP NEXT INSTR IF NOT SET
1091
1092 ; IF YES SET, MUST CHECK THE PARITY ERROR
1093
1094 001003 072 166 040 LDA CHKPAR ; GET FLAG TO SEE IF SHOULD REPORT PARITY ERRORS
1095 001006 247 ANA A ; SET FLAGS
1096 001007 302 021 027 JNZ RPTPAR ; IF NOT ZERO, MUST GO REPORT PARITY ERROR
1097 001012 303 021 002 JMP N2 ; AND CONTINUE ELSE
1098
1099 001015 057 NX2: CMA ; IF HERE, SET ACCUM .EQ. -1
1100 001016 062 166 040 STA CHKPAR ; AND SET FLAG TO SAY REPORT PARITY ERR
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 28
HCORE.M80 *BEGINNING OF BASIC CONSOLE NULL JOB... BEGINS WITH PROMPT*
1102
1103 ; CONTINUE NULL STATE STATUS CHECKS
1104 ; CHECK TO SEE IF RUN FLOP HAS DIED
1105
1106 001021 333 300 N2: IN RUNFP ; ;***** I/O READ 300Q *****
1107 001023 346 010 ANI ^O10 ; IS HALT LOOP SET? (TRUE .LO.)
1108 001025 302 047 002 JNZ NX3 ; CPU RUNNING - CONTINUE
1109
1110 ; FALL THRU IF HALT LOOP SET..
1111
1112 001030 072 231 040 LDA CHKHLT ; GET THE FLAG THAT SAYS IF WE SHLD CHK HALT
1113 001033 247 ANA A ; SET CONDITION CODES
1114 001034 365 PUSH PSW ; SAVE FLAGS FOR LATER USE
1115 001035 304 226 016 CNZ HLTCM ; IF FLAG SET, GO REPORT THE HALT
1116 001040 361 POP PSW ; GET FLAGS BACK
1117 001041 302 236 002 JNZ CHKKA ; IF YOU JUST HALTED, GO SEE IF RELOAD REQUEST
1118 001044 303 053 002 JMP N3 ; IF CLR, NO NEED TO REPORT..THEY KNOW
1119
1120 ; THIS AND THE "CONTINUE" CODE IS THE ONLY CODE IN THE CONSOLE THAT SETS
1121 ; THE "CHECK HALT" FLAG.. AND YOU CAN ONLY GET HERE IF THE "HALT LOOP"
1122 ; FLAG HAS BEEN CLEARED, BY ANY MEANS. AND WHEN YOU GET HERE, THE ACCUM
1123 ; MUST BE ZERO.
1124
1125 001047 057 NX3: CMA ; SET ACCUM = -1
1126 001050 062 231 040 STA CHKHLT ; AND ZAP THE CHECK HALT FLAG..
1127
1128 ; CONTINUE NULL STATE STATUS CHECKS.
1129 ; CHECK TO SEE IF MOS MEMORY REFRESH CYCLE HAS DIED.
1130
1131 001053 333 101 N3: IN REFERR ; READ REFRESH ERROR BIT
1132 001055 346 001 ANI 01 ; REFRESH ERROR TRUE? (TRUE .LO.)
1133 001057 302 076 002 JNZ NX4 ; SKIP FOLLOWING CODE IF NO REFRESH ERROR
1134
1135 ; FALL INTO THIS IF A REFRESH ERROR OCCURS
1136
1137 001062 072 167 040 LDA CHKREF ; GET FLAG THAT SAYS CHECK REFRESH
1138 ; ..SEE IF SHOULD BE REPORTED
1139 001065 247 ANA A ; SET 8080 FLAGS
1140 001066 345 PUSH H ; SAVE DISPATCHING ADDRESS
1141 001067 304 267 032 CNZ NOREFRESH ; GO REPORT REFRESH ERROR IF NECESSARY
1142 001072 341 POP H ; RESTORE DISPATCH ADDRESS
1143 001073 303 102 002 JMP N4 ; AND CONTINUE AS IF NOTHING HAPPENED
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 29
HCORE.M80 *BEGINNING OF BASIC CONSOLE NULL JOB... BEGINS WITH PROMPT*
1145
1146 ; THIS IS THE ONLY CODE THAT CAN SET THE "REPORT REFRESH ERROR FLAG"
1147
1148 001076 057 NX4: CMA ; YOU GOT HERE ON A JZ, SO ACCUM MUST BE ZERO
1149 001077 062 167 040 STA CHKREF ; AND SET FLAG TO -1
1150
1151 ; CONTINUE NULL STATE STATUS CHECK
1152 ; CHECK FOR "END-OF-LINE" OR A RUNNING 10'S "KEEP-ALIVE"
1153
1154 001102 072 156 040 N4: LDA USRMD ; IS THIS USER MODE?
1155 001105 247 ANA A ; SET CONDITION FLAGS
1156 001106 302 212 002 JNZ LIVE10 ; IF YES, CHECK 10 INTERRUPTS & KEEP ALIVE
1157
1158 ; BEFORE DOING ANOTHER COMMAND - SEE IF WE ARE ENVELOPING
1159 ; AND MUST SEND OUT A PACKET.
1160
1161 001111 072 247 040 LDA CSLMODE ; ONLY DO ENVELOPE STUFF IF IN MODE 4 OR GREATER
1162 001114 376 020 CPI .MODE4 ; CHECK IF MODE 4
1163 001116 302 126 002 JNZ EOL.LK ; NOT MODE 4, PROCEED AS NORMAL
1164
1165 001121 345 PUSH H ; SAVE H,L - IT HAS THE DISPATCH ADDRESS
1166 001122 315 174 034 CALL DECNET ; IF SOMETHING THERE, SEND IT OUT
1167 001125 341 POP H ; NEED H,L AGAIN
1168
1169 ; OTHERWISE, CTY'S EOL FLAG.
1170 ; BUT FIRST SEE IF THIS IS A REPEAT.
1171
1172 001126 072 213 040 EOL.LK: LDA RPTON ; GET THE REPEAT FLAG
1173 001131 247 ANA A ; SET THE PROCESSOR FLAGS
1174 001132 302 166 020 JNZ RPTRTN ; GO BACK TO REPEAT FUNCTION SO THAT HE CAN PROCEED
1175
1176 001135 072 204 040 LDA EOL ; GET VALUE OF EOL FLAG
1177 001140 267 ORA A ; SET FLAGS..IS EOL SET?
1178 001141 312 263 001 JZ NULLW ; REMAIN IN NULL JOB LOOP IF NOT SET
1179
1180 ; ELSE GO PROCESS A COMMAND
1181
1182 001144 351 PCHL ; RETURN TO COMMAND IN TTY INPUT, OR DECODE
1183
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 30
HCORE.M80 *TYPEIN COMMAND DECODER AND DISPATCHER*
1185 .SBTTL *TYPEIN COMMAND DECODER AND DISPATCHER*
1186
1187 001145 257 DCODE: XRA A ; ZERO OUT THE ACCUM
1188 001146 107 MOV B,A ; AND ZERO OUT TMP LOCATION
1189
1190 001147 021 143 004 LXI D,CMDLST ; "D,E" NOW POINTS TO CMD LIST CHARACTER PAIRS
1191 001152 052 227 040 LHLD FIRST ; "H,L" NOW POINTS TO FIRST CHAR TYPED AS CMD
1192 001155 315 204 021 CALL FNDARG ; FIRST GO CLR ANY LEADING SPACES OR TABS
1193 ; FROM CMD LINE
1194 001160 332 277 003 JC NORML ; IF AT END-OF-COMMAND, ITS A NULL COMMAND
1195
1196 ; NOW BEGINS COMMAND LOOK UP LOOP... "H,L" POINTS TO FIRST COMMAND CHAR.
1197 ; WHILE "D,E" POINTS TO FIRST CHAR IN THE LIST OF ALLOWABLE COMMANDS.
1198
1199 001163 032 DCODL: LDAX D ; CMD LIST CHAR TO ACCUM
1200 001164 267 ORA A ; IS THIS A ZERO BYTE?
1201 001165 312 204 002 JZ NXMDC ; IF YES, END OF LIST
1202 001170 023 INX D ; WHILE YOU ARE AT IT UPDATE CMD LIST PNTR
1203
1204 001171 276 CMP M ; COMPARE CMD LIST CHAR WITH TYPED CHAR.
1205 001172 312 136 003 JZ MTCH1 ; IF THEY MATCH, BR TO "MTCH1"
1206
1207 ; HERE IF NO MATCH.. UPDATE CMD LIST PNTR TO START OF NEXT COMMAND,
1208 ; THEN CHECK IF TRIED ENTIRE LIST YET. IF TRIED ENTIRE LIST, REPORT
1209 ; COMMAND ERROR AND BACK TO NULL JOB LOOP. IF NOT TRIED ENTIRE LIST
1210 ; YET, LOOP BACK AND TRY SOME MORE.
1211
1212 001175 023 MISS2: INX D ; BUMP PNTR PAST SECOND CHAR OF CMD
1213 001176 023 INX D ; BUMP PAST THE DISPATCH ADDR
1214 001177 023 INX D
1215 001200 004 INR B ; UPDATE NUMBER OF "TRIES"
1216 001201 303 163 002 JMP DCODL ; IF NOT, JUMP BACK AND TRY AGAIN
1217
1218 ; IF FALL TO HERE, WAS ILLEGAL COMMAND.. CLEAR REST OF LINE UP TO EOL...
1219 ; TYPE ERROR MESSSAGE AND BACK TO NULL JOB LOOP. FIRST STEP IS CLEARING
1220 ; BAD COMMAND FROM COMMAND BUFFER.
1221
1222 001204 NXMDC: PLINE CMDNG ; COMMAND NO GOOD
(1) 001204 337 RST 3 ; PRINT LINE OF CHARS
(1) 001205 015 037 .ADDR CMDNG ; BUFF TO PRINT
1223
1224 001207 303 137 032 JMP MMERR ; AND BACK TO PROMPT..
1225
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 31
HCORE.M80 *CTY SERVICE*
1227 .SBTTL *CTY SERVICE*
1228
1229 ; CODE ENTERED FROM THE NULL JOB LOOP WHENEVER WE ARE IN USER MODE
1230 ; (MODE 3). CODE CHECKS TO SEE IF CHAR IS AVAILABLE FROM THE 10
1231 ; AND ALSO IF KEEP ALIVE COUNT IS ACTIVE. WE ALSO CHECK FOR REBOOT
1232 ; REQUESTS (AS IN 20 SYSTEM MONITOR'S "BUGHALTS").
1233
1234 001212 333 301 LIVE10: IN SMSTS ; SEE IF INTERRUPT FROM THE 10 IS PENDING
1235 001214 247 ANA A ; SET CONDITION CODES
1236 001215 365 PUSH PSW ; SAVE FLAGS FOR A LITTLE BIT
1237 001216 364 174 007 CP CHRRDY ; IF PLUS, A CHARACTER IS READY, GO PROCESS
1238
1239 ; FIRST, WE ONLY WANT TO CHECK THE KEEP-ALIVE COUNTER EVERY SECOND.
1240 ; FIRST WE WILL CHECK OUR COUNTERS AND SEE IF TIME TO CHECK KEEP-ALIVE DATA
1241
1242 001221 361 POP PSW ; GET FLAGS BACK
1243 001222 364 334 002 CP FAKLIT ; IF TYPED A CHAR, THEN DOWN COUNT FOR TIME WASTED
1244 001225 312 236 002 JZ CHKKA ; IF ZERO, DO WHAT MUST BE DONE
1245
1246 001230 315 346 002 CALL DTIME ; ALWAYS DO IT AT LEAST ONCE
1247 001233 302 260 001 JNZ NULLJ ; IF NOT ZERO, IT HASN'T BEEN A SECOND YET. BACK NULL
1248
1249 ; WHEN YOU FALL TO HERE, IT IS TIME TO CHECK FOR "KEEP-ALIVE" OR "RELOAD"
1250
1251 001236 041 244 006 CHKKA: LXI H,KPAINI ; FIRST WE MUST RESET OUR MAJOR LOOP COUNTER
1252 001241 042 342 040 SHLD KATIM1 ; EACH NUM IN THIS LOC .EQ. .444 SECONDS BETWEEN CHECKS
1253
1254 001244 INTON ; DON'T PRINT THIS CRUD
(1) 001244 327 RST 2 ; GO SET INTERNAL MODE
1255 001245 363 DI ; NO INTERRUPTS
1256 001246 EXAM 31 ; MOS MEMORY LOC 31 HAS THE INFORMATION
(1) 001246 315 202 030 CALL EXAMSH ; AND DO EXAM ASSUMING SHORT ADDRESS
(1) 001251 031 000 .ADDR 31 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
1257 001253 373 EI ; OK..INTERRUPTS
1258
1259 001254 INTOFF ; INTERNAL MODE OFF NOW
(1) 001254 367 RST 6 ; GO EXIT FROM INTERNAL MODE
1260 001255 072 015 040 LDA EMBUF+3 ; GRAB THE RELOAD BITS.. WE CERTAINLY NEED THOSE
1261 001260 027 RAL ; "FORCED RELOAD" SHIFT INTO CARRY
1262 001261 332 360 002 JC FRELOAD ; IF "RELOAD" SET, GO EXECUTE A RELOAD
1263
1264 ; NOW SEE IF KEEP-ALIVE ACTIVE
1265
1266 001264 027 RAL ; "KEEP-ALIVE" BIT INTO THE C-BIT
1267 001265 322 260 001 JNC NULLJ ; IF ITS NOT SET, GO BACK TO NULL JOB
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 32
HCORE.M80 *CTY SERVICE*
1269
1270 ; KEEPING A WATCH ON THE KEEP ALIVE COUNT...BLINKY LIGHTS
1271
1272 001270 072 360 040 LDA STATE ; GET CURRENT STATE OF THE LIGHTS
1273 001273 127 MOV D,A ; SAVE IT JUST FOR A LITTLE BIT
1274 001274 346 373 ANI STMSK ; CLR THE "STATE" LIGHT FROM CURRENT SELECTIONS
1275 001276 137 MOV E,A ; AND NOW SAVE THIS LITTLE BIT IN A REGISTER
1276
1277 001277 172 MOV A,D ; GET BACK THE ORIGINAL "STATE"
1278 001300 057 CMA ; "BLINK"
1279 001301 346 004 ANI STBIT ; ONLY WANT TO BLINK THE SINGLE LIGHT
1280 001303 263 ORA E ; THROW IN THE PART THAT IS AS WAS..
1281 001304 062 360 040 STA STATE ; PUT WHOLE MESS BACK, NULL LOOP WILL BLINKY
1282 001307 323 101 OUT LIGHTS ; BLINK THE LIGHTS HERE
1283 001311 372 260 001 JM NULLJ ; AND IF MINUS, WE ARE "SHUTTING DOWN", LET LIGHTS GO
1284
1285 ; WE DID AN EXAM 31 A VERY SHORT TIME AGO, SO THE EXAMINE BUFFER
1286 ; SHOULD STILL HAVE A VALID "KEEP-ALIVE" UPDATE COUNT IN IT.
1287
1288 001314 041 250 040 LXI H,KACNTR ; GET POINTER TO THE PREVIOUS "KA" COUNT
1289 001317 072 013 040 LDA EMBUF+1 ; GET WHAT SHOULD BE AN UPDATED "KA" COUNT
1290 001322 276 CMP M ; COMPARE..BETTER BE DIFFERENT
1291 001323 312 063 003 JZ DIEING ; IF SAME, GO SEE IF CPU IS REALLY DIEING
1292
1293 ; FALL THRU IF THE COUNTS WERE DIFFERENT.. SAVE THE NEW COUNT.
1294
1295 001326 167 MOV M,A ; NEW COUNT GOES TO RAM, OVERWRITES THE OLD
1296 001327 CLRB DIECNT ; CLEAR THAT DIE COUNT
1297 001331 303 260 001 JMP NULLJ ; BACK TO THE NULL LOOP
1298
1299 ; ROUTINE FOR WHEN DOING CTY OUTPUT THE LIGHTS STILL BLINK AT
1300 ; A REASONABLE RATE.
1301
1302 001334 052 342 040 FAKLIT: LHLD KATIM1 ; GET CURRENT COUNT FOR BETWEEN THE LIGHTS
1303 001337 175 MOV A,L ; GET LO ORDER PIECE
1304 001340 346 374 ANI ^O374 ; TWEEK LITE COUNT, CAUSE TYPING MESSED UP TIMER LOOP
1305 001342 157 MOV L,A ; PUT LO ORDER PIECE BACK (MASKING EQUIV TO SUB 100)
1306 001343 303 352 002 JMP DTM1 ; AND PROCEED
1307
1308 ; ROUTINE TO DOWN COUNT KEEP ALIVE COUNTER
1309
1310 001346 052 342 040 DTIME: LHLD KATIM1 ; GET A 16-BIT MINOR LOOP COUNTER
1311 001351 053 DCX H ; DECREMENT THE COUNTER
1312 001352 042 342 040 DTM1: SHLD KATIM1 ; AND PUT IT BACK
1313 001355 175 MOV A,L ; NOW CHECK THE COUNT FOR .EQ. 0
1314 001356 264 ORA H ; "OR" HI PIECE WITH THE "LO" PIECE
1315 001357 311 RET
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 33
HCORE.M80 *CTY SERVICE*
1317
1318 ; ROUTINE TO ENTERED WHEN THE "FORCE RELOAD" BIT HAS BEEN SET BY A RUNNING
1319 ; PROGRAM IN THE KS10.
1320
1321 001360 FRELOAD:CLRB NOPNT ; CLEAR THE NO PRINT FLAG
1322 001362 PLINE FRCMSG ; PRINT MESSAGE TO INDICATE THE FORCED RELOAD
(1) 001362 337 RST 3 ; PRINT LINE OF CHARS
(1) 001363 324 037 .ADDR FRCMSG ; BUFF TO PRINT
1323 001365 076 002 MVI A,2 ; BIT 34 IS THE APPROPRIATE GUY ON A FORCED RELOAD
1324 001367 062 255 040 STA GOCODE ; SET BIT IN THE 8080 RAM BUFFER
1325 001372 333 300 IN RUNFP ; NOW SEE IF WE MUST HALT THE PROCESSOR
1326 001374 346 010 ANI ^O10 ; WE DID NOT INVERT SIGNAL. 0=HALTED, 1=RUNNING
1327
1328 001376 INTON ; DON'T PRINT WHAT HAPPENS TO THE HALT
(1) 001376 327 RST 2 ; GO SET INTERNAL MODE
1329 001377 304 173 017 CNZ HACMD ; MAKE SURE THE PROCESSOR IS STOPPED
1330 001402 INTOFF ; OK TO PRINT NOW
(1) 001402 367 RST 6 ; GO EXIT FROM INTERNAL MODE
1331 001403 072 256 040 LDA SECRET ; SECRET LOCATION
1332 001406 247 ANA A ; SET 8080 FLAGS
1333 001407 302 200 001 JNZ REINI ; IF FLAG SET, WE WILL NOT DO AUTO RELOADS
1334
1335 001412 021 004 002 LXI D,^O1004 ; POINTER TO THE MONITOR PRE-BOOT
1336 001415 315 252 022 CALL FILEINIT ; GO READ IN THE MONITOR PRE-BOOT
1337 001420 332 215 032 JC L.BTERR ; IF ERROR, FATAL OUT
1338
1339 001423 041 001 000 LXI H,1 ; NO ERR, NOW GO START THE MICRO-CODE AT LOC 1
1340 001426 315 164 016 CALL SM1.5 ; START MICROCODE, ADDRESS PASSED IN H,L
1341 001431 LONG.DELAY 2 ; GUARANTEE THAT THE "SM 1" HAS TIME TO FINISH
(1) 001431 041 220 001 LXI H,200. * 2 ; SET UP THE TIMING COUNT IN H,L REG
(1) 001434 315 076 014 CALL LTLOOP ; AND GO DELAY ABOUT 1 SEC FOR EACH (300 COUNT)
1342 001437 315 341 021 CALL BT.GO1 ; NOW FIX PARITY AND OTHER THINGS THAT WE BROKE
1343 001442 315 304 021 CALL INFOBT ; AND PASS THE SOURCE OF THE PRE-BOOT IN MOS MEM
1344
1345 001445 041 272 040 LXI H,HSBFL1 ; (5.2F) SET "H,L" REGISTER TO SPECIAL HSB FLAG
1346 001450 066 004 MVI M,4 ; (5.2F) SET TO 4 ("RUN")
1347 001452 043 INX H ; (5.2E) POINT TO NEXT HSB FLAG
1348 001453 066 001 MVI M,1 ; (5.2E) SET TO 1 ("CONTINUE")
1349 001455 315 247 021 CALL LB.GO1 ; AND GO EXECUTE THE BOOT CODE
1350 001460 303 260 001 JMP NULLJ ; AND BACK TO NULL JOB
1351
1352 001463 041 257 040 DIEING: LXI H,DIECNT ; GET NUMBER OF CONSECUTIVE "NO CHANGES" IN KA CNT
1353 001466 064 INR M ; INCREMENT
1354 001467 176 MOV A,M ; GET COUNT INTO ACCUM
1355 001470 376 043 CPI KATIMX ; NOW SEE IF OFFICIAL DEATH
1356 001472 372 260 001 JM NULLJ ; IF NOT YET, GO BACK AND WAIT FOR MORE
1357
1358 ; ELSE, FALL ON THROUGH TO THE RELOAD CODE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 34
HCORE.M80 *CTY SERVICE*
1360
1361 ; ROUTINE ENTERED WHEN THE "KEEP-ALIVE" COUNT DOES NOT CHANGE, AND WE
1362 ; ISSUE A RELOAD BECAUSE WE BELIEVE THAT THE PROGRAM RUNNING IN THE
1363 ; KS10 HAS DIED.
1364
1365 001475 CLRB NOPNT ; CLEAR THE NO PRINT FLAG
1366 001477 CLRB DIECNT ; AND RESET THE DIE COUNT
1367 001501 PLINE KAMSG ; PRINT MESSAGE TO INDICATE KEEP-ALIVE FAILURE
(1) 001501 337 RST 3 ; PRINT LINE OF CHARS
(1) 001502 317 037 .ADDR KAMSG ; BUFF TO PRINT
1368
1369 001504 INTON ; DON'T PRINT ANY OF THIS STUFF
(1) 001504 327 RST 2 ; GO SET INTERNAL MODE
1370 001505 315 173 017 CALL HACMD ; FIRST, STOP THE MACHINE
1371 001510 363 DI ; NO INTERRUPTS, TILL THE EXAMINE IS COMPLETE
1372 001511 EXAM 71 ; EXAMINE THE INSTRUCTION IN 71
(1) 001511 315 202 030 CALL EXAMSH ; AND DO EXAM ASSUMING SHORT ADDRESS
(1) 001514 071 000 .ADDR 71 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
1373 001516 373 EI ; OK TO INTERRUPT NOW
1374
1375 001517 076 001 MVI A,1 ; KEEP ALIVE CODE IS A 1
1376 001521 062 255 040 STA GOCODE ; SAVE FOR PASSING TO KS10
1377 001524 315 012 017 CALL EXINTM ; NOW GO EXECUTE LOC 71 IN PAGE 0 OF MONITOR SPACE
1378 001527 315 142 017 CALL COCMD ; LET THE PROCESSOR RESUME
1379 001532 INTOFF ; MAY RESUME PRINTING THIS STUFF
(1) 001532 367 RST 6 ; GO EXIT FROM INTERNAL MODE
1380 001533 303 260 001 JMP NULLJ ; AND BACK TO NULL JOB
1381
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 35
HCORE.M80 *COMMAND DECODER CONTINUED*
1383 .SBTTL *COMMAND DECODER CONTINUED*
1384
1385 ; CONTINUE COMMAND DECODER......
1386 ; HERE IF FIRST CHARACTER MATCHED. SEE IF SECOND CHAR MATCHED.
1387
1388 001536 043 MTCH1: INX H ; INPUT BUFFER NOW PNTS TO SECOND CHAR TYPED
1389 001537 032 LDAX D ; ACCUM GETS SECOND "EXPECTED" CHAR FROM CMD LIST
1390 001540 276 CMP M ; NOW. DOES SECOND CHARACTER MATCH??
1391 001541 312 150 003 JZ MTCH2 ; JUMP IF YES, SECOND CHAR MATCHES.
1392
1393 ; HERE IF SECOND CHARACTER DID NOT MATCH.RESET "H,L" & GO BACK TO TRY AGAIN
1394
1395 001544 053 DCX H ; RESET "H,L"
1396 001545 303 175 002 JMP MISS2 ; AND CONTINUE PROCESSING
1397
1398 ; GET TO HERE IF SECOND CHARACTER MATCHED
1399
1400 001550 023 MTCH2: INX D ; UPDATE PAST 2ND CHAR
1401 001551 043 INX H ; UPDATE BUFFER POINTER
1402
1403 001552 315 241 033 CALL SEPCHR ; GET RID OF SEPARATORS
1404
1405 ; "H,L" SHOULD NOW POINTS TO THE CMD BUFF
1406 ; "D,E" NOW POINTS TO THE DISP ADDR
1407 ; OR ELSE TO "EOL" CHAR IF CMD HAS NO ARGS.. ANYTHING ELSE IS COMMAND ERROR
1408
1409 001555 042 223 040 SHLD .ARG1 ; SAVE "H,L" POINTER TO FIRST ARG.
1410
1411 001560 170 MOV A,B ; NOW LOAD ACCUM WITH NUMBER "TRIES" TO FIND MATCH
1412 001561 353 XCHG ; DISP POINTER NOW TO "H,L"
1413
1414 001562 136 MOV E,M ; SET LOW ORDER HALF OF "TABLE ENTRY" INTO "E"
1415 001563 043 INX H ; BUMP POINTER
1416 001564 126 MOV D,M ; SET HIGH ORDER HALF OF "TABLE ENTRY" INTO "D"
1417 001565 041 277 003 LXI H,NORML ; SET A RETURN VALUE
1418 001570 345 PUSH H ; AND PLACE ON STACK FOR RETURNS
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 36
HCORE.M80 *COMMAND DECODER CONTINUED*
1420
1421 ; PIECE OF CODE TO SAVE EACH COMMAND DISPATCH ADDRESS IN THE RAM BUFFER
1422 ; SO THAT THE REPEAT FUNCTION CAN DISPATCH THRU THE LIST WITHOUT DECODING
1423 ; THE TYPED IN COMMAND STRING AGAIN..
1424
1425 001571 247 ANA A ; CHECK IF THIS IS RP COMMAND..IF YES MUST
1426 001572 062 275 040 STA T80DT ; SAVE WHICH COMMAND IS BEING EXECUTED
1427 001575 312 224 003 JZ CMDGO ; JUMP SO THAT CMD LST BUFFER NO CHANGED
1428
1429 001600 072 131 040 LDA CMDS.. ; SEE IF THIS IS THE FIRST COMMAND IN A LINE
1430 001603 247 ANA A ; SET FLAGS
1431 001604 314 267 020 CZ RPNEW ; IF IS FIRST CMD, RESET REPEAT BUFFER POINTERS
1432
1433 001607 052 211 040 LHLD RPLST ; GET POINTER TO CURRENT FREE BUFFER LOCATION
1434 001612 162 MOV M,D ; SAVE HI ORDER PIECE OF DISPATCH ADDRESS
1435 001613 043 INX H ; UPDATE MEM POINTER
1436 001614 163 MOV M,E ; SAVE LO ORDER PIECE OF DISPATCH ADDRESS
1437 001615 043 INX H ; UPDATE POINTER TO FIRST FREE..
1438 001616 257 XRA A ; CLR ACCUM
1439 001617 057 CMA ; IN ORDER TO MAKE IT -1
1440 001620 167 MOV M,A ; SET -1 AS END-OF-LIST INDICATOR
1441 001621 042 211 040 SHLD RPLST ; AND RESTORE THE POINTER
1442
1443 ; CONTINUE THE DISPATCH
1444
1445 001624 353 CMDGO: XCHG ; SET "TABLE ENTRY" INTO "H,L"
1446
1447 ; AND DISPATCH TO ACTUAL COMMAND CODE
1448
1449 001625 315 330 032 CALL EOCML ; SET "C-BIT" TO SAY END-OF-LINE IF TRUE
1450 001630 365 PUSH PSW ; SAVE STATE OF PROCESSOR FLAGS
1451 001631 324 252 003 CNC REMARG ; IF NO C-BIT, CMD HAD ARG..MUST REMEMBER IT
1452
1453 ; FINALLY SEE IF COMMAND REQUIRES AN ARG
1454
1455 001634 322 244 003 JNC CMDGO9 ; IF REQUIRES NO ARG, GO GO GO
1456
1457 ; FALL HERE IF COMMAND HAD NO ARG..SEE IF IT SHOULD HAVE HAD ONE
1458
1459 001637 174 MOV A,H ; GET HI ORDER OF DISP ADDRESS
1460 001640 027 RAL ; SHIFT HI ORDER BIT (BIT15) INTO THE C-BIT
1461 001641 332 126 032 JC RRARG ; WELL IF SET, IT NEEDED ARG.. REPORT THAT HAD NONE
1462
1463 ; ELSE ALL OK.. CLEAR BIT15 IF SET AND PROCEED
1464
1465 001644 174 CMDGO9: MOV A,H ; HI ORDER TO ACCUM
1466 001645 346 177 ANI ^O177 ; CLEAR BIT 15 NO MATTER WHAT
1467 001647 147 MOV H,A ; PUT HI ORDER BACK
1468 001650 361 POP PSW ; GET THE PROCESSOR FLAGS BACK
1469 001651 351 PCHL ; ADDR TO PC TAKES THE DISPATCH
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 37
HCORE.M80 *COMMAND DECODER CONTINUED*
1471
1472 ; ROUTINE TO REMEMBER IF COMMAND HAD AN ARG..USED BY REPEAT FUNCTION
1473
1474 001652 365 REMARG: PUSH PSW ; SAVE FLAGS
1475 001653 072 275 040 LDA T80DT ; SEE IF THIS WAS A REPEAT, IN WHICH CASE, DO NOTHING
1476 001656 247 ANA A ; SET CPU FLAGS
1477 001657 312 275 003 JZ REMAR1 ; IF WAS RP, GET OUT
1478
1479 001662 345 PUSH H ; AND SAVE DISPATCH ADDRESS
1480 001663 052 211 040 LHLD RPLST ; GET THIS DISPATCH FROM REPEAT LIST
1481 001666 053 DCX H ; BACK UP ADDR POINTER TO POINT
1482 001667 053 DCX H ; HI ORDER PIECE OF ADDRESS
1483 001670 176 MOV A,M ; NOW GET HI ORDER PIECE INTO ACCUM
1484 001671 366 200 ORI ^O200 ; ADD SIGN BIT TO REMEMBER ARG
1485 001673 167 MOV M,A ; NOW PUT IT BACK
1486 001674 341 POP H ; RESTORE DISPATCH ADDRESS
1487 001675 361 REMAR1: POP PSW ; AND RESTORE C-BIT FROM PREVIOUS "EOCML"
1488 001676 311 RET ; AND RETURN
1489
1490 ; THIS IS "NORML", FOR NORMAL RETURNS.. IT SETS UP PREVIOUS POINTERS
1491 ; AND THEN GOES BACK TO PROMPT.
1492
1493 001677 041 204 040 NORML: LXI H,EOL ; GET PNTR TO COMMAND COUNT
1494 001702 176 MOV A,M ; COPY TO ACCUM
1495 001703 075 DCR A ; DECREMENT IT
1496 001704 167 MOV M,A ; PUT BACK WHERE U GOT IT
1497
1498 ; IF COUNT WAS DOWN TO ZERO, THEN RESET IT
1499
1500 001705 075 DCR A ; IF COUNT WAS ZERO, THIS MAKES IT NEGATIVE
1501 001706 372 337 003 JM NORDIS ; IF EOL HAS GONE MINUS, TAKE NORMAL DISPATCH
1502 001711 315 324 003 CALL FXNXT ; OTHER WISE BE CLEVER & CRYPTIC
1503 001714 CLRB ERRCD ; AND CLEAR ERROR CODE
1504 001716 041 145 002 LXI H,DCODE ; FIX H,L FOR NORMAL NULL JOB
1505
1506 001721 303 374 001 JMP N1 ; AND FINALLY, ALL ELSE GOES TO NULL LOOP
1507 001724 052 223 040 FXNXT: LHLD .ARG1 ; GET CMD PNTR
1508 001727 043 INX H ; UPDATE IT PAST CURRENT EOL CHAR (, OR CRLF)
1509 001730 042 227 040 SHLD FIRST ; FIX CURRENT CMD LINE PNTR
1510 001733 311 RET ; AND THATS ENOUGH FOR NOW
1511
1512 ; CODE FOR BUFFER OVER FLOW
1513
1514 001734 BFOVR: PLINE BV ; "BUFFER OVERFLOW
(1) 001734 337 RST 3 ; PRINT LINE OF CHARS
(1) 001735 010 037 .ADDR BV ; BUFF TO PRINT
1515 001737 052 350 040 NORDIS: LHLD NOREND ; GET THE CURRENT DISPATCH ADDRESS FOR NORMAL ENDS
1516 001742 351 PCHL ; AND GO
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 38
HCORE.M80 *COMMAND DECODER CONTINUED*
1518
1519 ; SUBROUTINE TO PRINT A SINGLE CHARACTER. CHARACTER TO BE PRINTED IS
1520 ; PASSED IN THE ACCUM. IF THE UART SHOULD FAIL AND NEVER REACH THE
1521 ; TRANSMITTER READY STATE, THE 8080 WILL HANG IN THIS LOOP FOREVER
1522 ; TRYING TO PRINT.
1523
1524 001743 365 PCHR: PUSH PSW ; SAVE CHARACTER ON THE STACK
1525 001744 072 120 040 LDA NOPNT ; GET NO PRINT FLAG
1526 001747 267 ORA A ; IS IT SET?
1527 001750 312 355 003 JZ PCHR0 ; IF NOT CONTINUE AS NORMAL
1528
1529 001753 361 POP PSW ; IF IT IS..NO PRINTING
1530 001754 311 RET ; SO RETURN
1531
1532 001755 072 247 040 PCHR0: LDA CSLMODE ; GET CURRENT KLINIK LINE MODE
1533 001760 376 020 CPI .MODE4 ; IS THIS APT MODE?
1534 001762 302 012 004 JNZ PCHR1 ; IF NO, PRINT
1535
1536 ; HERE IF DOING APT AND MUST MERELY STACK CHARS TO BE ENVELOPED AND SENT OUT
1537 ; A LITTLE LATER. THE CHARACTER TO BE STACKED IS SITTING ON THE TOP OF THE
1538 ; STACK.
1539
1540 001765 361 POP PSW ; NOW GET THE CHARACTER THAT WAS STACKED
1541 001766 345 PUSH H ; MUST SAVE H,L IN HERE
1542 001767 052 352 040 LHLD ENVPNT ; GET THE POINTER TO THE ENVELOPE
1543 001772 167 MOV M,A ; PUT CHARACTER INTO THE BUFFER
1544 001773 043 INX H ; UPDATE THE POINTER
1545 001774 066 000 MVI M,0 ; GUARANTEE LAST BYTE IS A ZERO
1546 001776 042 352 040 SHLD ENVPNT ; PUT IT BACK WHERE U GOT IT
1547 002001 341 POP H ; AND RESTORE REG
1548 002002 376 015 CPI CRCHR ; IF WE ARE BUFFERING A CR, MUST SET THE FLAG
1549 002004 300 RNZ ; IF NOT A CR, JUST LEAVE
1550 002005 062 252 040 STA MAILFG ; ELSE SET THE FLAG
1551 002010 311 RET ; AND OUT
1552
1553 002011 365 PCHR1Z: PUSH PSW ; CHAR ON STACK FOR A BIT
1554 002012 333 201 PCHR1: IN CTYCTL ; GET UART STATUS
1555 002014 346 001 ANI 01 ; CHECK BITS TO SEE IS XMITTER READY?
1556 002016 312 012 004 JZ PCHR1 ; JUMP BACK IF NOT READY YET
1557
1558 ; NOW,BEFORE PRINTING, SEE IF NEED TO TYPE TO KLINIK LINE TOO.
1559
1560 002021 072 247 040 LDA CSLMODE ; GET CURRENT KLINIK LINE MODE
1561 002024 376 010 CPI .MODE3 ; KLINIK IN PARALLEL MODE??
1562 002026 302 046 004 JNZ PCHROV ; IF NOT, JUST GO PRINT
1563
1564 ; FALL THROUGH IF NEED KLINIK TOO
1565
1566 002031 333 203 PCHR2: IN REMCTL ; GET KLINIK UART STATUS
1567 002033 346 001 ANI 01 ; CHECK THE READY BIT
1568 002035 312 031 004 JZ PCHR2 ; IF NOT READY, GO BACK AND TRY AGAIN
1569 002040 361 POP PSW ; GET CHAR OFF STACK WHEN THINGS ARE READY
1570 002041 323 202 OUT REMDAT ; PRINT CHAR ON THE KLINIK LINE
1571 002043 323 200 OUT CTYDAT ; PRINT ON CTY
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 38-1
HCORE.M80 *COMMAND DECODER CONTINUED*
1572 002045 311 RET ; AND BACK TO CALLER
1573
1574 002046 361 PCHROV: POP PSW ; FINALLY READY..GET CHAR FROM STACK
1575 002047 323 200 OUT CTYDAT ; SEND CHARACTER
1576 002051 311 RET ; AND RETURN
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 39
HCORE.M80 *COMMAND DECODER CONTINUED*
1578
1579 ; SUBROUTINE KCHR. FOR PRINTING A SINGLE CHARACTER ON THE KLINIK LINE
1580 ; ONLY. PARTICULARLY USEFUL FOR THE "?NA" AND "PW:" MESSAGES. CHARACTER
1581 ; TO BE PRINTED CAN BE A TRAILING ARG, OR YOU CAN CALL THIS ROUTINE IN
1582 ; THE MIDDLE AND PASS THE CHAR TO BE PRINTED IN THE ACCUM.
1583
1584 002052 343 KCHR: XTHL ; SWAP STACK TOP WITH H,L
1585 002053 176 MOV A,M ; GET THE TRAILING ARG FROM PROM
1586 002054 043 INX H ; UPDATE RETURN ADDRESS PAST THE TRAILING ARG
1587 002055 343 XTHL ; PUT THE RETURN BACK ON THE STACK
1588 002056 365 KCHR0: PUSH PSW ; SAVE THE CHARACTER JUST FOR A LITTLE BIT
1589 002057 333 203 KCHR1: IN REMCTL ; GET KLINIK UART STATUS
1590 002061 346 001 ANI 01 ; SEE IF UART IS READY
1591 002063 312 057 004 JZ KCHR1 ; LOOP TILL IT IS
1592
1593 002066 361 POP PSW ; READY NOW, GET THE CHAR OFF THE STACK
1594 002067 323 202 OUT REMDAT ; SEND TO UART
1595 002071 311 RET ; AND BACK TO CALLER
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 40
HCORE.M80 *COMMAND DECODER CONTINUED*
1597
1598 ; SUBROUTINE KLINE. FOR PRINTING A LINE OF CHARACTERS. A TRAILING ARG
1599 ; POINTING TO THE STRING TO BE PRINTED IS USED. ("/" FOR CRLF NOT USED).
1600
1601 002072 343 KLINE: XTHL ; SWAP STACK, GET POINTER TO TRAILING ARG TO H,L
1602 002073 315 044 033 CALL TARG1 ; GET POINTER TO ARG INTO D,E
1603 002076 343 XTHL ; FIX RETURN ADDRESS
1604
1605 002077 032 KLINE1: LDAX D ; GET FIRST CHAR INTO ACCUM
1606 002100 023 INX D ; UPDATE THE CHARACTER POINTER
1607
1608 002101 247 ANA A ; WELL THEN, SEE IF CHAR IS 0, MEANING END OF STRING
1609 002102 310 RZ ; OUT IF YES
1610
1611 ; WELL THEN , MIGHT AS WELL GO PRINT THE THING
1612
1613 002103 315 056 004 CALL KCHR0 ; GO PRINT THE CHARACTER
1614 002106 303 077 004 JMP KLINE1 ; AND WHEN RETURN, GO FETCH UP THE NEXT CHAR
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 41
HCORE.M80 *COMMAND DECODER CONTINUED*
1616
1617 ; SUBROUTINE TO PRINT A LINE OF CHARACTERS. POINTER TO THE LINE OF
1618 ; CHARACTERS TO BE PRINTED IS PASSED IN "H,L" REGISTER. NO REGISTERS
1619 ; ARE DESTROYED BY THIS ROUTINE. THE END-OF-MESSAGE FOR THE LINE OF
1620 ; CHARACTERS TO BE PRINTED IS INDICATED BY A "00" BYTE AT THE END OF
1621 ; THE MESSAGE TEXT.
1622
1623 002111 343 PLNE: XTHL ; REPLACE RETURN..PUT ON STACK
1624 002112 353 XCHG ; TRAILING ARG FROM "D,E" TO "H,L"
1625
1626 002113 176 PLN1: MOV A,M ; GET CHARACTER FROM MEM.
1627 002114 043 INX H ; INCREMENT TO NEXT CHARACTER TO BE PRINTED
1628
1629 002115 376 134 CPI BSLASH ; IS THIS A BACK SLASH(I.E. IN-LINE CRLF)
1630 002117 312 127 004 JZ PLN2 ; JUMP IF YES...
1631
1632 002122 267 ORA A ; IS IT A "00" BYTE?
1633 002123 310 RZ ; RETURN IF DONE
1634
1635 ; FALL HERE IF GOTTA REAL CHAR..
1636
1637 002124 315 343 003 CALL PCHR ; GO PRINT CHAR IN ACCUM
1638 002127 314 136 004 PLN2: CZ CRLFIN ; GET HERE ON ZERO FLAG,ONLY IF NEED CRLF
1639 002132 303 113 004 JMP PLN1 ; CONTINUE LOOP
1640
1641 ; SUBROUTINE TO PRINT A CARRIAGE RETURN-LINE FEED. NO REGISTERS
1642 ; DESTROYED..JUST CALL TO GET YOUR <CR><LF> PRINTED
1643
1644 002135 341 .CRLF: POP H ; MUST FIX THE STACK
1645 002136 CRLFIN: PCHAR CRCHR ; PRINT CARRIAGE RETURN
(1) 002136 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 002137 015 .BYTE CRCHR ; CHAR TO PRINT
1646 002140 PCHAR LFCHR ; PRINT LINE FEED
(1) 002140 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 002141 012 .BYTE LFCHR ; CHAR TO PRINT
1647 002142 311 RET ; RETURN
1648
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 42
HCORE.M80 *COMMAND DISPATCH LIST*
1650 .SBTTL *COMMAND DISPATCH LIST*
1651
1652 ; THIS LIST CONTAINS ALL CHARACTER PAIRS WHICH ARE CONSIDERED
1653 ; LEGITIMATE COMMANDS TO THE KS10 CONSOLE.
1654
1655 002143 CMDLST:
1656 002143 122 120 .BYTE 'R,'P ; *REPEAT IN FAST LOOP*
1657 002145 124 020 .ADDR RPCMD
1658 002147 104 116 .BYTE 'D,'N ; *DEPOSIT NEXT*
1659 002151 246 212 .ADDR BIT15!DNCMD
1660 002153 104 103 .BYTE 'D,'C ; *DEPOSIT CRAM*
1661 002155 047 216 .ADDR BIT15!DCCMD
1662 002157 104 115 .BYTE 'D,'M ; *DEPOSIT MEMORY*
1663 002161 147 212 .ADDR BIT15!DMCMD
1664 002163 114 103 .BYTE 'L,'C ; *LOAD CRAM ADDRESS*
1665 002165 254 213 .ADDR BIT15!LCCMD
1666
1667 002167 114 101 .BYTE 'L,'A ; *LOAD MEMORY ADDRESS*
1668 002171 043 213 .ADDR BIT15!LACMD
1669 002173 104 111 .BYTE 'D,'I ; *DEPOSIT I/O*
1670 002175 335 212 .ADDR BIT15!DICMD
1671 002177 114 111 .BYTE 'L,'I ; *LOAD I/O ADDRESS*
1672 002201 050 213 .ADDR BIT15!LICMD
1673 002203 104 102 .BYTE 'D,'B ; *DEPOSIT BUS*
1674 002205 163 011 .ADDR DBCMD
1675 002207 104 113 .BYTE 'D,'K ; *DEPOSIT KONSOLE*
1676 002211 071 213 .ADDR BIT15!DKCMD
1677
1678 002213 114 113 .BYTE 'L,'K ; *LOAD ADR FOR KONSOLE*
1679 002215 055 213 .ADDR BIT15!LKCMD
1680 002217 105 113 .BYTE 'E,'K ; *EXAMINE KONSOLE*
1681 002221 376 012 .ADDR EKCMD
1682 002223 114 106 .BYTE 'L,'F ; LOAD DIAG FUNCTION
1683 002225 211 214 .ADDR BIT15!LFCMD
1684 002227 104 106 .BYTE 'D,'F ; DEPOSIT INTO DIAG FUNCTION
1685 002231 220 214 .ADDR BIT15!DFCMD
1686 002233 115 113 .BYTE 'M,'K ; *MARK MICRO-CODE*
1687 002235 376 217 .ADDR BIT15!MKCMD
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 43
HCORE.M80 *COMMAND DISPATCH LIST*
1689
1690 002237 125 115 .BYTE 'U,'M ; *UNMARK MICRO-CODE*
1691 002241 371 217 .ADDR BIT15!UMCMD
1692 002243 120 105 .BYTE 'P,'E ; *PARITY ENABLE*
1693 002245 340 016 .ADDR PECMD
1694 002247 103 105 .BYTE 'C,'E ; *CACHE ENABLE*
1695 002251 261 013 .ADDR CECMD
1696 002253 124 105 .BYTE 'T,'E ; *1 MSEC CLOCK ENABLE*
1697 002255 335 013 .ADDR TECMD
1698 002257 124 120 .BYTE 'T,'P ; *TRAP ENABLE*
1699 002261 027 014 .ADDR TPCMD
1700
1701 002263 123 124 .BYTE 'S,'T ; *START*
1702 002265 057 217 .ADDR BIT15!STCMD
1703 002267 110 101 .BYTE 'H,'A ; *HALT*
1704 002271 173 017 .ADDR HACMD
1705 002273 103 117 .BYTE 'C,'O ; *CONTINUE*
1706 002275 142 017 .ADDR COCMD
1707 002277 123 111 .BYTE 'S,'I ; *SINGLE INSTRUCT*
1708 002301 142 014 .ADDR SICMD
1709 002303 123 115 .BYTE 'S,'M ; *START MICRO-CODE*
1710 002305 150 016 .ADDR SMCMD
1711
1712 002307 115 122 .BYTE 'M,'R ; *MASTER RESET*
1713 002311 164 005 .ADDR MRCMD
1714 002313 103 123 .BYTE 'C,'S ; *START CPU CLOCK*
1715 002315 163 014 .ADDR CSCMD
1716 002317 103 110 .BYTE 'C,'H ; *HALT CPU CLOCK*
1717 002321 176 014 .ADDR CHCMD
1718 002323 103 120 .BYTE 'C,'P ; *PULSE CPU CLOCK*
1719 002325 107 013 .ADDR CPCMD
1720 002327 105 116 .BYTE 'E,'N ; *EXAMINE NEXT*
1721 002331 116 012 .ADDR ENCMD
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 44
HCORE.M80 *COMMAND DISPATCH LIST*
1723
1724 002333 105 115 .BYTE 'E,'M ; *EXAMINE MEMORY*
1725 002335 347 011 .ADDR EMCMD
1726 002337 105 111 .BYTE 'E,'I ; *EXAMINE I/O*
1727 002341 272 012 .ADDR EICMD
1728 002343 105 103 .BYTE 'E,'C ; *EXAMINE CRAM*
1729 002345 227 015 .ADDR ECCMD
1730 002347 105 102 .BYTE 'E,'B ; *EXAMINE BUS*
1731 002351 036 011 .ADDR EBCMD
1732 002353 105 112 .BYTE 'E,'J ; *EXAMINE CURRENT CRAM INFO*
1733 002355 052 015 .ADDR EJCMD
1734
1735 002357 124 122 .BYTE 'T,'R ; *TRACE*
1736 002361 141 015 .ADDR TRCMD
1737 002363 122 103 .BYTE 'R,'C ; *FUNCTION READ CRAM CONTROL REG*
1738 002365 366 014 .ADDR RCCMD
1739 002367 132 115 .BYTE 'Z,'M ; *ZERO KS10 MOS MEMORY*
1740 002371 050 020 .ADDR ZMCMD
1741 002373 120 115 .BYTE 'P,'M ; *PULSE MICRO-CODE..*
1742 002375 216 015 .ADDR PMCMD
1743 002377 102 124 .BYTE 'B,'T ; *BOOT SYS*
1744 002401 230 021 .ADDR BTCMD
1745
1746 002403 102 103 .BYTE 'B,'C ; *BOOT CHECK*
1747 002405 344 025 .ADDR BCCMD
1748 002407 114 102 .BYTE 'L,'B ; *LOAD BOOT*
1749 002411 260 021 .ADDR LBCMD
1750 002413 105 130 .BYTE 'E,'X ; *EXECUTE*
1751 002415 006 217 .ADDR BIT15!EXCMD
1752 002417 114 124 .BYTE 'L,'T ; *LAMP TEST*
1753 002421 057 014 .ADDR LTCMD
1754 002423 113 114 .BYTE 'K,'L ; *KLINIK*
1755 002425 231 017 .ADDR KLCMD
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 45
HCORE.M80 *COMMAND DISPATCH LIST*
1757
1758 002427 105 122 .BYTE 'E,'R ; *EXAMINE REGISTER*
1759 002431 140 013 .ADDR ERCMD
1760 002433 114 122 .BYTE 'L,'R ; *LOAD REGISTER*
1761 002435 223 013 .ADDR LRCMD
1762 002437 104 122 .BYTE 'D,'R ; *DEPOSIT REGISTER*
1763 002441 233 013 .ADDR DRCMD
1764 002443 115 124 .BYTE 'M,'T ; *MAGTAPE BOOT*
1765 002445 357 021 .ADDR MTCMD
1766 002447 104 123 .BYTE 'D,'S ; *DISK SELECT*
1767 002451 310 020 .ADDR DSCMD
1768 002453 115 123 .BYTE 'M,'S ; *MAGTAPE SELECT*
1769 002455 366 020 .ADDR MSCMD
1770 002457 123 110 .BYTE 'S,'H ; *SHUTDOWN*
1771 002461 201 017 .ADDR SHCMD
1772 002463 115 102 .BYTE 'M,'B ; *MAGTAPE BOOTSTRAP*
1773 002465 173 022 .ADDR MBCMD
1774 002467 120 127 .BYTE 'P,'W ; *PASSWORD*
1775 002471 317 017 .ADDR PWCMD
1776 002473 124 124 .BYTE 'T,'T ; *KLINIK LINE TO TTY*
1777 002475 273 017 .ADDR TTCMD
1778 002477 126 124 .BYTE 'V,'T ; *VERIFY AGAINST TAPE*
1779 002501 000 024 .ADDR VTCMD
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 46
HCORE.M80 *COMMAND DISPATCH LIST*
1781
1782 002503 126 104 .BYTE 'V,'D ; *VERIFY AGAINST DISK*
1783 002505 365 023 .ADDR VDCMD
1784 002507 130 061 .BYTE 'X,'1 ; DUMMY
1785 002511 054 040 .ADDR RAMX1
1786 002513 106 111 .BYTE 'F,'I ; *FILE*
1787 002515 267 223 .ADDR BIT15!FICMD
1788 002517 102 062 .BYTE 'B,'2 ; **TEMP BOOTCHECK 2**
1789 002521 355 023 .ADDR B2CMD
1790 002523 115 115 .BYTE 'M,'M ; MANUFACTURING MODE
1791 002525 116 014 .ADDR MMCMD
1792 002527 123 103 .BYTE 'S,'C ; SOFT CRAM ERROR RECOVERY "ON/OFF" SWITCH
1793 002531 371 013 .ADDR SCCMD
1794 002533 000 .BYTE 0 ; END LIST MARKER
1795
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 47
HCORE.M80 *CHECKSUMS AS COMPUTED BY SPECIAL 10-BASED PROGRAM*
1797 .SBTTL *CHECKSUMS AS COMPUTED BY SPECIAL 10-BASED PROGRAM*
1798
1799 001 .IF DF,PASS1
1800
1801 CHECKS: .ADDR 0 ; PSUEDO BYTES FOR RAM NUMBER 1
1802 .ADDR 0 ; PSUEDO BYTES FOR RAM NUMBER 2
1803 .ADDR 0 ; PSUEDO BYTES FOR RAM NUMBER 3
1804 .ADDR 0 ; PSUEDO BYTES FOR RAM NUMBER 4
1805 000 .ENDC
1806
1807
1808 001 .IF DF,PASS2
1809 002534 317 224 CHECKS: .ADDR CHKSM0 ; CHECKSUM FOR RAM NUMBER 1
1810 002536 017 303 .ADDR CHKSM1 ; CHECKSUM FOR RAM NUMBER 2
1811 002540 163 343 .ADDR CHKSM2 ; CHECKSUM FOR RAM NUMBER 3
1812 002542 015 004 .ADDR CHKSM3 ; CHECKSUM FOR RAM NUMBER 4
1813 000 .ENDC
1814
1815 .TITLE VER 5.2 KS10 CONSOLE PROGRAM
1816
1817 002544 134 113 123 INIMS: .ASCIZ /\KS10 CSL.V5.2\/ ; POWER UP MESSAGE AND IDENTIFIER
1818
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 48
HCORE.M80 *** "MR" CMD ***
1820 .SBTTL *** "MR" CMD ***
1821
1822 ; THIS CODE PERFORMS THE "MASTER RESET" CONSOLE FUNCTION.
1823
1824 002564 MRCMD:
1825 002564 257 XRA A ; SET ACCUM=0
1826 002565 323 212 OUT CPUCTL ; SET 0'S TO "RUN,EXECUTE,CONT"
1827 002567 315 176 014 CALL CHCMD ; AND INSURE CPU HAS STOPPED...
1828
1829 ; ISSUE SM10 BUS RESET
1830
1831 002572 076 005 MRINT: MVI A,5 ; BITS FOR "DP RESET", & "CRAM RESET"
1832 002574 323 204 OUT CRMCTL ; ***** I/O WRT 204/5 *****
1833
1834 002576 076 200 MVI A,^B10000000 ; BIT 7 FOR RESET
1835 002600 323 100 OUT RESET ; ISSUE RESET, SET CONSOLE MODE
1836
1837 002602 315 325 016 CALL SMFINI ; GET CURRENT PARITY SETTINGS & SET IN KS
1838
1839 002605 072 355 040 LDA TRAPEN ; BIT FOR "CLR TEN INT" SHOULD BE LOW
1840 002610 323 205 OUT DIAG ; ***** I/O WRT 205/XX *****
1841
1842 002612 006 000 MVI B,0 ; WILL SET NO BITS IN THE STATE WORD
1843 002614 315 312 032 CALL STATEM ; SET THE STATE
1844 002617 012 .BYTE ^O12 ; OFF THE STUFF WE DON'T WANT
1845 002620 ENDCMD ; AND OUT
(1) 002620 311 RET ; RETURN TO CALLER
1846
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 49
HCORE.M80 *INTERRUPT HANDLER*
1848 .SBTTL *INTERRUPT HANDLER*
1849
1850 ; HERE ON INTERRRUPTS..REGS ALREADY SAVED AT "RST" BLOCK
1851
1852 002621 041 145 006 INTRP: LXI H,ENDIN ; PUSH OUR FAVORITE EXIT ADDRESS ON THE STACK
1853 002624 345 PUSH H ; AND WE CAN DO "RET"'S TO LEAVE ROUTINE
1854 002625 333 201 IN CTYCTL ; GET CTY TTY STATUS
1855 002627 107 MOV B,A ; SAVE IT IN THE "B" REG FOR A COUPLE INSTRS
1856 002630 333 203 IN REMCTL ; NOW FETCH UP THE REMOTE STATUS
1857 002632 260 ORA B ; AND THROW BOTH STATUS'S TOGETHER
1858 002633 346 070 ANI ^O70 ; ANY ERR BITS SET?
1859 002635 302 024 010 JNZ TTERR ; GO TELL ERR IF YES
1860
1861 ; FALL THROUGH IF NO ONE IN ERROR. NOW SEE WHO THE CHARACTER IS FROM
1862
1863 002640 170 MOV A,B ; COPY CTY STATUS INTO ACCUM
1864 002641 346 002 ANI 2 ; IS A CHARACTER IN THE CTY UART??
1865 002643 302 274 005 JNZ INTCH ; JUMP IF YES. FIND CHARACTER IN CTY UART.
1866
1867 ; FALL HERE IF IT WAS A KLINIK CHAR
1868
1869 002646 333 202 IN REMDAT ; FETCH OUT THE CHARACTER
1870 002650 346 177 ANI ^O177 ; OFF THE PARITY BIT
1871 002652 107 MOV B,A ; MAKE SECOND COPY OF CHARACTER IN "B"
1872
1873 002653 376 031 CPI CNTLY ; BEFORE DISPATCHING, IS THIS "CONTROL-Y"?
1874 002655 302 270 005 JNZ KL.DSP ; IF NOT, DO EVERYTHING AS PER NORMAL
1875
1876 ; AHA. IT WAS A CONTROL-Y..NOW SEE IF IN MM MODE
1877
1878 002660 072 251 040 LDA MMFLG ; GET FLAG
1879 002663 247 ANA A ; SET 8080 CONDITION CODES
1880 002664 302 151 032 JNZ MMERR1 ; IF YES, MM MODE, THEN ABORT WHATEVER YOU ARE DOING
1881 002667 170 MOV A,B ; NOW REPLACE THE CHAR WE JUST BOMBED
1882
1883 ; ELSE FALL THROUGH
1884
1885 002670 052 346 040 KL.DSP: LHLD MODDIS ; GET CURRENT KLINIK MODE DISPATCH
1886 002673 351 PCHL ; DISPATCH TO DO THE RIGHT THING
1887
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 50
HCORE.M80 *INTERRUPT HANDLER*
1889
1890 ; CHECK IF WE ARE IN USER MODE
1891
1892 002674 333 200 INTCH: IN CTYDAT ; INPUT CHARACTER
1893 002676 346 177 ANI ^O177 ; STRIP BIT 8
1894 002700 107 MOV B,A ; SAVE CHAR FOR 2 INSTRUCTIONS
1895
1896 ; SEE IF THIS IS MANUFACTURING MODE BEFORE WE CONTINUE
1897
1898 002701 072 247 040 LDA CSLMODE ; GRAB CURRENT CSL MODE
1899 002704 346 020 ANI .MODE4 ; AND SEE IF ITS MODE 4
1900 002706 312 332 005 JZ CMNBUF ; IF NO, CTY INPUT NORMAL
1901
1902 ; PLACE YOU GO IF MANUFACTURING MODE.. CTY CHARS ARE JUST SENT TO KLINIK
1903
1904 002711 170 MOV A,B ; GRAB CHARACTER TO BE SENT TO KLINIK
1905 002712 315 056 004 CALL KCHR0 ; ONLY ECHO CTY STUFF AGAINST THE KLINIK LINE
1906
1907 ; NOW SEE IF THAT WAS A MODE CHANGE CHAR WE JUST SENT DOWN THE LINE
1908
1909 002715 376 031 CPI CNTLY ; IS IT "CONTROL-Y"
1910 002717 300 RNZ ; IF WAS NOT, SIMPLY GET OUT
1911
1912 002720 CLRB KLNKSW ; FORCE RE-EXAMINE OF THINGS
1913 002722 CLRB MMFLG ; TURN OFF MANUFACTURING MODE
1914 002724 315 070 034 CALL SETM2 ; FORCE KLINIK LINE IMMEDIATELY INTO MODE 2
1915 002727 303 200 001 JMP REINI
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 51
HCORE.M80 *INTERRUPT HANDLER*
1917
1918 ; ALSO STANDARD COMMON ENTRY POINT WHEN KLINIK LINE PARALLELS THE CTY
1919
1920 002732 MODE3:
1921 002732 072 156 040 CMNBUF: LDA USRMD ; GET USER MODE FLAG
1922 002735 247 ANA A ; IS IT SET?
1923 002736 170 MOV A,B ; COPY CHAR INTO ACCUM (FOR KLINIK OR CTY)
1924 002737 302 236 006 JNZ USER ; JUMP IF IN USER MODE...
1925
1926 ; FALL THRU TO HERE IF NOT USER MODE AND WE NEED DO SOMETHING WITH CHAR
1927
1928 002742 376 017 CPI CNTLO ; CONTROL-O?
1929 002744 302 364 005 JNZ SKP2 ; JMP IF NO
1930
1931 ; ELSE FALL INTO CONTROL-O CODE..STOP THE PRINTER
1932
1933 002747 PCHAR UPARR
(1) 002747 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 002750 136 .BYTE UPARR ; CHAR TO PRINT
1934 002751 PCHAR OCHR
(1) 002751 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 002752 117 .BYTE OCHR ; CHAR TO PRINT
1935 002753 072 120 040 LDA NOPNT ; GET CURRENT STATE OF "NO PRINT"
1936 002756 306 200 ADI ^O200 ; ZAP PRINT FLAG
1937 002760 062 120 040 STA NOPNT ; PUT IT BACK
1938 002763 257 XRA A ; ZAP CHAR SO WE CAN EARLY EXIT
1939
1940 002764 376 023 SKP2: CPI CNTLS ; IS IT CONTROL-S
1941 002766 314 076 007 CZ CNTS ; CALL IF YES
1942
1943 002771 376 021 CPI CNTLQ ; IS IT CONTROL-Q
1944 002773 302 001 006 JNZ SKP6 ; JMP IF NO
1945
1946 ; FALL TO HERE IF YES, ZAPP CNTL-Q FLAG
1947
1948 002776 CLRB STPPD ; ZAP!!
1949 003000 257 XRA A ; CLEAR ACCUM
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 52
HCORE.M80 *INTERRUPT HANDLER*
1951
1952 003001 062 157 040 SKP6: STA RPEND ; ANY OTHER CHARS MEAN END REPEAT LOOP
1953 003004 376 032 CPI CNTLZ ; CONTROL-Z?
1954 003006 312 324 006 JZ CNTZ ; JMP IF YES
1955
1956 003011 376 025 CPI CNTLU ; CONTROL-U?
1957 003013 302 030 006 JNZ SKP8 ; JMP IF NO
1958
1959 ; FALL TO HERE TO DO THE CONTROL-U CODE
1960
1961 003016 PCHAR UPARR
(1) 003016 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 003017 136 .BYTE UPARR ; CHAR TO PRINT
1962 003020 PCHAR UCHR
(1) 003020 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 003021 125 .BYTE UCHR ; CHAR TO PRINT
1963 003022 PCRLF ; AND A CR-LF TO GIVE CLEAN LINE
(2) 003022 347 RST 4
(2) 003023 002 .BYTE 2
1964 003024 315 115 010 CALL BFRST ; CLEAR INPUT BUFFER
1965 003027 257 XRA A ; AND SET ACCUM FOR EARLY OUT
1966
1967 003030 376 003 SKP8: CPI CNTLC ; CONTROL-C?
1968 003032 312 103 010 JZ CNTC ; JMP IF YES
1969
1970 003035 376 000 CPI Q.OUT ; SEE IF MUST TAKE A QUICK OUT
1971 003037 310 RZ ; LEAVE IF YES
1972
1973 003040 376 054 CPI COMMA ; IS IT A COMMA?
1974 003042 302 051 006 JNZ M11 ; IF NOT COMMA, AVOID NEXT COUPLE INSTRUCTIONS
1975
1976 ; FALL TO HERE IF WAS A COMMA
1977
1978 003045 041 225 040 LXI H,CMCNT ; POINT TO THE COMMA COUNTER
1979 003050 064 INR M ; UPDATE.. AND CONTINUE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 53
HCORE.M80 *INTERRUPT HANDLER*
1981
1982 ; NOT SPECIAL CHAR..PROCESS NORMAL
1983
1984 003051 376 034 M11: CPI CNBCK ; CONTROL BACKSLASH SHOULD LOOK LIKE CRLF
1985 003053 314 164 006 CZ EOMRK ; CALL IF YES
1986
1987 003056 376 015 CPI CRCHR ; CARRIAGE RET?
1988 003060 314 164 006 CZ EOMRK ; CALL IF YES
1989
1990 003063 376 012 CPI LFCHR ; LINE FEED?
1991 003065 314 164 006 CZ EOMRK ; CALL IF YES
1992
1993 003070 052 215 040 LHLD BUF. ; POINTER TO FIRST FREE BUFFER PLACE
1994 003073 376 177 CPI RBOUT ; RUB-OUT CHAR?
1995 003075 312 203 006 JZ RUB ; JMP IF YES
1996
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 54
HCORE.M80 *INTERRUPT HANDLER*
1998
1999 ; OTHERWISE ITS A REGULAR CHAR..
2000 ; THIS IS DUMB CODE - FOR FIRST GO AROUND TYPE-AHEAD WON'T WORK.
2001
2002 003100 315 153 006 CALL UP.LO ; CONVERT SO PGM INTERNAL ONLY SEES UPPER CASE
2003
2004 003103 167 MOV M,A ; CHAR INTO BUFFER SPACE
2005 003104 043 INX H ; UPDATE PNTR
2006 003105 042 215 040 SHLD BUF. ; AND REPLACE PNTR
2007
2008 003110 107 MOV B,A ; SAVE THE CHAR JUST TYPED
2009 003111 326 040 SUI ^O40 ; CHECK IF ITS A PRINTING CHAR
2010 003113 372 130 006 JM NOECH ; IF IT IS NONE-PNT..GO NO ECHO
2011
2012 003116 170 MOV A,B ; GET CHAR BACK
2013 003117 326 176 SUI ^O176 ; IS IT TOO HI TO BE PRINTING CHAR?
2014 003121 362 130 006 JP NOECH ; IF YES, GO NO ECHO
2015
2016 003124 170 MOV A,B ; GET CHAR BACK AGAIN
2017 003125 315 343 003 CALL PCHR ; NOW GO ECHO IT.....
2018
2019 003130 072 161 040 NOECH: LDA BFCNT ; GET CHAR COUNT
2020 003133 074 INR A ; BUMP UP
2021 003134 376 120 CPI 80. ; TOO MANY?
2022 003136 312 334 003 JZ BFOVR ; JMP BUFFER OVERFLOW IF YES
2023 003141 062 161 040 STA BFCNT ; REPLACE COUNT
2024 003144 341 POP H ; CLEAR STACK OF THE PSEUDO RETURN FIRST
2025
2026 ; FALL INTO END INTERRRUPT CODE IF CHAR COUNT OK
2027
2028 003145 341 ENDIN: POP H ; RESTORE REGS
2029 003146 321 POP D
2030 003147 301 POP B
2031 003150 361 POP PSW
2032 003151 373 EI ; INTERRUPTS BACK ON
2033 003152 311 RET ; AND OUT
2034
2035 ; AND ACCEPT LOWER CASE AS REQUESTED
2036
2037 003153 376 141 UP.LO: CPI ^O141 ; LOW CASE "A" OR BETTER?
2038 003155 370 RM ; IF MINUS, NOT LOW CASE, CONTINUE
2039 003156 376 173 CPI ^O173 ; LOW CASE "Z" OR WORSE?
2040 003160 360 RP ; IF POS, OR ZERO, ITS NOT LOW CASE RANGE
2041
2042 ; FALL INTO HERE IF IT WAS LOWER CASE....
2043
2044 003161 326 040 SUI ^O40 ; MAKE IT UPPER FOR ALL
2045 003163 311 RET ; AND OUT
2046
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 55
HCORE.M80 *INTERRUPT HANDLER*
2048
2049 ; CODE FOR END-OF-LINE CHAR TYPED IN
2050
2051 003164 EOMRK: PCRLF ; GIVE CR-LF
(2) 003164 347 RST 4
(2) 003165 002 .BYTE 2
2052
2053 003166 072 225 040 LDA CMCNT ; GET COUNT OF COMMAS
2054 003171 074 INR A ; UP BY ONE, FOR THE CR-LF
2055 003172 062 204 040 STA EOL ; AND SET EOL MARKER
2056 003175 257 XRA A ; CLEAR ACCUM
2057 003176 062 225 040 STA CMCNT ; SET LOCATION
2058 003201 057 CMA ; SET ACCUM = -1
2059 003202 311 RET ; RETURN
2060
2061 ; CODE FOR A RUB-OUT
2062
2063 003203 072 161 040 RUB: LDA BFCNT ; GET CURRENT CHAR COUNT
2064 003206 247 ANA A ; IS IT 0?
2065 003207 310 RZ ; GOOD, NOTHING TO DELETE
2066 003210 075 DCR A ; DECREMENT OTHERWISE
2067 003211 062 161 040 STA BFCNT ; AND PUT IT BACK
2068
2069 003214 053 DCX H ; AND BACK UP THE BUFFER PNTR
2070 003215 042 215 040 SHLD BUF. ; PUT IT BACK
2071 003220 PSLASH ; TYPE SLASH AS RUBOUT INDICATOR
(2) 003220 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 003221 057 .BYTE SLASH ; CHAR TO PRINT
2072 003222 176 MOV A,M ; GET CURRENT CHAR IN BUFFER
2073 003223 315 343 003 CALL PCHR ; ECHO WHAT WAS RUBBED OUT
2074 003226 376 054 CPI COMMA ; OH WAIT, WAS THAT A COMMA?
2075 003230 300 RNZ ; JMP IF NO, TAKE A NORMAL OUT
2076
2077 ; FALL THRU IF WAS A COMMA
2078
2079 003231 041 225 040 LXI H,CMCNT ; GET COMMA COUNT
2080 003234 065 DCR M ; DECREMENT
2081 003235 311 RET ; AN EXIT THIS PLACE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 56
HCORE.M80 *INTERRUPT HANDLER*
2083
2084 ; HERE IF USER MODE FLAG IS SET..
2085
2086 003236 376 034 USER: CPI CNBCK ; IS IT "^\"?
2087 003240 302 115 007 JNZ TENCHR ; IF NOT, THEN ITS A CHAR FOR THE KS-10
2088
2089 ; BEFORE WE LEAVE USER MODE, WE MUST CHECK THE CONSOLE ENABLE SWITCH
2090
2091 003243 333 301 END.USR: IN BOOTSW ; ***** I/O RD 301 ***** IS CONSOLE LOCKED UP??
2092
2093 ; BIT 2 IS "LO" IF CONSOLE ENABLE IS TRUE. IF BIT 2 IS "HI", WE ARE DISABLED
2094 ; DUE TO THE HARDWARE INVERSION OF SIGNAL LEVELS.
2095
2096 003245 346 004 ANI ^O4 ; CHECK BIT 2
2097 003247 300 RNZ ; IF HI, WE ARE DISABLED AND WILL IGNORE
2098
2099 ; IF YES, USER MODE MUST BE CLEARED
2100
2101 003250 CLRB NOPNT ; CLR NO PRINT FLAG IN CASE WE WERE IN "INTERNAL MODE"
2102 003252 315 305 006 CALL CLRUSE ; EXIT FROM USER MODE
2103 003255 PLINE RDYMS ; "ENABLED"
(1) 003255 337 RST 3 ; PRINT LINE OF CHARS
(1) 003256 274 006 .ADDR RDYMS ; BUFF TO PRINT
2104 003260 041 200 001 LXI H,REINI ; SET UP AN EXIT ADDRESS
2105 003263 321 IOUT: POP D ; CLEAR THE PSEUDO RETURN TO "ENDIN" FROM STACK
2106 003264 321 POP D ; CLEAR ORIGINAL SAVED "H,L" OFF STACK
2107 003265 321 POP D
2108 003266 301 POP B
2109 003267 361 POP PSW
2110 003270 063 INX SP ; NOW GET OLD RETURN ADDR OFF STACK
2111 003271 063 INX SP
2112
2113 003272 373 EI ; ENABLE INTS..
2114 003273 351 PCHL ; AND GO TO PROMPT
2115 003274 105 116 101 RDYMS: .ASCIZ /ENABLED\/
2116
2117 003305 CLRUSE: CLRB USRMD ; AND CLEAR THE USER MODE FLAG
2118 003307 072 251 040 LDA MMFLG ; BEFORE DROPPING USER, SEE IF IN MM MODE
2119 003312 247 ANA A ; SET 8080 FLAGS
2120 003313 310 RZ ; IF NOT MM MODE, OK TO GET OUT
2121
2122 ; IF WAS SET, MUST DROP BACK TO MODE 4
2123
2124 003314 315 037 034 CALL SETM4
2125 003317 315 052 004 CALL KCHR ; NON-PRINTING CHAR, ALSO TELLS HOST TO SWITCH MODES
2126 003322 034 .BYTE CNBCK ; "CONTROL-BACKSLASH IS THE MAGIC CHAR"
2127 003323 311 RET ; JUST LEAVE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 57
HCORE.M80 *INTERRUPT HANDLER*
2129
2130 ; CONTROL-Z CODE...ENTER USER MODE
2131
2132 003324 315 354 006 CNTZ: CALL SETUSE ; SET THE USER MODE
2133 003327 315 115 010 CALL BFRST ; BUFFER RESET..RE-INIT TTY INPUT BUFFER
2134
2135 ;THIS LINE WAS REMOVE BECAUSE IN PROTECT MODE TYPING A CONTROL-Z WOULD
2136 ;CAUSE THE PW TO BE QUERIED AGAIN AND WOULD NOT ALLOW THE KLINIK LINE TO
2137 ;ENTER DUPLICATE CTY MODE (MODE 3).
2138 ;
2139 ;(5.2A) CLRB KLNKSW ; FORCE LIGHTS FIXING AFTER ENTER USER
2140
2141 003332 PLINE U ; PRINT "USER MODE"
(1) 003332 337 RST 3 ; PRINT LINE OF CHARS
(1) 003333 343 006 .ADDR U ; BUFF TO PRINT
2142 003335 041 260 001 LXI H,NULLJ ; LOAD "H,L" WITH A PLACE TO GO
2143 003340 303 263 006 JMP IOUT ; AND GET OUT
2144 003343 125 123 122 U: .ASCIZ /USR MOD\/
2145
2146
2147 003354 SETUSE:
2148
2149 ; HERE IS THE DEPOSIT WORD 31 CODE..
2150
2151 003354 WRD31: INTON ; DON'T PRINT THIS STUFF
(1) 003354 327 RST 2 ; GO SET INTERNAL MODE
2152 003355 EXAM 31 ; MUST SAVE CURRENT STATE OF KA & RELOAD BITS
(1) 003355 315 202 030 CALL EXAMSH ; AND DO EXAM ASSUMING SHORT ADDRESS
(1) 003360 031 000 .ADDR 31 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
2153 003362 INTOFF ; ITS OK NOW
(1) 003362 367 RST 6 ; GO EXIT FROM INTERNAL MODE
2154 003363 072 255 040 LDA GOCODE ; BYTE 28-35 GETS THE REASON FOR RELOAD
2155 003366 041 047 040 LXI H,DMDAT ; MAKE H,L POINT TO THE DESIRED BUFFER
2156 003371 167 MOV M,A ; SET THE GOCODE BITS INTO THE BYTE "DMDAT"
2157
2158 003372 072 355 040 LDA TRAPEN ; NOW GRAB THE TRAP BIT
2159 003375 007 RLC ; AND SHIFT TO APPROPRIATE POSITION (20 TO 40)
2160 003376 007 RLC ; (40 TO 100)
2161 003377 007 RLC ; (100 TO 200)
2162 003400 107 MOV B,A ; SAVE IT IN B FOR A WHILE
2163
2164 003401 072 251 040 LDA MMFLG ; GET "MAINTENANCE MODE" FLAG
2165 003404 247 ANA A ; SET 8080 FLAGS
2166 003405 365 PUSH PSW ; SAVE THE STATE OF THE FLAGS FOR LATER USE
2167 003406 312 013 007 JZ WRD.PR ; IF NO MM MODE, DON'T SET A BIT
2168
2169 ; WAS MM MODE, MUST SET THE BIT
2170
2171 003411 076 100 MVI A,^O100 ; A BIT FOR MM MODE
2172 003413 260 WRD.PR: ORA B ; THROW TOGETHER WITH THE TRAP BIT
2173 003414 043 INX H ; PUT INTO THE DEPOSIT BUFFER
2174 003415 043 INX H
2175 003416 167 MOV M,A ; THIS IS LOC "DMDAT+2"
2176
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 57-1
HCORE.M80 *INTERRUPT HANDLER*
2177 003417 072 354 040 LDA PARBT ; NOW FOR THE SELECTION OF PARITY BITS
2178 003422 017 RRC ; RIGHT ONCE TO FREE UP 200 WEIGHT
2179 003423 107 MOV B,A ; SAVE IN B REG
2180 003424 072 247 040 LDA CSLMODE ; GET CURRENT KLINIK MODE
2181 003427 346 014 ANI .MODE2!.MODE3 ; IF EITHER OF THESE MODES, MUST SET THE BIT
2182 003431 312 036 007 JZ WRD.DP ; JUMP IF NOT THOSE BITS
2183
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 58
HCORE.M80 *INTERRUPT HANDLER*
2185
2186 ; HERE IF ONE OF THOSE MODES WAS SET
2187
2188 003434 076 100 MVI A,^O100 ; A BIT TO SET
2189
2190 003436 260 WRD.DP: ORA B ; THROW THIS BIT WITH THE OTHERS
2191 003437 017 RRC ; FINAL JUSTIFICATION
2192 003440 107 MOV B,A ; NOW SAVE THIS GOOD STUFF IN "B"
2193 003441 072 015 040 LDA EMBUF+3 ; GET THE BYTE THAT HAS CURRENT "KA" BIT
2194 003444 346 300 ANI ^O300 ; OFF EVERYTHING ELSE
2195 003446 260 ORA B ; NOW THROW WHOLE MESS TOGETHER AGAIN
2196
2197 003447 043 INX H ; BUMP POINTER TO "DMDAT+3"
2198 003450 167 MOV M,A ; AND PUT DATA INTO RAM
2199 003451 DEPOS 31 ; PUT INTO MOS MEMORY AT LOC 31
(1) 003451 247 ANA A ; CLR "C-BIT" FOR USE BY COMMON CODE
(1) 003452 315 203 030 CALL DEPSHT ; AND DO THE DEPOSIT ASSUMING SHORT ADDR
(1) 003455 031 000 .ADDR 31 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
2200 003457 CLRB GOCODE ; CLEAR THE RELOAD CODE
2201
2202 003461 361 POP PSW ; THIS WORD HAS FLAGS SET FROM BEFORE WHEN WE TESTED "MM"
2203 003462 076 377 MVI A,-1 ; FLAGS WON'T CHANGE WHILE WE SET USER MODE FLAG
2204 003464 062 156 040 STA USRMD ; SET USER MODE... NOW DO S/G BASED ON THE FLAGS
2205 003467 310 RZ ; IF NOT SET, A SIMPLE OUT
2206
2207 ; HERE IF SET, WE MUST SEND AN "ACK" DOWN KLINIK LINE BEFORE ANYTHING ELSE
2208
2209 003470 315 174 035 CALL ACK ; "ACK" DOWN THE KLINIK
2210 003473 303 070 034 JMP SETM2 ; ALSO SET MODE 2 AND USE HIS "RET" TO RETURN
2211
2212 ; TYPED "CONTROL-S" TO STOP CONSOLE OUTPUT
2213
2214 003476 041 162 040 CNTS: LXI H,STPPD ; POINTER TO STOPPED FLAG
2215 003501 176 MOV A,M ; GET THE FLAG
2216 003502 057 CMA ; SET .EQ. 0 IF WAS ALREADY SET
2217 003503 247 ANA A ; NOW SET FLAGS, 'CAUSE CMA DOESN'T
2218 003504 310 RZ ; IF .EQ. 0 NOW, MERELY LEAVE..ALREADY SET
2219
2220 003505 167 MOV M,A ; AND SET THE FLAG .EQ. -1 IF HERE
2221 003506 373 EI ; LET THE CNTL-Q THRU
2222
2223 003507 176 CNTSL: MOV A,M ; GET FLAG STATUS
2224 003510 247 ANA A ; IS IT SET?
2225 003511 310 RZ ; IF NOT,THEN TIME TO QUIT
2226 003512 303 107 007 JMP CNTSL ; STAY IN LOOP IF FLAG STILL SET
2227
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 59
HCORE.M80 *8080 TO KS10 CHARACTER SERVICE*
2229 .SBTTL *8080 TO KS10 CHARACTER SERVICE*
2230
2231 003515 062 035 040 TENCHR: STA CHRBUF ; PUT CHARACTER IN A RAM BUFFER
2232 003520 076 032 MVI A,^O32 ; DESIRED ADDRESS FOR DEPOSTING CHARACTER
2233
2234 003522 323 103 OUT A2835 ; WRITE ONLY RELEVANT PIECE OF THE ADDRESS
2235 003524 257 XRA A ; THEN CLR ACCUM
2236 003525 323 105 OUT A2027 ; AND CLR REST OF THE HARDWARE ADDRESS REGISTER
2237 003527 323 107 OUT A1219
2238 003531 323 106 OUT W1219 ; CLEAR PIECES OF DEPOSIT DATA WHICH MUST BE ZERO
2239 003533 323 110 OUT W0411
2240 003535 323 112 OUT W0003
2241
2242 003537 076 002 MVI A,02 ; BIT TO SAY "WRITE FUNCTION"
2243 003541 323 113 OUT A0003 ; ***** I/O WRT 113 *****
2244
2245 ; THE FOLLOWING "ADD A" WORKS BY LUCK..I.E. 2+2=4
2246
2247 003543 207 ADD A ; BIT INTO ACCUM FOR "COM/ADR CYCLE"
2248 003544 323 115 OUT BUSARB ; ***** I/O WRT 115/4 *****
2249
2250 003546 072 035 040 LDA CHRBUF ; NOW GET THE CHARACTER WE WANT
2251 003551 323 102 OUT W2835 ; PUT IT IN THE HARDWARE REGISTER
2252 003553 076 001 MVI A,1 ; AND GET THE VALID BIT TO GO WITH CHARACTER
2253 003555 323 104 OUT W2027 ; PUT IT IN THE HARDWARE REGISTER
2254
2255 ; AND BY LUCK, THE ACCUM HAS JUST WHAT WE NEED FOR THE NEXT STEP
2256
2257 003557 323 114 OUT DTARB ; ***** I/O WRT 114/1 *****
2258
2259 003561 076 360 MVI A,^O360 ; BITS FOR "CHECK NXM","CONSOLE REQ","T ENB FOR
2260 ; COM/ADR", "T ENB FOR DATA CYCLE"
2261 003563 323 210 OUT BUSCTL ; *****I/O WRT 210/360 *****
2262
2263 ; DO THIS TWICE TO GUARANTEE THAT THE INTERRUPT HAPPENS
2264
2265 003565 076 001 MVI A,1 ; BIT FOR SETTING INTERRUPT TO THE KS10
2266 003567 323 116 OUT INT2KS ; SET THE INTERRUPT
2267 003571 323 116 OUT INT2KS ; SET THE INTERRUPT
2268
2269 003573 311 RET ; AND EXIT NORMALLY....
2270
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 60
HCORE.M80 *KS10 TO 8080 CHARACTER SERVICE*
2272 .SBTTL *KS10 TO 8080 CHARACTER SERVICE*
2273
2274 ; ENTER HERE WITH THE CHAR IN THE ACCUM. ROUTINE FOR HANDLING
2275 ; INTERRUPT CHARACTERS FROM A RUNNING KS10. ONLY CHARS FROM KS
2276 ; TO CTY IMPLEMENTED.
2277
2278 003574 CHRRDY: INTON ; SET UP INTERNAL MODE
(1) 003574 327 RST 2 ; GO SET INTERNAL MODE
2279 003575 363 DI ; COMMON CODE,NOT TO BE DISTURBED
2280
2281 ; DISABLE INTERRUPTS FOR THIS OPERATION
2282
2283 003576 072 355 040 LDA TRAPEN ; GET DEFAULT FOR THE TRAP ENABLE BITS
2284 003601 323 205 OUT DIAG ; *****I/O WRT/ TO CLR THE INTERRUPT*****
2285
2286 ; FALL TO HERE IF YES WE ARE IN KLINIK MODE 2. ITS POSSIBLE THAT THIS
2287 ; INTERRUPT IS FROM THE KLINIK COMM WORD, FOR THE KLINIK LINE.
2288
2289 003603 EXAM 35 ; EXAM THE KLINIK COMM WORD
(1) 003603 315 202 030 CALL EXAMSH ; AND DO EXAM ASSUMING SHORT ADDRESS
(1) 003606 035 000 .ADDR 35 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
2290 003610 INTOFF ; KEEP THIS FLAG IN STEP
(1) 003610 367 RST 6 ; GO EXIT FROM INTERNAL MODE
2291 003611 072 013 040 LDA EMBUF+1 ; GRAB CONTENTS OF THE BYTE WITH THE CONTROL KEY
2292 003614 247 ANA A ; SET 8080 FLAGS
2293 003615 312 273 007 JZ CTYONLY ; IF CONTROL KEY CLEAR, NOTHING FROM KLINIK, TRY CTY
2294
2295 003620 107 MOV B,A ; SAVE THE DATA IN THE ACCUM FOR A LITTLE WHILE
2296 003621 072 247 040 LDA CSLMODE ; GET CURRENT MODE. DECIDE IF HAVE TO DISCARD
2297 003624 346 013 ANI .MODE0!.MODE1!.MODE3 ; CHARS OR JUST ACT AS A NULL BIT BUCKET
2298 003626 302 265 007 JNZ NULKL ; JUMP TO A NULL ACTION IF ANY OF THESE 3 MODES
2299
2300 ; NOW HERE IF CONTROL KEY IS .NE. 0
2301
2302 003631 170 MOV A,B ; RETRIEVE DATA
2303 003632 376 001 CPI 1 ; IS IT THE KEY FOR A SIMPLE CHAR TO BE OUTPUT?
2304 003634 312 251 007 JZ KLPCHR ; IF YES, GO PROCESS THE CHARACTER
2305
2306 003637 376 002 CPI 2 ; IS IT FOR A HANGUP
2307 003641 302 022 010 JNZ NOACTN ; NOPE, IGNORE ENTIRELY
2308
2309 003644 315 121 034 CALL KILL.KLINIK ; (5.2A) YUP, HANG 'EM UP
2310 003647 373 EI ; IDENTICAL CODE TO LOCATION "NOACTN", BUT THE
2311 003650 311 RET ; 2 BYTES HERE ARE CHEAPER THAN A "JMP"
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 61
HCORE.M80 *KS10 TO 8080 CHARACTER SERVICE*
2313
2314 ; CODE FOR PRINTING THE DESIRED CHARACTER ON THE KLINIK LINE
2315
2316 003651 KLPCHR: TSTRDY REMCTL ; SEE IF THE LINE IS READY FOR THE NEXT CHAR
(1) 003651 333 203 IN REMCTL ; READ DESIRED UART STATUS
(1) 003653 346 001 ANI 01 ; CHECK IF SET? ZBIT=0/1 READY/NOT YET READY
2317 003655 312 251 007 JZ KLPCHR ; IF NOT READY YET, BETTER WAIT LONGER
2318
2319 ; HERE WHEN READY
2320
2321 003660 072 012 040 LDA EMBUF ; GET THE CHARACTER
2322 003663 323 202 OUT REMDAT ; PRINT IT
2323 003665 076 035 NULKL: MVI A,^O35 ; NOW MUST CLEAR WORD AND INTERRUPT TO SAY DONE
2324 003667 315 354 007 CALL TTOCOM ; (5.2A) GO COMMON CODE
2325 003672 363 DI ; KEEP INTERRUPTS OFF BECAUSE TTOCOM TURNED IT ON
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 62
HCORE.M80 *KS10 TO 8080 CHARACTER SERVICE*
2327
2328 003673 CTYONLY: INTON ; DON'T PRINT THIS CRUD
(1) 003673 327 RST 2 ; GO SET INTERNAL MODE
2329 003674 EXAM 33 ; GET THE COMMUNICATION WORD
(1) 003674 315 202 030 CALL EXAMSH ; AND DO EXAM ASSUMING SHORT ADDRESS
(1) 003677 033 000 .ADDR 33 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
2330 003701 INTOFF ; INTERNAL MODE OFF
(1) 003701 367 RST 6 ; GO EXIT FROM INTERNAL MODE
2331 003702 072 013 040 LDA EMBUF+1 ; GET THE INTERRUPT CODE
2332 003705 376 001 CPI 1 ; IS INTERRUPT CODE .EQ. 1?
2333 003707 302 022 010 JNZ NOACTN ; JUMP TO "NO ACTION" IF NOT, CODE OUT OF BOUNDS
2334
2335 003712 072 012 040 LDA EMBUF ; ACTUAL CHAR TO ACCUM
2336 003715 107 MOV B,A ; AND SAVE IT IN THE B REG
2337
2338 ; CODE TO PRINT A CHAR PASSED FROM THE KS-10 CPU. CODE INTERRUPTS
2339 ; THE 10 WHEN THE CHARACTER HAS FINISHED PRINTING
2340
2341 003716 CTYPCHR: TSTRDY CTYCTL ; CHECK IS THE XMITTER READY?
(1) 003716 333 201 IN CTYCTL ; READ DESIRED UART STATUS
(1) 003720 346 001 ANI 01 ; CHECK IF SET? ZBIT=0/1 READY/NOT YET READY
2342 003722 312 316 007 JZ CTYPCHR ; LOOP UNTIL IT IS
2343
2344 ; FALL THRU WHEN READY
2345 ; BUT BEFORE PRINTING, CHECK THE KLINIK LINE TO SEE IF IT GETS THE
2346 ; CHARACTER TOO.
2347 003725 072 247 040 LDA CSLMODE ; CHECK THE KLINIK MODE
2348 003730 376 010 CPI .MODE3 ; IS THE KLINIK PARALLEL TO THE CTY LINE?
2349 003732 302 347 007 JNZ CTYOUT ; JUMP IF NO. KLINIK DOES NOT GET THIS CHAR
2350
2351 ; FALL HERE IF YES, KLINIK LINE GETS A PIECE OF THIS CHARACTER TOO.
2352
2353 003735 KLTOO: TSTRDY REMCTL ; SEE IF KLINIK LINE IS READY
(1) 003735 333 203 IN REMCTL ; READ DESIRED UART STATUS
(1) 003737 346 001 ANI 01 ; CHECK IF SET? ZBIT=0/1 READY/NOT YET READY
2354 003741 312 335 007 JZ KLTOO ; IF NOT YET, GO BACK AND TRY AGAIN
2355
2356 003744 170 MOV A,B ; CHAR TO ACCUM
2357 003745 323 202 OUT REMDAT ; PRINT IT ON THE KLINIK LINE
2358
2359 003747 170 CTYOUT: MOV A,B ; GET THE CHAR WE SAVED IN THE B REG.
2360 003750 323 200 OUT CTYDAT ; SEND TO THE UART
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 63
HCORE.M80 *KS10 TO 8080 CHARACTER SERVICE*
2362
2363 ; NOW CLEAR A DATA BUFFER FOR DEPOSITING 0'S INTO THE MOS MEMORY.
2364 ; WE ARE USING IN-LINE CODE HERE IN ORDER TO SPEED UP THE TYPE-OUT
2365 ; ON KS10 TO 8080 XFER'S..
2366
2367 003752 076 033 MVI A,^O33 ; THIS IS THE ADDRESS WE WISH TO DEPOSIT
2368 003754 323 103 TTOCOM: OUT A2835 ; PUT IT INTO THE HARDWARE REGISTER
2369 003756 257 XRA A ; CLEAR ACCUM, BECAUSE REST OF ADDR MUST BE ZERO
2370 003757 323 105 OUT A2027 ; CLR THE OTHER HARDWARE REGISTERS
2371 003761 323 107 OUT A1219
2372 003763 323 102 OUT W2835 ; AND WE WILL MAKE ALL OF THE HARDWARE DATA REGS 0
2373 003765 323 104 OUT W2027
2374 003767 323 106 OUT W1219
2375 003771 323 110 OUT W0411
2376 003773 323 112 OUT W0003
2377
2378 003775 076 002 MVI A,02 ; BIT TO SAY "WRITE FUNCTION"
2379 003777 323 113 OUT A0003 ; ***** I/O WRT 113 *****
2380
2381 ; THIS "ADD A" WORKS BY LUCK..I.E. 2+2=4
2382
2383 004001 207 ADD A ; BIT INTO ACCUM FOR "COM/ADR CYCLE"
2384 004002 323 115 OUT BUSARB ; ***** I/O WRT 115/4 *****
2385
2386 004004 076 001 MVI A,1 ; BIT INTO ACCUM FOR "DATA CYCLE"
2387 004006 323 114 OUT DTARB ; ***** I/O WRT 114/1 *****
2388
2389 004010 076 360 MVI A,^O360 ; BITS FOR "CHECK NXM","CONSOLE REQ","T ENB FOR
2390 ; COM/ADR", "T ENB FOR DATA CYCLE"
2391 004012 323 210 OUT BUSCTL ; *****I/O WRT 210/360 *****
2392
2393
2394 ; DO THIS TWICE TO GUARANTEE THE INTERRUPT GETS THRU
2395
2396 004014 076 001 POKE10: MVI A,1 ; BIT FOR SETTING INTERRUPT TO THE KS10
2397 004016 323 116 OUT INT2KS ; SET THE INTERRUPT
2398 004020 323 116 OUT INT2KS ; SET THE INTERRUPT
2399 004022 373 NOACTN: EI ; OK FOR INTERRUPTS NOW
2400 004023 311 RET ; AND OUT
2401
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 64
HCORE.M80 *TTY HANDLER FOR SPECIAL CHARACTERS*
2403 .SBTTL *TTY HANDLER FOR SPECIAL CHARACTERS*
2404
2405 ; WHEN HERE, "B" REG CONTAINS THE STATUS OF THE CTY LINE
2406
2407 004024 170 TTERR: MOV A,B ; COPY CTY STATUS TO ACCUM
2408 004025 346 070 ANI ^O70 ; ANY ERRS IN CTY UART?
2409 ; ANI ^O170 ; (5.2B WAS ^O70) ANY ERRS IN CTY UART?
2410 004027 302 046 010 JNZ TTERR1 ; IF YES, GO CHECK THINGS ON THE CTY LINE
2411
2412 ; HERE IF GOT KLINIK ERRORS
2413
2414 004032 076 025 MVI A,^O25 ; BEFORE JUMPING, RESET UART SO IT WILL WORK
2415 004034 323 203 OUT REMCTL ; I/O WRITE TO RESET THE UART
2416
2417 004036 072 156 040 LDA USRMD ; CHECK USER MODE. WILL NOT REPORT ERR IF IT IS
2418 004041 247 ANA A ; SET FLAGS
2419 004042 302 274 005 JNZ INTCH ; IF WAS USER MODE, IGNORE OVERRUN AND HANDLE CHAR
2420 004045 311 RET ; DONE INT
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 65
HCORE.M80 *TTY HANDLER FOR SPECIAL CHARACTERS*
2422
2423 004046 346 150 TTERR1: ANI ^O150 ; SEE IF OVERRRUN OR A FATAL ERROR
2424
2425 ; NOW MUST CLR ERROR FROM THE UART FIRST
2426
2427 004050 076 025 MVI A,^O25 ; BITS TO CLR ERROR CONDITIONS IN UART
2428 004052 323 201 OUT CTYCTL ; *****I/O WRT 200/25 *****
2429 004054 302 066 010 JNZ TTERMS ; NOW JUMP IF FATAL
2430
2431 004057 072 156 040 LDA USRMD ; BEFORE ISSUING MESSAGE,IS USER MODE SET?
2432 004062 267 ORA A ; TEST USER MODE FLAG
2433 004063 302 274 005 JNZ INTCH ; IF YES, USER MODE, THEN IGNORE THE ERROR
2434
2435 ; NOW MUST CLR OVERRUN ERROR FROM THE UART
2436
2437 004066 TTERMS:
2438 ; ANI ^O100 ; (5.2B) SEE IF BREAK DETECT
2439 ; JZ TTERMZ ; (5.2B) NO - CONTINUE
2440 ; MVI A,^O125 ; (5.2B) YES - BITS TO CLR ERRORS IN UART
2441 ; OUT CTYCTL ; (5.2B) *****I/O WRT 200/125 *****
2442
2443 004066 041 247 040 TTERMZ: LXI H,CSLMODE ; GET CURRENT MODE OF KLINIK
2444 004071 116 MOV C,M ; SAVE IT IN C
2445 004072 066 000 MVI M,0 ; NOW CLEAR CSL MODE
2446 004074 345 PUSH H ; AND SAVE "H,L"
2447 004075 PLINE TTM ; OUTPUT THE ERROR MESSAGE
(1) 004075 337 RST 3 ; PRINT LINE OF CHARS
(1) 004076 023 037 .ADDR TTM ; BUFF TO PRINT
2448 004100 341 POP H ; AND RESTORE MEM POINTER
2449 004101 161 MOV M,C ; REPLACE CSL MODE AND GET OUT
2450 004102 311 RET ; AND RESTART NULL LOOP
2451
2452 004103 061 000 044 CNTC: LXI SP,RAMST+^O2000 ;GUARANTEE THAT CNTRL-C WINS
2453 004106 PCHAR UPARR
(1) 004106 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 004107 136 .BYTE UPARR ; CHAR TO PRINT
2454 004110 PCHAR CCHR
(1) 004110 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 004111 103 .BYTE CCHR ; CHAR TO PRINT
2455 004112 303 200 001 JMP REINI ; JUMP AWAY
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 66
HCORE.M80 *TTY HANDLER FOR SPECIAL CHARACTERS*
2457
2458 ; LOCAL SUBROUTINE TO RESET TTY INPUT BUFFER
2459
2460 004115 041 114 041 BFRST: LXI H,BUFBG ; BUFFER BEGINNING
2461 004120 042 215 040 SHLD BUF. ; RESET CURRENT BUFFER POINTER
2462 004123 042 227 040 SHLD FIRST ; RESET CMD POINTER
2463 004126 CLRB RPEND ; CLEAR REPEAT KILLER
2464 004130 CLRB CMDS.. ; SAY LINE IS DONE.. AT BEGINNING OF THINGS
2465 004132 CLRB BFCNT ; CLEAR CHAR COUNT
2466 004134 311 RET ; AND RETURN
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 67
HCORE.M80 *TTY HANDLER FOR SPECIAL CHARACTERS*
2468
2469 ; THIS IS THE INITIAL MODE OF THE KLINIK LINE AFTER A POWER UP. ALSO,
2470 ; WHEN THE KLINIK LINE IS DISABLED, OR IN "PROTECT" MODE, BUT NO
2471 ; PASSWORD HAS BEEN SET BY THE OPERATOR.
2472
2473 004135 376 007 MODE0: CPI BELL ; NO ECHO IF RECEIVE BELL
2474 004137 310 RZ ; BELL, SO OUT
2475 004140 KLINE NOACCS ; PRINT A MESSAGE FOR THE KLINIK LINE ONLY
(1) 004140 315 072 004 CALL KLINE ; PRINT LINE OF CHARS
(1) 004143 337 037 .ADDR NOACCS ; BUFF TO PRINT
2476 004145 303 121 034 JMP KILL.KLINIK ; (5.2A) HANG UP SO REPEAT ?NA DON'T HANG SYSTM
2477
2478 ; THIS IS KLINIK MODE 1. THIS IS THE MODE OF THE KLINIK LINE WHENEVER
2479 ; THE FRONT PANEL SWITCH IS IN THE PROTECT POSITION, AND WE ARE WAITING
2480 ; FOR THE PASSWORD TO BE ENTERED.
2481
2482 004150 MODE1: KLINE QPW ; BEGIN BY PRINTING "PW:"
(1) 004150 315 072 004 CALL KLINE ; PRINT LINE OF CHARS
(1) 004153 345 037 .ADDR QPW ; BUFF TO PRINT
2483 004155 041 262 040 LXI H,PASSWORD ; GET ADDRESS OF PASSWORD (1ST CHARACTER)
2484 004160 042 125 040 SHLD APASS ; (5.2D) SAVE ADDRESS IN POINTER LOCATION
2485 004163 CLRB PNUM ; (5.2D) CLEAR PASSWORD CHARACTER COUNT
2486 004165 CLRB PWNOK ; (5.2D) CLEAR PASSWORD VALIDITY FLAG
2487
2488 ;THIS SECTION WAS THE OLD PW INIT SECTION WHICH IS REPLACE BY THE 3 LINES ABOVE
2489 ;
2490 ;(5.2D) LXI H,KPWBUF ; INITIALIZE BUFFER FOR SAVING TYPED PASSWORD
2491 ;(5.2D) SHLD KPWPNT ; SAVE IN THE BUFFER POINTER
2492 ;(5.2D)
2493 ;(5.2D) CLRB KPWCNT ; AND CLEAR THE PASSWORD CHARACTER COUNTER
2494
2495 004167 041 176 010 LXI H,PW.WAIT ; NOW ADDITIONAL KLINIK CHARS MUST DISPATCH TO
2496 004172 042 346 040 SHLD MODDIS ; THE PLACE THAT WAITS FOR A COMPLETE PASSWORD
2497 004175 311 RET ; END OF INTERRUPT
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 68
HCORE.M80 *TTY HANDLER FOR SPECIAL CHARACTERS*
2499
2500 ;(5.2D) THIS SECTION HAS BEEN RECODED TO SAVE 20 - 30 BYTES, AND THE CODE
2501 ; REPLACING THIS IS BELOW THIS SECTION.
2502 ;
2503 ; THIS IS THE ENTRY POINT WHEN THE PERSON IS IN THE PROCESS OF TYPING THE
2504 ; PASSWORD. WE STORE THE PASSWORD AS IT IS TYPED, THEN WHEN DONE, WE WILL
2505 ; VERIFY THAT IT IS CORRECT.
2506 ;
2507 ;PW.WAIT: CPI CRCHR ; IS IT AN END OF LINE CHARACTER
2508 ; JZ PW.TST ; JUMP IF YES.. TIME TO VERIFY THE PASSWORD
2509 ;
2510 ; CALL UP.LO ; GENERATE ONLY UPPER CASE FOR PROGRAM INTERNALS
2511 ; MOV B,A ; SAVE THE CHAR IN B REG FOR A LITTLE BIT
2512 ;
2513 ; IF NOT END OF LINE, JUST ADD IT TO THE BUFFER OF CHARS THAT IS THE PASSWORD
2514 ;
2515 ; LDA KPWCNT ; FIRST THINGS FIRST, SEE HOW MANY CHARS IN BUFFER
2516 ; INR A ; UPDATE TO ACCOUNT FOR THIS ONE
2517 ; CPI 7 ; IS IT TOO MANY
2518 ; JZ PW.ERR ; JUMP IF YES. ITS A PASSWORD ERROR
2519 ; STA KPWCNT ; ELSE SAVE THE UPDATED COUNT AND CONTINUE
2520 ;
2521 ; LHLD KPWPNT ; GET THE BUFFER POINTER
2522 ; MOV M,B ; PUT THE CHARACTER IN THE BUFFER
2523 ; INX H ; UPDATE THE BUFFER POINTER
2524 ; SHLD KPWPNT ; PUT THE POINTER BACK
2525 ; RET ; AND END OF INTERRUPT
2526 ;
2527 ; CODE FOR VERIFYING THAT THE PASSWORD ENTERED IS THE CORRECT AND VALID
2528 ; PASSWORD.
2529 ;
2530 ;PW.TST:LXI D,PASSWORD ; D,E POINTS TO THE EXPECTED PASSWORD
2531 ; LXI H,KPWBUF ; H,L POINTS TO THE TYPED IN BUFFER
2532 ; MVI B,00 ; "B" WILL BE THE COUNTER
2533 ;
2534 ;PW..: LDAX D ; FETCH UP AN EXPECTED CHARACTER
2535 ; ANA A ; SET THE FLAGS
2536 ; JZ PW.END ; IF "END", GO MAKE SURE TYPEIN IS TERMINATED
2537 ;
2538 ; INR B ; ELSE UPDATE OUR COUNTER
2539 ; CMP M ; AND COMPARE A CHAR
2540 ; JNZ PW.ERR ; IF MIS-COMPARE REPORT IT AS ERROR
2541 ;
2542 ; INX D ; UPDATE EXPECTED POINTER
2543 ; INX H ; UPDATE TYPED IN POINTER
2544 ; JMP PW.. ; CONTINUE
2545 ;
2546 ; END.. THIS IS ONLY TO VERIFY THAT TYPED TERMINATED AT THE SAME NUMBER OF
2547 ; CHARACTERS AS EXPECTED.
2548 ;
2549 ;PW.END:LDA KPWCNT ; GET EXPECTED COUNT
2550 ; CMP B ; CHECK AGAINST THE CURRENT COUNT
2551 ; JZ PW.OK ; AND JUMP IF COUNTS MATCH
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 69
HCORE.M80 *TTY HANDLER FOR SPECIAL CHARACTERS*
2553
2554 ;(5.2D) THIS SECTION REPLACES THE PREVIOUS SECTION TO VERIFY THE CORRECTNESS
2555 ; OF A PASSWORD AS IT IS BEING ENTERED.
2556 ;
2557 ; THIS SECTION TAKES EACH CHARACTER OF THE PASSWORD AS IT IS BEING
2558 ; ENTERED AND COMPARES TO EXPECTED. IF ANY CHARACTER MISMATCHES
2559 ; OCCUR, AN ERROR FLAG IS SET.
2560
2561 004176 376 015 PW.WAIT:CPI CRCHR ; EOL CHARACTER?
2562 004200 312 242 010 JZ PW.TST ; YES - CHECK IF PW IS OK
2563 004203 315 153 006 CALL UP.LO ; NO - CONVERT TO UPPER CASE
2564
2565 ; COMPARE CHARACTER TYPED TO EXPECTED
2566
2567 004206 052 125 040 LHLD APASS ; GET ADDR OF PASSWORD (CURRENT CHARACTER)
2568 004211 276 CMP M ; COMPARE TO TYPED IN
2569 004212 043 INX H ; INCREMENT PW ADDR
2570 004213 042 125 040 SHLD APASS ; SAVE PW ADDR
2571 004216 312 225 010 JZ PWOK1 ; CHARACTER SAME? YES - CONTINUE
2572
2573 ; ERROR SEEN - SET ERROR FLAG
2574
2575 004221 041 127 040 LXI H,PWNOK ; GET ADDR OF PWNOK FLAG
2576 004224 064 INR M ; INCREMENT IT
2577
2578 ; CHECK IF OVER 6 CHARACTERS
2579
2580 004225 072 271 040 PWOK1: LDA PNUM ; GET CHARACTER COUNT
2581 004230 074 INR A ; UPDATE TO ACCOUNT FOR THIS ONE
2582 004231 376 007 CPI 7 ; SEVEN YET?
2583 004233 312 261 010 JZ PW.ERR ; YES - ERROR
2584 004236 062 271 040 STA PNUM ; SAVE CHARACTER COUNT
2585 004241 311 RET ; END OF INTERRUPT
2586
2587 ; CHECK IF OK
2588
2589 004242 052 125 040 PW.TST: LHLD APASS ; GET ADDR OF NEXT PW CHAR - SHOULD BE 0
2590 004245 176 MOV A,M ; LOAD CHAR INTO ACCUM
2591 004246 247 ANA A ; IS THIS 0? (IE. PW LENGTH OK?)
2592 004247 302 261 010 JNZ PW.ERR ; IF NOT - HANDLE PW ERROR
2593 004252 072 127 040 LDA PWNOK ; GET PW NOT OK FLAG
2594 004255 247 ANA A ; SET THE FLAGS
2595 004256 312 303 010 JZ PW.OK ; ZERO? - YES - PW OK - EXIT
2596
2597 ; FALL THRU TO ERROR IF CHARACTER COUNTS DON'T MATCH
2598
2599 004261 PW.ERR: KLINE CMDNG ; GIVE USER AN ERROR MESSAGE
(1) 004261 315 072 004 CALL KLINE ; PRINT LINE OF CHARS
(1) 004264 015 037 .ADDR CMDNG ; BUFF TO PRINT
2600 004266 041 277 040 LXI H,PWRTRY ; HAD ERROR. ONLY GET 3 CHANCES FOR ERRORS
2601 004271 064 INR M ; UPDATE ERROR COUNT
2602 004272 176 MOV A,M ; PLACE COUNT IN ACCUM FOR A TEST
2603 004273 376 003 CPI 3 ; SEE IF STRUCK OUT
2604 004275 312 316 010 JZ KLIRST ; GO RESET KLINIK LINE IF USER STRUCK OUT
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 69-1
HCORE.M80 *TTY HANDLER FOR SPECIAL CHARACTERS*
2605
2606 004300 303 150 010 JMP MODE1 ; ELSE GIVE HIM "PW:" MESSAGE AGAIN
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 70
HCORE.M80 *TTY HANDLER FOR SPECIAL CHARACTERS*
2608
2609 ; HERE IF EVERYTHING MATCHED
2610
2611 004303 315 070 034 PW.OK: CALL SETM2 ; CHANGE LINE TO MODE 2
2612 004306 KLINE POKMSG ; WHEN GOOD PW, SEND OUT AN "OK"
(1) 004306 315 072 004 CALL KLINE ; PRINT LINE OF CHARS
(1) 004311 353 037 .ADDR POKMSG ; BUFF TO PRINT
2613
2614 004313 PW.OUT: CLRB PWRTRY ; CLEAR ERROR COUNTER
2615 004315 311 RET ; EXIT
2616
2617 ; KLINIK LINE RESET CODE. FOR RESETING KLINIK LINE AND HANGING UP THE USER
2618
2619 004316 315 123 034 KLIRST: CALL HANGUP ; GO HANG UP THE KLINIK LINE
2620 004321 315 375 033 CALL SETM1 ; DROP BACK TO MODE 1
2621 004324 303 313 010 JMP PW.OUT ; ZAP ERROR FLAG THEN OUT
2622
2623 ; KLINIK LINE MODE 2. THIS IS STREAM INPUT/OUTPUT. ALL CHARACTERS FROM
2624 ; THE KLINIK UART ARE SENT TO THE SPECIAL KLINIK COMMUNICATION WORDS AND
2625 ; ALL WORDS FROM THE KLINIK COMM WORDS ARE OUTPUT TO THE KLINIK LINE.
2626
2627 004327 376 034 MODE2: CPI CNBCK ; FIRST SEE IF KLINIK USER WANTS A MODE CHANGE
2628 004331 302 357 010 JNZ KL3435 ; IF NOT, GO SEND INFO TO THE KLINIK COMM WORD
2629
2630 004334 072 251 040 LDA MMFLG ; BEFORE GOING TO MODE 3, SEE IF MM MODE
2631 004337 247 ANA A ; SET 8080 FLAGS
2632 004340 302 243 006 JNZ END.USR ; IF YES, MM MODE, ACT LIKE FROM A CTY
2633
2634 ; FALL THRU IF WANTS TO CHANGE MODES. BUT BEFORE CHANGING, CHECK IF HE'S
2635 ; ALLOWED TO CHANGE MODES.
2636
2637 004343 072 300 040 LDA KLLINE.ON ; CHECK IF KLINIK ON, & USER ALLOWED TO CHANGE
2638 004346 247 ANA A ; SET FLAGS
2639 004347 310 RZ ; IF NOT ENABLED TO CHANGE, IGNORE THIS INTRPT
2640
2641 ; WELL, HE IS ALLOWED TO CHANGE. SEE IF THE FRONT PANEL SWITCH IS UNLOCKED
2642
2643 004350 333 301 IN BOOTSW ; ***** I/O RD 301 *****
2644
2645 ; NOTE THAT BIT LO IS TRUTH, IF BIT HI IS FALSE(DISABLED)
2646
2647 004352 346 004 ANI 4 ; CHECK THE CONSOLE ENABLE BIT
2648 004354 312 027 034 JZ SETM3 ; GO MODE 3 ONLY IF PANEL NOT LOCKED.
2649 ; LET SETM3 DO "RET"
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 71
HCORE.M80 *TTY HANDLER FOR SPECIAL CHARACTERS*
2651
2652 ; THIS IS WHERE YOU ACTUALLY WRITE THE DESIRED CHARACTER INTO THE KLINIK
2653 ; LINE COMMUNICATION WORD.
2654
2655 004357 KL3435:
2656 004357 062 035 040 STA CHRBUF ; PUT CHARACTER IN A RAM BUFFER
2657 004362 076 034 MVI A,^O34 ; DESIRED ADDRESS FOR DEPOSTING CHARACTER
2658
2659 004364 323 103 OUT A2835 ; WRITE ONLY RELEVANT PIECE OF THE ADDRESS
2660 004366 257 XRA A ; THEN CLR ACCUM
2661 004367 323 105 OUT A2027 ; AND CLR THE REST OF THE HARDWARE ADDR REG
2662 004371 323 107 OUT A1219
2663 004373 323 106 OUT W1219 ; CLEAR PIECES OF DEPOSIT DATA WHICH MUST BE ZERO
2664 004375 323 110 OUT W0411
2665 004377 323 112 OUT W0003
2666
2667 004401 076 002 MVI A,02 ; BIT TO SAY "WRITE FUNCTION"
2668 004403 323 113 OUT A0003 ; ***** I/O WRT 113 *****
2669
2670 ; THE FOLLOWING "ADD A" WORKS BY LUCK..I.E. 2+2=4
2671
2672 004405 207 ADD A ; BIT INTO ACCUM FOR "COM/ADR CYCLE"
2673 004406 323 115 OUT BUSARB ; ***** I/O WRT 115/4 *****
2674
2675 004410 072 035 040 LDA CHRBUF ; NOW GET THE CHARACTER WE WANT
2676 004413 323 102 OUT W2835 ; PUT IT IN THE HARDWARE REGISTER
2677 004415 076 001 MVI A,1 ; AND GET THE VALID BIT TO GO WITH THE CHARACTER
2678 004417 323 104 OUT W2027 ; PUT IT IN THE HARDWARE REGISTER
2679
2680 ; AND BY LUCK, THE ACCUM HAS JUST WHAT WE NEED FOR THE NEXT STEP
2681
2682 004421 323 114 OUT DTARB ; ***** I/O WRT 114/1 *****
2683
2684 004423 076 360 MVI A,^O360 ; BITS FOR "CHECK NXM","CONSOLE REQ","T ENB FOR
2685 ; COM/ADR", "T ENB FOR DATA CYCLE"
2686 004425 323 210 OUT BUSCTL ; *****I/O WRT 210/360 *****
2687
2688 ; DO THIS TWICE TO GUARANTEE THAT THE INTERRUPT HAPPENS
2689
2690 004427 076 001 MVI A,1 ; BIT FOR SETTING INTERRUPT TO THE KS10
2691 004431 323 116 OUT INT2KS ; SET THE INTERRUPT
2692 004433 323 116 OUT INT2KS ; SET THE INTERRUPT
2693
2694 004435 311 RET ; AND EXIT NORMALLY....
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 72
HCORE.M80 *TTY HANDLER FOR SPECIAL CHARACTERS*
2696
2697 ;>>;WCMDS.M80
2698 .SBTTL *CONSOLE COMMANDS AS IMPLEMENTED*
2699 .SBTTL *"EB" CMD*
2700
2701 ; THIS CODE PERFORMS THE "EXAMINE BUS" CONSOLE FUNCTION.
2702
2703 004436 076 001 EBCMD: MVI A,01 ; FIRST CLR "R CLK ENB"
2704 004440 323 210 OUT BUSCTL ; ***** I/O WRT 210/001 *****
2705 004442 315 070 033 CALL RDATT ; ***** I/O RD "0,1,2,3,103" (READ BITS 0-35) *****
2706 004445 012 040 .ADDR EMBUF ; PLACE BITS 0-35 INTO RAM BUFFER AREA "EMBUF"
2707
2708 ; READ THE REST OF THE I/O REGISTERS AND SAVE IN THE RAM
2709
2710 004447 041 172 040 LXI H,RM100 ; GET BEGINNING ADDRESS OF RAM BUFFER AREA
2711 004452 021 153 011 LXI D,IORGS ; D,E WILL POINT TO SOURCE OF REGS TO BE READ
2712 004455 006 010 MVI B,8 ; THERE ARE 8 REGISTERS TO BE READ
2713
2714 004457 032 EB.RDIN: LDAX D ; FETCH UP FIRST REGISTER TO BE READ
2715 004460 315 212 013 CALL ER.UTL ; CALL ER COMMAND
2716 004463 167 MOV M,A ; COPY RESULTS OF READ INTO THE RAM SPACE
2717 004464 023 INX D ; UPDATE SOURCE POINTER
2718 004465 043 INX H ; UPDATE DESTINATION POINTER
2719 004466 005 DCR B ; DOWN THE COUNTER
2720 004467 362 057 011 JP EB.RDIN ; CONTINUE LOOP
2721
2722 004472 257 XRA A ; CLR ACCUM MUST SET "R CLK ENB"
2723 004473 323 210 OUT BUSCTL ; ***** I/O WRT 210/0 *****
2724
2725 004475 PLINE EBHED ; EB CMD HEADER MSG
(1) 004475 337 RST 3 ; PRINT LINE OF CHARS
(1) 004476 030 037 .ADDR EBHED ; BUFF TO PRINT
2726 004500 315 174 034 CALL DECNET ; PRINT THE HEADING
2727 004503 315 333 030 CALL P36. ; GO PRINT IT
2728 004506 PCRLF ; AND A <CR><LF>
(2) 004506 347 RST 4
(2) 004507 002 .BYTE 2
2729 004510 315 174 034 CALL DECNET ; AND MAKE SURE THIS GETS SENT
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 73
CMDS.M80 *"EB" CMD*
2731
2732 004513 041 153 011 LXI H,IORGS ; "H,L" NOW PNTS TO LIST OF I/O REGISTER NAMES
2733 004516 021 172 040 LXI D,RM100 ; "D,E" NOW PNTS TO CORRESPONDING LIST OF DATA FOR I/O REG
2734 004521 006 010 MVI B,8 ; ACCUM NOW CONTAINS A COUNT OF 8 (FOR 8 I/O REGS)
2735
2736 004523 315 240 030 EB1: CALL P8BIT ; PRINT FIRST REG NAME
2737 004526 043 INX H ; BUMP TO NEXT
2738 004527 PSLASH ; PRINT "1"
(2) 004527 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 004530 057 .BYTE SLASH ; CHAR TO PRINT
2739 004531 353 XCHG ; SWAP SO "H,L" POINTS TO DATA
2740
2741 004532 315 240 030 CALL P8BIT ; PRINT DATA FOR THAT REG
2742 004535 043 INX H ; BUMP TO NEXT
2743 004536 353 XCHG ; SWAP BACK-"H,L" POINTS TO NAME AGAIN
2744 004537 PSPACE ; SPACE OVER
(2) 004537 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 004540 040 .BYTE SPACE ; CHAR TO PRINT
2745 004541 005 DCR B ; DOWN COUNT
2746 004542 302 123 011 JNZ EB1 ; CONTINUE TILL DONE ALL EIGHT REGS
2747 004545 PCRLF
(2) 004545 347 RST 4
(2) 004546 002 .BYTE 2
2748 004547 315 174 034 CALL DECNET ; AND FINALLY MAKE SURE LAST THING GETS SENT
2749 004552 ENDCMD ; END-OF-COMMAND
(1) 004552 311 RET ; RETURN TO CALLER
2750
2751 ; END THIS CODE WITH A 6 BYTE BUFFER OF THE I/O REGS NAMES, IN BINARY
2752
2753 004553 100 IORGS: .BYTE ^O100 ; FIRST REG NAME IN BINARY
2754 004554 101 .BYTE ^O101 ; 2ND
2755 004555 102 .BYTE ^O102 ; 3RD
2756 004556 103 .BYTE ^O103 ; 4TH
2757 004557 300 .BYTE ^O300 ; 5TH
2758 004560 301 .BYTE ^O301 ; 6TH
2759 004561 302 .BYTE ^O302 ; 7TH
2760 004562 303 .BYTE ^O303 ; 8TH
2761
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 74
CMDS.M80 *** "DB" CMD ***
2763 .SBTTL *** "DB" CMD ***
2764
2765 ; THIS CODE PERFORMS THE "DEPOSIT BUS" CONSOLE FUNCTION
2766
2767 004563 DBCMD: RUN.. ; IS CPU RUNNING?
(1) 004563 347 RST 4
(1) 004564 006 .BYTE 6
2768 004565 332 174 011 JC DB1 ; SKIP CODE IF AT END OF COMMAND
2769 004570 ARG36 ; IF NOT, GO ASSEMBLE ARG.
(1) 004570 347 RST 4
(1) 004571 010 .BYTE 8
2770 004572 042 040 .ADDR BUSAD ; AND PUT INTO BUFFER "BUS AD"
2771
2772 004574 315 165 033 DB1: CALL ADATT ; ***** I/O WRT TO R DATA 0-35 DATA REG(ODDS) *****
2773 004577 042 040 .ADDR BUSAD ; BUFFER ADDRESS OF SOURCE OF DATA
2774
2775 004601 257 XRA A ; CLR ACCUM SO CAN CLR I/O REG 115
2776 004602 323 115 OUT BUSARB ; ***** I/O WRT 115/0 *****
2777
2778 004604 076 141 MVI A,^O141 ; BITS TO SET "CONSOLE REQ" & "T ENB FOR COM/ADR"
2779 004606 323 210 OUT BUSCTL ; ***** I/O WRT 210/141 *****
2780
2781 004610 BUSRESP ARBRESP ; ***** I/O READ 301 *****
(1) 004610 315 231 032 CALL BUSRESP ; DO A CALL TO EXECUTE THIS CODE
(1) 004613 020 .BYTE ARBRESP ; BITS TO BE CHECKED
2782 004614 302 011 036 JNZ NOARB ; IF NO ARB RESPONSE WITH "BUS REQ", ABORT
2783
2784 004617 315 276 011 CALL DBRDIN ; GO READ RESULTS, AND DO A 36-BIT COMPARE
2785 004622 302 313 011 JNZ DBERR ; IF "Z-BIT" NOT SET REPORT MISCOMPARE & ABORT
2786
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 75
CMDS.M80 *** "DB" CMD ***
2788
2789 ; SECOND HALF OF COMMAND
2790
2791 004625 315 165 033 CALL ADATT ; CLR OUT OLD CRUD
2792 004630 333 016 .ADDR MAD000 ; WITH ALL ZEROES
2793
2794 004632 315 132 033 CALL WDATT ; ***** I/O WRT DATA 0-35 ADDR REG(EVENS) *****
2795 004635 042 040 .ADDR BUSAD ; BUFFER ADDRESS OF SOURCE OF DATA
2796
2797 004637 076 001 MVI A,01 ; BITS TO SET "DATA CYCLE"
2798 004641 323 114 OUT ^O114 ; ***** I/O WRT 114/1 *****
2799
2800 004643 076 363 MVI A,^O363 ; BITS FOR "CONSOLE REQ", "TENB FOR COM/AD R"
2801 ; "T ENB FOR DATA CYCLE","LATCH DATA SENT"
2802 004645 323 210 OUT BUSCTL ; ***** I/O WRT 210/363 *****
2803
2804 004647 BUSRESP ARBRESP ; ***** I/O RD 301 *****
(1) 004647 315 231 032 CALL BUSRESP ; DO A CALL TO EXECUTE THIS CODE
(1) 004652 020 .BYTE ARBRESP ; BITS TO BE CHECKED
2805
2806 004653 302 011 036 JNZ NOARB ; IF NO ARB RESP, ABORT WITH 2ND HALF MESSAGE
2807
2808 004656 BUSRESP DATACK ; HOW ABOUT DATA ACKNOWLEDGE?
(1) 004656 315 231 032 CALL BUSRESP ; DO A CALL TO EXECUTE THIS CODE
(1) 004661 001 .BYTE DATACK ; BITS TO BE CHECKED
2809 004662 312 377 035 JZ NOACK ; JUMP IF NONE
2810
2811 004665 315 276 011 CALL DBRDIN ; GO READ IN RESULTS AND COMPARE RESULT
2812 004670 310 RZ ; IF Z-BIT, THEN OK TO EXIT
2813
2814 ; ELSE FALL INTO THIS CODE IF A MISCOMPARE
2815
2816 004671 PCHAR DCHR ; PRINT "D"
(1) 004671 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 004672 104 .BYTE DCHR ; CHAR TO PRINT
2817 004673 303 315 011 JMP DBCOM ; AND NOW THE ERR FINISHES UP LIKE THE 1ST HALF
2818
2819 ; COMMON SUBROUTINE TO READ IN THE CONTENTS OF THE KS10 BUS & COMPARE AGAINST
2820 ; THE DATA WHICH WAS PUT ONTO THE BUS.
2821
2822 004676 315 070 033 DBRDIN: CALL RDATT ; ***** I/O RD 0,1,2,3,103 *****
2823 004701 100 040 .ADDR TMPB2 ; PLACE TO PUT RDATA 0-35
2824
2825 004703 315 016 033 CALL CMP36 ; CHECK DATA JUST READ VS. DATA SENT
2826 004706 042 040 .ADDR BUSAD ; SENT DATA
2827 004710 100 040 .ADDR TMPB2 ; RECEIVED DATA
2828 004712 311 RET ; DONE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 76
CMDS.M80 *** "DB" CMD ***
2830
2831 ; "DB" COMMAND CODE FOR THE CASES WHERE DATA DEPOSITED ON THE BUS IS NOT
2832 ; THE SAME AS THE DATA READ BACK FROM THE BUS.. BY THE WAY...RIGHT NOW
2833 ; THIS IS PRETTY SLOPPY CODE....
2834
2835 004713 DBERR: PCHAR CCHR ; PRINT A "C"
(1) 004713 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 004714 103 .BYTE CCHR ; CHAR TO PRINT
2836 004715 DBCOM: PLINE MSG10 ; "?C CYC"
(1) 004715 337 RST 3 ; PRINT LINE OF CHARS
(1) 004716 051 037 .ADDR MSG10 ; BUFF TO PRINT
2837
2838 004720 041 042 040 LXI H,BUSAD ; ADDR OF 36-BIT DATA
2839 004723 315 336 030 CALL P36 ; NOW PRINT THAT DATA
2840
2841 004726 PLINE DRCVD ; "RECEIVED DATA"
(1) 004726 337 RST 3 ; PRINT LINE OF CHARS
(1) 004727 064 037 .ADDR DRCVD ; BUFF TO PRINT
2842
2843 004731 041 100 040 LXI H,TMPB2 ; THIS IS ADDR OF RECEIVED DATA
2844 004734 315 336 030 CALL P36 ; PRINT THAT 36-BIT DATA
2845 004737 PCRLF ; AND CR-LF
(2) 004737 347 RST 4
(2) 004740 002 .BYTE 2
2846 004741 041 004 000 LXI H,4 ; PASS ERROR CODE BEFORE EXIT
2847 004744 303 005 036 JMP ERRRTN ; GO FINISH WITH THE ERROR CODE
2848
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 77
CMDS.M80 *** "EM" CMD ***
2850 .SBTTL *** "EM" CMD ***
2851
2852 ; THIS IS THE ACTUAL "EM" COMMAND CODE
2853
2854 004747 332 355 011 EMCMD: JC EM1 ; SKIP CODE IF AT END OF COMMAND
2855 004752 315 043 013 CALL LACMD ; GO FETCH UP AN ADDRESS TO EXAMINE
2856
2857 004755 257 EM1: XRA A ; CLEAR ACCUM
2858 004756 062 031 040 STA ENEXT ; AND SET SO "EN " CMD WILL KNOW WHAT TO DO
2859
2860 004761 021 017 040 EM2: LXI D,MEMAD ; ADDRESS FOR MEMORY LOC.
2861
2862 004764 076 004 EMINT: MVI A,04 ; BIT TO SAY "READ FUNCTION"
2863
2864 004766 107 EN2ND: MOV B,A ; SAVE FUNCTION DATA
2865 004767 353 XCHG ; DATA POINTER TO "H,L"
2866 004770 042 205 040 SHLD AM.AI ; STORE FOR LATER USE BY COMMON CODE
2867 004773 353 XCHG ; RESTORE "D,E"
2868 004774 315 172 033 CALL ADATP ; ***** I/O WRT 103,105,107,111,113 *****
2869
2870 004777 170 MOV A,B ; GET FUNCTION
2871 005000 323 113 EM.CRM: OUT A0003 ; ***** I/O WRT 113/4 *****
2872
2873 ; NOW SET "COM/ADR" CYCLE
2874
2875 005002 076 004 MVI A,^O04 ; BIT TO SET COM/ADR CYC
2876 005004 323 115 OUT BUSARB ; ***** I/O WRT 115/4 *****
2877
2878 ; CHECK IF DOING EI OR EM
2879
2880 005006 072 163 040 LDA EIFLAG ; GET THE EI FLAG
2881 005011 247 ANA A ; SET CODES, IF .NE. 0, THEN IT IS AN EI CODE
2882 005012 302 017 012 JNZ EMCONT ; AND IF WAS EI, GO DO IT
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 78
CMDS.M80 *** "EM" CMD ***
2884
2885 ; OTHERWISE JUST FALL THRU AND USE THE DM CODES
2886
2887 005015 076 343 MVI A,^O343 ; BITS FOR "CHECK NXM","CONSOLE REQ","T ENB FOR
2888 ; COM/ADR","LATCH DATA SENT"," R CLK DISABLE"
2889 005017 323 210 EMCONT: OUT BUSCTL ; ***** I/O WRT 210/343 *****
2890
2891 005021 257 XRA A ; CLEAR THE ACCUM
2892 005022 062 163 040 STA EIFLAG ; CLEAR FLAG ON THE WAY OUT
2893
2894 005025 BUSRESP ARBRESP ; ***** I/O RD 301 *****
(1) 005025 315 231 032 CALL BUSRESP ; DO A CALL TO EXECUTE THIS CODE
(1) 005030 020 .BYTE ARBRESP ; BITS TO BE CHECKED
2895 005031 302 011 036 JNZ NOARB ; IF GET NO "BUS REQ", ARB FAILED SO ABORT
2896
2897 005034 BUSRESP NONXMEM ; ***** I/O RD 301 *****
(1) 005034 315 231 032 CALL BUSRESP ; DO A CALL TO EXECUTE THIS CODE
(1) 005037 100 .BYTE NONXMEM ; BITS TO BE CHECKED
2898 005040 302 025 036 JNZ NIXOM ; JUMP IF NON-EXISTANT MEM FLAG IS SET
2899
2900 ; NOW MUST WAIT FOR "DATA ACKNOWLEDGE" FROM MEMORY
2901
2902 005043 BUSRESP DATACK ; ***** I/O RD 301 *****
(1) 005043 315 231 032 CALL BUSRESP ; DO A CALL TO EXECUTE THIS CODE
(1) 005046 001 .BYTE DATACK ; BITS TO BE CHECKED
2903 005047 312 377 035 JZ NOACK ; JMP IF NO "DATA ACK" (BUS HAS 15 USEC TO RESPOND)
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 79
CMDS.M80 *** "EM" CMD ***
2905
2906 ; HERE IF "DATA ACKNOWLEDGE" RECEIVED..GET RESULTS & PRINT
2907
2908 005052 021 012 040 LXI D,EMBUF ; PLACE TO PUT RECEIVED DATA
2909 005055 315 075 033 CALL RDATP ; ***** I/O RD 0,1,2,3,103 *****
2910
2911 005060 257 XRA A ; SET ACCUM .EQ. 0 FOR "R CLK ENABLE"
2912 005061 323 210 OUT BUSCTL ; ***** I/O WRT 210/0 *****
2913
2914 005063 072 120 040 LDA NOPNT ; GET THE PRINT FLAG
2915 005066 247 ANA A ; SET CONDITION CODES
2916 005067 300 RNZ ; AND DON'T WASTE TIME IF NOT PRINTING
2917
2918 005070 052 205 040 LHLD AM.AI ; GET POINTER TO MEM ADDR JUST EXAMINED
2919 005073 315 336 030 CALL P36 ; PRINT IT
2920
2921 005076 PSLASH ; PRINT "/"
(2) 005076 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 005077 057 .BYTE SLASH ; CHAR TO PRINT
2922 005100 315 333 030 CALL P36. ; AND PRINT IT
2923 005103 PCRLF ; CR-LF
(2) 005103 347 RST 4
(2) 005104 002 .BYTE 2
2924 005105 ENDCMD ; ALL DONE
(1) 005105 311 RET ; RETURN TO CALLER
2925
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 80
CMDS.M80 *** "EN" CMD ***
2927 .SBTTL *** "EN" CMD ***
2928
2929 ; ACTUAL CODE FOR "EN" CMD
2930
2931 005106 315 051 033 ENEM: CALL INC36 ; ADD 1 TO 36-BIT BUFFER
2932 005111 017 040 .ADDR MEMAD ; THIS IS THE BUFFER TO INCREMENT
2933 005113 303 355 011 JMP EM1 ; AND NO GO PROCESS JUST LIKE "EM" CMD
2934
2935 ; EXAMINE NEXT WILL DO THE NEXT, SAME AS THE LAST
2936
2937 005116 052 031 040 ENCMD: LHLD ENEXT ; GET INDEX FOR WHICH EXAMINE IS NEXT
2938 005121 021 132 012 LXI D,ENLST ; GET PNTR TO DISPATCH LIST
2939 005124 031 DAD D ; AND NOW ADD "WHICH" EXAMINE
2940 005125 136 MOV E,M ; GET LO ORDER PIECE
2941 005126 043 INX H ; UPDATE MEM PNTR
2942 005127 126 MOV D,M ; GET HI ORDER PIECE
2943 005130 353 XCHG ; PUT THIS NEW ADDR INTO "H,L"
2944 005131 351 PCHL ; AND TAKE THE DISPATCH
2945
2946 005132 106 012 ENLST: .ADDR ENEM ; DISPATCH FOR EXAM MEM CMD
2947 005134 324 012 .ADDR ENEI ; DISPATCH FOR EXAM I/O CMD
2948 005136 031 013 .ADDR ENEK ; DISPATCH FOR EXAM KONSOLE CMD
2949 005140 026 016 .ADDR ENEC ; DISPATCH FOR EXAM CRAM CMD
2950
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 81
CMDS.M80 *** "DM" CMD ***
2952 .SBTTL *** "DM" CMD ***
2953 .SBTTL *** "DN" CMD ***
2954
2955 ; DEPOSIT MEMORY ACTUAL COMMAND CODE
2956
2957 005142 315 051 033 DNDM: CALL INC36 ; INCREMENT MEMORY ADDRESS
2958 005145 017 040 .ADDR MEMAD ; HERE IS CURRENT MEMORY ADDRESS
2959 005147 DMCMD: ARG36 ; OTHERWISE, ASSEMBLE THE ARG
(1) 005147 347 RST 4
(1) 005150 010 .BYTE 8
2960 005151 047 040 .ADDR DMDAT ; PLACE TO PUT ASSEMBLED DATA
2961
2962 005153 257 DM1: XRA A ; 0 IS THE INDEX FOR MEM NEXT CMDS
2963 005154 062 033 040 STA DNEXT ; SAVE SO "NEXT" COMMAND WILL KNOW WHAT TO DO
2964
2965 005157 021 017 040 DM2: LXI D,MEMAD ; PNTR TO SM10 MEMORY ADDRESS
2966
2967 005162 076 002 DMINT: MVI A,02 ; BIT TO SAY "WRITE FUNCTION"
2968
2969 005164 107 DN2ND: MOV B,A ; SAVE FUNCTION STATUS
2970 005165 315 172 033 CALL ADATP ; ***** I/O WRT 103,105,107,111,113 *****
2971
2972 005170 170 MOV A,B ; GET FUNCTION DATA
2973 005171 323 113 OUT A0003 ; ***** I/O WRT 113 *****
2974
2975 005173 076 004 MVI A,04 ; BIT INTO ACCUM FOR "COM/ADR CYCLE"
2976 005175 323 115 OUT BUSARB ; ***** I/O WRT 115/4 *****
2977
2978 005177 315 132 033 CALL WDATT ; ***** I/O WRT 102,104,106,110,112 *****
2979 005202 047 040 .ADDR DMDAT ; PLACE TO GET DATA FOR DEPOSIT
2980
2981 005204 076 001 MVI A,01 ; BIT INTO ACCUM FOR "DATA CYCLE"
2982 005206 323 114 OUT DTARB ; ***** I/O WRT 114/1 *****
2983
2984 ; CHECK TO SEE IF DOING DI OR DM
2985
2986 005210 072 164 040 LDA DIFLAG ; GET THE FLAG
2987 005213 247 ANA A ; SET THE CONDITION CODES
2988 005214 302 221 012 JNZ DMCONT ; IF .NE. 0, THEN YOU GOT THE CODE FOR A DI
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 82
CMDS.M80 *** "DN" CMD ***
2990
2991 ; OTHERWISE, FALL THRU TO DO A DM
2992
2993 005217 076 362 DMGO: MVI A,^O362 ; BITS FOR "CHECK NXM","CONSOLE REQ","T ENB
2994 ; FOR COM/ADR","T ENB FOR DATA CYCLE"
2995 ; (LATCH DATA SENT PREVENTS FALSE PAR ERR)
2996 005221 323 210 DMCONT: OUT BUSCTL ; *****I/O WRT 210/362 *****
2997
2998 005223 257 XRA A ; CLEAR THE ACCUM
2999 005224 062 164 040 STA DIFLAG ; AND CLEAR THE FLAG
3000
3001 005227 BUSRESP ARBRESP ; ***** I/O RD 301 *****
(1) 005227 315 231 032 CALL BUSRESP ; DO A CALL TO EXECUTE THIS CODE
(1) 005232 020 .BYTE ARBRESP ; BITS TO BE CHECKED
3002 005233 302 011 036 JNZ NOARB ; IF NO "BUS REQ", ARB FAILED, SO ABORT
3003
3004 ; IF THAT WAS OK, CHECK FOR NON-EXISTANT MEMORY
3005
3006 005236 BUSRESP NONXMEM ; ***** I/O RD 301 *****
(1) 005236 315 231 032 CALL BUSRESP ; DO A CALL TO EXECUTE THIS CODE
(1) 005241 100 .BYTE NONXMEM ; BITS TO BE CHECKED
3007 005242 302 025 036 JNZ NIXOM ; IF FLAG SAYS NXM, THEN WE JUMP
3008
3009 ; ELSE ALL OK....
3010
3011 005245 ENDCMD
(1) 005245 311 RET ; RETURN TO CALLER
3012
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 83
CMDS.M80 *** "DN" CMD ***
3014 .SBTTL *** "DN" CMD ***
3015
3016 ; ROUTINE WILL DEPOSIT NEXT, JUST AS THE LAST
3017
3018 005246 052 033 040 DNCMD: LHLD DNEXT ; GET CODE FOR WHICH DEPOSIT IS NEXT
3019 005251 021 262 012 LXI D,DNLST ; PNTR TO DISPATCH LIST
3020 005254 031 DAD D ; ADD GIVES PNTR TO WHICH IS NEXT
3021
3022 005255 136 MOV E,M ; LO ORDER PIECE TO REG
3023 005256 043 INX H ; UPDATE MEM PNTR
3024 005257 126 MOV D,M ; HI ORDER PIECE TO REG
3025 005260 353 XCHG ; NOW THE DISPATCH GOES TO "H,L"
3026 005261 351 PCHL ; AND DISPATCH
3027
3028 005262 142 012 DNLST: .ADDR DNDM ; DISPATCH FOR DEP NEXT TO MEM
3029 005264 332 012 .ADDR DNDI ; FOR DEPOSIT NEXT TO I/O
3030 005266 062 013 .ADDR DNDK ; FOR DEPOSIT NEXT TO KONSOLE
3031 005270 040 016 .ADDR DNDC ; FOR DEPOSIT NEXT CRAM
3032
3033 .SBTTL *** "EI" CMD ***
3034
3035 005272 EICMD: RUN.. ; ILLEGAL COMMAND IF CPU RUNNING
(1) 005272 347 RST 4
(1) 005273 006 .BYTE 6
3036 005274 332 302 012 JC EI1 ; SKIP CODE IF AT END OF COMMAND
3037 005277 315 050 013 CALL LICMD ; FETCH UP THE DESIRED I/O ADDRESS
3038
3039 005302 076 002 EI1: MVI A,2 ; DISP CODE FOR EXAMINE NEXT..
3040 005304 062 031 040 STA ENEXT ; TELL EXAMINE NEXT TO COME HERE
3041
3042 005307 021 024 040 LXI D,IOAD ; "H,L" GETS PNTR TO ADDR BUFFER
3043
3044 005312 076 143 MVI A,^O143 ; SPECIAL CODE FOR WHEN DOING DI
3045 005314 062 163 040 STA EIFLAG ; PASS IT TO ROUTINE
3046
3047 005317 076 014 MVI A,^O14 ; BITS FOR "I/O FUNC" & "READ FUNC"
3048 005321 303 366 011 JMP EN2ND ; JUMP TO COMMON CODE
3049
3050
3051 ; EXAMINE I/O ENTRY PNT FOR EXAMINE NEXT SITUATION
3052
3053 005324 315 363 012 ENEI: CALL IO.INC ; GO INCREMENT I/O ADDRESS TWICE
3054 005327 303 302 012 JMP EI1 ; THEN ON TO COMMON CODE
3055
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 84
CMDS.M80 *** "DI" CMD ***
3057 .SBTTL *** "DI" CMD ***
3058 .SBTTL *** "DN" CMD ***
3059
3060 005332 315 363 012 DNDI: CALL IO.INC ; GO INCREMENT THE I/O ADDRESS TWICE
3061 005335 DICMD: ARG36 ; OTHERWISE GO ASSEMBLE THE ARG
(1) 005335 347 RST 4
(1) 005336 010 .BYTE 8
3062 005337 047 040 .ADDR DMDAT ; AND STORE IT HERE
3063
3064 005341 076 002 DI1: MVI A,02 ; SET WORD THAT SAYS DEP NEXT WILL BE DI
3065 005343 062 033 040 STA DNEXT ; AND SAVE FOR "DN" CMD
3066
3067 005346 021 024 040 LXI D,IOAD ; PNTR TO ADDRESS DATA TO USE
3068
3069 005351 076 160 MVI A,^O160 ; SET CODE FOR USE BY DI COMMAND
3070 005353 062 164 040 STA DIFLAG ; AND PASS IT TO ROUTINE
3071
3072 005356 076 012 MVI A,^O012 ; BITS TO SAY "I/O FUNC" & "WRITE FUNC"
3073 005360 303 164 012 JMP DN2ND ; AND JUMP TO COMMON CODE
3074
3075 005363 315 051 033 IO.INC: CALL INC36 ; NOW INCREMENT I/O ADDRESS
3076 005366 024 040 .ADDR IOAD ; ITS RIGHT HERE
3077 005370 315 051 033 CALL INC36 ; NOW INCREMENT I/O ADDRESS
3078 005373 024 040 .ADDR IOAD ; ITS RIGHT HERE
3079 005375 311 RET ; AND BACK
3080
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 85
CMDS.M80 *** "EK" CMD ***
3082 .SBTTL *** "EK" CMD ***
3083
3084 ; ROUTINE EXAMINES 8080 LOCATIONS
3085
3086 005376 332 005 013 EKCMD: JC EK1 ; IF NOT, NO ARG TO BE ASSEMBLED
3087
3088 ; OTHERWISE, MUST ASSEMBLE ARG
3089
3090 005401 ARG16 ; GO GET 16 BIT ADDR TO EXAMINE
(1) 005401 347 RST 4
(1) 005402 004 .BYTE 4
3091 005403 002 040 .ADDR C80AD ; AND PUT INTO CURRENT ADDR BUFFER
3092
3093 005405 076 004 EK1: MVI A,04 ; INDEX SAYS EK IS NEXT
3094 005407 062 031 040 STA ENEXT ; SAVE IN THE RAM
3095
3096 005412 041 002 040 LXI H,C80AD ; GET CURRENT ADDR
3097 005415 315 303 030 CALL P16 ; AND PRINT IT AS IS
3098
3099 005420 PSLASH ; NOW A "/"
(2) 005420 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 005421 057 .BYTE SLASH ; CHAR TO PRINT
3100
3101 005422 052 002 040 LHLD C80AD ; GET ADDR JUST PRINTED
3102 005425 176 MOV A,M ; PASS ARG TO PRINT IN THE ACCUM AND
3103 005426 303 000 017 JMP P8CRLF ; PRINT DATA PLUS CRLF, FOR FREE
3104
3105
3106
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 86
CMDS.M80 *** "EN" CMD ***
3108 .SBTTL *** "EN" CMD ***
3109
3110 005431 052 002 040 ENEK: LHLD C80AD ; GET CURRENT 8080 ADDRESS
3111 005434 043 INX H ; UPDATE
3112 005435 042 002 040 SHLD C80AD ; PUT IT BACK
3113 005440 303 005 013 JMP EK1 ; COMMON CODE
3114
3115 .SBTTL *** "LA" CMD ***
3116
3117 005443 LACMD: ARG36 ; OTHERWISE, GET ARG & PUT IN 36-BIT BUFFER
(1) 005443 347 RST 4
(1) 005444 010 .BYTE 8
3118 005445 017 040 .ADDR MEMAD ; PLACE TO PUT DATA
3119 005447 ENDCMD ; AND DONE
(1) 005447 311 RET ; RETURN TO CALLER
3120
3121
3122 .SBTTL *** "LI" CMD ***
3123
3124 005450 LICMD: ARG36 ; GET ARG AND PUT INTO A TEMP BUFFER
(1) 005450 347 RST 4
(1) 005451 010 .BYTE 8
3125 005452 024 040 .ADDR IOAD ; THIS TEMP BUFFER
3126 005454 ENDCMD ; AND DONE
(1) 005454 311 RET ; RETURN TO CALLER
3127
3128 .SBTTL *** "LK" CMD ***
3129
3130 ; ROUTINE SETS CURRENT 8080 ADDRESS INTO RAM..
3131 ; IF USER TRIES TO DEPOSIT PROM, TOO BAD. HE SHOULD KNOW BETTER
3132
3133 005455 LKCMD: ARG16 ; IF OK, GO ASSEMBLE 16 BIT ARG
(1) 005455 347 RST 4
(1) 005456 004 .BYTE 4
3134 005457 002 040 .ADDR C80AD ; THIS IS A GOOD PLACE TO KEEP IT
3135 005461 ENDCMD ; AND END
(1) 005461 311 RET ; RETURN TO CALLER
3136
3137 .SBTTL *** "DN" CMD ***
3138
3139 005462 052 002 040 DNDK: LHLD C80AD ; GET 8080 ADDRESS
3140 005465 043 INX H ; INCREMENT BY 1
3141 005466 042 002 040 SHLD C80AD ; PUT IT BACK
3142
3143 ; FALL INTO THE "DK" COMMAND
3144
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 87
CMDS.M80 *** "DK" CMD ***
3146 .SBTTL *** "DK" CMD ***
3147
3148 ; CODE TO DEPOSIT INTO 8080 RAM.. IF U TRY TO DEPOSIT PROM
3149 ; ITS YOUR OWN FAULT.
3150
3151 005471 315 230 030 DKCMD: CALL ARG16. ; OK, NOW GO ASSEMBLE 16 BITS OF DATA
3152
3153 005474 175 MOV A,L ; GET DATA FROM LOC
3154 005475 052 002 040 LHLD C80AD ; AND CURRENT ADDRESS TO "H,L"
3155 005500 167 MOV M,A ; WRITE THE 8-BIT DATA
3156 005501 076 004 MVI A,04 ; GET CODE THAT SAYS 'EN' SHOULD BE "KONSOLE"
3157 005503 062 033 040 STA DNEXT ; AND SAVE IN RAM
3158 005506 ENDCMD ; ALL DONE
(1) 005506 311 RET ; RETURN TO CALLER
3159
3160 .SBTTL *** "CP" CMD ***
3161
3162 ; COMMAND TO SINGLE PULSE THE SM10 CPU CLK
3163
3164 005507 332 127 013 CPCMD: JC CP1 ; IF NO ARG, ONLY GIVE SINGLE CPU CLK
3165 005512 315 230 030 CALL ARG16. ; ELSE GET ARG
3166
3167 ; NOW GIVE NUMBER OF CLKS REQUESTED
3168
3169 005515 175 CPMLT: MOV A,L ; LO ORDER PIECE INTO ACCUM
3170 005516 264 ORA H ; ADD THE HI ORDER PIECE
3171 005517 310 RZ ; ALL DONE IF DOWN TO ZERO
3172
3173 005520 315 127 013 CALL CP1 ; OTHERWISE, GIVE CLOCK
3174 005523 053 DCX H ; DECREMENT
3175 005524 303 115 013 JMP CPMLT ; AND CONTINUE TILL DONE ALL
3176
3177 005527 076 010 CP1: MVI A,^O010 ; SET BIT FOR "SS MODE"
3178 005531 323 204 OUT CRMCTL ; *****I/O WRT 204/010 *****
3179 005533 076 002 MVI A,2 ; SET BIT FOR "SINGLE CLK"
3180 005535 323 206 OUT CLKCTL ; ***** I/O WRT 206/2 *****
3181 005537 ENDCMD ; DONE..
(1) 005537 311 RET ; RETURN TO CALLER
3182
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 88
CMDS.M80 *** "ER" CMD ***
3184 .SBTTL *** "ER" CMD ***
3185
3186 ; COMMAND TO EXAMINE ONE OF THE 8080 INTERNAL REGISTER, AND DISPLAY
3187 ; THE CONTENTS OF THAT REGISTER.
3188
3189 005540 332 152 013 ERCMD: JC ER1 ; IF NO ARG, GO USE THE ONE ALREADY IN THE RAM
3190
3191 005543 315 230 030 CALL ARG16. ; ELSE, PICK UP THE ARG THAT WAS TYPED
3192
3193 ; FALL TO HERE IF ARG OK..
3194
3195 005546 175 MOV A,L ; GET ACTUAL ARG INTO THE ACCUM
3196 005547 062 123 040 STA ERADDR ; WELL, BEST SAVE THIS THING IN THE RAM
3197 005552 072 123 040 ER1: LDA ERADDR ; COMMON TYPE CODE.. A NO-OP IF ARG WAS TYPED
3198
3199 005555 365 PUSH PSW ; NOW SAVE ACCUM PLEASE
3200 005556 315 270 030 CALL P8BITA ; PRINT NAME OF 8080 REG THAT IS BEING EXAMINED
3201 005561 PSLASH ; AND SEPARATE FROM ITS CONTENTS WITH A SLASH
(2) 005561 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 005562 057 .BYTE SLASH ; CHAR TO PRINT
3202
3203 005563 361 POP PSW ; RESTORE ACCUM PLEASE
3204 005564 315 212 013 CALL ER.UTL ; EXECUTE THE INSTR PAIR FROM THE RAM SPACE
3205
3206 ; BACK HERE AND THE DATA IS IN THE ACCUM
3207
3208 005567 315 000 017 CALL P8CRLF ; PRINT THE RESULTS
3209 005572 311 RET ; AND DONE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 89
CMDS.M80 *** "ER" CMD ***
3211
3212 ; ROUTINE TO EXECUTE AN "IN" OR "OUT" FROM THE 8080 RAM SPACE
3213
3214 005573 042 070 040 RAMXCT: SHLD ER.LOC ; THE "IN/OUT" AND THE REG NUMBER INTO RAM SPACE
3215 005576 365 PUSH PSW ; SAVE ACCUM, IN CASE ROUTINE IS AN "OUT"
3216 005577 076 311 MVI A,.RET ; A "RETURN" INTO ACCUM
3217 005601 062 072 040 STA ER.LOC+2 ; AND THEN THE RETURN GETS PUT INTO RAM SPACE
3218 005604 361 POP PSW ; RESTORE ACCUM, ANYWAY
3219 005605 315 070 040 CALL ER.LOC ; GO EXECUTE THE RAM LOC
3220 005610 057 CMA ; FIX HARDWARE INVERSION
3221 005611 311 RET ; BACK TO CALLER
3222
3223 ; ROUTINE ER.UTL.. DOES AN EXAMINE REGISTER, INTERNAL TYPE FORMAT.
3224 ; NO PRINTING, JUST THE EXAMINE. PASS DESIRED I/O REG ADDRESS IN
3225 ; ACCUM. ACCUM GETS THE RESULTS OF THE READ.
3226
3227 005612 345 ER.UTL: PUSH H ; SAVE H,L PAIR
3228 005613 147 MOV H,A ; NOW, THE NUMBER TYPED IS PUT INTO HI HALF
3229 005614 056 333 MVI L,.IN ; AND AN "IN" INSTR GOES LO HALF
3230
3231 005616 315 173 013 CALL RAMXCT ; NOW ACTUALLY EXECUTE THE CODE TO DO THE READ
3232 005621 341 POP H ; FIX H,L
3233 005622 311 RET ; OUT
3234
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 90
CMDS.M80 *** "LR" CMD ***
3236 .SBTTL *** "LR" CMD ***
3237
3238 ; COMMAND TO SET INTO THE 8080 RAM, THE I/O REGISTER TO BE EITHER
3239 ; DEPOSITED OR EXAMINED.
3240
3241 005623 315 230 030 LRCMD: CALL ARG16. ; FETCH IN THE NUMBER TYPED
3242
3243 005626 175 MOV A,L ; DESIRED REG TO ACCUM
3244 005627 062 123 040 STA ERADDR ; PUT IN 8080 RAM
3245 005632 311 RET ; AND OUT
3246
3247
3248 .SBTTL *** "DR" CMD ***
3249
3250 ; COMMAND TO DEPOSIT A NUMBER INTO THE LAST SPECIFIED 8080 I/O REG.
3251
3252 005633 DRCMD: ARG16
(1) 005633 347 RST 4
(1) 005634 004 .BYTE 4
3253 005635 275 040 .ADDR T80DT ; TAKE ARG AND PUT INTO RAM SPACE
3254
3255 005637 056 323 MVI L,.OUT ; "L" GETS THE OPERATION TYPE WE WILL PERFORM
3256 005641 072 123 040 LDA ERADDR ; FETCH UP THE CURRENTLY SELECTED I/O REG
3257 005644 147 MOV H,A ; AND PUT IT INTO THE "H"
3258 005645 072 275 040 LDA T80DT ; NOW THE DATA TO BE WRITTEN GOES TO THE ACCUM
3259
3260 005650 315 173 013 CALL RAMXCT ; PERFORM THE OPERATION
3261 005653 311 RET ; THATS ALL
3262
3263 .SBTTL *** "LC" CMD ***
3264
3265 ; COMMAND TO LOAD THE 8080 RAM CURRENT CRAM ADDRESS
3266
3267 005654 LCCMD: ARG16 ; OK, ASSEMBLE THE 16 BITS
(1) 005654 347 RST 4
(1) 005655 004 .BYTE 4
3268 005656 004 040 .ADDR CRMAD ; TEMP PLACE TO KEEP BITS
3269 005660 ENDCMD ; DONE..
(1) 005660 311 RET ; RETURN TO CALLER
3270
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 91
CMDS.M80 *** "CE" CMD ***
3272 .SBTTL *** "CE" CMD ***
3273
3274 ; COMMAND TO SET CACHE ENABLE ON THE CSL BOARD
3275 ; OR PERHAPS CLR CACHE ENABLE IF DESIRED.
3276
3277 005661 332 312 013 CECMD: JC CEDIS ; IF NO ARG, DISPLAY "CACHE ENABLE"
3278
3279 005664 315 230 030 CALL ARG16. ; MUST ASSEMBLE ARG IF FALL THRU
3280
3281 005667 175 MOV A,L ; ARG TO ACCUM
3282 005670 027 RAL ; BIT 0 TO 1
3283 005671 027 RAL ; BIT TO 2
3284 005672 027 RAL ; BIT TO 3
3285 005673 346 010 ANI ^O10 ; OFF ALL BITS BUT THE CACHE BIT
3286 005675 107 MOV B,A ; SAVE RESULT IN "B" FOR A LITTLE WHILE
3287 005676 072 354 040 LDA PARBT ; GET CURRENT PARITY BIT STATUS
3288 005701 346 367 ANI ^O367 ; OFF THE CACHE BIT
3289
3290 ; HERE IS SOME COMMON CODE, USEFUL BY ROUTINES WHICH MUST ADJUST
3291 ; THE DATA IN THE PARBT LOCATION.
3292
3293 005703 260 ENACOM: ORA B ; ADD NEW DATA TO DEFAULTED "PARBT"
3294 005704 062 354 040 KS.PAR: STA PARBT ; NOW SAVE THE NEW DEFAULT
3295 005707 323 100 OUT RESET ; ***** I/O WRT 100/STUFF *****
3296 005711 ENDCMD ; AND ALL DONE
(1) 005711 311 RET ; RETURN TO CALLER
3297
3298 ; CODE ENTERED WHEN WE WANT TO DISPLAY THE CACHE ENABLE STATUS
3299
3300 005712 072 354 040 CEDIS: LDA PARBT ; GET CURRENT STATUS
3301 005715 346 010 ANI ^O10 ; IS THE CACHE BIT SET?
3302 005717 302 326 013 CHOOSE: JNZ PNT.ON ; HERE IF YES
3303 005722 PLINE OFFMSG ; OFF MESSAGE DEPENDING THINGS
(1) 005722 337 RST 3 ; PRINT LINE OF CHARS
(1) 005723 143 037 .ADDR OFFMSG ; BUFF TO PRINT
3304 005725 311 RET
3305 005726 PNT.ON: PCHAR 'O ; PRINTING "ON" A CHAR AT A TIME SAVES 1 BYTE
(1) 005726 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 005727 117 .BYTE 'O ; CHAR TO PRINT
3306 005730 PCHAR 'N ; OVER PRINTING IT AS A STRING..SPACE IS A LITTLE TIGHT
(1) 005730 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 005731 116 .BYTE 'N ; CHAR TO PRINT
3307 005732 PCRLF
(2) 005732 347 RST 4
(2) 005733 002 .BYTE 2
3308 005734 311 RET
3309
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 92
CMDS.M80 *** "TE" CMD ***
3311 .SBTTL *** "TE" CMD ***
3312
3313 ; CONSOLE COMMAND TO ENABLE OR DISABLE THE 1 MSEC CLOCK
3314
3315 005735 332 361 013 TECMD: JC TEDIS ; IF NO ARG, DISPLAY CURRENT STATE
3316
3317 005740 315 230 030 CALL ARG16. ; OTHERWISE, GO FETCH THE ARG
3318
3319 005743 175 MOV A,L ; GET INFO JUST TYPED
3320 005744 027 RAL ; BIT 0 TO 1
3321 005745 027 RAL ; BIT TO 2
3322 005746 346 004 ANI ^O4 ; OFF ALL BUT THE TIME BIT
3323 005750 107 MOV B,A ; SAVE STUFF IN B
3324 005751 072 354 040 LDA PARBT ; GET CURRENT DEFAULT
3325 005754 346 373 ANI ^O373 ; OFF THE 1 MSEC CLOCK SIGNAL
3326
3327 005756 303 303 013 JMP ENACOM ; GO DO COMMON CODE
3328
3329 ; THIS CODE ENTERED WHEN WE ONLY WANT TO DISPLAY CURRENT STATE OF 1 MSEC CLOCK
3330
3331 005761 072 354 040 TEDIS: LDA PARBT ; WE NEED TO REPORT STATE..GET DEFAULT
3332 005764 346 004 ANI ^O4 ; IS THE BIT SET??
3333 005766 303 317 013 JMP CHOOSE ; GO TO COMMON PLACE THAT CHOOSES "YES" OR "NO"
3334
3335 .SBTTL *** "SC" CMD ***
3336
3337 ; CODE TO TURN OFF OR ON, THE ABILITY TO RECOVER FROM SOFT CRAM ERRORS.
3338 ; FLAG AT 0, MEANS TRY AND RECOVER, THEREFORE ITS THE DEFAULT ON
3339 ; MACHINE POWER ON...
3340
3341 005771 332 017 014 SCCMD: JC SCDIS ; IF NO ARG TYPED, GO DISPLAY STATE OF SC
3342
3343 005774 315 230 030 CALL ARG16. ; ELSE GO GATHER UP AN ARGUMENT
3344 005777 175 MOV A,L ; ARG GOES INTO ACCUM
3345 006000 247 ANA A ; SET 8080 FLAGS
3346 006001 312 011 014 JZ SC.TOFF ; IF ZERO , TURN OFF SC SOFT CRAM RECOVERY
3347
3348 ; FALL THRU IF TURNING ON SCE
3349
3350 006004 257 XRA A ; ZERO ACCUM
3351 006005 062 326 042 STA SC.OFF ; SO THAT WE CAN SET THE APPROPRIATE FLAG
3352 006010 ENDCMD ; THAT'S IT
(1) 006010 311 RET ; RETURN TO CALLER
3353 006011 076 377 SC.TOFF: MVI A,-1 ; WANT TO TURN OFF SCE, NEED -1 TO DO IT
3354 006013 062 326 042 STA SC.OFF ; ZAP
3355 006016 ENDCMD ; AND OUT
(1) 006016 311 RET ; RETURN TO CALLER
3356
3357 006017 072 326 042 SCDIS: LDA SC.OFF ; GRAB THE FLAG
3358 006022 057 CMA ; SINCE 0 = ON, WE MUST INVERT FLAVOR OF FLAG
3359 006023 247 ANA A ; SET 8080 PROCESSOR FLAGS
3360 006024 303 317 013 JMP CHOOSE ; AND GO PRINT THE RIGHT THING
3361
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 93
CMDS.M80 *** "TP CMD" ***
3363 .SBTTL *** "TP CMD" ***
3364
3365 ; CONSOLE COMMAND TO ENABLE OR DISABLE THE TEN STYLE TRAPS
3366
3367 006027 332 047 014 TPCMD: JC TPDIS ; GO DISPLAY CURRENT STATE IF NOTHING TYPED
3368
3369 006032 315 230 030 CALL ARG16. ; OTHERWISE, GO ASSEMBLE A NUMBER TYPED IN
3370
3371 006035 175 MOV A,L ; GET INFO THAT WAS TYPED
3372 006036 027 RAL ; BIT 0 TO 1
3373 006037 027 RAL ; 1 TO 2
3374 006040 027 RAL ; 2 TO 3
3375 006041 027 RAL ; 3 TO 4
3376 006042 346 020 ANI ^O20 ; OFF ALL BUT TRAP BIT
3377 006044 303 351 021 JMP TP.SET ; JUMP TO PLACE THAT SETS TRAPS, AND SAVES DATA
3378
3379 ; CODE TO DISPLAY CURRENT STATE OF SIGNAL
3380
3381 006047 072 355 040 TPDIS: LDA TRAPEN ; GET CURRENT STATE OF TRAPS BIT
3382 006052 346 020 ANI ^O20 ; SET CONDITION CODES
3383 006054 303 317 013 JMP CHOOSE ; AND GO DO IT
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 94
CMDS.M80 *** "TP CMD" ***
3385
3386 .SBTTL *** "LT" CMD ***
3387
3388 ; CONSOLE COMMAND TO TURN ON THE LIGHTS ON THE CONSOLE FRONT PANEL
3389
3390 006057 LTCMD: CLRB KLNKSW ; FORCE A FIXING OF THE LIGHTS
3391 006061 076 007 MVI A,7 ; LOAD ACCUM WITH A BIT FOR EACH OF 3 LIGHTS
3392 006063 323 101 OUT LIGHTS ; ***** I/O WRT 101/7 *****
3393 006065 315 073 014 CALL LTDLY ; LEAVE LIGHTS ON FOR ABOUT A SECOND
3394 006070 257 XRA A ; CLEAR ACCUM
3395 006071 323 101 OUT LIGHTS ; ***** I/O WRT 101/0 *****
3396
3397 ; FALL INTO CODE THAT WAITS A WHILE WITH THE LIGHTS OFF
3398
3399 006073 041 054 001 LTDLY: LXI H,300 ; DELAY ABOUT A SECOND AND A HALF
3400
3401 006076 315 261 033 LTLOOP: CALL DELAY. ; GO DO A LITTLE DELAY
3402 006101 377 .BYTE -1 ; MAX COUNT
3403
3404 006102 053 DCX H ; DOWN THE COUNT
3405 006103 175 MOV A,L ; GET PIECE OF THE COUNT
3406 006104 264 ORA H ; THROW IN THE REST OF THE COUNT
3407 006105 302 076 014 JNZ LTLOOP ; CONTINUE WAITING
3408 006110 072 360 040 LDA STATE ; (5.2A) MUST GUARANTEE DTR HAS BEEN RESTORED
3409 006113 323 101 OUT DTR ; (5.2A) DO IT
3410 006115 311 RET ; UNTIL ALL DONE
3411
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 95
CMDS.M80 *** "MM" CMD ***
3413 .SBTTL *** "MM" CMD ***
3414
3415 ; COMMAND TO PUT THE 8080 INTO MANUFACTURING MODE. SETS THE STATE FOR
3416 ; THE KLINIK LINE THEN SENDS A COMMUNICATIONS CLEAR TO WHATEVER IS AT
3417 ; THE OTHER END OF THE KLINIK LINE.
3418
3419 006116 315 037 034 MMCMD: CALL SETM4 ; SET KLINIK LINE TO MODE 4
3420 006121 076 041 MVI A,^O41 ; WE MUST ALWAYS RESET THE MESSAGE NUMBERS
3421 006123 062 361 040 STA LSTMSG ; THIS IS THE "RECEIVE" MESSAGE NUMBER
3422 006126 062 011 042 STA ENVMNO ; AND THIS IS THE "SEND" MESSAGE NUMBER
3423 006131 062 251 040 STA MMFLG ; SAY MANUFACTURING MODE HAS BEEN ENTERED
3424 006134 315 365 035 CALL Z.TBUF ; CLEAR SOME COMMUNICATION DEC10 BUFFERS
3425 006137 303 325 034 JMP DECEX2 ; CLEAR THE MAILING ENVELOPES
3426 ; **USING JMP USES OTHER GUY'S RETURN TO RETURN
3427
3428 .SBTTL *** "SI" CMD ***
3429
3430 ; COMMAND TO CAUSE SM10 TO EXECUTE A SINGLE INSTR.
3431
3432 006142 333 300 SICMD: IN RUNFP ; BEFORE CONTINUING,MUST READ MACHINE STATE
3433 006144 346 004 ANI 4 ; IS RUN FLOP SET (ALREADY RUNNING?)(TRUE LO)
3434 006146 312 013 027 JZ YSRUN ; IF YES, GO PRINT ?RUN MSG AND ABORT COMMAND
3435
3436 006151 076 001 MVI A,01 ; SET BIT FOR "CONTINUE"
3437 006153 323 212 OUT CPUCTL ; ***** I/O WRT 212/1 *****
3438 006155 315 036 017 CALL DNF ; CHECK THAT INSTR FINISHED
3439 006160 303 305 016 JMP PCCOM ; AND GO TO TYPE OUT THE PC
3440
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 96
CMDS.M80 *** "CS" CMD ***
3442 .SBTTL *** "CS" CMD ***
3443
3444 ; COMMAND TO START THE SM10 CPU CLK RUNNING.
3445
3446 006163 315 241 032 CSCMD: CALL SETRN ; SET CLK "RUNNING" FLAG
3447 006166 257 XRA A ; CLR ACCUM TO CLR "SS MODE"
3448 006167 323 204 OUT CRMCTL ; ***** I/O WRT 204/0 *****
3449 006171 076 003 MVI A,03 ; SET BITS FOR "CLK RUN" & "SINGLE CLK"
3450 006173 323 206 OUT CLKCTL ; ***** I/O WRT 206/3 *****
3451 006175 ENDCMD ; DONE..
(1) 006175 311 RET ; RETURN TO CALLER
3452
3453 .SBTTL *** "CH" CMD ***
3454
3455 ; COMMAND TO HALT THE SM10 CPU CLK
3456
3457 006176 315 255 032 CHCMD: CALL CLRRN ; CLEAR CLK "RUNNING" FLAG
3458 006201 076 010 MVI A,^O010 ; SET BIT FOR "SS MODE"
3459 006203 323 204 OUT CRMCTL ; ***** I/O WRT 204/010 *****
3460 006205 257 XRA A ; CLR BITS FOR "SINGLE CLK" & "CLK RUN"
3461 006206 323 206 OUT CLKCTL ; ***** I/O WRT 206/0 *****
3462 006210 ENDCMD ; DONE..
(1) 006210 311 RET ; RETURN TO CALLER
3463
3464
3465 .SBTTL *** "LF" CMD ***
3466
3467 ; COMMAND TO "LOAD FUNCTION". SPECIFIES WHICH DIAG FUNCTION WRITE
3468 ; TO DO ON THE NEXT "DF" COMMANDS.
3469
3470 006211 315 230 030 LFCMD: CALL ARG16. ; GO ASSEMBLE 16 BIT ARG(WE ONLY NEED 4 BITS)
3471
3472 006214 042 010 040 SHLD CRMFN ; PERMANENT HOME FOR DATA
3473 006217 ENDCMD ; DONE..
(1) 006217 311 RET ; RETURN TO CALLER
3474
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 97
CMDS.M80 *** "DF" CMD ***
3476 .SBTTL *** "DF" CMD ***
3477
3478 ; ROUTINE WRITES THE DATA TYPED USING THE DIAG FUNCTION
3479 ; PREVIOUSLY SPECIFIED BY LF COMMAND.
3480
3481 006220 DFCMD: RUN.. ; IS CPU RUNNING?
(1) 006220 347 RST 4
(1) 006221 006 .BYTE 6
3482
3483 006222 315 230 030 CALL ARG16. ; GO ASSEMBLE ARG
3484
3485 ; NEXT ROUTINE DOES LOTS OF I/O WRTS TO SM10 CPU ALL WHILE TRYING TO
3486 ; WRITE DIAGNOSTIC ADDRESS REG FOR CRAM LOADING OR READING..
3487
3488 006225 345 PUSH H ; SAVE DATA TO BE DEPOSITED
3489 006226 315 264 014 CALL CRM.AD ; WRITE THE CRAM ADDRESS
3490 006231 341 POP H ; GET DATA TO BE DEPOSITED
3491
3492 006232 175 WFUNC: MOV A,L ; GET DATA FOR BITS 28-35 INTO ACCUM
3493 006233 323 103 OUT A2835 ; ***** I/O WRT 103 *****
3494 006235 174 MOV A,H ; GET DATA FOR BITS 20-27
3495 006236 323 105 OUT A2027 ; ***** I/O WRT 105 *****
3496
3497 006240 257 WFNC1: XRA A ; CLR ACCUM
3498 006241 323 115 OUT BUSARB ; ***** I/O WRT 115/0 *****
3499
3500 006243 076 144 MVI A,^O144 ; BITS FOR "CONS REQ","T ENB FOR COM/ADR","CRA R CLK"
3501 006245 323 210 OUT BUSCTL ; ***** I/O WRT 210/144 *****
3502
3503 006247 072 010 040 LDA CRMFN ; GET DIAG FUNCTION
3504 006252 323 205 OUT DIAG ; ***** I/O WRT 205/FNC *****
3505
3506 ; NOTE THAT "TRAP EN" WAS JUST ZAPPED, BUT IT IS ONLY USEFUL IF THE
3507 ; MICRO-CODE IS RUNNING AND ANYTHING YOU DO TO GET THE MICRO-CODE
3508 ; RUNNING WILL RESTORE THE TRAP ENABLE. THIS KLUDGE SPEEDS UP
3509 ; MICRO-CODE LOAD.
3510
3511 006254 076 040 MVI A,^O40 ; BIT FOR "CRAM WRT"
3512 006256 323 204 OUT CRMCTL ; ***** I/O WRT 204/40
3513 006260 257 XRA A ; BIT TO CLR "CRAM WRT"
3514 006261 323 204 OUT CRMCTL ; ***** I/O WRT 204/0 *****
3515 006263 ENDCMD ; DONE..
(1) 006263 311 RET ; RETURN TO CALLER
3516
3517 ; SIMPLE LITTLE ROUTINE TO SAVE SOME SPACE..USED IN SEVERAL PLACES
3518
3519 006264 052 004 040 CRM.AD: LHLD CRMAD ; LOAD DIAG ADDR TO BE WRITTEN
3520
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 98
CMDS.M80 *** "DF" CMD ***
3522
3523 ; ROUTINE COUNTS ON DATA IN "H,L"..DESTROYS "H,L"...
3524
3525 006267 076 001 CADWR: MVI A,01 ; BIT FOR CRAM RESET
3526 006271 323 204 OUT CRMCTL ; ***** I/O WRT 204/1 *****
3527 006273 257 XRA A ; CLR BIT TO CLR CRAM RESET
3528 006274 323 204 OUT CRMCTL ; ***** I/O WRT 204/0 *****
3529
3530 ; ***** I/O WRT 103,105,107,111,113 *****
3531
3532 006276 175 MOV A,L ; LO ORDER 8 BITS TO ACCUM
3533 006277 323 103 OUT A2835 ; SET IN HARDWARE REG
3534 006301 174 MOV A,H ; HI ORDER 4 BITS TO ACCUM
3535 006302 323 105 OUT A2027 ; SET INTO HARDWARE REG
3536
3537 006304 257 XRA A ; CLR ACCUM
3538 006305 323 107 OUT A1219 ; CLR OTHER HARDWARE REGS
3539 006307 323 111 OUT A0411
3540 006311 323 113 OUT A0003
3541
3542 006313 323 115 OUT BUSARB ; ***** I/O WRT 115/0 *****
3543
3544 006315 076 144 MVI A,^O144 ; BITS FOR "CONS REQ", "T ENB FOR COM/ADR","CRA R CLK"
3545 006317 323 210 OUT BUSCTL ; ***** I/O WRT 210/144 *****
3546 006321 076 021 MVI A,^O21 ; BIT FOR "CRM ADDR LOAD"
3547 006323 323 204 OUT CRMCTL ; ***** I/O WRT 204/21
3548 006325 257 XRA A ; BIT TO CLR CRAM ADDR LOAD
3549 006326 323 204 OUT CRMCTL ; ***** I/O WRT 204/0 *****
3550 006330 311 RET ; AND RETURN
3551
3552
3553 ; ROUTINE TO READ A SINGLE DIAG FUNC WORTH OF STUFF FROM
3554 ; THE CRA/CRM PROCESSOR BOARDS.
3555
3556 006331 127 READC: MOV D,A ; SAVE DIAG FUNC FOR A SEC..
3557 006332 072 355 040 LDA TRAPEN ; GET CURRENT VALUE FOR TRAP ENABLES
3558 006335 262 ORA D ; MIX TOGETHER
3559 006336 323 205 OUT DIAG ; ***** I/O WRT 205/FNC *****
3560 006340 076 115 MVI A,^O115 ; BITS "CONS REQ","CRA T CLK","R CLK ENB","CRA R CLK"
3561 006342 323 210 OUT BUSCTL ; ***** I/O WRT 210/115 *****
3562
3563 006344 333 000 IN D2835 ; ***** I/O RD 0 *****
3564 006346 057 CMA ; FIX INVERSION
3565 006347 062 100 040 STA TMPB2 ; SAVE IN STANDARD BUFFER
3566
3567 006352 333 001 IN D2027 ; ***** I/O RD 1 *****
3568 006354 057 CMA ; FIX INVERSION
3569 006355 346 017 ANI ^O17 ; KEEP ONLY 12-8
3570 006357 062 101 040 STA TMPB2+1 ; SAVE IN STANDARD BUFFER
3571
3572 006362 257 XRA A ; CLR ACCUM
3573 006363 323 210 OUT BUSCTL ; ***** I/O WRT 210/0 *****
3574
3575 006365 311 RET ; RETURN
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 99
CMDS.M80 *** "RC" ***
3577 .SBTTL *** "RC" ***
3578
3579 006366 RCCMD: RUN.. ; IS CPU RUNNING?
(1) 006366 347 RST 4
(1) 006367 006 .BYTE 6
3580
3581 006370 257 RCINT: XRA A ; CLEAR ACCUM FOR USE AS A COUNTER
3582 006371 001 341 040 LXI B,CRMBF+^D31 ; PNTR TO A BUFFER AREA TO SAVE "RC'S" AS READ
3583 006374 137 RCLP: MOV E,A ; SAVE IN "E" REG
3584 006375 315 331 014 CALL READC ; READ A DIAG FUNC FROM CRA/CRM BRD
3585
3586 ; NOW PRINT WHAT WAS READ
3587
3588 006400 072 120 040 LDA NOPNT ; WE WILL MAKE IT QUICKER IF NOT PRINTING RESULTS
3589 006403 247 ANA A ; SET FLAGS
3590 006404 302 031 015 JNZ RCNOP ; IF NO PRINT, AVOID TYPING CODE
3591
3592 006407 173 MOV A,E ; PUT IN MEM FOR PRINT ROUTINE
3593 006410 315 270 030 CALL P8BITA ; PRINT NAME OF THIS DIAG FUNC
3594 006413 PSLASH ; AND "/"
(2) 006413 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 006414 057 .BYTE SLASH ; CHAR TO PRINT
3595 006415 315 300 030 CALL P16. ; AND PRINT IT
3596 006420 PCRLF
(2) 006420 347 RST 4
(2) 006421 002 .BYTE 2
3597
3598 006422 305 PUSH B ; SAVE COUPLE REGS WHILE GO DECNET
3599 006423 325 PUSH D
3600 006424 315 174 034 CALL DECNET ; YES.. SEND THIS GROUP OF DATA DOWN THE KLINIK LINE
3601 006427 321 POP D ; RETRIEVE THOSE REGISTERS
3602 006430 301 POP B
3603
3604 ; CODE FOR SAVING THE RESULTS OF THESE FUNCTION READS IN THE 8080 RAM SPACE
3605 ; FOR NOW WE WILL SAVE THE RESULTS IN THE PLACE WHERE CRAM DATA IS KEPT.
3606
3607 006431 052 100 040 RCNOP: LHLD TMPB2 ; FETCH UP THE DATA THAT WAS ACTUALLY READ
3608 006434 174 MOV A,H ; GET LO ORDER PIECE TO ACCUM
3609 006435 002 STAX B ; STORE TO PLACE POINTED TO BY "D,E"
3610 006436 013 DCX B ; UPDATE THE STORAGE POINTER
3611 006437 175 MOV A,L ; GET HI ORDER PIECE OF CRAM DATA
3612 006440 002 STAX B ; SAVE IN STORAGE AREA
3613 006441 013 DCX B ; AGAIN DOWNDATE POINTER TO BEGINING OF ACTUAL
3614
3615 006442 034 INR E ; INCREMENT IT
3616 006443 173 MOV A,E ; COPY CURRENT COUNT TO ACCUM FOR THE COMPARE
3617 006444 376 020 CPI ^O20 ; REACHED MAX YET??
3618 006446 302 374 014 JNZ RCLP ; BACK IF NOT YET..
3619
3620 ; OTHERWISE
3621
3622 006451 ENDCMD ; DONE...
(1) 006451 311 RET ; RETURN TO CALLER
3623
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 100
CMDS.M80 *** "EJ" CMD ***
3625 .SBTTL *** "EJ" CMD ***
3626
3627 ; CONSOLE COMMAND TO DISPLAY THE FLOW OF THE CONTROL STORE BY PRINTING
3628 ; OUT THE CURRENT "J-FIELD", "NEXT LOC", "SUBROUTINE RET REG", & "CURRENT
3629 ; LOCATION"
3630
3631 006452 EJCMD: RUN.. ; IS CPU RUNNING?
(1) 006452 347 RST 4
(1) 006453 006 .BYTE 6
3632 006454 041 117 015 LXI H,EJLST ; FIRST GET A PNTR TO ASCII TEXT
3633 006457 001 207 004 LXI B,^B10010000111 ; SET B=4 & C="10,00,01,11"
3634
3635 006462 171 EJLP: MOV A,C ; COPY DIAG FUNC STRING TO ACCUM
3636 006463 346 003 ANI 3 ; STRIP ALL BUT LO ORDER 2 BITS
3637
3638 006465 315 331 014 EJ1: CALL READC ; GO READ DIAG FUNC AS GIVEN BY ACCUM
3639
3640 006470 315 113 004 CALL PLN1 ; PRINT ASCII IDENTIFIER FOR THIS FUNC
3641
3642 006473 345 PUSH H ; SAVE "H,L"
3643 006474 315 300 030 CALL P16. ; AND GO PRINT IT AS 16 BIT OCTAL
3644 006477 PCHAR SPACE
(1) 006477 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 006500 040 .BYTE SPACE ; CHAR TO PRINT
3645 006501 PCHAR SPACE
(1) 006501 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 006502 040 .BYTE SPACE ; CHAR TO PRINT
3646 006503 341 POP H ; GET "H,L" BACK
3647
3648 006504 171 MOV A,C ; GET FUNCTION PICKER
3649 006505 017 RRC ; SHIFT FUNCTION LIST
3650 006506 017 RRC ; 2 PLACES
3651 006507 117 MOV C,A ; PUT BACK FUNCTION
3652
3653 006510 005 DCR B ; NOW DOWN THE COUNTER
3654 006511 302 062 015 JNZ EJLP ; AND JUMP TO THE EXECUTING CODE
3655
3656 006514 PCRLF ; AND A CR-LF
(2) 006514 347 RST 4
(2) 006515 002 .BYTE 2
3657
3658 ; ELSE.. END OF COMMAND
3659
3660 006516 ENDCMD ; RETURN TO CALLER
(1) 006516 311 RET ; RETURN TO CALLER
3661
3662 006517 103 125 122 EJLST: .ASCIZ %CUR/% ; FUNC 03 IS CURRENT CRAM LOCATION
3663 006524 116 130 124 .ASCIZ %NXT/% ; FUNC 01 IS NEXT LOC
3664 006531 112 057 000 .ASCIZ %J/% ; FUNC 00 IS J-FIELD
3665 006534 123 125 102 .ASCIZ %SUB/% ; FUNC 02 IS SUBROUTINE RETURN REG
3666
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 101
CMDS.M80 *** "TR" CMD ***
3668 .SBTTL *** "TR" CMD ***
3669
3670 ; THIS CONSOLE COMMAND TRACES THE FLOW OF THE MICRO-CODE BY TYPING
3671 ; THE 4 KNOWN ADDRESSES FROM THE CONTROL RAM ADDRESS BRD, THEN ISSUING
3672 ; A SINGLE CPU PULSE AND CONTINUING THIS UNTIL THE USER TYPES CARRIAGE
3673 ; RETURN.
3674
3675 006541 332 155 015 TRCMD: JC TR1 ; IF NO ARG, GO LIKE NORMAL
3676 006544 ARG16 ; IF WAS ARG, GO GET IT
(1) 006544 347 RST 4
(1) 006545 004 .BYTE 4
3677 006546 152 040 .ADDR BRKDT ; PLACE TO PUT IT
3678
3679 006550 076 077 MVI A,^O77 ; NOW ANY ARBITRARY,NON-ZERO VALUE
3680 006552 062 151 040 STA BRKON ; TO SAY THAT BREAKING IS ON..
3681
3682 006555 TR1: RUN.. ; IS CPU RUNNING?
(1) 006555 347 RST 4
(1) 006556 006 .BYTE 6
3683 006557 CLRB RPEND ; SO CAN CLR CMD CNTR
3684 006561 072 151 040 TR: LDA BRKON ; CHECK IF BREAK IS ON
3685 006564 247 ANA A ; CHECK FLAG
3686 006565 312 177 015 JZ TRLP ; IF ZERO, DON'T LOOK AT BREAK STUFF
3687 006570 021 152 040 LXI D,BRKDT ; PASS PNTR TO THE DESIRED STOPPING ADDRESS
3688 006573 315 155 030 CALL BREAK ; IF FLAG SET, CALL TO CHECK ADDRESS
3689 006576 310 RZ ; IF RETURN WITH Z-SET, WE ARE AT BREAK PLACE
3690
3691 006577 315 220 015 TRLP: CALL PULSE ; GIVE PULSE
3692 006602 PCRLF ; CARRIAGE RETURN LINE FEED
(2) 006602 347 RST 4
(2) 006603 002 .BYTE 2
3693
3694 006604 072 157 040 LDA RPEND ; GET CMD CNTR
3695 006607 247 ANA A ; IS IT SET?
3696 006610 312 161 015 JZ TR ; WELL, CONT LOOP IF NOT YET
3697
3698 ; OTHERWISE, END THE COMMAND
3699
3700 006613 CLRB BRKON ; AND CLR THE FLAG
3701 006615 ENDCMD ; DONE..
(1) 006615 311 RET ; RETURN TO CALLER
3702
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 102
CMDS.M80 *** "PM" CMD ***
3704 .SBTTL *** "PM" CMD ***
3705
3706 ; CONSOLE COMMAND TO "PULSE" "MICRO-CODE". IE., GIVE A SINGLE PULSE AND
3707 ; THEN AN "EJ" COMMAND. COMMAND IS EQUIVALENT TO THE "TR" TRACE COMMAND,
3708 ; ONLY EXECUTING THE TRACE ONCE.
3709
3710 006616 PMCMD: RUN.. ; IS CLK RUNNING?
(1) 006616 347 RST 4
(1) 006617 006 .BYTE 6
3711
3712 006620 315 127 013 PULSE: CALL CP1 ; GO DO A SINGLE CLOCK
3713 006623 315 052 015 CALL EJCMD ; TYPE CONTROL STORE ADDRESSES & EXIT FROM THERE
3714 006626 ENDCMD ; AND OUT
(1) 006626 311 RET ; RETURN TO CALLER
3715
3716 .SBTTL *** "EC" CMD ***
3717
3718 ; ROUTINE TO READ THE C-RAM AND TYPE IT OUT
3719
3720 006627 ECCMD: RUN.. ; IS CPU RUNNING?
(1) 006627 347 RST 4
(1) 006630 006 .BYTE 6
3721 006631 332 251 015 JC EC2 ; IF NO ARG, DON'T GO ASSEMBLE ONE
3722 006634 315 254 013 CALL LCCMD ; FETCH UP DESIRED CRAM ADDRESS
3723
3724 006637 EC1: CLRRM TMPB2 ; ZAP A TEMPORARY BUFFER
(1) 006637 347 RST 4
(1) 006640 012 .BYTE 10.
(1) 006641 105 040 .ADDR TMPB2+5
3725
3726 006643 315 264 014 CALL CRM.AD ; NOW WRITE DESIRED CRAM ADDRESS
3727 006646 315 127 013 CALL CP1 ; AND GIVE A SINGLE CLK PULSE TO LOAD CNTRL REG
3728
3729 006651 076 006 EC2: MVI A,06 ; SET UP "EXAMINE NEXT" TYPE COMMANDS
3730 006653 062 031 040 STA ENEXT ; SAVE EXAMINE STUFF IN RAM
3731
3732 ; NOW READY TO READ THE CONTROL REG
3733
3734 006656 041 010 016 LXI H,RDLST ; GET PNTR TO DIAG FUNCTIONS TO BE READ
3735
3736 006661 176 ECLP: MOV A,M ; GET DIAG FUNCTION TO ACCUM
3737 006662 043 INX H ; UPDATE PNTR
3738 006663 247 ANA A ; WAS FNC END-OF-LIST(YES IF WAS MINUS)
3739 006664 372 313 015 JM ECBEE ; JMP IF WAS END OF LIST
3740
3741 ; OTHERWISE, WE MUST DO A DIAG FUNCTION
3742
3743 006667 315 331 014 CALL READC ; GO READ THIS DIAG FUNC,DATA RETURNED IN "TMPB2"
3744 006672 042 170 040 SHLD ECSAV ; NOW SAVE "H,L" FOR A MINUTE
3745
3746 006675 041 100 040 LXI H,TMPB2 ; POINTER TO DATA JUST READ
3747 006700 315 016 031 CALL OCTAL ; NOW TURN DATA INTO ASCII OCTAL CHARS
3748 006703 002 .BYTE 2 ; TWO BYTES RELEVANT DATA
3749 006704 004 .BYTE 4 ; WANT 4 OCTAL CHARS
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 102-1
CMDS.M80 *** "EC" CMD ***
3750
3751 006705 052 170 040 LHLD ECSAV ; RESTORE THE "H,L"
3752 006710 303 261 015 JMP ECLP ; AND CONTINUE TILL READ ALL DIAG FUNCS
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 103
CMDS.M80 *** "EC" CMD ***
3754
3755 ; WHEN YOU GET TO HERE, YOU'VE READ ALL FUNCS, NOW READ & CMP A & B COPIES
3756
3757 006713 176 ECBEE: MOV A,M ; GET DIAG FUNC FOR AN "A" COPY
3758 006714 043 INX H ; UPDATE MEM PNTR
3759 006715 247 ANA A ; DID DIAG FUNC HAVE MINUS SIGN?
3760 006716 372 361 015 JM PCRAM ; DONE LIST, JMP IF WAS MINUS
3761
3762 ; OTHERWISE, GO AND READ THE "A" COPY AGAIN
3763
3764 006721 315 331 014 CALL READC ; DATA RETURNED IN "TMPB2"
3765 006724 MOV5B ; MOVE THAT DATA TO 2ND TMP BUFF
(1) 006724 347 RST 4
(1) 006725 000 .BYTE 0
3766 006726 100 040 .ADDR TMPB2 ; SRC OF DATA
3767 006730 073 040 .ADDR TMPBF2 ; PLACE TO PUT IT
3768
3769 006732 176 MOV A,M ; GET DIAG FUNC FOR A "B" COPY
3770 006733 043 INX H ; UPDATE PNTR
3771 006734 315 331 014 CALL READC ; NOW READ A "B" COPY
3772
3773 006737 345 PUSH H ; SAVE "H,L"
3774 006740 315 016 033 CALL CMP36 ; NOW COMPARE THE "A" AND "B" COPIES
3775 006743 100 040 .ADDR TMPB2 ; "B" COPY
3776 006745 073 040 .ADDR TMPBF2 ; "A" COPY
3777 006747 341 POP H ; RESTORE "H,L"
3778 006750 312 313 015 JZ ECBEE ; IF CHECKED OK, BACK TO READ NEXT "A/B" COPIES
3779
3780 ; FALL THRU TO VERIFY ERROR IF "Z" NOT SET
3781
3782 006753 PLINE ECVER ; "?VERIFY ERR"
(1) 006753 337 RST 3 ; PRINT LINE OF CHARS
(1) 006754 073 037 .ADDR ECVER ; BUFF TO PRINT
3783 006756 303 370 014 JMP RCINT ; GO PRINT ALL CRAM REGS
3784
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 104
CMDS.M80 *** "EC" CMD ***
3786
3787 ; IF "A/B" COPIES VERIFIED, TIME TO PRINT C-RAM CONTENTS
3788
3789 006761 076 003 PCRAM: MVI A,03 ; DIAG FUNC TO READ "CURRENT CRAM LOCATION"
3790 006763 315 331 014 CALL READC ; GO READ CURRENT CRAM LOC..
3791 006766 315 300 030 CALL P16. ; PRINT IT
3792 006771 PSLASH ; AND "/"
(2) 006771 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 006772 057 .BYTE SLASH ; CHAR TO PRINT
3793
3794 ; NOW PRINT THE 32 OCTAL CHARS.......
3795
3796 006773 006 040 MVI B,32. ; NUM CHARS TO PRINT
3797 006775 361 PCRLP: POP PSW ; GET A CHAR
3798 006776 315 343 003 CALL PCHR ; PRINT IT
3799 007001 005 DCR B ; DOWN COUNT OF CHARS PRINTED
3800 007002 302 375 015 JNZ PCRLP ; LOOP TILL DONE
3801
3802 007005 PCRLF ; NEED CR-LF
(2) 007005 347 RST 4
(2) 007006 002 .BYTE 2
3803
3804 007007 ENDCMD ; THEN OUT
(1) 007007 311 RET ; RETURN TO CALLER
3805
3806 007010 017 RDLST: .BYTE ^O17 ; READ 84-95
3807 007011 016 .BYTE ^O16 ; READ 72-83
3808 007012 015 .BYTE ^O15 ; READ 60-71
3809 007013 014 .BYTE ^O14 ; READ 48-59
3810 007014 012 .BYTE ^O12 ; READ 36-47A
3811 007015 005 .BYTE ^O5 ; READ 24-35A
3812 007016 004 .BYTE ^O4 ; READ 12-23
3813 007017 000 .BYTE 0 ; READ 0-11
3814 007020 377 .BYTE ^O377 ; END BYTE
3815 007021 012 .BYTE ^O12 ; READ 36-47A
3816 007022 013 .BYTE ^O13 ; READ 36-47B
3817 007023 005 .BYTE ^O5 ; READ 24-35A
3818 007024 006 .BYTE ^O6 ; READ 24-35B
3819 007025 377 .BYTE ^O377 ; END BYTE
3820
3821 .SBTTL *** "EN" CMD ***
3822
3823 007026 052 004 040 ENEC: LHLD CRMAD ; GET CURRENT ADDRESS
3824 007031 043 INX H ; UPDATE IT
3825 007032 042 004 040 SHLD CRMAD ; PUT IT BACK
3826 007035 303 237 015 JMP EC1 ; GO TO COMMON CODE
3827
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 105
CMDS.M80 *** "DC" CMD ***
3829 .SBTTL *** "DC" CMD ***
3830 .SBTTL *** "DN TO DC" CMD ***
3831
3832 ; CODE USED IN DEPOSIT NEXT FOR THE CRAM
3833
3834 007040 052 004 040 DNDC: LHLD CRMAD ; GET CURRENT ADDRESS
3835 007043 043 INX H ; INCREMENT IT
3836 007044 042 004 040 SHLD CRMAD ; PUT IT BACK
3837
3838 007047 DCCMD: RUN.. ; IS CPU RUNNING?
(1) 007047 347 RST 4
(1) 007050 006 .BYTE 6
3839 007051 315 213 031 CALL ARG96 ; ASSEMBLE DATA TO DEPOSIT
3840 007054 322 040 .ADDR CRMTM ; PLACE TO PUT IT
3841
3842 007056 021 302 040 LXI D,CRMBF ; PLACE TO PUT THE RESULTS OF THE CRAM SHUFFLE
3843 007061 041 322 040 LXI H,CRMTM ; THE OLD 12-BYTE FORMAT WILL ALWAYS BE HERE
3844 007064 016 004 MVI C,4 ; LOAD "C" WITH A 4
3845
3846 ; BEGIN THE UNPACKING
3847
3848 007066 315 046 032 GENLP: CALL PLACE ; LOCAL ROUTINE THAT TAKES 12 BITS OF 24.
3849 007071 076 003 MVI A,3 ; A SHIFT 24 REQUIRES 3 BYTES OF DATA TO SHIFT
3850 007073 315 142 031 CALL SHR24 ; SHIFT 12 BITS JUST PACKED INTO OUTER SPACE
3851 007076 014 .BYTE 12. ; TELL ROUTINE 12 PLACES
3852 007077 315 046 032 CALL PLACE ; NOW ROUTINE WILL GET 12 MORE BITS..12+12=24
3853
3854 007102 043 INX H ; UPDATE PNTR 3-BYTES(IE 24 BITS)
3855 007103 043 INX H
3856 007104 043 INX H
3857
3858 007105 015 DCR C ; DOWN THE COUNTER (THERE ARE 4 GROUPS OF 24=96)
3859 007106 302 066 016 JNZ GENLP ; CONTINUE TILL DONE THE 4 GROUPS
3860
3861 007111 315 264 014 CALL CRM.AD ; WRITE THE CRAM ADDRESS
3862 007114 041 302 040 LXI H,CRMBF ; GET PLACE WHERE INFO WAS JUST PLACED
3863
3864 007117 076 006 MVI A,06 ; NUMBER FOR DEPOSIT NEXT TO USE
3865 007121 062 033 040 STA DNEXT ; STANDARD PLACE TO KEEP IT
3866 007124 074 INR A ; SET FUNCTION .EQ. 7 (INR WORKS BY LUCK)
3867 007125 001 010 040 LXI B,CRMFN ; SET AN ADDRESS INTO "B,C" REGISTER,TO USE AS A POINTER
3868 007130 002 DCLP: STAX B ; SAVE IT IN THE RAM AT LOC "CRMFN"
3869
3870 007131 136 MOV E,M ; GET 8 BITS OF DATA
3871 007132 043 INX H ; UPDATE PNTR
3872 007133 126 MOV D,M ; GET 4 MORE BITS OF DATA
3873 007134 043 INX H ; AND UPDATE PNTR AGAIN
3874
3875 007135 353 XCHG ; NOW "H,L" CONTAINS THE DATA & "D,E" THE PNTR
3876 007136 315 232 014 CALL WFUNC ; AND DIAG FUNCTION WRT
3877 007141 353 XCHG ; POINTER BACK TO "H,L"
3878
3879 007142 012 LDAX B ; GET PARTICULAR DIAG FUNC FROM RAM LOC
3880 007143 075 DCR A ; DOWN TO NEXT
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 105-1
CMDS.M80 *** "DN TO DC" CMD ***
3881 007144 362 130 016 JP DCLP ; AS LONG AS 0-7, KEEP GOING
3882 007147 ENDCMD ; NOW ALL DONE
(1) 007147 311 RET ; RETURN TO CALLER
3883
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 106
CMDS.M80 *** "SM" CMD ***
3885 .SBTTL *** "SM" CMD ***
3886
3887 ; CODE TO START THE MICRO-CODE AT THE ADDRESS SPECIFIED. DEFAULTS TO
3888 ; STARTING AT C-RAM LOC 0 IF NO ADDRESS IS GIVEN.
3889
3890 007150 332 161 016 SMCMD: JC SM1 ; IF NO ARG, SUPPLY ADDRESS OF 0000
3891
3892 ; OTHERWISE MUST ASSEMBLE THE GIVEN ADDRESS
3893
3894 007153 315 230 030 CALL ARG16. ; ASSEMBLE 16-BITS OF ARGUMENT
3895
3896 007156 303 164 016 JMP SM1.5 ; OTHERWISE, CONTINUE NORMALLY
3897
3898 007161 041 000 000 SM1: LXI H,00 ; IF HERE, DESIRE ADDRESS OF 0000
3899 007164 042 275 040 SM1.5: SHLD T80DT ; SET ADDR
3900
3901 007167 315 164 005 CALL MRCMD ; RESET THE MACHINE
3902
3903 007172 MOV5B ; SET UP INITIAL DATA
(1) 007172 347 RST 4
(1) 007173 000 .BYTE 0
3904 007174 242 022 .ADDR ONES ; DATA TO BE IS ALL ONES
3905 007176 047 040 .ADDR DMDAT ; PLACE WHERE IT GOES
3906
3907 007200 021 333 016 LXI D,MAD000 ; GET ADDRESS OF MEM LOC 0
3908 007203 315 162 012 CALL DMINT ; "DEPOSIT MEMORY" INTERNAL FORMAT
3909
3910 007206 072 354 040 LDA PARBT ; GET PARITY STUFF
3911 007211 346 140 ANI ^O140 ; ONLY KEEP A LITTLE BIT
3912 007213 323 100 OUT RESET ; AND TURN OF ALL PARITY STUFF WHILE WE DO THIS
3913
3914 007215 052 275 040 LHLD T80DT ; GET START ADDRESS OF MICRO-CODE TO "H,L"
3915 007220 315 267 014 CALL CADWR ; WRITE THE DIAG ADDRESS REG
3916
3917 007223 315 163 014 CALL CSCMD ; START THE CPU CLK FREE RUN
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 107
CMDS.M80 *** "SM" CMD ***
3919
3920 007226 315 261 033 HLTCM: CALL DELAY. ; NOW WAIT FOR MICRO-CODE TO REACH HALT LOOP
3921 007231 377 .BYTE -1
3922 007232 315 305 006 CALL CLRUSE ; EXIT FROM USER MODE
3923 007235 333 300 IN RUNFP ; ***** I/O RD 300 *****
3924 007237 057 CMA ; AND FIX INVERSION
3925 007240 346 010 ANI ^O10 ; IS CPU IN THE HALT LOOP?
3926 007242 302 254 016 JNZ SMVER ; JUMP IF YES..APPEARED TO START OK
3927
3928 ; FALL TO HERE IF SM10 DID NOT SET HALT LOOP FLAG
3929
3930 007245 PLINE SMERR ; PRINT ERR MESSAGE
(1) 007245 337 RST 3 ; PRINT LINE OF CHARS
(1) 007246 135 037 .ADDR SMERR ; BUFF TO PRINT
3931 007250 067 STC ; SET C-BIT TO INDICATE AN ERROR EXIT
3932 007251 303 325 016 JMP SMFINI ; AND EXIT VIA RESTORE PARITY PATH
3933
3934 007254 SMVER: INTON ; SET INTERAL STATUS FOR THE EXAMINE
(1) 007254 327 RST 2 ; GO SET INTERNAL MODE
3935 007255 EXAM 0 ; EXAMINE MEM LOC 0(MICRO-CODE STOP CODE)
(1) 007255 315 202 030 CALL EXAMSH ; AND DO EXAM ASSUMING SHORT ADDRESS
(1) 007260 000 000 .ADDR 0 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
3936 007262 INTOFF ; TURN OFF INTERNAL STATUS
(1) 007262 367 RST 6 ; GO EXIT FROM INTERNAL MODE
3937
3938 ; IT DID SUCCEED IN SETTING HALT LOOP FLAG, SO MERELY PRINT HALTED
3939 ; AND THE DATA IN LOCATION 0..
3940 ; ****SUBROUTINE "STOP CODE" ****
3941
3942 007263 315 241 032 CALL SETRN ; JUST A LITTLE KLUDGE - CHEAP WAY TO FIX STATE
3943 ; LIGHT IF PROGRAM EXECUTED A "HALT" WHILE
3944 ; LITES WERE BLINKY
3945
3946 007266 PLINE HLTMS ; PRINT "HALTED" MESSAGE
(1) 007266 337 RST 3 ; PRINT LINE OF CHARS
(1) 007267 105 037 .ADDR HLTMS ; BUFF TO PRINT
3947 007271 041 012 040 LXI H,EMBUF ; PNTR TO DATA IN LOC 0
3948 007274 315 002 031 CALL P18 ; PRINT RIGHT HALF OF 36-BIT DATA
3949 007277 CLRB CHKHLT ; SET FLAG TO SAY WEVE TYPED HALTED ALREADY
3950
3951 007301 PSPACE ; PRINT A SPACE
(2) 007301 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 007302 040 .BYTE SPACE ; CHAR TO PRINT
3952 007303 PSPACE ; AND ANOTHER
(2) 007303 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 007304 040 .BYTE SPACE ; CHAR TO PRINT
3953 007305 PCCOM: INTON ; SET INTERNAL MODE
(1) 007305 327 RST 2 ; GO SET INTERNAL MODE
3954 007306 EXAM 1 ; EXAMINE WORD WHICH HOLDS THE PC
(1) 007306 315 202 030 CALL EXAMSH ; AND DO EXAM ASSUMING SHORT ADDRESS
(1) 007311 001 000 .ADDR 1 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
3955 007313 INTOFF ; CLR INTERNAL MODE
(1) 007313 367 RST 6 ; GO EXIT FROM INTERNAL MODE
3956 007314 PLINE PCMSG ; PRINT "PC/"
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 107-1
CMDS.M80 *** "SM" CMD ***
(1) 007314 337 RST 3 ; PRINT LINE OF CHARS
(1) 007315 101 037 .ADDR PCMSG ; BUFF TO PRINT
3957 007317 315 333 030 CALL P36. ; AND PRINT THE PC
3958 007322 PCRLF ; PRINT CARRIAGE RETURN LINE-FEED
(2) 007322 347 RST 4
(2) 007323 002 .BYTE 2
3959 007324 247 ANA A ; CLEAR THE C-BIT 'CAUSE ALL OK
3960
3961 ; AND BEFORE WE LEAVE,RESTORE THE PARITY STUFF
3962
3963 007325 072 354 040 SMFINI: LDA PARBT ; GET CURRENT PARITY DEFAULTS
3964 007330 323 100 OUT RESET ; RESTORE THE PARITY DETECTS
3965 007332 311 RET ; AND OUT
3966 007333 ZEROES:
3967 007333 MAD000: D 0,0,,0,0 ; MEMORY ADDRESS 0
3968 ; FROM MEMORY LOCATION 0
3969
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 108
CMDS.M80 *** "PE" CMD ***
3971 .SBTTL *** "PE" CMD ***
3972
3973 ; COMMAND TO ENABLE VARIOUS PARITY CHECKS NORMALLY MADE BY THE 8080..
3974 ; ACCEPTABLE PARITY COMMANDS ARE:
3975 ; PE 0 ; "DISABLE" ALL PARITY DETECTION
3976 ; PE 1 ; "ENABLE" "DP" PARITY DETECT
3977 ; PE 2 ; "ENABLE" "CRM" PARITY DETECTION
3978 ; PE 4 ; "ENABLE" "PE" PARITY DET (CLK FREEZE ON PAR ERR)
3979 ; PE 7 ; "ENABLE" ALL
3980 ; BITS ARE WEIGHTED FOR THE THREE TYPES OF PARITY ERRORS
3981
3982 007340 332 367 016 PECMD: JC PARDIS ; COMMAND REQUIRES ARG
3983
3984 007343 315 230 030 CALL ARG16. ; ASSEMBLE TYPED ARG
3985
3986 007346 175 MOV A,L ; GET NUMBER TYPED INTO THE ACCUM
3987 007347 346 007 ANI ^O7 ; KEEP ONLY APPROPRIATE BITS
3988 007351 027 RAL ; BIT 0 INTO BIT 1
3989 007352 027 RAL ; BIT 0 INTO BIT 2
3990 007353 027 RAL ; INTO BIT 3
3991 007354 027 RAL ; INTO BIT 4
3992
3993 007355 157 MOV L,A ; SAVE IN L
3994 007356 072 354 040 LDA PARBT ; NOW GET CURRENT STATUS
3995 007361 346 217 ANI ^O217 ; OFF THE OLD CRUMMY PARITY
3996 007363 265 ORA L ; THROW IN THESE NEW BITS
3997
3998 007364 303 304 013 JMP KS.PAR ; SAVE IN RAM PLACE & WRITE TO KS
3999
4000
4001 ; THIS IS THE CODE FOR IF WE WANT TO DISPLAY THE PARITY
4002
4003 007367 072 354 040 PARDIS: LDA PARBT ; GET THE CURRENT PARITY STATUS
4004 007372 346 160 ANI ^O160 ; CLR CRUD, JUST SAVING PARITY BITS
4005 007374 037 RAR ; ROTATE TO JUSTIFY THE BITS AT BIT 0
4006 007375 037 RAR
4007 007376 037 RAR
4008 007377 037 RAR
4009
4010 007400 315 270 030 P8CRLF: CALL P8BITA ; AND GO PRINT THOSE 8 BITS
4011 007403 PCRLF ; TERMINATE ALL WITH A CR-LF
(2) 007403 347 RST 4
(2) 007404 002 .BYTE 2
4012 007405 ENDCMD ; ALL DONE
(1) 007405 311 RET ; RETURN TO CALLER
4013
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 109
CMDS.M80 *** "EX" CMD ***
4015 .SBTTL *** "EX" CMD ***
4016
4017 ; CONSOLE COMMAND TO EXECUTE A SINGLE SM10 "TEN ORDER" INSTRUCTION
4018
4019 007406 EXCMD: ARG36 ; GO ASSEMBLE THE INSTR TO BE EXECUTED
(1) 007406 347 RST 4
(1) 007407 010 .BYTE 8
4020 007410 012 040 .ADDR EMBUF ; PLACE TO PUT IT
4021
4022 007412 021 012 040 EXINTM: LXI D,EMBUF ; POINTER TO INSTR INTO "D,E"
4023
4024 007415 315 137 033 EXINT: CALL WDATP ; ***** I/O WRT 102,104,106,101,112 *****
4025
4026 007420 076 002 MVI A,2 ; SET BIT FOR "I/O DATA CYCLE"
4027 007422 323 114 OUT DTARB ; ***** I/O WRT 114/2 *****
4028
4029 007424 076 003 MVI A,3 ; BITS FOR "EXECUTE" & "CONTINUE"
4030 007426 041 272 040 LXI H,HSBFL1 ; (5.2F) SET "H,L" REGISTER TO SPECIAL HSB FLAG
4031 007431 206 ADD M ; (5.2F) ADD IT IN (FOR FRC WILL ADD IN "RUN")
4032 007432 323 212 OUT CPUCTL ; ***** I/O WRT 212/3 *****
4033 007434 066 000 MVI M,0 ; (5.2F) CLEAR HSB FLAG
4034
4035 007436 000 DNF: NOP
4036 007437 000 NOP ; WAIT
4037
4038 007440 333 300 IN RUNFP ; ***** I/O RD 300 *****
4039 007442 057 CMA ; FIX INVERSION
4040 007443 346 001 ANI 1 ; IS CONTINUE STILL SET?
4041 007445 310 RZ ; IF CLR, WE ARE OK...
4042
4043 ; IF CONT STILL SET, WE HAVE AN ERROR
4044
4045 007446 PLINE EXMS ; ERR MESSAGE "?DNF-DID NOT FINISH"
(1) 007446 337 RST 3 ; PRINT LINE OF CHARS
(1) 007447 114 037 .ADDR EXMS ; BUFF TO PRINT
4046 007451 315 305 006 CALL CLRUSE ; EXIT FROM USER MODE
4047 007454 057 CMA ; ACCUM NOW .EQ. -1
4048 007455 247 ANA A ; SET FLAGS, SO "JNZ" WILL JUMP
4049 007456 311 RET ; AND RETURN
4050
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 110
CMDS.M80 *** "ST" CMD ***
4052 .SBTTL *** "ST" CMD ***
4053
4054 ; CONSOLE COMMAND TO ISSUE A START TO THE CPU
4055
4056 007457 315 043 013 STCMD: CALL LACMD ; FIRST GO ASSEMBLE A LEGAL ADDRESS TO START AT
4057 007462 MOV5B ; MOVE TO TMP BUFF SO DON'T KILL "MEMAD"
(1) 007462 347 RST 4
(1) 007463 000 .BYTE 0
4058 007464 017 040 .ADDR MEMAD ; SRC
4059 007466 073 040 .ADDR TMPBF2 ; TEMP PLACE TO KEEP IT
4060
4061
4062 007470 STINT: CLRRM DMDAT ; MUST CLR COMM WORDS BEFORE WE START
(1) 007470 347 RST 4
(1) 007471 012 .BYTE 10.
(1) 007472 054 040 .ADDR DMDAT+5
4063 007474 DEPOS 32 ; CLEAR LOC 32 (THE TTY INPUT WORD)
(1) 007474 247 ANA A ; CLR "C-BIT" FOR USE BY COMMON CODE
(1) 007475 315 203 030 CALL DEPSHT ; AND DO THE DEPOSIT ASSUMING SHORT ADDR
(1) 007500 032 000 .ADDR 32 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
4064 007502 DEPOS 33 ; CLEAR 33 (THE TTY OUTPUT WORD)
(1) 007502 247 ANA A ; CLR "C-BIT" FOR USE BY COMMON CODE
(1) 007503 315 203 030 CALL DEPSHT ; AND DO THE DEPOSIT ASSUMING SHORT ADDR
(1) 007506 033 000 .ADDR 33 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
4065
4066 007510 072 255 040 LDA GOCODE ; (5.2F) BYTE 28-35 GETS THE REASON FOR RELOAD
4067 007513 041 047 040 LXI H,DMDAT ; (5.2F) MAKE H,L POINT TO THE DESIRED BUFFER
4068 007516 167 MOV M,A ; (5.2F) SET GOCODE BITS INTO THE BYTE "DMDAT"
4069
4070 007517 DEPOS 31 ; CLEAR LOC 31 (KEEP ALIVE WORD)
(1) 007517 247 ANA A ; CLR "C-BIT" FOR USE BY COMMON CODE
(1) 007520 315 203 030 CALL DEPSHT ; AND DO THE DEPOSIT ASSUMING SHORT ADDR
(1) 007523 031 000 .ADDR 31 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
4071
4072 007525 041 140 005 LXI H,^O2540 ; LOAD "H,L" WITH "JRST" OPCODE
4073 007530 042 076 040 SHLD TMPBF2+3 ; AND PUT INTO THE BUFFER WHERE THE ADDR IS
4074
4075 007533 021 073 040 LXI D,TMPBF2 ; NOW SET POINTER TO THE INSTR
4076 007536 315 015 017 CALL EXINT ; AND GO HANDLE JUST LIKE AN EXECUTE
4077 007541 300 RNZ ; IF NON ZERO, THE EXECUTE FAILED
4078
4079 ; AND NOW FALL INTO THE "CONTINUE" COMMAND
4080
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 111
CMDS.M80 *** "CO" CMD ***
4082 .SBTTL *** "CO" CMD ***
4083
4084 ; CONSOLE COMMAND TO ISSUE CONTINUE TO CPU
4085
4086 007542 315 354 006 COCMD: CALL SETUSE ; ENTER USER MODE
4087 007545 076 005 MVI A,5 ; SET BITS FOR "CONTINUE" & "RUN"
4088 007547 041 273 040 LXI H,HSBFL2 ; (5.2F) SET "H,L" REGISTER TO SPECIAL HSB FLAG
4089 007552 226 SUB M ; (5.2F) SUBTRACT (FOR FRC REMOVE "CONTINUE")
4090 007553 066 000 MVI M,0 ; (5.2F) CLEAR HSB FLAG
4091 007555 323 212 OUT CPUCTL ; ***** I/O WRT 212/5 *****
4092 007557 062 231 040 COINT: STA CHKHLT ; AND GUARANTEE THAT ANY FAST HALTS WILL GET REPORTED
4093
4094 007562 PLINE KSPRMT ; WANT TO TELL USER WHEN WE SWITCH MODES
(1) 007562 337 RST 3 ; PRINT LINE OF CHARS
(1) 007563 042 037 .ADDR KSPRMT ; BUFF TO PRINT
4095 007565 PLINE U ; SAY "USER MODE"
(1) 007565 337 RST 3 ; PRINT LINE OF CHARS
(1) 007566 343 006 .ADDR U ; BUFF TO PRINT
4096
4097 ; AND JUMP OFF TO COMMON CODE THAT CHECKS THE CONTINUE BIT
4098 ; AND ERRS IF CONTINUE HAS NOT BEEN CLEARED BY THE CPU.
4099
4100 007570 303 036 017 JMP DNF ; GO....
4101
4102 .SBTTL *** "HA" CMD ***
4103
4104 ; CONSOLE COMMAND TO HALT THE SM10 CPU. CPU MICRO-CODE SHOULD ENTER
4105 ; THE HALT LOOP.
4106
4107 007573 257 HACMD: XRA A ; CLR ACCUM FOR "RUN","EXECUTE" & "CONTINUE"
4108 007574 323 212 OUT CPUCTL ; *****I/O WRT 212/0 *****
4109 007576 303 226 016 JMP HLTCM ; AND FINISHES UP JUST LIKE "SM" COMMAND
4110
4111 .SBTTL *** "SH" CMD ***
4112
4113 ; COMMAND TO CAUSE THE TOPS20 MONITOR TO BEGIN AN ORDERLY SYSTEM SHUTDOWN
4114
4115 007601 SHCMD: MOV5B ; MOVE US SOME DATA
(1) 007601 347 RST 4
(1) 007602 000 .BYTE 0
4116 007603 052 001 .ADDR .DSBASE ; FROM HERE (0,,776700)
4117 007605 047 040 .ADDR DMDAT ; TO HERE. PLACE FOR DEPOSIT TO FIND IT
4118
4119 007607 DEPOS 30 ; AND DO IT
(1) 007607 247 ANA A ; CLR "C-BIT" FOR USE BY COMMON CODE
(1) 007610 315 203 030 CALL DEPSHT ; AND DO THE DEPOSIT ASSUMING SHORT ADDR
(1) 007613 030 000 .ADDR 30 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
4120 007615 315 354 006 CALL SETUSE ; NOW BE SURE WE ENTER THE USER MODE AGAIN
4121 007620 006 200 MVI B,^O200 ; SET SIGN BIT SO AS TO IGNORE "KEEP-ALIVE"
4122 007622 315 312 032 CALL STATEM ; GO DO THE STUFF WITHOUT
4123 007625 377 .BYTE ^O377 ; CHANGING THINGS
4124 007626 303 157 017 JMP COINT ; RETURN TO USER MODE TO WATCH MONTR "SHUTDOWN"
4125
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 112
CMDS.M80 *** "KL" CMD ***
4127 .SBTTL *** "KL" CMD ***
4128
4129 ; KLINIK COMMAND
4130
4131 007631 332 264 017 KLCMD: JC KLDIS ; DISPLAY CURRENT STATE IF NOTHING TYPED
4132
4133 ; ELSE ASSEMBLE THE TYPED IN ARG
4134
4135 007634 315 230 030 CALL ARG16. ; PERMIT 16 BIT WIDE TYPE IN
4136
4137 ; NOW VERIFY THAT LOWER HALF IS A LEGAL NUMBER
4138
4139 007637 175 MOV A,L ; LO HALF TO ACCUM
4140 007640 247 ANA A ; SET CONDITION CODES
4141 007641 312 250 017 JZ KLOFF ; IF TYPED ZERO, GO TURN OFF KLINIK
4142
4143 ; NOW FALL THRU HERE IF .EQ. 1, MUST TURN ON THE KLINIK
4144
4145 007644 062 300 040 STA KLLINE.ON ; SET BIT TO SAY THAT KLINIK IS ON
4146 007647 311 RET ; AND OUT
4147 007650 062 300 040 KLOFF: STA KLLINE.ON ; GET HERE IF ACCUM WAS ZERO.. ZAP KLINIK FLAG
4148
4149 ; AND FALL INTO CODE TO SEE IF THE END OF KLINIK MUST FORCE A CHANGE IN THE
4150 ; STATE OF THE KLINIK LINE AND USER. IE., IF IN MODE 3, WE MUST FORCE USER
4151 ; INTO MODE 2.
4152
4153 007653 072 247 040 LDA CSLMODE ; GET CURRENT MODE
4154 007656 376 010 CPI .MODE3 ; IS IT MODE 3?
4155 007660 314 070 034 CZ SETM2 ; SET MODE 2 IF NOT IN THERE
4156 007663 311 RET ; AND OUT
4157
4158 ; HERE IF JUST WANT TO DISPLAY CURRENT KLINIK STATE
4159
4160 007664 072 300 040 KLDIS: LDA KLLINE.ON ; GET CURRENT VALUE
4161 007667 247 ANA A ; SET FLAGS
4162 007670 303 317 013 JMP CHOOSE ; GO DISPLAY THE APPROPRIATE MESSAGE
4163
4164
4165 .SBTTL *** "TT" CMD ***
4166
4167 007673 315 354 006 TTCMD: CALL SETUSE ; ON THIS COMMAND WE DESIRE THAT CTY ENTER USER MODE
4168 007676 PLINE KSPRMT ; "KS10>"
(1) 007676 337 RST 3 ; PRINT LINE OF CHARS
(1) 007677 042 037 .ADDR KSPRMT ; BUFF TO PRINT
4169 007701 PLINE U ; "USR MOD"
(1) 007701 337 RST 3 ; PRINT LINE OF CHARS
(1) 007702 343 006 .ADDR U ; BUFF TO PRINT
4170 007704 072 247 040 LDA CSLMODE ; (5.2A) CHECK KLINIK STATUS - PUT INTO MODE 2?
4171 007707 326 004 SUI .MODE2 ; (5.2A) IS MODE LESS THAN MODE 2?
4172 007711 362 070 034 JP SETM2 ; (5.2A) NO - OK TO SET MODE 2 - SO GO DO IT
4173 007714 CLRB KLNKSW ; (5.2A) CLEAR KLINIK STATUS WORD - FORCE
4174 ; REEXAMINATION OF THE SWITCHES ...
4175 007716 311 RET ; NOW RETURN
4176
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 112-1
CMDS.M80 *** "TT" CMD ***
4177
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 113
CMDS.M80 *** "PW" CMD ***
4179 .SBTTL *** "PW" CMD ***
4180
4181 ; COMMAND FOR SETTING A PASSWORD INTO THE 8080, SO THAT THE KLINIK LINE
4182 ; USER WILL HAVE SOMETHING TO MATCH AGAINST WHEN HE TRIES TO GET INTO
4183 ; THE SYSTEM.
4184
4185 007717 PWCMD: CLRB KLNKSW ; ON ANY PASSWORD COMMAND, FORCE RE-EXAMINATION
4186 ; OF THE KLINIK MODE
4187
4188 ; NOW DO THE NORMAL STUFF U NEED TO DO WITH THIS COMMAND
4189
4190 007721 332 361 017 JC PW.CLR ; IF NO PW TYPED, GO CLR PASSWORD
4191
4192 ; FALL THRU ELSE.. IE MUST SET THE PASSWORD
4193
4194 007724 052 223 040 PW.SET: LHLD .ARG1 ; GET POINTER TO THE TYPE-IN BUFFER
4195 007727 021 262 040 LXI D,PASSWORD ; POINT TO BUFFER AREA WHERE PASSWORD WILL BE
4196 007732 006 372 MVI B,-6 ; SET A MAX COUNT FOR LENGTH OF THE PASSWORD
4197
4198 007734 176 PW.LOOP: MOV A,M ; COPY A PASSWORD CHARACTER TO THE ACCUM
4199 007735 376 377 CPI EOLCH ; IS IT END OF LINE?
4200 007737 310 RZ ; IF YES, SIMPLE RETURN
4201
4202 ; FALL TO HERE IF MORE TO BE MOVED
4203
4204 007740 315 153 006 CALL UP.LO ; UPPER CASE ONLY
4205 007743 022 STAX D ; MOVE A CHARACTER TO THE SAVE BUFFER
4206 007744 023 INX D ; UPDATE DESTINATION POINTER
4207 007745 043 INX H ; UPDATE SOURCE POINTER
4208 007746 004 INR B ; UPDATE CHARACTER COUNT
4209 007747 302 334 017 JNZ PW.LOOP ; STAY IN THE LOOP
4210
4211 ; FALL THRU WHEN DONE 6 CHRACTERS.. THAT HAD BETTER BE ALL, ELSE ERROR
4212
4213 007752 176 MOV A,M ; GET 7TH CHARACTER
4214 007753 376 377 CPI EOLCH ; IT BETTER BE END
4215 007755 310 RZ ; IF YES, WAS END OF LINE, THEN OK TO RETURN
4216
4217 ; FALL THRU WHEN USER TYPED TOO MANY CHARACTERS
4218
4219 007756 PLINE PWLEN ; ERR MESSAGE
(1) 007756 337 RST 3 ; PRINT LINE OF CHARS
(1) 007757 332 037 .ADDR PWLEN ; BUFF TO PRINT
4220 007761 PW.CLR: CLRRM PASSWORD+1 ; CLEAR 5 BYTES OF THE 6 BYTE BUFFER
(1) 007761 347 RST 4
(1) 007762 012 .BYTE 10.
(1) 007763 270 040 .ADDR PASSWORD+1+5
4221 007765 053 DCX H ; POINTER CAME OUT GOOD
4222 007766 066 000 MVI M,0 ; CLR THE 6TH BYTE OF THE BUFFER
4223 007770 311 RET ; THAT'S ALL
4224
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 114
CMDS.M80 *** "MK" & "UM" CMD ***
4226 .SBTTL *** "MK" & "UM" CMD ***
4227
4228 ; CONSOLE COMMAND TO MARK AND UMARK SPECIFIED MICRO-CODE LOCATIONS
4229
4230 007771 016 000 UMCMD: MVI C,0 ; WE ARE CLEARING THE MARK BIT..
4231 007773 303 000 020 JMP MRKCM ; AND GO SAVE IT AS A FLAG FOR WHAT WE'RE DOING
4232
4233 007776 016 001 MKCMD: MVI C,1 ; A BIT SAYS WE ARE SETTING THE MARK BIT
4234 010000 305 MRKCM: PUSH B ; SAVE "B,C", IT HAS DATA FOR SET OR CLEAR
4235 010001 RUN.. ; IS CPU RUNNING?
(1) 010001 347 RST 4
(1) 010002 006 .BYTE 6
4236 010003 315 254 013 CALL LCCMD ; "C-BIT" IS CLR..GO ASSEMBLE A LEGAL RAM-ADDR
4237 010006 315 264 014 CALL CRM.AD ; SET DIAGNOSTIC ADDRESS REG
4238 010011 315 127 013 CALL CP1 ; GIVE SINGLE PULSE TO GET DATA WHERE I CAN READ
4239
4240 010014 076 017 MVI A,^O17 ; GET FUNCTION READ FOR CRAM DATA THAT INCLUDES MRK
4241 010016 315 331 014 CALL READC ; DO THE DIAGNOSTIC FUNCTION READ
4242 010021 315 264 014 CALL CRM.AD ; SET DIAGNOSTIC ADDRESS REG
4243 010024 021 100 040 LXI D,TMPB2 ; GET PNTR TO DATA THAT HAS THE MARK BIT
4244 010027 301 POP B ; GET INSTR TYPE
4245
4246 010030 032 LDAX D ; GET THE ACTUAL DATA
4247 010031 346 376 ANI ^O376 ; CLEAR BIT 0
4248 010033 261 ORA C ; NOW EITHER SET OR CLEAR THE BIT
4249
4250 010034 022 MRKRT: STAX D ; BUT DATA BACK, NEW MARK BIT STATUS
4251
4252 010035 315 172 033 CALL ADATP ; WRITE DATA TO BUS REG
4253
4254 010040 076 007 MVI A,7 ; NOW WISH TO DO FUNCTION WRITE 7
4255 010042 062 010 040 STA CRMFN ; SET INTO FUNC WORD
4256
4257 010045 303 240 014 JMP WFNC1 ; AND FINISH UP BY WRITING DATA BACK
4258
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 115
CMDS.M80 *** "ZM" CMD ***
4260 .SBTTL *** "ZM" CMD ***
4261
4262 ; CONSOLE COMMAND TO ZERO THE SM10 MOS MEMORY..
4263
4264 010050 ZMCMD: CLRRM MEMAD ; CLEAR MEMORY ADDRESS BUFFER(TO START AT 0)
(1) 010050 347 RST 4
(1) 010051 012 .BYTE 10.
(1) 010052 024 040 .ADDR MEMAD+5
4265 010054 076 002 MVI A,2 ; BITS TO SAY WRITE TYPE FUNCTION
4266 010056 062 023 040 STA MEMAD+4 ; WRITE INTO THE BUFFER
4267
4268 010061 CLRRM DMDAT ; DATA TO DEPOSIT IS ALL ZEROES
(1) 010061 347 RST 4
(1) 010062 012 .BYTE 10.
(1) 010063 054 040 .ADDR DMDAT+5
4269
4270 010065 INTON ; INTERNAL MODE ON
(1) 010065 327 RST 2 ; GO SET INTERNAL MODE
4271 010066 315 153 012 CALL DM1 ; DEPOSIT ZEROES INTO FIRST LOCATION
4272 010071 315 051 033 ZM1: CALL INC36 ; TO NEXT ADDRESS
4273 010074 017 040 .ADDR MEMAD ; HERE IT IS
4274
4275 010076 021 017 040 LXI D,MEMAD ; DO PART OF THE DEPOSIT HERE, FOR SPEED SAKE
4276 010101 315 172 033 CALL ADATP ; LOAD UP BUS REGS WITH THE DESIRED DATA
4277 010104 076 004 MVI A,4 ; NOW FUNCTION TYPE BIT INTO ACCUM
4278 010106 323 115 OUT BUSARB ; ***** I/O WRT *****
4279
4280 010110 315 217 012 CALL DMGO ; NOW GO DO THE DEPOSIT
4281
4282 ; AND CHECK TO SEE IF GOT A NXM
4283
4284 010113 072 154 040 LDA ERRCD ; GET ERROR CODE..
4285 010116 247 ANA A ; CHECK IF SET
4286 010117 312 071 020 JZ ZM1 ; IF NO ERRORS YET, KEEP GOING
4287
4288 ; FALL THRU WHEN HAD "NO DATA ACNOWLEDGE" ERROR
4289
4290 010122 INTOFF ; CLEAR INTERNAL MODE
(1) 010122 367 RST 6 ; GO EXIT FROM INTERNAL MODE
4291 010123 ENDCMD ; AND DONE
(1) 010123 311 RET ; RETURN TO CALLER
4292
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 116
CMDS.M80 *** "RP" CMD ***
4294 .SBTTL *** "RP" CMD ***
4295
4296 ; NOTE: THE LIST OF SAVED COMMAND DISPATCHES IS NOT IN THE NORMAL 8080
4297 ; ADDRESS FORMAT..IE THE COMMAND LIST IS SAVED IN PAIRS OF BYTES AS:
4298 ; HI ORDER PIECE FIRST..
4299 ; LO ORDER PIECE SECOND..
4300
4301 010124 322 151 020 RPCMD: JNC RP1 ; IF ARG, BEGIN AT A SPECIAL PLACE
4302 010127 257 XRA A ; CLR ACCUM
4303 010130 062 160 040 RP0: STA RPCNTR ; THERE IS NO REPEAT COUNT
4304 010133 315 273 020 CALL RPFOO ; IN THE BEGINNING YOU MUST RESET THE POINTERS
4305 010136 257 XRA A ; CLR ACCUM
4306 010137 062 157 040 STA RPEND ; CLR THE REPEAT KILLER
4307 010142 057 CMA ; MAKE ACCUM .EQ. -1
4308 010143 062 213 040 STA RPTON ; THAT REPEAT FUNCTION IS TURNED ON
4309 010146 303 175 020 JMP RP2 ; CONTINUE...
4310
4311 010151 315 230 030 RP1: CALL ARG16. ; FETCH THE ARG THAT WAS TYPED
4312
4313 010154 174 MOV A,H ; IT MUST ONLY BE 256 OR LESS
4314 010155 247 ANA A ; SET PROCESSOR FLAGS
4315 010156 302 134 032 JNZ KILNM ; IF .GT. 256, THEN BAD NUMBER
4316
4317 ; FALL THRU IF ACCUM 0
4318
4319 010161 175 MOV A,L ; GET REAL ARG INTO ACCUM
4320 010162 074 INR A ; SET ACCUM 1 GREATER THAN ACTUAL
4321 010163 303 130 020 JMP RP0 ; CONTINUE BY INITING FLAGS
4322
4323 010166 072 157 040 RPTRTN: LDA RPEND ; NEXT THING IS TO SEE IF TIME TO STOP REPEAT
4324 010171 247 ANA A ; TEST DATA
4325 010172 302 233 020 JNZ RP.OUT ; AND END THE REPEAT IF "END" FLAG IS SET
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 117
CMDS.M80 *** "RP" CMD ***
4327
4328 010175 052 211 040 RP2: LHLD RPLST ; GET POINTER TO COMMAND DISPATCH LIST
4329 010200 176 MOV A,M ; CHECK BYTE..MAKE SURE ITS NOT THE END-OF-LIST
4330 010201 074 INR A ; IF IT WAS -1, NOW ITS A ZERO
4331 010202 302 240 020 JNZ RP4 ; AND GO BACK TOO
4332
4333 010205 072 160 040 LDA RPCNTR ; CHECK IF THIS IS A COUNTED REPEAT
4334 010210 314 273 020 CZ RPFOO ; IT WAS END OF LIST IF U GOT HERE, SO FIX POINTERS
4335 010213 247 ANA A ; SET FLAGS
4336 010214 312 166 020 JZ RPTRTN ; IF .EQ. 0 NO COUNT ON THE REPEAT
4337
4338 010217 075 DCR A ; THERE IS A COUNTER, DOWN IT
4339 010220 062 160 040 STA RPCNTR ; SAVE NEW COUNT
4340 010223 376 001 CPI 1 ; SEE IF AT BOTTOM LINE
4341 010225 304 273 020 CNZ RPFOO ; IF A COUNTED REPEAT, FIX END OF LIST ONLY IF MORE TO DO
4342 010230 302 166 020 JNZ RPTRTN ; JUMP IF NO
4343
4344 010233 257 RP.OUT: XRA A ; CLEAR ACCUM PRIOR TO LEAVING
4345 010234 062 213 040 STA RPTON ; TURN OFF THE "ON" FLAG
4346 010237 311 RET ; AND HERE IF YES
4347
4348 010240 126 RP4: MOV D,M ; IF IT WAS OK.. START ASSEMBLING THE DISPATCH
4349 010241 043 INX H ; UPDATE TO LO ORDER PIECE
4350 010242 136 MOV E,M ; AND DISPATCH IS NOW IN "D,E"
4351 010243 043 INX H ; UPDATE POINTER
4352 010244 042 211 040 SHLD RPLST ; SAVE POINTER TO WHERE WE ARE IN CMD LIST
4353
4354 010247 041 263 001 LXI H,NULLW ; "H,L" GETS PLACE WE WANT TO RETURN TO
4355 010252 345 PUSH H ; PLACE ON STACK SO THAT "RET" INS COMES HERE
4356 010253 353 XCHG ; DISPATCH ADDRESS INTO "H,L"
4357
4358 010254 174 MOV A,H ; GET HI ORDER PIECE OF ADDR TO SEE IF ARG
4359 010255 247 ANA A ; WAS TYPED WITH THIS COMMAND..SET FLAGS
4360 010256 362 265 020 JP RPGO ; IF SIGN BIT CLR, CMD GOT NO ARG
4361
4362 ; OTHERWISE MUST SET THE C-BIT TO TELL CMD TO LOOK FOR ARG
4363
4364 010261 346 177 ANI ^O177 ; CLR SIGN BIT
4365 010263 147 MOV H,A ; PUT IT BACK FOR CORRECT DISPATH
4366 010264 067 STC ; SET C-BIT IF NECCESSARY
4367 010265 077 RPGO: CMC ; SET C-BIT FOR THIS COMMAND TO SEE
4368 010266 351 PCHL ; AND GO DO IT..
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 118
CMDS.M80 *** "RP" CMD ***
4370
4371 ; IF REACHED END OF THE DISPATCH LIST, THEN THIS CODE RESETS
4372 ; THE POINTER BACK TO THE BEGINNING OF THE LIST
4373
4374 010267 057 RPNEW: CMA ; RPFOO DOESNT TOUCH ACCUM, SET ACCUM TO -1
4375 010270 062 131 040 STA CMDS.. ; NOW ZAP THE FIRST IN LINE FLAG
4376 010273 041 001 041 RPFOO: LXI H,RPINI ; BUFFER BEGINNING ADDRESS
4377 010276 042 211 040 SHLD RPLST ; PUT BACK INTO RAM
4378 010301 041 032 041 LXI H,RPTBFI ; POINTER TO DATA BUFFER
4379 010304 042 207 040 SHLD RPBUFS ; RESET INTO HOLDING LOCATION
4380 010307 311 RET ; AND RETURN
4381
4382 .SBTTL *** "DS" CMD ***
4383
4384 ; COMMAND TO SELECT NON DEFAULT DISK UNIT AND UNIBUS ADAPTERS FOR BOOTING
4385 ; FROM DISK
4386
4387 010310 DSCMD: PLINE Q.UBA ; MESSAGE TO ASK FOR "UNIBUS ADAPTER" TO BE USED
(1) 010310 337 RST 3 ; PRINT LINE OF CHARS
(1) 010311 241 037 .ADDR Q.UBA ; BUFF TO PRINT
4388 010313 315 144 021 CALL PICKUP ; GO FETCH THE RESPONSE THAT WAS TYPED
4389 010316 332 331 020 JC DS1 ; IF NOTHING TYPED, LEAVE UBA AS CURRENTLY SELECTED
4390
4391 ; FALL INTO HERE IF A NEW UBA NUMBER WAS TYPED
4392
4393 010321 072 100 040 LDA TMPB2 ; GRAB THE NEW UBA NUMBER AS TYPED
4394 010324 007 RLC ; THE UBA NUMBER IS JUSTIFIED "*4" IN A BYTE
4395 010325 007 RLC ; TAKES 2 ROTATES TO GET IT JUSTIFIED
4396 010326 062 357 040 STA DSKUBA ; AND SAVE THE NEW VALUE IN THE RAM
4397
4398 010331 DS1: PLINE Q.RH ; ASK FOR AN RH11 TO USE
(1) 010331 337 RST 3 ; PRINT LINE OF CHARS
(1) 010332 250 037 .ADDR Q.RH ; BUFF TO PRINT
4399 010334 315 144 021 CALL PICKUP ; GET WHAT WAS TYPED
4400 010337 332 350 020 JC DS2 ; IF NOTHING TYPED, DO NOTHING
4401
4402 010342 MOV5B ; NOW SAVE THIS NEW DISK BASE
(1) 010342 347 RST 4
(1) 010343 000 .BYTE 0
4403 010344 100 040 .ADDR TMPB2 ; THIS IS WHERE THE DATA SHOULD BE SITTING
4404 010346 374 040 .ADDR DSBASE ; THIS IS WHERE WE WILL KEEP IT
4405
4406 010350 DS2: PLINE Q.UNIT ; ASK FOR A UNIT NUMBER TO BOOT FROM
(1) 010350 337 RST 3 ; PRINT LINE OF CHARS
(1) 010351 262 037 .ADDR Q.UNIT ; BUFF TO PRINT
4407 010353 315 144 021 CALL PICKUP ; GO FETCH WHAT WAS TYPED
4408 010356 330 RC ; IF NOTHING TYPED, THEN ALL DONE. RETURN FROM THIS CMD
4409
4410 ; FALL TO HERE IF A UNIT WAS TYPED..GO SET THE UNIT TO BE USED
4411
4412 010357 072 100 040 LDA TMPB2 ; GET NUMBER TYPED FOR THE NEW UNIT
4413 010362 062 132 040 STA UNITNM ; SET IT INTO RAM AS THE NEW VALUE
4414 010365 311 RET ; ALL DONE THIS COMMAND....
4415
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 119
CMDS.M80 *** "MS" CMD ***
4417 .SBTTL *** "MS" CMD ***
4418
4419 ; COMMAND TO SELECT WHAT MAGTAPE TO BOOT FROM
4420
4421 010366 MSCMD: PLINE Q.UBA ; ASK FOR A UNIBUS ADAPTER TO LOAD FROM
(1) 010366 337 RST 3 ; PRINT LINE OF CHARS
(1) 010367 241 037 .ADDR Q.UBA ; BUFF TO PRINT
4422 010371 315 144 021 CALL PICKUP ; GET WHAT WAS TYPED
4423 010374 332 007 021 JC MS1 ; IF NOTHING, LEAVE UBA ALONE.. GO GET THE NEXT THING
4424
4425 ; FALL INTO HERE IF A NEW UBA WAS SELECTED
4426
4427 010377 072 100 040 LDA TMPB2 ; GET THE NEW UBA TYPED
4428 010402 007 RLC ; UBA NUMBERS MUST BE JUSTIFIED ON BYTE BOUNDARY *4
4429 010403 007 RLC ; TAKES TWO SHIFTS TO SET THE UBA NUMBER
4430 010404 062 356 040 STA MTAUBA ; SAVE THE NEW UBA VALUE IN THE RAM
4431
4432 010407 MS1: PLINE Q.RH ; ASK FOR A NEW RH11 TO USE
(1) 010407 337 RST 3 ; PRINT LINE OF CHARS
(1) 010410 250 037 .ADDR Q.RH ; BUFF TO PRINT
4433 010412 315 144 021 CALL PICKUP ; FETCH WHAT WAS TYPED
4434 010415 332 026 021 JC MS1.5 ; IF NOTHING TYPED, THEN DO NOTHING
4435
4436 010420 MOV5B ; IF SOMETHING TYPED, GET IT FROM THE BUFFER
(1) 010420 347 RST 4
(1) 010421 000 .BYTE 0
4437 010422 100 040 .ADDR TMPB2 ; PLACE WHERE THE STUFF WAS PUT
4438 010424 367 040 .ADDR MTBASE ; PLACE WHERE WE KEEP THE MAGTAPE BASE REG
4439 010426 MS1.5: PLINE Q.TCU ; GO ASK FOR A UNIT NUMBER
(1) 010426 337 RST 3 ; PRINT LINE OF CHARS
(1) 010427 272 037 .ADDR Q.TCU ; BUFF TO PRINT
4440 010431 315 144 021 CALL PICKUP ; GO SEE WHAT WAS TYPED
4441 010434 332 045 021 JC MS2 ; IF NOTHING TYPE, LEAVE VALUE ALONE.. GO AROUND THIS.
4442
4443 ; FALL TO HERE IF NEED TO SET A NEW UNIT NUMBER
4444
4445 010437 072 100 040 LDA TMPB2 ; GET WHAT WAS TYPED
4446 010442 062 137 040 STA TAPEUNIT ; SET IN THE NEW UNIT NUMBER
4447
4448 010445 MS2: PLINE Q.DEN ; NOW GO SEE WHAT DENSITY TO SET FOR THE MAGTAPE
(1) 010445 337 RST 3 ; PRINT LINE OF CHARS
(1) 010446 301 037 .ADDR Q.DEN ; BUFF TO PRINT
4449 010450 315 156 021 CALL INBUF ; UPDATE BUFFER PNTR. THIS CASE DIFFERENT FROM
4450 ; THE OTHERS. WE MUST EXAMINE ASCII, NOT OCTAL
4451 010453 332 115 021 JC MS3 ; BUT IF NOTHING TYPED, GO ASK FOR A NEW SLAVE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 120
CMDS.M80 *** "MS" CMD ***
4453
4454 ; FALL THRU IF NEED TO SET A DENSITY....
4455 ; NOW H,L REG POINTS TO THE STRING JUST TYPED IN
4456
4457 010456 345 PUSH H ; SAVE POINTER TO THE TYPED IN BUFFER
4458 010457 021 133 021 LXI D,EIGHT0 ; GET POINTER TO THE "800" LIST
4459 010462 315 276 033 CALL STRCMP ; NOW DO A STRING COMPARE
4460 010465 302 076 021 JNZ S16CHK ; IF WAS NOT AN "800", SEE IF ITS A "1600"
4461
4462 ; OK, IT WAS 800..NOW SET UP THE CHANNEL DATA TO SAY 800 BPI TAPE
4463
4464 010470 076 002 MVI A,2 ; A 2 IS THE CORRECT CODE FOR 800 BPI
4465 010472 341 POP H ; IF "800" MATCHED, THEN CLEAN UP THE STACK
4466 010473 303 112 021 JMP MS2.5 ; GO TO NEXT CHECK
4467
4468 010476 341 S16CHK: POP H ; GET POINTER TO THE TYPED IN STUFF
4469 010477 021 137 021 LXI D,SIXTN ; MATCH AGAINST "1600"
4470 010502 315 276 033 CALL STRCMP ; DO THE STRING COMPARE
4471 010505 302 134 032 JNZ KILNM ; IF WAS NOT 1600, THEN IT WAS BAD
4472
4473 ; IT WAS 1600, SO SET THE RIGHT THING FOR TAPE BPI
4474
4475 010510 076 004 MVI A,4 ; THIS IS THE CODE FOR 1600 BPI
4476 010512 062 363 040 MS2.5: STA DEN.SLV+1 ; SET THE BYTE IN THE CHANNEL DATA WORD
4477
4478 010515 MS3: PLINE Q.SLV ; ASK FOR A NEW SLAVE DEVICE
(1) 010515 337 RST 3 ; PRINT LINE OF CHARS
(1) 010516 310 037 .ADDR Q.SLV ; BUFF TO PRINT
4479 010520 315 144 021 CALL PICKUP ; FETCH WHAT WAS TYPED
4480 010523 330 RC ; IF NOTHING TYPED, THEN WE ARE ALL DONE
4481
4482 ; ELSE FALL TO HERE TO GET THE SLAVE
4483
4484 010524 072 100 040 LDA TMPB2 ; GET THE NUMBER
4485 010527 062 362 040 STA DEN.SLV ; SET THE BYTE AS REQUIRED
4486 010532 311 RET ; AND ALL DONE
4487 010533 070 060 060 EIGHT0: .ASCIZ /800/ ; FOR 800 BPI TAPES
4488 010537 061 066 060 SIXTN: .ASCIZ /1600/ ; STRING FOR 1600 BPI TAPES
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 121
CMDS.M80 *** "MS" CMD ***
4490
4491 ; SOME SUBROUTINES FOR USE BY THE DEVICE SELECT COMMANDS.
4492 ; FIRST A ROUTINE TO READ IN A NUMBER TYPED IN ANSWER TO AN 8080 QUESTION
4493 ; AND SAVE THE NUMBER TYPED IN THE 36 BIT BUFFER "TMPB2". RETURNS C-BIT
4494 ; CLEAR IF A NUMBER WAS GATHERED AND STORED IN "TMPB2". RETURNS C-BIT SET
4495 ; IF NOTHING WAS TYPED.
4496
4497 010544 315 156 021 PICKUP: CALL INBUF ; SET UP THE INPUT BUFFER TO THE CURRENT TYPEIN
4498 010547 330 RC ; RETURNS HERE WITH C-BIT SET IF NOTHING TYPED
4499
4500 ; GET HERE IF SOMETHING WAS TYPED.. GO GET IT AND PUT IT IN "TMPB2"
4501
4502 010550 ARG36 ; GATHER A 36-BIT ARGUMENT
(1) 010550 347 RST 4
(1) 010551 010 .BYTE 8
4503 010552 100 040 .ADDR TMPB2 ; PUT IT IN THIS BUFFER
4504 010554 257 XRA A ; CLEAR C-BIT BECAUSE ALL WAS OK.
4505 010555 311 RET ; ALL DONE
4506
4507 ; SUBROUTINE TO FIX UP THE BUFFER POINTERS IN THE INPUT BUFFER
4508
4509 010556 041 204 040 INBUF: LXI H,EOL ; GET POINTER TO END-OF-LINE COUNTER
4510 010561 065 DCR M ; SO CAN DECREMENT
4511 010562 315 115 010 CALL BFRST ; RESET TTY INPUT POINTERS
4512 010565 052 215 040 LHLD BUF. ; FIND THE BEGINNING OF BUFFER
4513 010570 042 223 040 SHLD .ARG1 ; AND SET IT AS THE POINTER TO THE FIRST ARG
4514
4515 010573 041 201 021 LXI H,INRDY ; PASS A RETURN ADDRESS IN H,L
4516 010576 303 263 001 JMP NULLW ; ENTER TTY INPUT WAIT
4517
4518 010601 052 223 040 INRDY: LHLD .ARG1 ; GET POINTER TO THE START OF THE NEW DATA
4519 010604 315 241 033 FNDARG: CALL SEPCHR ; EAT UP ANY NO-OP SEPARATORS
4520 010607 042 223 040 SHLD .ARG1 ; REPLACE THE POINTER
4521 010612 303 330 032 JMP EOCML ; CHECK IF AT EOL. C-SET IF YES (IE NO ARG)
4522
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 122
CMDS.M80 *** "BT" CMD ***
4524 .SBTTL *** "BT" CMD ***
4525
4526 000077 INDIRECT=^O77
4527 010615 BOOT: PLINE BTMSG1 ; INCLUDE A MSG SO USERS KNOW YOU ARE BOOTING
(1) 010615 337 RST 3 ; PRINT LINE OF CHARS
(1) 010616 127 037 .ADDR BTMSG1 ; BUFF TO PRINT
4528 010620 BTAUT: PCRLF ; AND KEEP IT ON ONE LINE
(2) 010620 347 RST 4
(2) 010621 002 .BYTE 2
4529 010622 076 010 MVI A,^O10 ; BIT 32 IN TENLAND FOR BOOT BUTTON LOAD
4530 010624 062 255 040 STA GOCODE ; SAVE IN THE "GO CODE" PLACE
4531 010627 067 STC ; FALL THRU TO A "BT"
4532
4533 010630 315 312 021 BTCMD: CALL BTCHOICE ; GO SELECT MONITOR OR DIAG PRE-BOOT
4534 010633 315 247 022 BT.SRC: CALL MICROP ; READ PAGE OF FILE POINTERS INTO MEMORY @1000
4535
4536 ; WHEN GET TO HERE, THE PAGE HAS BEEN READ IN.
4537
4538 010636 332 161 032 JC C.BTERR ; ERROR IN BOOT PROCESS DURING MICRO-CODE LOAD
4539
4540 010641 315 027 023 CALL DMEM2CRAM ; LOAD DATA FROM MEMORY INTO CRAM
4541
4542
4543 ; FALL THRU IF DONE THE CRAM LOADING PORTION.
4544 ; NOW MUST READ IN THE BOOT CODE ITSELF, START THE SM10 MICRO-CODE AND
4545 ; THEN START THE BOOT PROGRAM AT ADDRESS 1000. NOW SET UP DISK POINTERS
4546 ; TO POINT TO BOOT BLOCK OF DISK, IN ORDER THAT WE LOAD THE MONITOR BOOT.
4547
4548 010644 315 263 021 LB.GO: CALL LBINT ; GO READ-IN THE APPROPRIATE BOOTSTRAP
4549 010647 LB.GO1: MOV5B ; SET UP A START ADDRESS
(1) 010647 347 RST 4
(1) 010650 000 .BYTE 0
4550 010651 230 022 .ADDR MA1000 ; MEMORY ADDRESS 1000 FOR STARTING PROGRAM
4551 010653 073 040 .ADDR TMPBF2 ; SET UP SO START COMMAND CAN FIND THE ADDRESS
4552
4553 ; TEMP CODE FOR FIGURING OUT HOW TO MAKE THE INTERNAL START CODE WORK
4554
4555 010655 303 070 017 JMP STINT ; GO START THE MACHINE WITH MONITOR BOOT
4556
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 123
CMDS.M80 *** "LB" CMD ***
4558 .SBTTL *** "LB" CMD ***
4559
4560 010660 315 312 021 LBCMD: CALL BTCHOICE ; IF ARG GIVEN, GO SET UP A CHOICE FOR THE BOOTING
4561 010663 021 000 002 LBINT: LXI D,^O1000 ; ALL POINTERS START AT 1000
4562 010666 072 172 040 LDA RM100 ; GET THE OFFSET AS SELECTED (MON OR DIAG PRE-BOOT)
4563 010671 203 ADD E ; ADD LO ORDER TO THE OFFSET
4564 010672 137 MOV E,A ; PUT IT BACK
4565 010673 315 252 022 CALL FILEINIT ; READ IN POINTERS TO THE "PRE-BOOTS"
4566
4567 010676 332 215 032 JC L.BTERR ; ERROR IN LOADING THE PRE-BOOT
4568
4569 010701 315 333 021 CALL BT.GO ; START UP THE MICRO-CODE & INTERNAL OFF
4570
4571 ; NOW PASS ADDRESSES OF RH BASE & DRIVE # TO THE PRE-BOOT PROGRAMS
4572
4573 010704 052 132 040 INFOBT: LHLD UNITNM ; UNIT NUMBER INTO HL REGISTER
4574 010707 303 060 022 JMP PASSSRC ; ROUTINE WHICH WRITES LOCS 36,37 & 40
4575
4576 ; CUTE LITTLE ROUTINE FOR SELECTING WHICH BOOT TO LOAD
4577
4578 010712 332 326 021 BTCHOICE: JC LOAD4 ; IF NO ARG, SET FOR "BOOT>" INPUT
4579
4580 010715 315 230 030 CALL ARG16. ; ASSEMBLE THE ARG
4581
4582 ; AS LONG AS IT WAS A NUMBER, WE WILL LOAD THE DIAG BOOT
4583
4584 010720 076 006 MVI A,6 ; A 6 IS THE OFFSET FOR THE DIAG PRE-BOOT
4585 010722 062 172 040 EXIT4: STA RM100 ; SAVE IT
4586 010725 311 RET
4587 010726 076 004 LOAD4: MVI A,4 ; PASS A 4.. TO SAY LOAD MONITOR BOOT
4588 010730 303 322 021 JMP EXIT4 ; AND COMMON EXIT
4589
4590 ; ROUTINE TO START UP THE MACHINE(KS10), AND RE-ESTABLISH THE PARITY DEFAULT
4591
4592 010733 315 161 016 BT.GO: CALL SM1 ; START THE MICRO-CODE
4593 010736 332 157 032 JC D.BTERR ; IF MICRO-CODE DOES NOT START
4594 010741 BT.GO1: INTOFF ; INTERNAL MODE OFF
(1) 010741 367 RST 6 ; GO EXIT FROM INTERNAL MODE
4595
4596 010742 076 174 MVI A,DEFLTE ; GET MACHINE DEFAULT VALUE FOR ENABLES
4597 010744 315 304 013 CALL KS.PAR ; SET THEM INTO THE RAM & WRITE INTO KS
4598 010747 076 020 MVI A,TRPDEF ; GET MACHINE DEFAULT FOR TRAP ENABLES
4599 010751 062 355 040 TP.SET: STA TRAPEN ; SET DEFAULT INTO THE RAM
4600 010754 323 205 OUT DIAG ; ***** I/O WRT 205/TRAPS ENABLE *****
4601 010756 311 RET ; AND OUT
4602
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 124
CMDS.M80 *** "MT" CMD ***
4604 .SBTTL *** "MT" CMD ***
4605
4606 010757 042 221 040 MTCMD: SHLD CMD.. ; SAVE WHAT COMMAND THIS IS, SO RETRYS WILL WORK
4607 010762 315 210 022 CALL MTSETUP ; GO TO SOME COMMON CODE
4608 010765 076 071 MVI A,READ.TAPE ; GET THE COMMAND EXECUTION CODE FOR THE TAPE CMD
4609 010767 315 362 024 CALL MTXFR ; AND READ-IN THE MICRO-CODE FROM TAPE
4610 010772 322 003 022 JNC MT.1 ; NO NEED TO CHECK IF FATAL ERR IF ALL OK
4611
4612 010775 315 140 022 CALL NONFATAL ; WAS AN ERROR, GO SEE WHAT KIND
4613 011000 302 165 032 JNZ A.BTERR ; ERR TYPE "A" IF INITIAL READ FAILS
4614
4615 011003 076 002 MT.1: MVI A,MT.BIT ; SET ACCUM .EQ. MAGTAPE BIT
4616 011005 315 031 023 CALL MEM2CRAM ; LOAD MICRO-CODE FROM MEMORY TO "CRAM" SPACE
4617
4618 011010 315 021 022 CALL MBINT ; NOW LOAD IN THE PRE-BOOT PROGRAM
4619 011013 315 333 021 CALL BT.GO ; START THE MICRO-CODE,REPLACE PARITY & TRAP DEFAULTS
4620 011016 303 247 021 JMP LB.GO1 ; AND PROCEED TO START THINGS
4621
4622 ; NOW MUST DO A RE-WIND.. SKIP FIRST FILE(MICRO-CODE), THEN READ-IN THE
4623 ; SECOND FILE (THE PRE-BOOT).
4624
4625 011021 076 031 MBINT: MVI A,SKP.TAPE ; GRAB A SKIP COMMAND
4626 011023 315 362 024 CALL MTXFR ; ISSUE A REWIND. AND A FILE-SKIP
4627
4628 ; NOW WE EXPECT THERE TO BE A FRAME COUNT ERROR FROM THE SPACE FORWARD
4629 ; AND WE WILL DO WHAT WE CAN TO IGNORE IT
4630
4631 011026 322 037 022 JNC MTSKOK ; IF NO ERROR AT ALL, THATS OK TOO
4632
4633 011031 315 140 022 CALL NONFATAL ; CHECK ERROR TYPE IF FALL INTO HERE
4634 011034 302 215 032 JNZ L.BTERR ; IF WAS NOT A FRAME COUNT ERROR, WAS MORE SERIOUS
4635
4636 ; IF COMPARE RESULT WAS ZERO, THEN THE ERROR WAS A FRAME COUNT ERROR
4637 ; AND WE WILL IGNORE IT BY FALLING INTO THE CONTINUE CODE
4638
4639 011037 076 071 MTSKOK: MVI A,READ.TAPE ; GET A TAPE READ COMMAND
4640 011041 315 373 024 CALL QMXFR ; EXECUTE TAP COMMAND LIST WITH NO REWIND IN IT
4641 011044 322 055 022 JNC PASSME ; NO ERROR IF NO "C" BIT
4642
4643 011047 315 140 022 CALL NONFATAL ; SEE WHAT KIND OF ERROR
4644 011052 302 215 032 JNZ L.BTERR ; BOOT ERROR IF NO Z
4645
4646 011055 052 137 040 PASSME: LHLD TAPEUNIT ; GET TAPE UNIT FOR CURRENT MAGTAPE SELECTION
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 125
CMDS.M80 *** "MT" CMD ***
4648
4649 ; NOW PASS INFO IN LO MEMORY ADDRESS SPOTS
4650
4651 011060 345 PASSSRC: PUSH H ; SAVE THE PASSED UNIT NUMBER ON TOP OF STACK
4652 011061 MOV5B ; PASS RH BASE ADDRESS TO INTERNAL BUFFER
(1) 011061 347 RST 4
(1) 011062 000 .BYTE 0
4653 011063 242 040 .ADDR RHBASE ; FROM HERE
4654 011065 047 040 .ADDR DMDAT ; TO HERE
4655 011067 041 051 040 LXI H,DMDAT+2 ; GET POINTER TO PIECE FOR UBA
4656 011072 072 254 040 LDA UBANUM ; GET CURRENT UBA
4657 011075 266 ORA M ; PUT IT INTO MEMORY
4658 011076 167 MOV M,A
4659
4660 011077 345 PUSH H ; SAVE THE POINTER TO "DMDAT" AREA
4661 011100 DEPOS 36 ; DEPOSIT IN MEMORY
(1) 011100 247 ANA A ; CLR "C-BIT" FOR USE BY COMMON CODE
(1) 011101 315 203 030 CALL DEPSHT ; AND DO THE DEPOSIT ASSUMING SHORT ADDR
(1) 011104 036 000 .ADDR 36 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
4662 011106 341 POP H ; GET BACK THE POINTER TO "DMDAT" AREA
4663 011107 066 000 MVI M,0 ; CLEAR BYTE WITH BITS 12-19
4664 011111 341 POP H ; GET THE UNIT NUMBER THAT WAS SAVED ON STACK
4665 011112 042 047 040 SHLD DMDAT ; AND PUT IT INTO THE DEPOSIT MEMORY DATA AREA
4666 011115 DEPOS 37 ; DEPOSIT IN MEMORY HERE
(1) 011115 247 ANA A ; CLR "C-BIT" FOR USE BY COMMON CODE
(1) 011116 315 203 030 CALL DEPSHT ; AND DO THE DEPOSIT ASSUMING SHORT ADDR
(1) 011121 037 000 .ADDR 37 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
4667
4668 011123 MOV5B ; FINALLY PASS DENSITY SLAVE INFORMATION
(1) 011123 347 RST 4
(1) 011124 000 .BYTE 0
4669 011125 362 040 .ADDR DEN.SLV ; GET IT FROM HERE
4670 011127 047 040 .ADDR DMDAT ; PUT IT HERE
4671 011131 DEPOS 40 ; AND MOS MEMORY HERE
(1) 011131 247 ANA A ; CLR "C-BIT" FOR USE BY COMMON CODE
(1) 011132 315 203 030 CALL DEPSHT ; AND DO THE DEPOSIT ASSUMING SHORT ADDR
(1) 011135 040 000 .ADDR 40 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
4672 011137 311 RET ; BACK TO CALLER
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 126
CMDS.M80 *** "MT" CMD ***
4674
4675 ; ROUTINE THAT CHECKS TO SEE WHAT KIND OF ERROR WE HAVE SUFFERED UNDER
4676 ; THE MAGTAPE TRANSFER
4677
4678 011140 076 332 NONFAT: MVI A,<^O377&FRMERR+2> ; CHK ERROR CODE FOR FATAL OR NON FATAL TYPES
4679 011142 041 154 040 LXI H,ERRCD ; NOW POINT TO ACTUAL ERROR TYPE THAT WE GOT
4680 011145 276 CMP M ; COMPARE THE TWO
4681 011146 365 PUSH PSW ; SAVE FLAGS WHILE WE RESET THE TAPE DRIVE
4682 011147 314 001 025 CZ MTRESET ; GO RESET ANY ERRORS ENCOUNTERED IN THE SKIP OP
4683 011152 361 POP PSW ; GET BACK THE FLAGS
4684 011153 310 RZ ; ONLY RETURN IF ERROR WAS NON FATAL
4685
4686 ; FALL TO HERE IF ERR WAS FATAL TYPE..SEE IF WE CAN RETRY IT
4687
4688 011154 076 327 MVI A,<^O377&RETRY.+2> ; "RETRYABLE" ERROR?
4689 011156 276 CMP M ; COMPARE
4690 011157 300 RNZ ; OUT IF CAN'T EVEN RETRY..DIE
4691
4692 ; AND HERE IF IT WAS RETRYABLE
4693
4694 011160 061 000 044 LXI SP,RAMST+^O2000 ; FIRST CLEAR THE STACK
4695 011163 041 277 003 LXI H,NORML ; PUT A RETURN ADDRESS ONTO THE STACK
4696 011166 345 PUSH H
4697
4698 011167 052 221 040 LHLD CMD.. ; NOW GET "WHICH" COMMAND TO RETRY
4699 011172 351 PCHL ; GIVE IT A GO
4700
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 127
CMDS.M80 *** "MB" CMD ***
4702 .SBTTL *** "MB" CMD ***
4703
4704 ; COMMAND TO LOAD ONLY THE BOOTSTRAP OFF OF THE CURRENTLY SELECTED MAGTAPE
4705
4706 011173 042 221 040 MBCMD: SHLD CMD.. ; SAVE WHICH COMMAND THIS IS
4707 011176 315 210 022 CALL MTSETUP ; GO TO SOME COMMON CODE TO SET UP FOR MAGTAPE XFER
4708 011201 315 021 022 CALL MBINT ; AND GO
4709 011204 315 333 021 CALL BT.GO ; START UP THE MICRO-CODE & INTERNAL OFF
4710 011207 311 RET ; BACK TO NULL JOB LOOP
4711
4712 ; SOME COMMON CODE THAT SETS UP PARAMETERS FOR MAGTAPE XFER'S..SAVES A FEW
4713 ; BYTES OF 8080 SPACE.
4714
4715 011210 315 001 023 MTSETUP: CALL BTINT ; FIRST SET UP FOR THE BOOTING PROCESS
4716 011213 072 356 040 LDA MTAUBA ; GET SELECTED UBA FOR MAGTAPE
4717 011216 062 254 040 STA UBANUM ; PASS TO COMMON SPOT FOR CHANNEL CMD LIST TO FIND
4718
4719 011221 MOV5B ; AND MOVE SELECTED MT BASE FOR RH BASE TO FIND
(1) 011221 347 RST 4
(1) 011222 000 .BYTE 0
4720 011223 367 040 .ADDR MTBASE ; SELECTED MAGTAPE RH BASE ADDRESS
4721 011225 242 040 .ADDR RHBASE ; COMMON RH BASE REGISTER LOCATION
4722 011227 311 RET ; BACK TO MAILINE
4723
4724 011230 MA1000: D 0,0,,1,000
4725 011235 HOMEWD: D 505,755,,000,000 ; "HOM" MEANS HOME BLOCK
4726 011242 ONES: D 777,777,,777,777 ; ALL ONES...
4727
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 128
CMDS.M80 FILE SYSTEM
4729 .SBTTL FILE SYSTEM
4730
4731 ; --PAGE OF POINTERS FORMAT--
4732 ; +0 POINTER TO FREE
4733 ; +1 LENGTH OF FREE
4734
4735 ; +2 POINTER TO MICRO-CODE
4736 ; +3 LENGTH OF MICRO-CODE
4737
4738 ; +4 POINTER TO MONITOR PRE-BOOT
4739 ; +5 LENGTH OF PRE-BOOT
4740
4741 ; +6 POINTER TO DIAG PRE-BOOT
4742 ; +7 LENGTH OF SAME
4743
4744 ; +10 POINTER TO BC1 MICRO-CODE
4745 ; +11 LENGTH OF SAME
4746
4747 ; +12 POINTER TO BC2 PRE-BOOT
4748 ; +13 LENGTH
4749
4750 ; +14 POINTER TO MONITOR BOOT PROGRAM
4751 ; +15 LENGTH OF SAME
4752
4753 ; +16 POINTER TO DIAGNOSTIC BOOT
4754 ; +17 LENGTH OF SAME
4755
4756 ; +20 POINTER TO BC2 ITSELF
4757 ; +21 LENGTH OF SAME
4758
4759 ; +22 POINTER TO FI-ABLE 0
4760 ; +23 LENGTH OF SAME
4761 ; .
4762 ; .
4763 ; .
4764 ; +776 POINTER TO FI-ABLE 366(8)
4765 ; +777 LENGTH OF SAME
4766
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 129
CMDS.M80 FILE SYSTEM
4768
4769 ; ROUTINE TO "FIND THE 8080 FILE SYSTEM", WHICH IS REALLY JUST A PAGE
4770 ; OF PHYSICAL POINTERS, TO PHYSICAL DISK LOCATIONS.
4771
4772 011247 021 002 002 MICROP: LXI D,^O1002 ; FOR MICROCODE, ALWAYS GO TO 2ND POINTER
4773 011252 325 FILEINIT: PUSH D ; SAVE POINTER INTO THE FILE PAGE
4774 011253 315 001 023 CALL BTINT ; AND SET UP TO DO A READIN
4775 011256 321 POP D ; RESTORE "D,E"..KLUDGY WAY TO MAKE SUBROUTINE
4776 011257 325 FILESH: PUSH D ; HAVE MULTIPLE ENTRY POINTS
4777 011260 315 012 023 CALL DSKDFT ; FETCH CURRENT DISK DEFAULTS
4778
4779 011263 041 000 000 LXI H,00 ; CLR "H,L"
4780 011266 042 112 040 SHLD BLKADR ; AND SET THE DESIRED CYLINDER TO 00
4781 011271 043 INX H ; BUMP H,L TO MAKE IT .EQ. 01
4782 011272 042 105 040 SHLD BLKNUM ; NOW SET THIS INTO THE BLOCK NUMBER(HOME BLOCK)
4783
4784 011275 315 356 022 CALL CHKHOM ; GO SEE IF THIS PAGE HAS THE "HOM" BLK I.D.
4785 011300 312 316 022 JZ GOODPK ; IF YES, JUMP TO CONTINUE READ-IN
4786
4787 ; FALL THRU IF FIRST HOME BLOCK NO GOOD
4788
4789 011303 076 010 MVI A,^O10 ; TRY ALTERNATE HOME BLOCK
4790 011305 062 105 040 STA BLKNUM ; SET BLOCK NUMBER TO ALTERNATE
4791
4792 011310 315 356 022 CALL CHKHOM ; TRY ALTERNATE
4793 011313 302 165 032 JNZ A.BTERR ; IF THIS ONES BAD, THEN GIVE UP
4794 011316 GOODPK: EXAM 1103 ; EXAMINE WORD WITH HOME BLOCK IN IT
(1) 011316 315 202 030 CALL EXAMSH ; AND DO EXAM ASSUMING SHORT ADDRESS
(1) 011321 103 002 .ADDR 1103 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
4795
4796 ; NOW THAT YOUVE READ HOME BLOCK, FIND POINTER FILE AND TRANSFER THE ENTIRE
4797 ; MICRO-CODE INTO MOS MEMORY. SHORT ROUTINE TO MOVE DATA FROM THE EMBUF
4798 ; INTO THE CHANNEL COMMAND LIST.
4799
4800 011323 315 336 022 CALL BLKRDR ; READ IN THE PAGE OF POINTERS FROM THE DISK
4801 011326 332 163 032 JC B.BTERR ; ERROR IN BOOT PROCESS DURING POINTER PAGE READ-IN
4802
4803 ; NOW EXAM THE REAL DESIRED DATA
4804
4805 011331 341 POP H ; FETCH UP THE FILE POINTER ADDRESS
4806 011332 067 STC ; SET SIGN WHICH INDICATES AND EXAMINE
4807 011333 315 211 030 CALL EXMHL ; AND READ IT IN TO MEM
4808
4809 ; SHORT ROUTINE TO MOVE DATA FROM THE EMBUF INTO THE CHANNEL COMMAND LIST
4810
4811 011336 052 015 040 BLKRDR: LHLD EMBUF+3 ; GET CYLINDER FROM SPECIAL HOME BLK PNTR
4812 011341 042 112 040 SHLD BLKADR ; SET CYLINDER IN CHANNEL COMMAND LIST
4813 011344 052 012 040 LHLD EMBUF ; GET TRACK SECTOR BYTE
4814 011347 042 105 040 SHLD BLKNUM ; SET INFO INTO THE TRCK/SECTOR WORD
4815
4816 011352 315 353 024 CALL DSXFR ; FINALLY READ THE FIRST PAGE OF THE DESIRED
4817 011355 311 RET
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 130
CMDS.M80 FILE SYSTEM
4819
4820 ; LITTLE ROUTINE TO READ IN THE HOME BLOCK, CHECK THAT IT IS A HOME BLOCK
4821 ; VIA THE "HOM" ID, AND RETURN Z-BIT SET IF IT IS.
4822
4823 011356 315 353 024 CHKHOM: CALL DSXFR ; EXECUTE DISK TRANSFER
4824 011361 332 165 032 JC A.BTERR ; BOOT ERROR "A", IF OOPS
4825
4826 011364 EXAM 1000 ; NOW EXAMINE THE HOME BLOCK ID
(1) 011364 315 202 030 CALL EXAMSH ; AND DO EXAM ASSUMING SHORT ADDRESS
(1) 011367 000 002 .ADDR 1000 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
4827 011371 315 016 033 CALL CMP36 ; AND TRY OUT A COMPARE
4828 011374 235 022 .ADDR HOMEWD ; EXPECTED ID
4829 011376 012 040 .ADDR EMBUF ; AGAINST WHAT WAS JUST READ IN
4830 011400 311 RET ; AND OUT
4831
4832 011401 BTINT: INTON ; SET INTERNAL MODE ON
(1) 011401 327 RST 2 ; GO SET INTERNAL MODE
4833 011402 CLRB PARBT ; NO PARITYS
4834 011404 CLRB TRAPEN ; AND NO TRAPS WHILE BOOTING
4835 011406 315 164 005 CALL MRCMD ; AND DON'T FORGET MR RESET
4836 011411 311 RET
4837
4838 ; LITTLE ROUTINE TO SET UP DISK DEFAULTS
4839
4840 011412 072 357 040 DSKDFT: LDA DSKUBA ; GET CURRENTLY SELECTED DISK UBA NUMBER
4841 011415 062 254 040 STA UBANUM ; SET INTO COMMAND LIST PLACE
4842
4843 011420 MOV5B ; AND SEND CURRENTLY SELECTED RHBASE
(1) 011420 347 RST 4
(1) 011421 000 .BYTE 0
4844 011422 374 040 .ADDR DSBASE ; CURRENT DISK RH BASE
4845 011424 242 040 .ADDR RHBASE ; TO PLACE FOR COMMAND LIST TO FIND IT
4846 011426 311 RET ; OUT
4847
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 131
CMDS.M80 CRAM LOADER CODE
4849 .SBTTL CRAM LOADER CODE
4850
4851 011427 076 001 DMEM2CR: MVI A,BT.BIT ; DO COUPLE ROUTINES A FAVOR, LOAD BIT
4852 011431 062 121 040 MEM2CR: STA BT.TYPE ; ACCUM HAD THE BOOTING TYPE..SAVE IT
4853 011434 041 000 000 LXI H,00 ; ZEROES TO "H,L"
4854 011437 345 PUSH H ; SAVE CURRENT CRAM ADDRESS
4855 011440 315 267 014 CALL CADWR ; AND THEN WRITE IT TO THE CRAM
4856 011443 076 007 MVI A,7 ; START WITH FUNCTION 7
4857 011445 062 010 040 STA CRMFN
4858 011450 NEWPAG: MOV5B ; INITIALIZE MEM ADDRESS
(1) 011450 347 RST 4
(1) 011451 000 .BYTE 0
4859 011452 230 022 .ADDR MA1000 ; WITH 1000 OCTAL
4860 011454 017 040 .ADDR MEMAD ; STANDARD MEM ADDRESS
4861
4862 ; CODE TO DECIDE IF WE NEED TO READ AN ADDITIONAL DISK SECTOR
4863
4864 011456 052 017 040 LHLD MEMAD ; GET CURRENT MOS MEM ADDRESS
4865 011461 175 RD.EXM: MOV A,L ; GET 8 BITS OF ADDRESS TO BE EXAMINED
4866 011462 323 103 OUT A2835 ; SET PIECE OF ADDRESS INTO ADDRESS REGISTER
4867 011464 174 MOV A,H ; GET COUPLE MORE BITS
4868 011465 323 105 OUT A2027 ; SET INTO CSL BOARD ADDRESS REGISTER
4869 011467 076 004 MVI A,4 ; SPECIAL KEY TO MAKE "EXAMINE" WORK CORRECTLY
4870 011471 315 000 012 CALL EM.CRM ; GO DO A MEMORY EXAMINE, OF THE SHORT FLAVOR
4871
4872 011474 052 012 040 LHLD EMBUF ; GET 16 BITS OF THE MEMORY DATA
4873 011477 174 MOV A,H ; COPY TO ACCUM, SO THAT WE CAN MAKE IT 12 BITS
4874 011500 346 017 ANI ^O17 ; CLR THE BITS
4875 011502 147 MOV H,A ; PUT BACK INTO THE HI ORDER REG
4876
4877 011503 315 232 014 CALL WFUNC ; WRITE THE PIECE
4878 011506 041 010 040 LXI H,CRMFN ; GET CURRENT DIAG FUNCTION
4879 011511 065 DCR M ; DOWN COUNT
4880
4881 011512 052 013 040 LHLD EMBUF+1 ; GET 16 BITS OF THE MEMORY READ
4882
4883 011515 016 004 MVI C,4 ; NOW A QUICK LITTLE LOOP
4884 011517 257 XRA A ; CLR ACCUM TEMP
4885 011520 174 QQLOOP: MOV A,H ; COPY TO ACCUM
4886 011521 037 RAR ; ROTATE INTO THE C-BIT
4887 011522 147 MOV H,A ; PUT IT BACK
4888
4889 011523 175 MOV A,L ; TRY BOTTOM PIECE
4890 011524 037 RAR ; ROTATE C-BIT INTO THE TOP
4891 011525 157 MOV L,A ; PUT IT BACK
4892 011526 015 DCR C ; DOWN THE LITTLE COUNTER
4893 011527 302 120 023 JNZ QQLOOP ; CONTINUE
4894
4895 011532 315 232 014 CALL WFUNC ; WRITE THIS PIECE
4896 011535 041 010 040 LXI H,CRMFN ; DOWN THE FUNCTION COUNTER
4897 011540 065 DCR M ; DECREMENT
4898 011541 362 167 023 JP BBLOOP ; JUMP AROUND THIS STUFF IF NOT AT FUNCTION 0
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 132
CMDS.M80 CRAM LOADER CODE
4900
4901 ; IF DONE FUNCTIONS 0-7, TRY A LITTLE RESET
4902
4903 011544 076 007 MVI A,7 ; RESTART AT FUNCTION 7
4904 011546 062 010 040 STA CRMFN ; SAVE IT
4905
4906 ; HERE IF FINSHED A CRAM WORD & NEED TO DO RESET.
4907
4908 011551 341 POP H ; GET CRAM ADDRESS
4909 011552 043 INX H ; UPDATE
4910 011553 345 PUSH H
4911 011554 315 267 014 CALL CADWR ; NOW WRITE THIS, THE NEXT CRAM ADDRESS
4912 011557 174 MOV A,H ; NOW GET HI ORDER PIECE OF CRAM ADDR
4913 011560 346 010 ANI ^O10 ; IS IT .EQ. 4000 OCTAL YET?
4914 011562 312 205 023 JZ SEEPAGE ; IF NOT 4000 OCTAL YET, CHECK FOR A NXT WORD
4915 011565 341 POP H ; AND RESTORE STACK BEFORE LEAVING
4916 011566 311 RET ; OTHERWISE ALL DONE
4917
4918 011567 052 015 040 BBLOOP: LHLD EMBUF+3 ; GRAB 16 BITS OF THE MEMORY DATA
4919 011572 174 MOV A,H ; PASS 8 BITS TO ACCUM, SO WE CAN MAKE IT 4 BITS
4920 011573 346 017 ANI ^O17 ; OFF UNNEEDED BITS
4921 011575 147 MOV H,A ; PUT IT BACK
4922 011576 315 232 014 CALL WFUNC ; WRITE THIS DATUM
4923 011601 041 010 040 LXI H,CRMFN ; GET FUNCTION
4924 011604 065 DCR M ; DOWN TO NEXT FUNCTION
4925
4926 011605 052 017 040 SEEPAGE: LHLD MEMAD ; GET THE CURRENT MEMORY ADDRESS
4927 011610 043 INX H ; GO TO NEXT ADDRESS
4928 011611 042 017 040 SHLD MEMAD ; SAVE THIS NEXT ADDRESS
4929 011614 174 MOV A,H ; TEST H FOR AT "2000"
4930 011615 346 004 ANI ^O4 ; IF "2000" WEIGHT BIT SET, TIME FOR NEW PAGE OF DATA
4931 011617 312 061 023 JZ RD.EXM ; IF MEM ADDRESS .EQ. 2000, THEN FALL THRU TO NEXT READIN
4932 011622 315 230 023 CALL NEXTCR ; ROUTINE TO FETCH NEXT PAGE OF CRAM DATA
4933 011625 303 050 023 JMP NEWPAG ; AND BACK TO BEGINNING
4934
4935 ; ELSE, MUST READ IN ANOTHER PAGE'S WORTH FROM CURRENT BOOT DEVICE
4936
4937 011630 072 121 040 NEXTCR: LDA BT.TYPE ; FIND OUT WHAT KIND OF DEVICE WE ARE BOOTING FROM
4938 011633 376 001 CPI BT.BIT ; SEE IF DOING BOOT FROM THE DISK
4939 011635 302 252 023 JNZ TAPDEV ; IF FLAG .NE. BT.BIT, THEN BOOTING FROM MAGTAPE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 133
CMDS.M80 CRAM LOADER CODE
4941
4942 ; FALL THRU TO DO BOOT FROM DISK
4943
4944 011640 041 135 036 LXI H,QXFR ; SET UP FOR THE QUICK XFR COMMAND LIST
4945 011643 315 007 025 CALL CHNXCT ; READ IN, SHORT FORMAT(TRK/SEC/CYL IS PRESET)
4946 011646 332 161 032 JC C.BTERR ; ERROR IN READING CRAM
4947 011651 311 RET ; BACK TO CALLER
4948
4949 ; JUMP TO HERE TO DO BOOT FROM TAPE
4950
4951 011652 076 071 TAPDEV: MVI A,READ.TYPE ; PASS TO CHANNEL CMD LIST EXECUTOR THE XFR TYPE
4952 011654 315 373 024 CALL QMXFR ; READ IN A SINGLE PAGE FROM MAGTAPE
4953 011657 320 RNC ; IF NOTHING BAD, RETURN
4954 011660 315 140 022 CALL NONFATAL ; IF BADNESS, SEE IF FATAL KIND OR NOT
4955 011663 302 161 032 JNZ C.BTERR ; ERROR IN READING THE CRAM
4956 011666 311 RET ; BACK TO CALLER
4957
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 134
CMDS.M80 *** "FI" CMD ***
4959 .SBTTL *** "FI" CMD ***
4960
4961 ; COMMAND TO READ IN A PARTICULAR PAGE OF THE FILESYSTEM AND TO EXECUTE ITS
4962 ; CONTENTS AS IF THEY WERE TYPED IN 8080 COMMANDS.
4963
4964 011667 315 230 030 FICMD: CALL ARG16. ; COLLECT IT WHEN ITS THERE
4965
4966 ; BEWARE..IF YOU TYPE FI WITH A BOGUS ARGUMENT, THEN YOU LOSE..
4967 ; HE WHO USES THE FI CMD BEST KNOW WHAT HE'S DOING.
4968
4969 011672 021 022 002 LXI D,^O1022 ; START WITH OFFSET "0" INTO THE "FI" FILES
4970 011675 031 DAD D ; ADD THIS TO NUMBER TYPED TO GET THE DESIRED
4971 011676 315 252 022 CALL FILEINIT ; READ IN THE DESIRED PAGE
4972 011701 332 215 032 JC L.BTERR ; IF ERR
4973
4974 ; NOW DO SOMETHING WITH THE STUFF TYPED...
4975
4976 011704 MOV5B ; FIRST MUST GET INFO FROM MOS MEM TO 8080 RAM
(1) 011704 347 RST 4
(1) 011705 000 .BYTE 0
4977 011706 230 022 .ADDR MA1000 ; INFO STARTS AT MOS MEM LOC 1000
4978 011710 017 040 .ADDR MEMAD ; AND WE WILL TELL INTERNAL READER TO START THERE
4979
4980 011712 021 253 041 LXI D,E.BEG+2 ; A PLACE TO STORE ASCII BYTES FROM MEMORY
4981 011715 FI.GET: INTON ; NO PRINTING
(1) 011715 327 RST 2 ; GO SET INTERNAL MODE
4982 011716 315 216 024 CALL GATHER ; GO READ IN A WORD FROM MOS MEM
4983 011721 INTOFF ; OK TO PRINT NOW
(1) 011721 367 RST 6 ; GO EXIT FROM INTERNAL MODE
4984 011722 056 004 MVI L,4 ; NOW ONLY 4 BYTES PER WORD ARE USEFUL
4985 011724 001 012 040 LXI B,EMBUF ; AND THIS IS WHERE IN 8080 RAM THE BYTES ARE
4986 011727 012 FI.MOV: LDAX B ; FETCH UP A BYTE
4987 011730 022 STAX D ; PUT IT IN PLACE
4988 011731 376 377 CPI ^O377 ; IS IT END OF STRING?
4989 011733 302 344 023 JNZ FI.NXT ; IF NO, GO MOVE SOME MORE
4990
4991 011736 315 340 034 CALL MV.ALL ; GOT HERE, MOVE TO EXECUTE BUFFER
4992 011741 303 145 002 JMP DCODE ; AND GO DO IT
4993
4994 ; NOPE.. MOVE SOME MORE
4995
4996 011744 003 FI.NXT: INX B ; UPDATE THE POINTERS
4997 011745 023 INX D
4998 011746 055 DCR L ; CHECK COUNT TO SEE IF WE'VE DONE 4 YET
4999 011747 302 327 023 JNZ FI.MOV ; IF NOT, GO MOVE NEXT BYTE FROM CURRENT WORD
5000 011752 303 315 023 JMP FI.GET ; YES, READ NEXT MEM WORD AND TRY IT
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 135
CMDS.M80 *** "FI" CMD ***
5002
5003 ;;**********PROPOSED INSTRUCTION ********************
5004 ;
5005 ; .SBTTL *** "B1" CMD ***
5006 ;
5007 ;; COMMAND TO READ IN A SECOND TYPE OF MICRO-CODE AND EXECUTE IT..
5008 ;; I.E. BOOTCHECK 1 MICRO-CODE
5009 ;
5010 ;B1CMD: LXI D,^O1010 ; GET THE CORRECT OFFSET
5011 ; CALL FILEINIT ; READ IN THE FIRST PAGE
5012 ; JC C.BTERR ; IF ERR
5013 ;
5014 ; MVI A,BT.BIT ; SAY THAT THIS IS A LOAD FROM DISK
5015 ; CALL MEM2CRAM ; READ IT IN AS MICRO-CODE
5016 ; CALL BT.GO ; START IT UP
5017 ; RET ; THAT IT
5018 ;
5019
5020 .SBTTL *** "B2" CMD ***
5021
5022 ; BOOTCHECK 2.. THIS LOADS IN A SEPARATE "PRE-BOOT", WHICH
5023 ; LOADS IN THE BOOT CHECK 2.
5024
5025 011755 076 012 B2CMD: MVI A,^O12 ; GET THE OFFSET
5026 011757 062 172 040 STA RM100 ; SAVE IT SO WE CAN USE SOME SUPER COMMON CODE
5027 011762 303 233 021 JMP BT.SRC ; THAT'S IT!!!!
5028
5029 .SBTTL *** "VD" CMD ***
5030
5031 ; COMMAND TO VERIFY THE CONTENTS OF THE C-RAM AGAINST THE MICRO-CODE
5032 ; AS IT SITS ON DISK.
5033
5034 011765 315 247 022 VDCMD: CALL MICROP ; NOW READ IN HOME BLOCKS, THEN 1ST PAGE OF U-CODE
5035 011770 332 161 032 JC C.BTERR ; IF ERROR, GO TELL WORLD ABOUT IT
5036
5037 011773 076 001 MVI A,BT.BIT ; WENT OK.. SPECIFY A DISK TYPE OPERATION
5038 011775 303 015 024 JMP VERCRAM ; AND GO IN TO VERIFY THE CRAM
5039
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 136
CMDS.M80 *** "VT" CMD ***
5041 .SBTTL *** "VT" CMD ***
5042
5043 ; COMMAND TO VERIFY THE CONTENTS OF THE C-RAM AGAINST THE MICRO-CODE
5044 ; AS IT SITS ON MAG TAPE.
5045
5046 012000 315 210 022 VTCMD: CALL MTSETUP ; GO TO SOME COMMON CODE TO LOOK AT MAGTAPES
5047 012003 076 071 MVI A,READ.TAPE ; TELL CHANNEL LISTER TO DO A READ IN
5048 012005 315 362 024 CALL MTXFR ; READ IN FIRST PAGE OF U-CODE OFF THE TAPE
5049 012010 332 165 032 JC A.BTERR ; IF ERROR, GO REPORT IT
5050
5051 012013 076 002 MVI A,MT.BIT ; WENT OK.. SPECIFY A TAPE OPERATION
5052
5053 ; FALL STRAIGHT INTO THE CODE TO VERIFY THE CRAM
5054
5055 .SBTTL VERIFY CRAM CODE
5056
5057 ; ROUTINES THAT DO READ INS FROM THE CURRENTLY SELECTED DEVICE AND COMPARES
5058 ; THAT HARD MICRO-CODE DATA AGAINST THE CURRENT CONTENTS OF THE CONTROL-STORE.
5059
5060 012015 VERCRAM:
5061 012015 062 121 040 STA BT.TYPE ; BEGIN BY SAVING DEVICE AGAINST WHICH WE WILL VERIFY
5062
5063 012020 MOV5B ; START BY SETTING MEMORY ADDRESS AT 1000
(1) 012020 347 RST 4
(1) 012021 000 .BYTE 0
5064 012022 230 022 .ADDR MA1000 ; A "1000"
5065 012024 017 040 .ADDR MEMAD ; PLACE WHERE MEM ADDRESS IS KEPT
5066 012026 041 000 000 LXI H,00 ; BEGIN WITH CRAM ADDRESS 00
5067 012031 042 004 040 SHLD CRMAD ; SET CRAM ADDRESS TO ZEROES
5068 012034 303 047 024 JMP V.GO ; ENTER LOOP AT THE PROPER PLACE
5069
5070 012037 052 004 040 V.DONWD: LHLD CRMAD ; GET CURRENT CRAM ADDRESS
5071 012042 043 INX H ; AND UPDATE FOR NEXT TIME AROUND
5072 012043 174 MOV A,H ; PUT HI ORDER PIECE OF IT INTO ACCUM
5073 012044 346 010 ANI ^O10 ; SEE IF AT END OF CRAM YET
5074 012046 300 RNZ ; IF IT IS, ALL DONE, GO OUT
5075
5076 ; HERE IF REALLY READY TO DO A CRAM LOC
5077
5078 012047 315 267 014 V.GO: CALL CADWR ; WRITE IT TO CRAM, BE IT GOOD OR BAD
5079 012052 042 004 040 SHLD CRMAD ; NOW SAVE ADDRESS WHILE WE DO SOME STUFF
5080 012055 315 127 013 CALL CP1 ; SINGLE CLOCK GETS CRAM CONTENTS TO CONTROL REG
5081 012060 315 370 014 CALL RCINT ; READ IN CONTENTS OF C-RAM AND SAVE IN 8080 RAM
5082
5083 ; HERE WHEN CRAM DATA IS SAFELY TUCKED AWAY IN THE 8080 RAM
5084
5085 012063 001 171 024 LXI B,VERLST ; B,C PAIR POINTS TO LIST OF DATA OFFSETS
5086 012066 021 302 040 LXI D,CRMBF ; D,E PAIR POINTS TO ACTUAL DATA LIST (H,L PNTS EXPECTED)
5087
5088 012071 315 216 024 V.NXMEM: CALL GATHER ; HERE TO CALL ROUTINE THAT READS IN THE NEXT MEM WORD
5089 012074 076 003 MVI A,3 ; AND TAKE TIME OUT TO RESET THE 3 COUNTER
5090 012076 062 253 040 STA VERCNT ; SET UP A CLEAN COUNT
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 137
CMDS.M80 VERIFY CRAM CODE
5092
5093 ; AND HERE BELOW BEGINS THE ACTUAL DATA COMPARES
5094
5095 012101 012 V.BLP: LDAX B ; GET THE FIRST INDEX BYTE FROM THE LIST OF BYTES
5096 012102 346 077 ANI ^O77 ; OFF THE SIGNALS, AND CONTINUE
5097 012104 052 012 040 V.BLP1: LHLD EMBUF ; GET EXPECTED DATA INTO H,L REGISTER
5098 012107 003 INX B ; UPDATE B,C TO POINT AT FUNCTION READ
5099 012110 203 ADD E ; ADD AS AN OFFSET TO THE D,E PAIR
5100 012111 137 MOV E,A ; PUT THE GOOD ADDR BACK INTO "E"
5101 012112 172 MOV A,D ; AND GRAB THE HI ORDER FOR A SEC
5102 012113 316 000 ACI 0 ; ADD IN THE CARRY IF REQUIRED
5103 012115 127 MOV D,A ; PUT THE HI ORDER BACK AGAIN
5104
5105 012116 032 LDAX D ; NOW LOAD IN THE FIRST "ACTUAL" DATUM
5106 012117 023 INX D ; UPDATE POINTER TO ACTUAL
5107 012120 275 CMP L ; COMPARE AGAINST EXPECTED
5108 012121 302 132 024 JNZ V.ERR ; REPORT IF BADNESS
5109
5110 012124 174 MOV A,H ; GET UPPER 12 BITS OF THE EXPECTED
5111 012125 346 017 ANI ^O17 ; IF DATA WAS EQUAL, ONLY DISCREPENCY CAN BE IN B7-B4
5112
5113 012127 147 MOV H,A ; GET THE 4 BITS OF DATA LEFT AFTER THE "AND"
5114 012130 032 LDAX D ; GET THE ACTUAL DATA TO ACCUM
5115 012131 274 CMP H ; SEE IF SAME AND B3-B0 SHOULD BE
5116 012132 304 260 024 V.ERR: CNZ VERRPT ; ZERO. IF NOT REPORT AS ERROR
5117 012135 033 DCX D ; FIX D TO LOOK AT BEGINNING OF "ACTUAL" 2 BYTES
5118
5119 ; NOW NEED TO CHOOSE IF NEED CHECK TWICE(FOR DOUBLE COPIES), OR IF END
5120 ; OF LIST FOR THIS CRAM WORD
5121
5122 012136 003 INX B ; UPDATE POINTER INTO THE INDEXER LIST
5123 012137 012 LDAX B ; GET THE NEXT INDEX BYTE
5124 012140 027 RAL ; COPY SIGN INTO C-BIT
5125 012141 332 037 024 JC V.DONWD ; IF SET, END OF LIST.. GO DO NEXT CRAM WORD
5126
5127 012144 027 RAL ; WASN'T END OF LIST.. SEE IF A DOUBLE CHECKER
5128 012145 332 101 024 JC V.BLP ; JUMP BACK TO MAIN LOOP WITHOUT UPDATING IF YES
5129
5130 ; IF NOT A DOUBLE, MUST FALL THROUGH TO UPDATE EXPECTED
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 138
CMDS.M80 VERIFY CRAM CODE
5132
5133 ; HERE WHEN MUST UPDATE EXPECTED..NOT A DOUBLE COPY
5134
5135 012150 041 253 040 V.NXT: LXI H,VERCNT ; LOAD CURRENT COUNT FOR HOW MANY COMPARE PER MEM WORD
5136 012153 065 DCR M ; DECREMENT THAT COUNT
5137 012154 312 071 024 JZ V.NXMEM ; IF DOWN TO ZERO, GO READ IN THE NEXT MEMORY WORD
5138
5139 012157 041 012 040 LXI H,EMBUF ; TELL SHR36 WHERE IT SHOULD SHIFT
5140 012162 315 140 031 CALL SHR36 ; IF NOT DOWN, SHIFT WHAT WE HAVE TO NEXT 12 BIT GRP
5141 012165 014 .BYTE 12. ; SPECIFY THE NEXT 12 BIT GROUP IS WHAT WE WANT
5142 012166 303 101 024 JMP V.BLP ; AND CONTINUE IN THE BIG LOOP
5143
5144 ; LIST OF INDEXER BYTES
5145
5146 .RADIX 8
5147 012171 000 017 VERLST: .BYTE 0,17 ; READ FCN 17 (BITS 84-95)
5148 012173 002 016 .BYTE 2,16 ; READ FCN 16 (BITS 72-83)
5149 012175 002 015 .BYTE 2,15 ; READ FCN 15 (BITS 60-71)
5150 012177 002 014 .BYTE 2,14 ; READ FCN 14 (BITS 48-59)
5151 012201 002 013 .BYTE 2,13 ; READ FCN 13 (BITS 36-47)
5152 012203 102 012 .BYTE 102,12 ; READ FCN 12 (BITS 36-47) SECOND COPY
5153 012205 010 006 .BYTE 10,6 ; READ FCN 6 (BITS 24-35)
5154 012207 102 005 .BYTE 102,5 ; READ FCN 5 (BITS 24-35) SECOND COPY
5155 012211 002 004 .BYTE 2,4 ; READ FCN 4 (BITS 12-23)
5156 012213 010 000 .BYTE 10,0 ; READ FCN 0 (BITS 00-11)
5157 012215 200 .BYTE 200 ; END OF LIST MARKER
5158 .RADIX 10
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 139
CMDS.M80 VERIFY CRAM CODE
5160
5161 ; SUBROUTINE TO READ IN THE NEXT WORD FROM MEMORY.
5162 ; ALSO CHECKS TO SEE IF AT THE END OF THE MEMORY PAGE(ADDR 1777), AND IF SO
5163 ; TO GO AND READ IN THE NEXT PAGE OF MICRO-CODE FROM THE DEVICE AGAINST
5164 ; WHICH WE ARE VERIFYING THE MICRO-CODE.
5165
5166 012216 325 GATHER: PUSH D
5167 012217 305 PUSH B
5168
5169 012220 052 017 040 LHLD MEMAD ; GET CURRENT MEMORY ADDRESS
5170 012223 345 PUSH H ; SAVE CURRENT MEM ADDRESS
5171
5172 012224 174 MOV A,H ; GET THE HI ORDER PIECE OF THE MEM ADDRESS
5173 012225 346 004 ANI ^O4 ; SEE IF ADDRESS AT "2000" YET
5174 012227 312 245 024 JZ G.SKP ; IF NOT, SIMPLY GO READ IN THE NEXT WORD
5175
5176 ; ELSE MUST READ IN THE NEXT PAGE OF MICRO-CODE
5177
5178 012232 315 230 023 CALL NEXTCR ; DO THE READ IN
5179
5180 012235 341 POP H ; GET OLD CRUMMY H,L OFF THE STACK
5181 012236 041 000 002 LXI H,^O1000 ; WANT TO RESET MEM ADDRESS TO BEGINNING OF PAGE
5182 012241 345 PUSH H ; PUT BACK ON STACK
5183 012242 042 017 040 SHLD MEMAD ; AND PASS NEW ADDRESS IN RAM
5184 012245 315 361 011 G.SKP: CALL EM2 ; EXAMINE THE NEXT MEMORY WORD
5185 012250 341 POP H ; GRAB THE ADDRESS WE WANT TO READ NEXT TIME
5186 012251 043 INX H ; UPDATE TO NEXT
5187 012252 042 017 040 SHLD MEMAD ; PUT IT BACK
5188 012255 301 POP B ; RESTORE THE REGS NOW
5189 012256 321 POP D
5190 012257 311 RET ; AND OUT
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 140
CMDS.M80 VERIFY CRAM CODE
5192
5193 ; VERIFY ERROR REPORTER SUBROUTINE. REPORTS VERIFY ERRORS AS THEY HAPPEN
5194 ; AND THEN PERMITS THE VERIFIER TO CONTINUE VERIFYING THE REST OF THE CRAM.
5195
5196 012260 345 VERRPT: PUSH H ; SAVE CONTENTS OF H,L PAIR
5197 012261 325 PUSH D ; MUST ALSO SAVE D,E
5198 012262 INTOFF ; PRINT ALL THIS GOOD STUFF
(1) 012262 367 RST 6 ; GO EXIT FROM INTERNAL MODE
5199
5200 012263 041 004 040 LXI H,CRMAD ; THEN PRINT CRAM ADDRESS OF THE FAILING CRAM WORD
5201 012266 315 303 030 CALL P16 ; AND PRINT OUT THE ADDRESS
5202
5203 012271 PSLASH ; THROW OUT A "/"
(2) 012271 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 012272 057 .BYTE SLASH ; CHAR TO PRINT
5204
5205 012273 012 LDAX B ; FETCH UP THE DIAG FUNC OF THE READ FAILURE
5206 012274 315 270 030 CALL P8BITA ; AND PRINT IT
5207
5208 012277 PCHAR ': ; SIMPLE CHARACTERS ARE ": A "
(1) 012277 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 012300 072 .BYTE ': ; CHAR TO PRINT
5209 012301 PSPACE
(2) 012301 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 012302 040 .BYTE SPACE ; CHAR TO PRINT
5210 012303 PCHAR 'A
(1) 012303 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 012304 101 .BYTE 'A ; CHAR TO PRINT
5211 012305 PSPACE
(2) 012305 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 012306 040 .BYTE SPACE ; CHAR TO PRINT
5212
5213 012307 353 XCHG ; AND NOW H,L POINTS AT THE ACTUAL
5214 012310 053 DCX H ; NOW D,E POINTS TO THE ACTUAL
5215 012311 315 303 030 CALL P16 ; PRINT THE ACTUAL DATA
5216 012314 353 XCHG ; FIX SO H,L POINTS AT TEMP LOC ONCE AGAIN
5217
5218 012315 PSPACE ; ANOTHER SPACE
(2) 012315 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 012316 040 .BYTE SPACE ; CHAR TO PRINT
5219 012317 PCHAR 'E ; A "W" STANDS FOR "WAS"
(1) 012317 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 012320 105 .BYTE 'E ; CHAR TO PRINT
5220 012321 PSPACE
(2) 012321 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 012322 040 .BYTE SPACE ; CHAR TO PRINT
5221
5222 012323 052 012 040 LHLD EMBUF ; GET THE EXPECTED DATA INTO H,L PAIR
5223 012326 174 MOV A,H ; WANT TO STRIP ANY BITS ABOVE 12 BITS
5224 012327 346 017 ANI ^O17 ; KEEP ONLY RELEVANT BITS
5225 012331 147 MOV H,A ; PUT IT BACK
5226 012332 042 100 040 SHLD TMPB2 ; PUT IT IN THE TEMP PLACE
5227 012335 315 300 030 CALL P16. ; PRINT THE EXPECTED
5228 012340 PCRLF
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 140-1
CMDS.M80 VERIFY CRAM CODE
(2) 012340 347 RST 4
(2) 012341 002 .BYTE 2
5229
5230 012342 305 PUSH B ; SAVE B REG TOO
5231 012343 315 174 034 CALL DECNET ; IF THERE IS A HOST, TELL HIM TOO
5232 012346 301 POP B
5233 012347 INTON ; AND BACK TO INTERNAL MODE
(1) 012347 327 RST 2 ; GO SET INTERNAL MODE
5234 012350 321 POP D
5235 012351 341 POP H
5236 012352 311 RET
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 141
CMDS.M80 VERIFY CRAM CODE
5238
5239 ; EXECUTE CHANNEL COMMANDS....
5240
5241 012353 041 041 036 DSXFR: LXI H,DSKSEQ ; PNTR TO COMMAND LIST
5242 012356 315 007 025 XCTNOW: CALL CHNXCT ; EXECUTE CHANNEL LIST
5243 012361 311 RET
5244
5245 012362 041 204 036 MTXFR: LXI H,MTASEQ ; PNTR TO COMMAND LIST
5246 012365 062 144 040 XCTMTA: STA SKP.GO ; ACCUM HAD XFR TYPE..SAVE IT
5247 012370 303 356 024 JMP XCTNOW ; GO EXECUTE THE CHANNEL COMMAND LIST
5248
5249 012373 041 264 036 QMXFR: LXI H,QTXFR ; PNTR TO COMMAND LIST
5250 012376 303 365 024 JMP XCTMTA ; GO EXECUTE THE CHANNEL COMMAND LIST
5251
5252 012401 041 352 036 MTRESET: LXI H,MTARST ; CHANNEL CMD LIST TO CLEAR ERROR FROM MAGTAPE
5253 012404 303 356 024 JMP XCTNOW ; GO EXECUTE THE CHANNEL COMMAND LIST
5254
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 142
CMDS.M80 CHANNEL COMMAND LIST EXECUTOR
5256 .SBTTL CHANNEL COMMAND LIST EXECUTOR
5257
5258 ; ROUTINE TO A CHANNEL COMMAND LIST TYPE OPERATION, FOR DATA TRANSFERS FROM
5259 ; OUR SELECTED BOOT DEVICE. COMMAND LIST IS CODED AS FOLLOWS:
5260 ;
5261 ; THE LIST IS A SERIES OF 36-BIT COMMANDS.
5262 ; WE HAVE FREE USE OF BITS 0-17 AS COMMAND TYPES
5263 ;
5264 ; BITS 15,16,17 .EQ. 0 MEAN "DI" COMMAND
5265 ; BITS 15,16,17 .EQ. 1 MEAN "LI" COMMAND
5266 ; BITS 15,16,17 .EQ. 2 MEAN "EI" COMMAND
5267 ; BITS 15,16,17 .EQ. 3 MEAN "WAIT" COMMAND
5268 ; BITS 15,16,17 .EQ. 4 MEAN "ERRTST" COMMAND
5269 ; BITS 15,16,17 .EQ. 5 MEAN "END" OF COMMAND LIST
5270 ; BITS 15,16,17 .EQ. 6 MEAN "TWAIT" COMMAND
5271 ; BITS 15,16,17 .EQ. 7 MEAN "UBA" COMMAND
5272
5273 ; POINTER TO THE CURRENT COMMAND LIST IS ALWAYS STORED IN H,L
5274
5275 012407 CHNXCT: INTON ; SET UP FOR INTERNAL MODE
(1) 012407 327 RST 2 ; GO SET INTERNAL MODE
5276 012410 305 PUSH B
5277 012411 325 PUSH D
5278 012412 345 PUSH H
5279
5280 012413 021 002 000 DSCON: LXI D,2 ; "D,E" GETS THE CONSTANT "2"
5281 012416 031 DAD D ; NOW "H,L" POINTS TO "DATA+2"(BITS 12-19)
5282
5283 012417 104 MOV B,H ; COPY "H,L" INTO "B,C"
5284 012420 115 MOV C,L
5285 012421 345 PUSH H ; SAVE "H,L"
5286 012422 176 MOV A,M ; GET BITS 12-19 INTO ACCUM
5287
5288 012423 037 RAR ; NOW JUSTIFY ACCUM AT BITS 16,17
5289 012424 037 RAR ; TAKES 2 SHIFTS
5290 012425 346 017 ANI ^O17 ; OFF ALL BUT BITS 14,15,16,17
5291 012427 137 MOV E,A ; NOW PUT INTO LO-ORDER HALF OF DOUBLE REG
5292 012430 041 052 025 LXI H,DSLST ; GET A PNTR TO THE DISPATCHING LIST
5293 012433 031 DAD D ; CREAT PNTR TO THE COMMAND
5294
5295 012434 136 MOV E,M ; GET LO ORDER PIECE OF CMD DISPATCH
5296 012435 043 INX H
5297 012436 126 MOV D,M ; GET HI ORDER PIECE OF CMD DISPATCH
5298 012437 353 XCHG ; ASSEMBLED ADDRESS TO "H,L"
5299 012440 021 045 025 LXI D,XFRRT ; NOW GET A PSEUDO RETURN PC TO PUT ON STACK
5300 012443 325 PUSH D ; AND PUT IT THERE
5301
5302 012444 351 PCHL ; DISPATCH TO THAT ASSEMBLED ADDRESS
5303
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 143
CMDS.M80 CHANNEL COMMAND LIST EXECUTOR
5305
5306 ; UPON COMPLETION OF THE COMMAND LIST COMMANDS, YOU GENERALLY
5307 ; RETURN HERE IN THE CODE.
5308
5309 012445 341 XFRRT: POP H ; GET POINTER TO CURRENT LOCATION IN CMD LIST
5310 012446 043 INX H ; MAKE IT POINT TO NEXT WORD IN THE LIST
5311 012447 303 013 025 JMP DSCON ; AND CONTINUE IN COMMAND LIST EXECUTOR
5312
5313 ; COMMAND LIST DISPATCH SELECTION
5314
5315 012452 150 025 DSLST: .ADDR CMDDI ; DI CMD .EQ. 0
5316 012454 076 025 .ADDR CMDLI ; LI CMD .EQ. 2
5317 012456 072 025 .ADDR CMDEI ; EI CMD .EQ. 4
5318 012460 177 025 .ADDR CMDWAIT ; WAIT CMD .EQ. 6
5319 012462 246 025 .ADDR CMDERCHK ; ERRTST CMD .EQ. 10
5320 012464 266 025 .ADDR CMDEN ; END CMD .EQ. 12
5321 012466 230 025 .ADDR CMDTWAIT ; WAIT CMD WITH NO TIMEOUT. CHECKS FOR BIT TRUE .EQ. 14
5322 012470 132 025 .ADDR CMDUBA ; LI TYPE CMD. NO OFFSETS, GOOD FOR UBA STUFF .EQ. 16
5323
5324 ; CODE FOR "EI" COMMAND
5325
5326 012472 247 CMDEI: ANA A ; CLR THE "C-BIT"
5327 012473 303 077 025 JMP CMDLI1 ; GO TO COMMON CODE FOR LI AND EI COMMAND
5328
5329 ; CODE FOR "LI" COMMAND
5330
5331 012476 067 CMDLI: STC ; SET THE "C-BIT"
5332 012477 365 CMDLI1: PUSH PSW ; AND SAVE IT
5333 012500 MOV5B ; PASS THE COMMAND LIST EXECUTOR THE RHBASE ADDRESS
(1) 012500 347 RST 4
(1) 012501 000 .BYTE 0
5334 012502 242 040 .ADDR RHBASE ; KEPT IN HERE
5335 012504 024 040 .ADDR IOAD ; USED IN HERE
5336
5337 012506 041 026 040 LXI H,IOAD+2 ; "H,L" PNTS TO DEST+2
5338 012511 072 254 040 LDA UBANUM ; CURRENT UBA NUMBER INTO ACCUM
5339 012514 266 ORA M ; THROW IN THE CURRENT BITS
5340 012515 167 MOV M,A ; PUT IT ALL BACK
5341
5342 012516 053 DCX H ; NOW MAKE "H,L" POINT TO ADDR +0
5343 012517 053 DCX H
5344 012520 013 DCX B ; MAKE "B,C" PAIR POINT TO SELECTED OFFSET FROM BASE
5345 012521 012 LDAX B ; GET SELECTED OFFSET
5346 012522 206 ADD M ; ADD OFFSET TO THE BASE
5347 012523 167 MOV M,A ; AND PUT THE WHOLE MESS BACK
5348 012524 361 POP PSW ; NOW GET STATE OF PROCESSOR FLAGS
5349 012525 330 RC ; IF "C" SET, IT WAS AN LI AND WE ARE DONE
5350
5351 ; CALL THRU IF "C" CLR..IT WAS EI AND WE MUST FINISH IT
5352
5353 012526 315 302 012 CALL EI1 ; EXECUTE "EI" CMD
5354 012531 311 RET ; ALL DONE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 144
CMDS.M80 CHANNEL COMMAND LIST EXECUTOR
5356
5357 ; CODE FOR LI TYPE COMMAND ONLY USING NO OFFSETS, TAKING THE ADDRESSES
5358 ; EXACTLY AS PRESENTED.. GOOD FOR UBA OPERATIONS, WHICH REQUIRE NO OFFSETS.
5359
5360 012532 021 026 040 CMDUBA: LXI D,IOAD+2 ; "D,E" PNTS TO DEST+2
5361 012535 325 PUSH D ; SAVE THE ADDRESS OF UBA/RH ADDRESS
5362 012536 315 307 025 CALL MOV18B ; MOVE SOME DATA
5363 012541 341 POP H ; ADDR OF UBA/RH INTO H,L
5364 012542 072 254 040 LDA UBANUM ; CURRENT UBA NUMBER INTO ACCUM
5365 012545 266 ORA M ; THROW IN THE CURRENT BITS
5366 012546 167 MOV M,A ; PUT IT ALL BACK
5367 012547 311 RET ; WE ARE DONE
5368
5369 ; CODE FOR DI COMMAND
5370
5371 012550 012 CMDDI: LDAX B ; GET DISP CODE TO SEE IF INDIRECT
5372 012551 247 ANA A ; CHECK THE SIGN BIT
5373 012552 362 165 025 JP DILOCL ; AND JUMP IF NO INDIRECTION
5374
5375 ; FALL TO HERE IF WAS INDIRECT
5376
5377 012555 151 MOV L,C ; PASS ADDR IN "B,C" TO "H,L"
5378 012556 140 MOV H,B
5379 012557 053 DCX H ; NOW BACK UP PNTR TO HI ORDER PCE OF INDIRECT WRD
5380 012560 106 MOV B,M ; AND INTO B
5381 012561 053 DCX H ; NOW TO LO ORDER PIECE OF INDIRECT WORD
5382 012562 116 MOV C,M ; LO ORDER PIECE TO C AND DONE
5383 012563 003 INX B ; "B,C" MUST POINT TO SRC + 2
5384 012564 003 INX B
5385 012565 021 051 040 DILOCL: LXI D,DMDAT+2 ; "D,E" POINTS TO DEST+2
5386 012570 315 307 025 CALL MOV18B ; MOVE SOME STUFF AROUND
5387 012573 315 341 012 CALL DI1 ; EXECUTE THE DEPOSIT
5388 012576 311 RET ; AND BACK TO COMMAND LIST
5389
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 145
CMDS.M80 CHANNEL COMMAND LIST EXECUTOR
5391
5392 ; CODE FOR WAIT COMMAND(FOR WAITING FOR A TAPE TO FINISH, FOR EXAMPLE)
5393
5394 012577 CMDWAIT:
5395 012577 257 XRA A ; CLEAR ACCUM
5396 012600 127 MOV D,A ; NOW CLR "D", THE REGISTER WE WILL USE FOR TIMEOUT COUNT
5397 012601 137 MOV E,A ; CLR "E" TOO
5398
5399 012602 305 WAITLP: PUSH B ; SAVE B,C
5400 012603 315 330 025 CALL CHKBIT ; CHECK BITS VERSUS DEVICE STATUS TO SEE IF SET(I.E READY)
5401 012606 301 POP B ; RESTORE B,C
5402 012607 300 RNZ ; IF READY BIT SET, ITS OK, GO AWAY
5403
5404 ; FALL THRU IF READY NOT SET
5405
5406 012610 305 PUSH B ; SAVE B,C FROM DESTRUCTION
5407 012611 325 PUSH D ; SAVE TIME-OUT COUNT
5408 012612 315 302 012 CALL EI1 ; DO ANOTHER EXAMINE OF DEVICE STATUS TO SEE IF READY NOW
5409 012615 321 POP D ; GET THE TIME-OUT COUNT
5410 012616 301 POP B ; RESTORE B,C
5411 012617 023 INX D ; INCREMENT
5412 012620 173 MOV A,E ; SEE IF COUNT DOWN TO ZERO YET
5413 012621 262 ORA D ; USE TOP HALF TOO
5414 012622 302 202 025 JNZ WAITLP ; GO TRY AGAIN
5415
5416 ; FALL THRU IF DEVICE TIME'S OUT BEFORE GETTING A READY
5417
5418 012625 303 254 025 JMP DEVERR ; GO REPORT "?BT" AND THE FAILED PC
5419
5420 ; CODE FOR TWAIT COMMAND
5421
5422 012630 305 CMDTWAIT: PUSH B ; FIRST SAVE THE BC POINTERS
5423 012631 315 302 012 CALL EI1 ; READ THE CURRENT STATE AS IT IS NOW
5424 012634 301 POP B ; RESET B TO A GOOD VALUE
5425 012635 305 PUSH B ; AND SAVE IT FROM DESTRUCTION AGAIN
5426 012636 315 330 025 CALL CHKBIT ; NOW SEE IF APPROPRIATE BIT IS SET
5427 012641 301 POP B ; RESTORE
5428 012642 300 RNZ ; RETURN IF BIT WAS SET AS DESIRED
5429 012643 303 254 025 JMP DEVERR ; ELSE.. GO SAY ERR, BIT WAS NOT SET AS DESIRED
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 146
CMDS.M80 CHANNEL COMMAND LIST EXECUTOR
5431
5432 ; CODE FOR ERROR TEST COMMAND
5433
5434 012646 305 CMDERCHK: PUSH B ; SAVE B,C
5435 012647 315 330 025 CALL CHKBIT ; FIRST GO CHECK TO SEE IF ANY OF DESIRED BITS SET
5436 012652 301 POP B ; AND RESTORE
5437 012653 310 RZ ; IF NONE SET, RETURN CAUSE ALL IS OK
5438
5439 ; FALL TO HERE IF SOME BITS SET..HAD DEVICE ERROR & THEREFORE "BOOT" FAILED
5440
5441 012654 140 DEVERR: MOV H,B ; NOW COPY "B,C" TO "H,L" REGISTER
5442 012655 151 MOV L,C
5443
5444 012656 042 154 040 SHLD ERRCD ; "H,L" NOW HAS FAILING PC
5445 012661 INTOFF ; LET ALL MESSAGES PRINT NOW
(1) 012661 367 RST 6 ; GO EXIT FROM INTERNAL MODE
5446 012662 257 XRA A ; CLR C-BIT, SO THAT IT WILL SET LATER, TO INDICATE ERR
5447 012663 303 276 025 JMP DEVEXIT ; GO EXIT WITH MESSING WITH PRINT FLAGS
5448
5449 ; CODE FOR THE END COMMAND
5450
5451 012666 021 333 016 CMDEN: LXI D,MAD000 ; GUARANTEE CSL BUS ADDR REG .EQ. 0 AFTER XFR
5452 012671 315 172 033 CALL ADATP ; WRITE THE CSL BUS ADDRESS REG WITH 0'S
5453 012674 INTOFF ; CLR INTERNAL MODE
(1) 012674 367 RST 6 ; GO EXIT FROM INTERNAL MODE
5454 012675 067 STC ; SET THE C-BIT, SO THAT IT WILL BE CLEARED LATER
5455 012676 077 DEVEXIT: CMC ; COMPLEMENT C-BIT, SO IT WILL SAY ERR, OR NO ERR
5456 012677 341 POP H ; THROW OUT PSEUDO RETURN FROM STACK TOP
5457 012700 341 POP H ; THROW OUT THE SAVED "H,L"
5458 012701 341 POP H ; AND RESTORE ALL THE REGISTERS
5459 012702 321 POP D ; THAT WE SAVED
5460 012703 301 POP B
5461 012704 076 000 MVI A,0 ; ACCUM WILL ALWAYS BE 0 ON EXIT FROM CMD LIST EXECUTOR
5462 012706 311 RET
5463
5464 ; ROUTINE FOR MOVING 3 BYTES OF DATA. "B,C" HAS SRC+2..."D,E" HAS DST+2.
5465
5466 012707 046 002 MOV18B: MVI H,2 ; COUNT OF 3 IS HOW MANY TO MOVE
5467 012711 012 LDAX B ; GET PIECE OF SOURCE
5468 012712 346 003 ANI 3 ; ONLY INTERESTED IN BITS 18,19
5469 012714 022 STAX D ; PUT AT DESTINATION
5470 012715 013 DCX B ; POINT TO NEXT RELEVANT BYTE
5471 012716 033 DCX D ; FOR SRC AND DST
5472 012717 012 MOV18X: LDAX B ; GET A PIECE OF THE SRC TO ACCUM
5473 012720 022 STAX D ; AND PUT AT DESTINATION PLACE
5474 012721 013 DCX B ; DOWN THE POINTER
5475 012722 033 DCX D ; DOWN THE OTHER POINTER
5476 012723 045 DCR H ; AND DOWN THE COUNTER..
5477 012724 302 317 025 JNZ MOV18X ; CONTINUE TILL MOVED 3 BYTES
5478 012727 311 RET ; THEN OUT
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 147
CMDS.M80 CHANNEL COMMAND LIST EXECUTOR
5480
5481 ; COMMON ROUTINE FOR CHECKING DEVICE STATUS, FOR EITHER DEVICE ERRORS OR
5482 ; READY BIT TRUE..MUST BE CALLED IMMEDIATLY AFTER AN "EI" COMMAND.
5483
5484 012730 052 012 040 CHKBIT: LHLD EMBUF ; GET CURRENT DEVICE STATUS INTO "H,L"
5485 012733 013 DCX B ; MAKE B PNT TO +1
5486 012734 013 DCX B ; AND MAKE IT PNT TO +0
5487 012735 012 LDAX B ; BYTE OF DESIRED INTO ACCUM
5488 012736 245 ANA L ; COMPARE AGAINST CURRENT DEVICE
5489 012737 300 RNZ ; IF NON-ZERO, NO NEED TO LOOK FURTHER
5490
5491 012740 003 INX B ; IF 1ST BYTE WAS ZERO, BUMP PNTR TO LOOK AT NEXT BYTE
5492 012741 012 LDAX B ; NEXT BYTE INTO THE ACCUM
5493 012742 244 ANA H ; COMPARE VERSUS DESIRED
5494 012743 311 RET ; PLAIN RETURN..Z BIT WILL BE SET APPROPRIATELY
5495
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 148
CMDS.M80 *** "BC" CMD ***
5497 .SBTTL *** "BC" CMD ***
5498
5499 ; CODE WHICH PERFORMS THE VERY FAMOUS BOOT CHECK I
5500
5501 012744 315 164 005 BCCMD: CALL MRCMD ; MAKE SURE MACHINE IS STOPPED
5502 012747 INTON ; SET UP INTERNAL MODE
(1) 012747 327 RST 2 ; GO SET INTERNAL MODE
5503 012750 CLRB ERRCD ; BEGIN BY CLEARING THE ERROR CODES
5504 012752 CLRB ERRCD+1 ; MUST CLEAR BOTH HALVES
5505 001 .IF NDF,NEEDRM
5506
5507 012754 CLRRM BUSAD ; WILL GENERATE A STARTING BUFFER OF (400000,,0)
(1) 012754 347 RST 4
(1) 012755 012 .BYTE 10.
(1) 012756 047 040 .ADDR BUSAD+5
5508 012760 076 010 MVI A,^O10 ; THIS TURNS OUT TO BE BIT0 IN 36-BIT LAND
5509 012762 062 046 040 STA BUSAD+4 ; SET IT
5510
5511 012765 001 000 001 LXI B,^O400 ; SET B=1, C=0
5512 012770 305 BC.ALP: PUSH B ; SAVE COUNTERS
5513 012771 315 163 011 CALL DBCMD ; EXECUTE THE DEPOSIT BUS
5514
5515 ; CHECK FOR FAILURE
5516
5517 012774 072 154 040 LDA ERRCD ; FETCH AN ERROR CODE
5518 012777 247 ANA A ; SET 8080 CONDITION CODES
5519 013000 302 355 026 JNZ BCA.ERR ; GO STANDARD ERROR REPORT IF ERR FOUND
5520
5521 ; NO ERROR, GENERATE THE NEXT DATUM
5522
5523 013003 041 042 040 LXI H,BUSAD ; POINT TO A BUFFER TO BE SHIFTED
5524 013006 315 140 031 CALL SHR36 ; SHIFT 36 BITS(I.E. FLOAT A 1 OR 0)
5525 013011 001 .BYTE 1 ; SHIFT ONLY ONE PLACE AT A TIME
5526
5527 ; NOW CHECK FOR END OF TEST
5528
5529 013012 301 POP B ; GRAB UP THE CURRENT LOOP COUNTERS
5530 013013 014 INR C ; UP COUNT FOR THIS DATAUM
5531 013014 171 MOV A,C ; COPY TO ACCUM
5532 013015 376 044 CPI 36. ; NOW SEE IF FLOATED DOWN THE ENTIRE 36 BIT WORD
5533 013017 332 370 025 JC BC.ALP ; JUMP IF NOT DONE A GROUP OF 36 YET..
5534
5535 ; HERE WHEN DONE A GROUP OF 36, SEE IF THIS WAS FIRST OR SECOND TIME THROUGH
5536
5537 013022 005 DCR B ; DECREMENT "TIMES THROUGH THE LOOP" COUNTER
5538 013023 372 046 026 JM BC.2ND ; IF MINUS, TIME TO GET OUT..GO NEXT PHASE OF TEST
5539
5540 ; HERE WHEN DONE FIRST WORD, TIME TO SET UP TO FLOAT A 0 THRU FIELD OF ONES.
5541
5542 013026 MOV5B ; MOVE 2ND DATA PATTERN
(1) 013026 347 RST 4
(1) 013027 000 .BYTE 0
5543 013030 041 026 .ADDR BC.DB2 ; INIT 2ND PATTERN TO BE (377777,,777777)
5544 013032 042 040 .ADDR BUSAD ; AND THIS IS THE PLACE THAT DB COMMAND USES
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 148-1
CMDS.M80 *** "BC" CMD ***
5545
5546 013034 016 000 MVI C,00 ; RESET THE COUNTER
5547 013036 303 370 025 JMP BC.ALP ; AND GO ROUND FOR THE SECOND TIME......
5548
5549 013041 BC.DB2: D 377,777,,777,777
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 149
CMDS.M80 *** "BC" CMD ***
5551
5552 ; BOOTCHECK CODE FOR EXECUTING A TEST OF THE CRAM AND ITS ABILITIY TO
5553 ; HOLD ALL ONES AND ZEROES, AND TO SEE IF ITS ADDRESSING LOGIC WORKS
5554 ; AS IT SHOULD....
5555
5556 013046 041 000 000 BC.2ND: LXI H,00 ; START AT CRAM ADDRESS 00
5557 013051 315 221 026 BC.BLP: CALL W.CRMZ ; WRITE THE LOCATION WITH ALL ZEROES
5558 013054 043 INX H ; UPDATE TO NEXT CRAM ADDRESS
5559 013055 174 MOV A,H ; NOW CHECK TO SEE IF DONE ALL
5560 013056 346 010 ANI ^O10 ; IS ADDRESS AT "4000" YET?
5561 013060 312 051 026 JZ BC.BLP ; BACK AND ZERO MORE IF NOT YET
5562
5563 ; NOW READY FOR COMBINED ADDRESS AND DATA TEST
5564
5565 013063 046 000 MVI H,00 ; L IS ALREADY .EQ. 0, NOW MAKE H,L PAIR .EQ. 0
5566 013065 315 267 014 BC.BL1: CALL CADWR ; WRITE CURRENT CRAM ADDRESS
5567 013070 345 PUSH H ; AND SAVE IT FOR A WHILE
5568 013071 315 127 013 CALL CP1 ; CLOCK TO GET THE CONTENTS OF THAT LOC TO C.R.
5569 013074 315 370 014 CALL RCINT ; NOW READ-IN THE CONTENTS OF THE C.R.
5570 013077 041 000 000 LXI H,00 ; DATA TO VERIFY AGAINST IS 00
5571 013102 315 247 026 CALL V.VER ; VERIFY CONTENTS OF C.R. TO BE ALL 0
5572 013105 315 212 026 CALL A.CRMO ; NOW WRITE THAT LOCATION WITH ALL ONES
5573 013110 341 POP H ; RETRIEVE CURRENT CRAM ADDRESS
5574 013111 043 INX H ; UP TO THE NEXT ADDRESS
5575 013112 174 MOV A,H ; COPY HI HALF TO ACCUM, SO CAN CHECK FOR 4000
5576 013113 346 010 ANI ^O10 ; ADDRESS AT "4000"?
5577 013115 312 065 026 JZ BC.BL1 ; BACK INTO LOOP IF NOT YET..
5578
5579 ; WHEN DONE HERE, FALL INTO MEMORY PART OF BOOT CHECK A PAGE MOS MEMORY CHECK.
5580
5581 013120 315 050 020 BC.3RD: CALL ZMCMD ; FIRST CLEAR ENTIRE MOS MEMORY (AT LEAST TRY)
5582
5583 013123 MOV5B ; SET UP THE INITIAL DATA
(1) 013123 347 RST 4
(1) 013124 000 .BYTE 0
5584 013125 242 022 .ADDR ONES ; DATA FOR DEPOSITING IS ALL ONES
5585 013127 047 040 .ADDR DMDAT ; .. THE DEPOSIT BUFFER
5586
5587 013131 MOV5B ; SET UP THE STARTING MEMORY ADDRESS
(1) 013131 347 RST 4
(1) 013132 000 .BYTE 0
5588 013133 230 022 .ADDR MA1000 ; START AT ADDRESS 1000
5589 013135 017 040 .ADDR MEMAD ; .. MEMORY ADDRESS BUFFER
5590
5591 013137 315 361 011 BC.CLP: CALL EM2 ; EXAMINE A LOCATION
5592 013142 315 016 033 CALL CMP36 ; THEN COMPARE RESULTS..DATA SHOULD BE ALL ZEROES
5593 013145 012 040 .ADDR EMBUF ; THIS IS THE ACTUAL READ-IN DATA
5594 013147 333 016 .ADDR ZEROES ; VERSUS 36-BITS OF 0'S
5595 013151 302 326 026 JNZ BC.CERR ; GO TO ERROR REPORT IF NOT ALL ZEROES
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 150
CMDS.M80 *** "BC" CMD ***
5597
5598 ; FALL THRU IF THAT WENT OK.
5599
5600 013154 315 157 012 CALL DM2 ; NOW DEPOSIT ONES INTO THAT LOC AND CONTINUE
5601
5602 013157 315 361 011 CALL EM2 ; WHILE WE ARE AT IT, WE'LL CHECK ALL ONES
5603 013162 315 016 033 CALL CMP36 ; DO THE 36-BIT COMPARE
5604 013165 012 040 .ADDR EMBUF ; THIS STUFF JUST READ IN
5605 013167 242 022 .ADDR ONES ; AGAINST ALL ONES
5606 013171 302 326 026 JNZ BC.CERR ; IF BAD, SAY SO..
5607
5608 013174 052 017 040 LHLD MEMAD ; FETCH UP THE CURRENT MEMORY ADDRESS
5609 013177 043 INX H ; UPDATE TO THE NEXT
5610 013200 174 MOV A,H ; COPY HI PIECE TO THE ACCUM
5611 013201 346 004 ANI ^O4 ; SEE IF REACHED ADDRESS 2000
5612 013203 042 017 040 SHLD MEMAD ; REPLACE THE UPDATED ADDRESS FIRST
5613 013206 312 137 026 JZ BC.CLP ; AND CONTINUE IF HAD NOT REACHED THE MAX
5614
5615 013211 311 RET ; RETURN..DONE ALL BOOT CHECK OK
5616
5617 ; SUBROUTINES REQUIRED FOR THE CRAM TESTING.
5618 ; SUBROUTINES FOR WRITING ALL ONES AND ALL ZEROES INTO A SELECTED CRAM
5619 ; LOCATION. DESIRED ADDRESS PASSED IN THE H,L REGISTER (FOR W.XXX
5620 ; CALLS). USES CURRENTLY SELECTED ADDRESS FOR (A.XXX CALLS).
5621
5622 013212 345 A.CRMO: PUSH H ; SAVE H,L
5623 013213 041 377 377 LXI H,-1 ; H,L TO ALL ONES INDICATES THE ALL ONES DATA DESIRED
5624 013216 303 230 026 JMP W.LOC ; GO COMMON CODE
5625
5626 013221 315 267 014 W.CRMZ: CALL CADWR ; WRITE DESIRED ADDRESS
5627 013224 345 A.CRMZ: PUSH H ; SAVE H,L
5628 013225 041 000 000 LXI H,00 ; SET TO ZERO, DATA IS ALL ZEROES
5629 013230 016 007 W.LOC: MVI C,7 ; TAKES 8 FUNCTION WRITES TO DO ALL OF ONE CRAM LOC
5630 013232 171 W.LP: MOV A,C ; GET CURRENT FUNCTION TO ACCUM
5631 013233 062 010 040 STA CRMFN ; PUT FUNCTION INTO LOC USED BY STANDARD ROUTINE
5632 013236 315 232 014 CALL WFUNC ; WRITE ONE OF THE 8 PIECES OF A CRAM LOC
5633 013241 015 DCR C ; DOWN COUNT
5634 013242 362 232 026 JP W.LP ; AS LONG AS .GE. 0, KEEP GOING
5635 013245 341 POP H ; HERE WHEN DONE ALL 8
5636 013246 311 RET ; NOW GET OUT OF HERE.
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 151
CMDS.M80 *** "BC" CMD ***
5638
5639 ; ROUTINE TO VERFIY THAT A CRAM LOCATION IS INDEED ALL ONES OR ALL ZEROES.
5640 ; NO ARGUMENTS PASSED TO THIS ROUTINE.
5641
5642 013247 042 316 040 V.VER: SHLD CRMBF+^O14 ; ALL DON'T CARE LOCATIONS OF THE "READ" ARE
5643 013252 042 320 040 SHLD CRMBF+^O16 ; FUDGED TO MATCH EXPECTED DATA
5644 013255 042 322 040 SHLD CRMBF+^O20 ; THERE ARE 12 DON'T CARE LOCATIONS
5645
5646 013260 042 332 040 SHLD CRMBF+^O30 ; SOME ARE VARIOUS ADDRESS (NXT/CURRENT/SUBRTN)
5647 013263 042 334 040 SHLD CRMBF+^O32 ; AND SOME ARE JUST UNBUFFERED COPIES OF THE
5648 013266 042 336 040 SHLD CRMBF+^O34 ; BUS
5649
5650 013271 175 MOV A,L ; NOW COPY EXPECTED DATA INTO "B,C" PAIR
5651 013272 057 CMA ; FIRST COMPLEMENT
5652 013273 117 MOV C,A ; THEN MOVE
5653 013274 174 MOV A,H ; NEED BOTH HALVES PLEASE
5654 013275 057 CMA ; COMPLEMENT
5655 013276 107 MOV B,A ; THEN MOVE
5656
5657 013277 041 302 040 LXI H,CRMBF ; NOW POINT TO START OF BUFFER WHERE EXPECTED
5658 013302 136 V.BCLP: MOV E,M ; DATA KEPT. PROCEED TO COPY BUFFER DATA INTO
5659 013303 043 INX H ; (UPDATE POINTER)
5660 013304 126 MOV D,M ; THE D,E REGISTER PAIR
5661 013305 043 INX H ; AND UPDATE MEMORY POINTER AFTER EACH MOVE
5662 013306 353 XCHG ; SWAP, SO NOW "H,L" HAS BUFFER, "D,E" HAS POINTER
5663 013307 011 DAD B ; ADD COMPLEMENT TO EXPECTED...SHOULD GET 0.
5664 013310 043 INX H ; TWO'S COMPLEMENT , THAT IS..
5665 013311 175 MOV A,L ; PIECE TO ACCUM
5666 013312 264 ORA H ; "OR" IN THE OTHER PIECE
5667 013313 302 336 026 JNZ BC.BERR ; AND GO HANDLE ERROR IF RESULTS .NE. 0
5668
5669 ; YOU FELL THROUGH TO HERE IF DATA CHECK WAS OK..
5670
5671 013316 353 XCHG ; SWAP..NOW "H,L" HAS POINTER, "D,E" HAS 00
5672 013317 076 342 MVI A,<<CRMBF+32.>&^O377> ;CHECK IF DONE
5673 013321 275 CMP L ; SEE IF AT LAST LOCATION IN LIST
5674 013322 302 302 026 JNZ V.BCLP ; JUMP BACK IF NOT YET
5675 013325 311 RET ; ELSE OK TO RETURN
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 152
CMDS.M80 *** "BC" CMD ***
5677
5678 ; ERROR REPORTING
5679
5680 013326 052 017 040 BC.CERR: LHLD MEMAD ; GRAB UP FAILED MEM ADDRESS
5681 013331 006 100 MVI B,^O100 ; GET A BIT TO SET IN ERROR PRINTOUT
5682 013333 303 342 026 JMP BCC.ERR ; GO PROCESS STANDARD ERROR TYPEOUTS
5683 013336 341 BC.BERR: POP H ; CLEAR A RETURN ADDRESS
5684 013337 006 200 MVI B,^O200 ; BIT TO SET FOR CRAM FAILURES
5685 013341 341 POP H ; NOW GATHER UP THE CURRENT CRAM ADDRESS
5686 013342 042 154 040 BCC.ERR: SHLD ERRCD ; SAVE 1 BYTE BY DEPOSITING TWICE
5687 013345 174 MOV A,H ; HI HALF TO THE ACCUM
5688 013346 260 ORA B ; THROW IN A WEIGHT SO NUMBER WILL DIFFER
5689 013347 062 155 040 STA ERRCD+1 ; PUT NUMBER INTO ERROR CODE LOC
5690 013352 303 362 026 JMP BCB.ERR ; AND GO PRINT OUT THE CORRECT ERROR STUFF
5691
5692 013355 301 BCA.ERR: POP B ; GET COUNTER OFF THE STACK
5693 013356 171 MOV A,C ; SUBTEST TO ACCUM
5694 013357 062 154 040 STA ERRCD ; PLACE FROM WHICH TO REPORT ERRORS
5695 013362 BCB.ERR: CLRB NOPNT ; GUARANTEE PRINTING ON
5696 013364 PLINE ERRMSG ; "?BC"
(1) 013364 337 RST 3 ; PRINT LINE OF CHARS
(1) 013365 170 037 .ADDR ERRMSG ; BUFF TO PRINT
5697 013367 041 154 040 LXI H,ERRCD ; POINT AT THE ERROR I.D.
5698 013372 315 303 030 CALL P16 ; PRINT
5699 013375 303 137 032 JMP MMERR ; OUT
5700 000 .ENDC
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 153
CMDS.M80 *** "BC" CMD ***
5702
5703 ;>>;WSUBRTN.M80
5704 .SBTTL ****KS10 CONSOLE SUBROUTINE FILE
5705
5706 ; SUBROUTINE TO CHECK IF THE CPU IS RUNNING, AND IF IT IS,
5707 ; TO ABORT THE COMMAND THAT CALLED IT.
5708
5709 013400 341 .RUN..: POP H ; MUST FIX THE STACK
5710 013401 365 PUSH PSW ; SAVE FLAGS (STATE OF THE "C-BIT"
5711 013402 072 165 040 LDA RNFLG ; CHECK SOFTWARE RUN FLAG TO SEE IF CPU CLK ON
5712 013405 247 ANA A ; IS IT ZERO? , OR NOT ZERO
5713 013406 302 013 027 JNZ YSRUN ; IF NOT ZERO, JMP OFF TO PRINT MESSAGE
5714
5715 013411 361 POP PSW ; OTHERWISE, RESTORE FLAGS
5716 013412 311 RET ; AND OUT
5717
5718 013413 YSRUN: PLINE RN. ; MESSAGE TO SAY RUNNING..
(1) 013413 337 RST 3 ; PRINT LINE OF CHARS
(1) 013414 175 037 .ADDR RN. ; BUFF TO PRINT
5719 013416 303 137 032 JMP MMERR ; NOW GO RESTART OURSELVES
5720
5721
5722 ; ROUTINE TO REPORT A PARITY ERROR WHEN DETECTED BY THE 8080 CONSOLE
5723
5724 013421 RPTPAR: CLRB NOPNT ; TURN TYPING ON
5725 013423 257 XRA A ; ACCUM MUST BE ZERO
5726 013424 323 206 OUT CLKCTL ; KILL CLK, SO PAR ERR CLRING WONT RELEASE THE CPU CLKS
5727
5728 001 .IF DF,SCECOD
5729 013426 072 326 042 LDA SC.OFF ; GET FLAG TO SEE IF WE CAN TRY FOR SOFT RECOVER
5730 013431 247 ANA A ; SET 8080 FLAGS
5731 013432 302 100 027 JNZ HRDERR ; IF FLAG .NE. 0, THEN WE WILL NOT RECOVER
5732
5733 ; FIRST THING WE NEED TO DO IS CHECK FOR CRAM/CRA PARITY ERRORS, AND DECIDE
5734 ; IF WE CAN RECOVER FROM THEM
5735
5736 013435 LONG.DELAY 1 ; LET DISK TRAFFIC STOP
(1) 013435 041 310 000 LXI H,200. * 1 ; SET UP THE TIMING COUNT IN H,L REG
(1) 013440 315 076 014 CALL LTLOOP ; AND GO DELAY ABOUT 1 SEC FOR EACH (300 COUNT)
5737 013443 076 100 MVI A,SMPAR ; GET WHICH REG HAS PARITY INFO IN IT
5738 013445 315 212 013 CALL ER.UTL ; READ DATA,PARITY CRAM PARITY ERROR OCCURRING
5739 ; AT SAME CRAM ADDR MORE THAN ONCE IN A ROW)
5740 013450 057 CMA ; INVERT SO THAT .TRUE. .EQ. HI
5741 013451 346 022 ANI ^O22 ; SEE IF CRA/CRM ERROR TYPE
5742 013453 312 100 027 JZ HRDERR ; IF NO, GO FOR A HARD ERROR
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 154
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
5744
5745 ; WELL, LETS SEE IF MEM BUSY OR I/O BUSY
5746
5747 013456 333 102 IN R.BUSY ; *****I/O RD 102*****
5748 013460 057 CMA ; FIX HARDWARE COMPLEMENT
5749 013461 346 060 ANI ^O60 ; SEE IF EITHER OF THOSE TWO BITS SET
5750 013463 107 MOV B,A ; SAVE RESULTS OF THIS "AND" FOR A BIT
5751 013464 333 101 IN REFERR ; SEE IF MEM REFRESH ERR EITHER
5752 013466 057 CMA ; FIX HARDWARE INVERSION
5753 013467 346 001 ANI 1 ; ONLY KEEP THE REFRESH BIT
5754 013471 260 ORA B ; THROW THE TWO TOGETHER. IF RESULTS 0, THEN ALL OK
5755 013472 312 235 027 JZ SOFTERR ; IF NOTHING, GO TRY FOR SOFT ERROR RECOVERY
5756
5757 ; GET TO HERE IF ERROR IS CONSIDERED NON-RECOVERABLE
5758
5759 013475 NR: PLINE NRSCE ; "?NR-SCE". NON RECOVERABLE-SOFT CRAM ERROR
(1) 013475 337 RST 3 ; PRINT LINE OF CHARS
(1) 013476 216 027 .ADDR NRSCE ; BUFF TO PRINT
5760
5761 000 .ENDC
5762
5763 013500 HRDERR: CLRB CHKPAR ; SAY NOT TO REPORT AGAIN & AGAIN
5764 013502 315 305 006 CALL CLRUSE ; EXIT FROM USER MODE
5765 013505 PLINE PARMSG ; MESSAGE TO CTY
(1) 013505 337 RST 3 ; PRINT LINE OF CHARS
(1) 013506 150 037 .ADDR PARMSG ; BUFF TO PRINT
5766
5767 013510 333 100 IN SMPAR ; ***** I/O RD PARITY *****
5768 013512 057 CMA ; FIX THE HARDWARE INVERSION
5769 013513 315 270 030 CALL P8BITA ; AND PRINT IT OUT WITH THE ERROR MESSAGE
5770 013516 PSPACE ; SEPARATE THE 8 BIT DATUMS
(2) 013516 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 013517 040 .BYTE SPACE ; CHAR TO PRINT
5771 013520 333 303 IN ^O303 ; READ "DPM PARITY BIT"
5772 013522 057 CMA ; FIX CPU INVERSION
5773 013523 346 001 ANI ^O1 ; ONLY INTERESTED IN BIT 0 "DPM PAR ERR"
5774 013525 315 270 030 CALL P8BITA ; AND THEN PRINT THE "DPM PAR" DATA
5775 013530 PSPACE ; AGAIN, SEPARATE BY SPACES
(2) 013530 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(2) 013531 040 .BYTE SPACE ; CHAR TO PRINT
5776 013532 333 103 IN ^O103 ; READ REG THAT HAS R PAR RIGHT & R PAR LEFT
5777 013534 057 CMA ; FIX THE HARDARE INVERSION
5778 013535 346 360 ANI ^O360 ; KEEP ONLY THE 2 "R PAR" BITS
5779 013537 315 000 017 CALL P8CRLF ; PRINT IT
5780 013542 315 255 032 CALL CLRRN ; CLEAR THE SOFTWARE "RUNNING" FLAG TOO
5781 013545 315 301 032 CALL LTFLT ; PARITY ERROR LIGHTS THE FAULT LIGHT
5782 013550 303 200 001 JMP REINI ; AND GO RE-INIT..PAR ERRS ARE FATAL
5783
5784 001 .IF DF,SCECOD
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 155
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
5786
5787 ; COMMAND LIST FOR READING UBA INFO
5788
5789 013553 UBA.RD: UBA. 763,001
(1) 013553 001 .BYTE 001 & 377
(1) 013554 346 .BYTE Q.1
(1) 013555 073 .BYTE Q.2
5790 013556 ENDLST
(1) 013556 000 .BYTE 0
(1) 013557 000 .BYTE 0
(1) 013560 050 .BYTE <12*4>
5791
5792 ; RH11 COMMAND LIST FOR CHECKING FOR RECOVERABLE & NON RECOVERABLE
5793 ; STATES OF THE CONTROLLER.
5794
5795 013561 RH.TST: EI. D776,P.00 ; EXAM CONTROLLER STATUS REG
(1) 013561 374 .BYTE Q.1
(1) 013562 000 .BYTE P.00 & 377
(1) 013563 023 .BYTE Q.2
5796 013564 ERRTST 60000 ; TEST FOR FATAL ERRS
(1) 013564 000 140 .ADDR 60000
(1) 013566 040 .BYTE <10*4>
5797 013567 EI. D776,P.12 ; EXAM DRIVE STATUS REG
(1) 013567 374 .BYTE Q.1
(1) 013570 012 .BYTE P.12 & 377
(1) 013571 023 .BYTE Q.2
5798 013572 ERRTST 40000 ; CHECK THAT GUY FOR ERRS
(1) 013572 000 100 .ADDR 40000
(1) 013574 040 .BYTE <10*4>
5799 013575 ENDLST ; HERE IF ALL OK
(1) 013575 000 .BYTE 0
(1) 013576 000 .BYTE 0
(1) 013577 050 .BYTE <12*4>
5800
5801 013600 RH.EXE: EI. D776,P.00 ; A TEMPLATE FOR RH EXAMINES
(1) 013600 374 .BYTE Q.1
(1) 013601 000 .BYTE P.00 & 377
(1) 013602 023 .BYTE Q.2
5802 013603 ENDLST ; THAT'S ALL WE NEED FOR THIS
(1) 013603 000 .BYTE 0
(1) 013604 000 .BYTE 0
(1) 013605 050 .BYTE <12*4>
5803
5804 013606 000 SAVLST: .BYTE P.00 ; READ 776700
5805 013607 002 .BYTE P.02 ; READ 776702
5806 013610 004 .BYTE P.04 ; READ 776704
5807 013611 006 .BYTE P.06 ; READ 776706
5808 013612 010 .BYTE P.10 ; READ 776710
5809 013613 032 .BYTE P.32 ; READ 776732
5810 013614 034 .BYTE P.34 ; READ 776734
5811 013615 377 .BYTE -1 ; END OF LIST MARKER
5812
5813 ; THE ASCII MESSAGES REQUIRED FOR PARITY RECOVERY
5814
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 155-1
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
5815 013616 077 116 122 NRSCE: .ASCIZ/?NR-SCE / ; NOT RECOVERABLE SOFT CRAM ERROR
5816 013627 045 123 103 OKSCE: .ASCIZ/%SCE / ; RECOVERABLE SOFT CRAM ERROR
5817
5818 ; NOW GET THE CURRENT CRAM ADDRESS AND CHECK FOR HARD CRAM ERRORS. (NOTE: A
5819 ; HARD CRAM ERROR IS A CRAM PARITY ERROR OCCURRING AT THE SAME CRAM ADDRESS
5820 ; MORE THAN ONCE IN A ROW).
5821
5822 013635 021 344 040 SOFTERR: LXI D,SCEADR ; "D,E" PAIR WILL POINT AT THE DESIRED
5823 013640 315 155 030 CALL BREAK ; GO CHECK IF CURRENT .EQ. DESIRED..
5824 013643 312 100 027 JZ HRDERR ; IF YES, JUMP 'CAUSE ITS A HARD ERROR
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 156
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
5826
5827 ; SOFT CRAM ERRO RECOVERY CONTINUED....
5828 ; RECOVERY BEGINS BY ZAPPING THE PE(1) FLOP SO WE MAY CATCH ANY ADDITIONAL
5829 ; PARITY ERRORS.
5830
5831 013646 076 001 MVI A,1 ; BIT TO RESET CRAM C.R. & PE(1)
5832 013650 323 204 OUT CRMCTL ; ***** I/O WRT/204 *****
5833
5834 ; FALL THRU IF ADDRESS NOT THE SAME
5835
5836 013652 042 344 040 NOTSAME: SHLD SCEADR ; SAVE IT AS THE NEW "PREVIOUS"
5837
5838 ; NOW CHECK RH11 TO SEE IF THIS FAILURE IS RECOVERABLE FOR THE
5839 ; MONITOR. 8080 WILL SIMPLY EXECUTE A CHANNEL COMMAND LIST OF
5840 ; "ERRTST", WITH THE CORRECT ERROR BITS CHECKED FOR.
5841
5842 013655 041 161 027 LXI H,RH.TST ; POINT TO ERROR CHECKER COMMAND LIST
5843 013660 315 007 025 CALL CHNXCT ; EXECUTE THAT LIST
5844 013663 332 075 027 JC NR ; IF BAD, SAY NOT RECOVERABLE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 157
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
5846
5847 ; ELSE...FALL INTO THE SOFT RECOVERY CODE
5848
5849 ; FINALLY GET TO HERE IF THIS THING LOOKS RECOVERABLE. NOW WE MUST
5850 ; BEGIN SAVING THINGS. FIRST.. GET THE CURRENT DISK UBA NUMBER TO
5851 ; SET UP THE RH11 REGISTER SAVING. THEN WE MUST SET UP THE RH11
5852 ; BASE REGISTER ITSELF. WHILE WE ARE AT IT, MIGHT AS WELL PRINT
5853 ; A LITTLE MESSAGE SAYING WHAT WE ARE DOING IN HERE.
5854
5855 013666 RECVR: PLINE OKSCE ; ERR MSG "%SCE" SOFT CRAM ERROR
(1) 013666 337 RST 3 ; PRINT LINE OF CHARS
(1) 013667 227 027 .ADDR OKSCE ; BUFF TO PRINT
5856 013671 041 344 040 LXI H,SCEADR ; NOW POINT TO THIS BAD ADDRESS
5857 013674 315 303 030 CALL P16 ; AND PRINT IT
5858 013677 PCRLF ; TERMINATE EVERYTHING WITH A CR-LF
(2) 013677 347 RST 4
(2) 013700 002 .BYTE 2
5859 013701 315 012 023 CALL DSKDFT ; NOW GET THOSE DEFAULTS JUST MENTIONED
5860 013704 257 XRA A ; CLEAR ACCUM
5861 013705 323 100 OUT RESET ; *****I/O WRT 100***** NO PAR CHECKING
5862
5863 ; FINALLY READY TO BEGIN THE ACT OF SAVING SOME REGISTERS.
5864 ; FIRST GET UBA LOCATION 763001.
5865
5866 013707 041 153 027 LXI H,UBA.RD ; POINTER TO UBA READ-IN LIST
5867 013712 315 007 025 CALL CHNXCT ; READ-IN THE UBA INFO.. NOW ITS IN EMBUF
5868 013715 INTON ; DON'T PRINT THIS
(1) 013715 327 RST 2 ; GO SET INTERNAL MODE
5869 013716 315 302 012 CALL EI1 ; ACTUALLY DO THE READ-IN
5870 013721 INTOFF ; OK NOW
(1) 013721 367 RST 6 ; GO EXIT FROM INTERNAL MODE
5871
5872 ; BEFORE WE SAVE IT, WE WILL SET UP FOR SAVING RH REGISTERS.. THAT WAY,
5873 ; WE CAN USE SOME COMMON CODE FOR PUTTING DATA INTO OUR SAVE BUFFER.
5874
5875 013722 001 200 027 LXI B,RH.EXE ; NOW POINT TO A CHANNEL COMMAND LIST
5876 013725 021 172 040 LXI D,RM100 ; AND POINT TO A PLACE TO PUT THE LIST
5877 013730 076 006 MVI A,6 ; IT TAKES SIX BYTES TO MOVE THE ENTIRE LIST
5878 013732 315 005 033 CALL M5B ; MOVE THE STUFF TO RAM
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 158
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
5880
5881 ; THE CODE TO MOVE BYTES REQUIRES "B,C" POINTING TO THE SOURCE AND "D,E"
5882 ; POINTING TO THE DESTINATION. AND "A" HAVING HOW MANY BYTES TO BE MOVED.
5883 ; "MOVREG" DOES 5 BYTES FREE OF CHARGE. B,C AND D,E ARE UPDATED BY THE
5884 ; NUMBER OF BYTES MOVED.
5885
5886 013735 041 206 027 LXI H,SAVLST ; POINT TO A LIST OF THINGS WHICH WE MUST SAVE
5887 013740 345 PUSH H ; PLACE IT IN THE RAM FOR SAFE KEEPING
5888 013741 021 327 042 LXI D,RHSAVE ; D,E GETS THE POINTER TO THE SAVE AREA
5889 013744 001 012 040 RH.LP: LXI B,EMBUF ; WE WILL ALWAYS BE MOVING STUFF FROM "EMBUF"
5890 013747 315 003 033 CALL MOVREG ; MOVE 5 BYTES, PLEASE
5891
5892 ; TO SAVE THE RH REGISTERS, WE WILL PUT A TINY CHANNEL COMMAND LIST INTO
5893 ; RAM SPACE, THEN EXECUTE IT, CHANGING THE DESIRED REGISTERS BETWEEN READS,
5894 ; WHICH WILL GIVE US A CHANCE TO SAVE THE RESULTS OF THE READ.
5895
5896 013752 341 POP H ; GET POINTER INTO "REG TO BE SAVED" BUFFER
5897 013753 176 MOV A,M ; GET CURRENT BYTE INTO ACCUM
5898 013754 062 173 040 STA RM100+1 ; PUT BYTE INTO BUFFER SO CAN BE EXECUTED
5899 013757 074 INR A ; UP BY ONE
5900 013760 312 000 030 JZ SCE.GO ; IF THAT MAKES .EQ. 0, THEN OUT
5901
5902 013763 043 INX H ; ELSE UPDATE POINTER
5903 013764 345 PUSH H ; SAVE THE POINTER TOO
5904 013765 041 172 040 LXI H,RM100 ; PREPARE TO EXECUTE THE READIN BUFFER
5905 013770 325 PUSH D ; NOW SAVE SPOT WE ARE IN IN THE RHSAVE AREA
5906 013771 315 007 025 CALL CHNXCT ; DO IT..ONE RH REGISTER IS IN
5907 013774 321 POP D ; RETRIEVE POINTER TO THE DATA SAVE SPACE
5908 013775 303 344 027 JMP RH.LP ; SAVE INFO, AND READ IN NEXT RH REGISTER
5909
5910 ; NOW DATA HAS BEEN SAVED, WE CAN ACTUALLY BEGIN TO RESTORE THE MICRO-CODE
5911
5912 014000 SCE.GO: INTON ; SET INTERNAL MODE
(1) 014000 327 RST 2 ; GO SET INTERNAL MODE
5913 014001 021 002 002 LXI D,^O1002 ; PLACE IN DISK PAGE OF POINTERS TO MICRO-CODE
5914 014004 315 257 022 CALL FILESH ; GO READ IN THE FIRST PAGE OF MICRO-CODE
5915 014007 332 161 032 JC C.BTERR ; IF ERR ITS ALL OVER
5916
5917 014012 315 027 023 CALL DMEM2CR ; GO LOAD CRAM
5918
5919 014015 052 344 040 LHLD SCEADR ; GET ADDRESS AT WHICH TO CONTINUE
5920 014020 315 267 014 CALL CADWR ; SET THE CRAM ADDRESS TO THE GUY THAT SLIPPED
5921
5922 ; WE ARE NEARING THE END OF THIS RECOVERY STUFF.. WE MUST RESTORE THE STATE
5923 ; OF THE RH11 AND UBA TO WHAT IT WAS BEFORE WE STARTED, THEN WE CAN TURN THE
5924 ; CLOCKS ON AGAIN.
5925
5926 014023 041 153 027 LXI H,UBA.RD ; POINT TO A UBA READ CHANNEL COMMAND LIST
5927 014026 315 007 025 CALL CHNXCT ; SET THE I/O ADDRESS TO A UBA PAGE REGISTER
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 159
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
5929
5930 ; NOW FIX UP THE FORMAT BETWEEN A READ OF THE UBA PAGING REG, AND
5931 ; THE WRITE WE WISH TO DO TO THE PAGING RAM.
5932
5933 014031 072 332 042 LDA RHSAVE+3 ; GET THE BYTE THAT HAS THE CURRENT CNTRL BITS
5934 014034 346 170 ANI ^O170 ; OFF JUNK, KEEP ONLY 4 RELEVANT BITS
5935 014036 117 MOV C,A ; SAVE IN THE C REG
5936 014037 041 327 042 LXI H,RHSAVE ; NOW POINT TO OUR BUFFER WITH THE DESIRED INFO
5937 014042 315 140 031 CALL SHR36 ; SHIFT DATA RIGHT, 4 PLACES
5938 014045 004 .BYTE 4
5939
5940 014046 171 MOV A,C ; GET OUR CONTROL BITS BACK
5941 014047 062 331 042 STA RHSAVE+2 ; PLOP THEM INTO THE 36 BIT WORD
5942 014052 315 140 031 CALL SHR36 ; NOW SHIFT THE WHOLE MESS 5 MORE PLACES
5943 014055 005 .BYTE 5
5944
5945 ; AND THATS IT.. MOVE STUFF TO A DEPOSIT BUFFER
5946
5947 014056 MOV5B ; A "MOVE"
(1) 014056 347 RST 4
(1) 014057 000 .BYTE 0
5948 014060 327 042 .ADDR RHSAVE ; FROM THE SAVE BUFFER
5949 014062 047 040 .ADDR DMDAT ; TO THE DEPOSIT BUFFER
5950 014064 315 341 012 CALL DI1 ; WRITE THIS MESS BACK TO UBA PAGING RAM
5951
5952 ; NOW WE WANT TO WRITE BACK THE RH11 REGISTERS THAT WE SAVED, THEN DESTROYED
5953
5954 014067 041 200 027 LXI H,RH.EXE ; NOW SET THE RH11 REGISTER I.D. INTO THE
5955 014072 315 007 025 CALL CHNXCT ; INTERNAL BUFFER "IOAD",INCLUDING UBA NUMBER
5956
5957 014075 041 206 027 LXI H,SAVLST ; POINT TO LIST OF REGS TO BE RESTORED
5958 014100 345 PUSH H ; SAVE THIS INFO ON THE STACK
5959 014101 001 334 042 LXI B,RHSAVE+5 ; WILL BEGIN MOVING STUFF WE SAVED FROM RH
5960 014104 021 047 040 DI.LP: LXI D,DMDAT ; ALWAYS MOVE THE STUFF TO THE DEPOSIT BUFFER
5961 014107 315 003 033 CALL MOVREG ; MOVE THE STUFF INTO "DMDAT"
5962 014112 341 POP H ; GET OUR LITTLE LIST POINTER
5963 014113 072 024 040 LDA IOAD ; GET CURRENT OFFSET INTO RH
5964 014116 346 300 ANI ^O300 ; THROW AWAY CURRENT OFFSET
5965 014120 266 ORA M ; THROW OUR DESIRED OFFSET INTO THE WORD
5966 014121 062 024 040 STA IOAD ; PUT IT BACK INTO THE IOAD BUFFER
5967 014124 176 MOV A,M ; GET THE OFFSET WE JUST MESSED WITH
5968 014125 074 INR A ; TEST TO SEE IF END OF LIST
5969 014126 312 143 030 JZ CONT.I ; IF END OF LIST, FINISH THE RECOVERY
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 160
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
5971
5972 ; NOT END OF LIST, MUST SAVE SOME MORE RH REGISTERS
5973
5974 014131 043 INX H ; UPDATE THE LIST POINTER
5975 014132 345 PUSH H ; SAVE THE POINTER
5976 014133 305 PUSH B ; SAVE POINTER TO THE SAVED DATA IN "RHSAVE"
5977 014134 315 341 012 CALL DI1 ; NOW RESTORE THIS RH REGISTER
5978 014137 301 POP B ; RESTORE POINTER INTO BUFFER
5979 014140 303 104 030 JMP DI.LP ; CONTINUE
5980
5981 014143 315 325 016 CONT.I: CALL SMFINI ; GET CURRENT PARITY DEFAULTS & WRITE THEM OUT
5982 014146 315 163 014 CALL CSCMD ; TURN THE CLOCK BACK ON
5983 014151 INTOFF ; NO MORE INTERNAL MODE
(1) 014151 367 RST 6 ; GO EXIT FROM INTERNAL MODE
5984 014152 303 260 001 JMP NULLJ ; GO
5985 000 .ENDC
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 161
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
5987
5988 ; ROUTINE TO CHECK IF CURRENT RAM ADDRESS IS THE DESIRED BREAK ADDRESS..
5989
5990 014155 325 BREAK: PUSH D ; "D,E" HAS POINTER TO DESIRED ADDR, SAVE IT
5991 014156 076 003 MVI A,3 ; DIAG FUNC TO READ CURRENT RAM ADDR
5992 014160 315 331 014 CALL READC ; GO DO FUNCTION READ
5993 014163 321 POP D ; NOW MAKE "D,E" POINT AT DESIRED AGAIN
5994
5995 014164 052 100 040 LHLD TMPB2 ; GET CURRENT ADDRESS..
5996 014167 174 MOV A,H ; ALSO MAKE SURE CURRENT JUST READ IS 11 BITS
5997 014170 346 007 ANI ^O7 ; 8 BITS LO HALF, PLUS 3 BITS HI HALF
5998 014172 147 MOV H,A ; NOW PUT THE WHOLE MESS BACK
5999
6000 014173 032 LDAX D ; GET LO ORDER PIECE TO ACCUM
6001 014174 275 CMP L ; CHECK VERSUS JUST READ
6002 014175 300 RNZ ; IF .NE. 0, THEN NO MATCH, SO OUT..
6003 014176 023 INX D ; OK, SO UPDATE PNTR TO READ-IN
6004 014177 032 LDAX D ; GET HI ORDER OF DESIRED PIECE
6005 014200 274 CMP H ; COMPARE, SIGNS TAKE CARE OF THEMSELVES
6006 014201 311 RET ; IF RESULT OF ADD WAS ZERO, GOOD.IF NOT,OK TOO..
6007
6008 ; ROUTINE TO DO SHORT FORM OF EXAMINE MEMORY
6009 ; ENTER WITH "D,E" CONTAINING SHORT ADDRESS
6010
6011 014202 067 EXAMSH: STC ; SET C-BIT FOR LATER USE IN COMMON CODE
6012 014203 343 DEPSHT: XTHL ; SWAP SO H,L POINTS TO TRAILING ARG
6013 014204 315 044 033 CALL TARG1 ; COLLECT TRAILING ARG INTO "D,E"
6014 014207 343 XTHL ; SWAP BACK SO THAT THINGS ARE RIGHT
6015 014210 353 XCHG ; AND NOW MAKE "H,L" HOLD THE TRAILING ARG
6016 014211 042 235 040 EXMHL: SHLD SHRTAD ; STORE SHORT ADDRESS IN THE RAM
6017 014214 021 235 040 LXI D,SHRTAD ; DE, GETS REPLACED WITH A POINTER TO SHORT ADDRESS
6018 014217 365 PUSH PSW ; SAVE THE C-BIT FOR LATER USE
6019 014220 334 364 011 CC EMINT ; IF C WAS SET, GO DO AN EXAMINE
6020 014223 361 POP PSW ; GET FLAGS AS THEY WERE
6021 014224 324 162 012 CNC DMINT ; IF C WAS CLR DO A DEPOSIT
6022 014227 311 RET ; NOW OK TO RETURN
6023
6024 ; ROUTINE THAT EXECUTES AN "ARG16", THEN RETURNS THE DATA IN "H,L"
6025
6026 014230 ARG16.: ARG16 ; ARGUMENT ASSEMBLER
(1) 014230 347 RST 4
(1) 014231 004 .BYTE 4
6027 014232 275 040 .ADDR T80DT ; USE A TEMP LOCATION
6028
6029 014234 052 275 040 LHLD T80DT ; GATHER DATA INTO H,L
6030 014237 311 RET ; AND BACK
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 162
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
6032
6033 ; SUBROUTINE TO PRINT A SINGLE 8-BIT BYTE AS OCTAL DATA OF THE FORM: XXX
6034 ; NO REGS DESTROYED..PNTR TO 8-BIT BYTE PASSED IN "H,L"
6035
6036 014240 345 P8BIT: PUSH H ; SAVE ALL REGISTERS
6037 014241 305 P8BIT1: PUSH B
6038 014242 325 PUSH D
6039 014243 365 PUSH PSW
6040 014244 315 016 031 CALL OCTAL ; CREATE 8-BIT BUFFER AS A 3 OCTAL CHARACTERS
6041 014247 001 .BYTE 1 ; ONE BYTE OF BINARY DATA INVOLVED
6042 014250 003 .BYTE 3 ; WANT ONLY 3 OCTAL CHARS
6043 014251 016 003 MVI C,03 ; NUM CHARS TO PRINT
6044 014253 361 P8LP: POP PSW ; CHAR OFF TOP OF STACK
6045 014254 315 343 003 CALL PCHR ; AND GO PRINT IT
6046 014257 015 DCR C ; DOWN COUNT
6047 014260 302 253 030 JNZ P8LP ; AND CONTINUE TILL DONE ALL 3
6048
6049 014263 361 POP PSW ; RESTORE REGS
6050 014264 321 POP D
6051 014265 301 POP B
6052 014266 341 POP H
6053 014267 311 RET ; AND ALL DONE
6054
6055 ; WHEN DOING A "P8BIT" WITH THE DATA PASSED IN THE ACCUM
6056 ; INSTEAD OF BEING POINTED TO BY H,L THEN COME HERE.
6057
6058 014270 345 P8BITA: PUSH H ; MUST SAVE H,L HERE, SO WE CAN MESS IT UP
6059 014271 041 122 040 LXI H,P8.TMP ; KEEP A PLACE FOR PRINTING DATA
6060 014274 167 MOV M,A ; PUT THE THING TO BE PRINTED IN THE RAM SPACE
6061 014275 303 241 030 JMP P8BIT1 ; GO TO COMMON CODE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 163
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
6063
6064 ; SUBROUTINE TO PRINT 16-BITS WORTH OF DATA..
6065 ; POINTER TO THAT DATA IS PASSED TO THE ROUTINE IN REGISTER "H,L"
6066
6067 014300 041 100 040 P16.: LXI H,TMPB2 ; IN THIS TYPE CALL, WE LOAD H,L AUTOMATICALLY
6068 014303 365 P16: PUSH PSW ; SAVE ALL THE REGISTERS
6069 014304 305 PUSH B
6070 014305 325 PUSH D
6071 014306 345 PUSH H
6072
6073 014307 315 016 031 CALL OCTAL ; CREATE OCTAL CHARS FROM THE 16-BIT DATA
6074 014312 002 .BYTE 2 ; WE HAVE 2 BYTES OF RELEVANT DATA
6075 014313 006 .BYTE 6 ; AND WE WANT 6 OCTAL CHARS TO PRINT
6076
6077 014314 006 006 MVI B,6 ; ON RETURN WE WANT TO PRINT 6 CHARS
6078 014316 361 P16LP: POP PSW ; GET OCTAL CHAR OFF STACK
6079 014317 315 343 003 CALL PCHR ; AND GO PRINT IT
6080 014322 005 DCR B ; DOWN THE COUNT
6081 014323 302 316 030 JNZ P16LP ; BACK TO PRINT MORE TILL ALL DONE
6082
6083 014326 341 POP H ; DONE..NOW RESTORE ALL REGS
6084 014327 321 POP D
6085 014330 301 POP B
6086 014331 361 POP PSW
6087 014332 311 RET ; AND RETURN
6088
6089 ; SUBROUTINE PRINT 36-BIT BINARY DATA AS A 12-OCTAL DIGIT CHARACTER
6090 ; STRING IN THE FORM: XXXXXX,,XXXXXX
6091 ; NO REGS DESTROYED-BIN DATA PNTR PASSED IN "H,L".
6092
6093 014333 041 012 040 P36.: LXI H,EMBUF ; IN THIS CALL, WE LOAD H,L AUTOMATICALLY
6094 014336 365 P36: PUSH PSW ; WILL SAVE ALL REGS IN HERE
6095 014337 305 PUSH B
6096 014340 325 PUSH D
6097 014341 345 PUSH H
6098 014342 315 016 031 CALL OCTAL ; CREATE 36-BIT BUFFER AS AN OCTAL CHAR STRING
6099 014345 005 .BYTE 5 ; 5 BYTES REQUIRED BY 36-BITS
6100 014346 014 .BYTE ^D12 ; WANT 12 OCTAL DIGITS
6101
6102 014347 315 366 030 CALL PHALF ; PRINT 18 BITS
6103
6104 ; IF HERE, JUST FINISHED FIRST PASS, NEED 2 COMMAS.
6105
6106 014352 PCHAR COMMA
(1) 014352 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 014353 054 .BYTE COMMA ; CHAR TO PRINT
6107 014354 PCHAR COMMA ; PRINT ",,"
(1) 014354 317 RST 1 ; GO PRINT CHAR IN TRAILING BYTE
(1) 014355 054 .BYTE COMMA ; CHAR TO PRINT
6108 014356 315 366 030 P36RH: CALL PHALF ; PRINT 18 MORE BITS...
6109 014361 341 POP H ; NOW RESTORE ALL THE REGS
6110 014362 321 POP D
6111 014363 301 POP B
6112 014364 361 POP PSW
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 163-1
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
6113 014365 311 RET ; RETURN
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 164
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
6115
6116 ; ROUTINE PRINTS 18 BITS AS 6 OCTAL CHARS
6117
6118 014366 341 PHALF: POP H ; GET A RETURN ADDR OFF STACK,SO STACK IS CLR
6119 014367 006 006 MVI B,6 ; "B" WILL BE A COUNTER, IN IT WITH 3
6120 014371 361 P36L2: POP PSW ; CHARACTERS TO ACCUM
6121 014372 315 343 003 CALL PCHR ; PRINT IT
6122
6123 014375 005 DCR B ; DOWN COUNT
6124 014376 302 371 030 JNZ P36L2 ; CONTINUE IF NOT DONE 6 CHARS YET
6125 014401 351 PCHL ; RETURN
6126
6127 ; ROUTINE TO ALONE PRINT 18 BITS
6128
6129 014402 365 P18: PUSH PSW ; WILL SAVE ALL REGS IN HERE
6130 014403 305 PUSH B
6131 014404 325 PUSH D
6132 014405 345 PUSH H
6133 014406 315 016 031 CALL OCTAL ; CREATE 6 OCTAL CHARS
6134 014411 003 .BYTE 3 ; 3 BYTES HAVE RELEVANT DATA
6135 014412 006 .BYTE 6 ; AND DESIRE 6 OCTAL CHARS
6136
6137 014413 303 356 030 JMP P36RH ; GO TO RIGHT HALF PRINTER FROM "P36"
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 165
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
6139
6140 ; UNIVERSAL BINARY DATA TO ASCII CHARACTER SUBROUTINE.
6141 ; ROUTINE DESTROYS THE CONTENTS OF ALL REGISTERS. PASS POINTER TO
6142 ; BINARY DATA IN "H,L" ,THEN CALL APPROPRIATE CONVERSION DESIRED
6143 ; WITH 2 TRAILING PARAMETERS-CHARS PLACED ON STACK, MSB-LSB.
6144 ; CALL ROUTINE
6145 ; DB XX ; NUMBER OF BYTES HOLDING RELEVANT BINARY DATA
6146 ; DB YY ; NUMBER OF ASCII CHARACTERS TO BE GENERATED
6147 ; ROUTINES ARE "OCTAL", "BINRY", AND "HEXIDECIMAL"
6148
6149 ; CODE WAS NEVER USED..KEEP TEXT HERE JUST IN CASE WE EVER NEED TO ADD IT..
6150 ; THIS WAY WE WON'T HAVE TO FIGURE IT ALL OUT AGAIN.
6151 ;
6152 ;BINRY: LXI D,^O401 ; LOAD D=1,E=1
6153 ; JMP COMEN ; GO TO COMMON CODE
6154
6155 014416 021 007 003 OCTAL: LXI D,^O1407 ; LOAD D=3,E=7
6156 014421 353 XCHG ; SWAP "D,E" WITH "H,L"
6157 014422 042 202 040 SHLD BTMSK ; SET DATA INTO "BTMSK" & "BTNUM"
6158
6159 ; POINTER TO BIN DATA NOW IN "D,E"
6160
6161 014425 343 XTHL ; "H,L" NOW POINTS TO TRAILING ARGS
6162 014426 106 MOV B,M ; BOMB "B" REGISTER, NOW CONTAINS "NUM" BYTES
6163 014427 043 INX H ; UPDATE PNTR
6164 014430 116 MOV C,M ; NUM CHARS INTO C
6165 014431 043 INX H ; AND UPDATE PNTR TO RET ADDR
6166
6167 014432 042 217 040 SHLD HLSAVE ; SAVE RETURN IN RAM
6168 014435 341 POP H ; CLEAR OLD STUFF OFF STACK
6169 014436 305 PUSH B ; SAVE "B,C" JUST TEMPORARILY
6170
6171 014437 041 073 040 LXI H,TMPBF2 ; "H,L" NOW POINTS TO TEMPORARY BUFFER
6172
6173 ; IF FALL TO HERE, MUST MOVE DATA FROM BINARY BUFFER TO TEMP BUFFER
6174
6175 014442 032 OCTL1: LDAX D ; DATA POINTED TO BY "D,E" TO ACCUM
6176 014443 023 INX D ; BUMP POINTER
6177 014444 167 MOV M,A ; SET THAT DATA IN RAM
6178 014445 043 INX H ; BUMP POINTER
6179 014446 005 DCR B ; DONE ALL BYTES YET?
6180 014447 302 042 031 JNZ OCTL1 ; BACK TILL MOVED ALL.
6181
6182 014452 301 POP B ; RESTORE "B,C" AND GO
6183
6184 014453 041 073 040 LXI H,TMPBF2 ; "H,L" NOW PNTS TO TMP BUFF
6185 014456 257 XRA A ; CLEAR ACCUM
6186 014457 127 MOV D,A ; CLEAR "D" REG
6187 014460 130 MOV E,B ; BYTE COUNT TO "E"
6188 014461 035 DCR E ; BUFF IS ALWAYS 1 LESS THAN BYTE COUNT
6189 014462 031 DAD D ; "H,L" GETS BUFF ADDR PLUS BYTE COUNT
6190 014463 042 233 040 SHLD OCTSV ; AND SAVE THIS ADDR IN THE RAM
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 166
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
6192
6193 ; HERE WILL BEGIN TRANSLATION FROM BINARY TO CHARACTERS
6194
6195 014466 041 073 040 OCTLC: LXI H,TMPBF2 ; "H,L" NOW POINTS TO TEMPORARY BUFFER
6196 014471 072 202 040 LDA BTMSK ; NOW GET BIT MASK
6197 014474 246 ANA M ; AND TO KEEP ONLY DESIRED CHARS
6198
6199 014475 306 060 ADI ^O60 ; MAKE INTO ASCII
6200
6201 ; NOW MUST ROTATE ENTIRE BUFFER 3 PLACES TO RID OURSELVES OF CHAR JUST PROCESSED
6202 014477 365 PUSH PSW ; NOW SAVE CHARACTER WEVE JUST CREATED
6203 014500 015 DCR C ; DOWN THE CHAR COUNT
6204 014501 312 134 031 JZ OCTL5 ; JUMP OUT IF PROCESSED ALL CHARS
6205 014504 072 203 040 LDA BTNUM ; GET NUM BITS INTO ACCUM
6206 014507 127 MOV D,A ; "D" GETS INITAL COUNT OF BITS
6207
6208 014510 130 OCTL3: MOV E,B ; "E" GETS BYTE COUNT
6209 014511 052 233 040 LHLD OCTSV ; GET UPDATED BUFF PNTR TO "H,L"
6210 014514 247 ANA A ; CLEAR "C-BIT"
6211
6212 014515 176 OCTL4: MOV A,M ; GROUP OF BINARY BITS TO ACCUM
6213 014516 037 RAR ; BIT 0 INTO "C" BIT
6214 014517 167 MOV M,A ; AND SHIFTED DATA BACK INTO MEM
6215 014520 053 DCX H ; STEP UP IN THE BUFFER (UPSIDE-DOWN BUFFER)
6216 014521 035 DCR E ; DOWN BYTE COUNT
6217 014522 302 115 031 JNZ OCTL4 ; CONTINUE WITH BUFFER
6218 014525 025 DCR D ; DONE BUFFERS WORTH, SEE IF DONE ALL 3 BITS WORTH
6219 014526 302 110 031 JNZ OCTL3
6220
6221 ; DONE THE 3-BITS, NOW CONTINUE WITH NEXT CHARACTER
6222
6223 014531 303 066 031 JMP OCTLC ; GO PROCESS NEXT CHARACTER
6224
6225 ; HERE WHEN DONE ALL CHARS.
6226
6227 014534 052 217 040 OCTL5: LHLD HLSAVE ; GRAB THE RETURN ADDRESS
6228 014537 351 PCHL ; AND RETURN
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 167
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
6230
6231 ; SUBROUTINE TO SHIFT 36-BIT DATA BUFFER SOME NUMBER OF PLACES TO THE
6232 ; RIGHT. ADDRESS OF BUFFER TO BE SHIFTED IS PASSED IN "H,L". NUMBER
6233 ; OF PLACES FOR IT TO BE SHIFTED IS PASSED AS A TRAILING PARAMETER IN
6234 ; A BYTE TRAILING THE SUBROUTINE CALL.
6235 ; CALL SHR36
6236 ; .BYTE XX ; NUM PLACES TO SHIFT
6237
6238 014540 076 005 SHR36: MVI A,5 ; A SHIFT 36 REQUIRES 5 BYTES TO BE MOVED
6239 014542 SHR24:
6240 014542 343 SHRGO: XTHL ; POINTER TO TRAILING BYTE INTO "H,L"
6241 014543 305 PUSH B ; SAVE ALL THE REGISTERS
6242 014544 106 MOV B,M ; NUMBER PLACES TO SHIFT IN "B"
6243
6244 014545 063 INX SP ; BUMP STACK POINTER AROUND THE SAVED "B,C"
6245 014546 063 INX SP
6246 014547 043 INX H ; NOW BUMP RETURN ADDRESS PAST THE TRAILING ARG
6247 014550 343 XTHL ; AND PUT IT BACK ONTO THE STACK
6248 014551 073 DCX SP ; NOW FIX STACK SO THAT SAVED "B,C" IS BACK ON TOP
6249 014552 073 DCX SP
6250 014553 325 PUSH D
6251 014554 345 PUSH H
6252
6253 014555 137 MOV E,A ; NUMBER OF BYTES INVOLVED WAS IN A, SAVE IN E
6254
6255 014556 075 DCR A ; FIX COUNT
6256 014557 205 ADD L ; AND NOW ADD COUNT TO "H,L" ADDRESS
6257 014560 157 MOV L,A ; PUT BACK INTO LO ORDER
6258 014561 174 MOV A,H ; GET HI PIECE
6259 014562 316 000 ACI 0 ; AND ADD A CARRY TO H IF THERE WAS ONE
6260 014564 147 MOV H,A ; NOW PUT IT BACK
6261
6262 014565 345 PUSH H ; AND PUT ON STACK FOR REUSE
6263
6264 014566 341 S36BL: POP H ; FETCH SAVED, UPDATED ADDRESS
6265 014567 345 PUSH H ; NOW SAVE "H,L"
6266 014570 113 MOV C,E ; GET NUMBER BYTE INVOLVED INTO C AGAIN
6267 014571 247 ANA A ; CLEAR THE C-BIT
6268
6269 014572 176 S36LP: MOV A,M ; GET BYTE FROM BUFF TO ACCUM
6270 014573 037 RAR ; SHIFT IT RIGHT
6271 014574 167 MOV M,A ; NOW PUT IT BACK INTO THE BUFFER
6272 014575 053 DCX H ; NEXT BYTE
6273
6274 014576 015 DCR C ; WAIT!..HAVE WE DONE ALL BYTES YET??
6275 014577 302 172 031 JNZ S36LP ; BACK INTO LOOP IF NOT YET
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 168
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
6277
6278 ; FALL THRU WHEN DONE THE 5 BYTES
6279
6280 014602 005 DCR B ; DONE NUMBER OF TIMES YET??
6281 014603 302 166 031 JNZ S36BL ; JUMP IF YES DONE ALL
6282
6283 ; HERE WHEN ALL DONE
6284
6285 014606 341 POP H ; RESTORE THE "H,L"+X
6286 014607 341 POP H ; RESTORE "B,C"
6287 014610 321 POP D ; RESTORE "D,E"
6288 014611 301 POP B ; RESTORE "H,L"
6289 014612 311 RET
6290
6291 ; ROUTINE TO ASSEMBLE 16-BIT ARGUMENT. PLACE TO PUT 16-BIT DATA PASSED
6292 ; AS A TRAILING ARGUMENT. "B,C" IS MESSED UP BY THIS ROUTINE.
6293
6294 ; CALL ARG16
6295 014613 076 014 ARG96: MVI A,12. ; NUMB BYTES USED IN ARG96 IS 12
6296 014615 303 230 031 JMP ARGBG1
6297
6298 014620 076 005 .ARG36: MVI A,5 ; NUMB BYTES USED IN ARG36 IS 5
6299 014622 303 227 031 JMP ARGBEG
6300
6301 014625 076 002 .ARG16: MVI A,2 ; NUMB BYTES USED IN ARG16 IS 2
6302 014627 341 ARGBEG: POP H ; GET H,L FROM TRAP HANDLER
6303 014630 062 214 040 ARGBG1: STA CHRCNT ; SAVE IT
6304 014633 072 213 040 LDA RPTON ; IS THIS A REPEAT?
6305 014636 247 ANA A ; CHECK THE REPEAT FLAG
6306 014637 302 371 031 JNZ CLEAN ; JUMP IF YES A REPEAT....
6307
6308 ; ELSE FALL THRU AND "GET" CHARACTERS AS BINARY DATA
6309
6310 014642 052 223 040 LHLD .ARG1 ; GET PNTR TO ARG
6311 014645 001 000 000 LXI B,00 ; CLR REGS "B,C"
6312
6313 014650 176 GETLP: MOV A,M ; GET AN ASCII CHARACTER
6314 014651 326 060 SUI ^O60 ; OTHERWISE, OFF ASCII STUFF
6315 014653 346 370 ANI ^O370 ; NOW BE SURE IT WAS NUM AND NOT CHAR
6316 014655 302 271 031 JNZ GETEN ; IF HAD BITS GO SEE IF PROPER ENDING
6317 014660 176 MOV A,M ; MESSED UP CHAR, GET IT BACK
6318 014661 326 060 SUI ^O60 ; OFF THE ASCII AGAIN
6319 014663 365 PUSH PSW ; SO WE CAN STACK IT
6320
6321 014664 014 INR C ; WAS OK.. SO UP COUNT
6322 014665 043 INX H ; AND UPDATE TO NEXT CHAR
6323 014666 303 250 031 JMP GETLP ; AND CONTINUE TILL DONE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 169
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
6325
6326 ; JUMP TO HERE WHEN STACKED ALL THE CHARS
6327
6328 014671 315 241 033 GETEN: CALL SEPCHR ; THROW OUT TRAILING SPACES & TABS
6329 014674 042 223 040 SHLD .ARG1 ; SAVE "H,L"
6330 014677 315 330 032 CALL EOCML ; END OF LINE?
6331 014702 322 134 032 JNC KILNM ; IF NOT WE HAVE A PROBLEM
6332
6333 014705 052 207 040 LHLD RPBUFS ; GET PNTR TO REPEAT DATA BUFFER
6334 014710 257 XRA A ; CLR ACCM
6335 014711 167 MOV M,A ; CLR THE "BYTE" COUNTER
6336 014712 043 INX H ; UPDATE POINTER
6337
6338 014713 135 MOV E,L ; COPY POINTER INTO "D,E" REG
6339 014714 124 MOV D,H
6340 014715 015 DCR C ; MAKE C START AT COUNT-1
6341
6342
6343 014716 325 RPINCB: PUSH D ; H,L SHOULD BE SAME AS D,E
6344 014717 341 POP H ; SO DO IT USING STACK
6345 014720 023 INX D ; EXCEPT D,E SHOULD BE
6346 014721 023 INX D ; 3 GREATER
6347 014722 023 INX D
6348
6349 014723 345 PUSH H ; SAVE H,L FOR A MINUTE
6350 014724 052 207 040 LHLD RPBUFS ; WHILE THE "BYTE" COUNTER GETS UPDATED
6351 014727 176 MOV A,M ; COPY CURRENT COUNT
6352 014730 306 003 ADI 3 ; UPDATE BY 3
6353 014732 167 MOV M,A ; NOW PUT IT BACK
6354 014733 341 POP H ; AND FIX UP H,L
6355
6356 014734 006 010 MVI B,8. ; B GETS A COUNT OF 8 FOR OUR LOOP
6357 014736 361 A16PK: POP PSW ; GET 3-BIT BINARY
6358
6359 014737 022 ARGQQ: STAX D ; AND PUT INTO TMP BUFFER
6360
6361 ; DON'T MESS UP "H,L", ITS NEEDED BY "SHR36" ROUTINE
6362
6363 014740 315 140 031 CALL SHR36 ; SHIFT THING 36 PLACES
6364 014743 003 .BYTE 3 ; SHIFT 3 PLACES
6365
6366 014744 015 DCR C ; DOWN CHAR COUNT
6367 014745 362 360 031 JP NOTRK ; FOOL THE 8-TIME LOOP IF GOES MINUS
6368 014750 257 XRA A ; CLR ACCUM,IN ORDER TO PAD WITH ZEROES
6369 014751 005 DCR B ; DOWN OUR "8" COUNTER
6370 014752 312 364 031 JZ CHKSTK ; AND OUT IF ZERO
6371 014755 303 337 031 JMP ARGQQ ; ELSE CONTINUE LOOPING
6372
6373 014760 005 NOTRK: DCR B ; DOWN COUNT THE 8-TIME LOOP
6374 014761 302 336 031 JNZ A16PK ; IF STILL DOING 8-TIMES
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 170
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
6376
6377 ; DONE 8-TIMES..NOW CHECK IF C HAS GONE TO ZERO
6378
6379 014764 171 CHKSTK: MOV A,C ; COPY C TO ACCM TO CHECK IF ZERO
6380 014765 247 ANA A ; .EQ. 0?
6381 014766 362 316 031 JP RPINCB ; JUMP IF NOT YET..
6382
6383 ; ELSE FALL THRU..MUST NOW MOVE ASSEMBLED NUMBER TO DESTINATION
6384
6385 014771 052 207 040 CLEAN: LHLD RPBUFS ; GET BYTE COUNTER FOR THIS DATA
6386 014774 106 MOV B,M ; NOW B HAS COUNT OF NUMBER BYTES ASSY'D
6387 014775 043 INX H ; FIX H,L UP AGAIN..
6388
6389 ; NOW H,L HAS SRC. D,E HAS FF. STACK HAS PC
6390
6391 014776 343 XTHL ; SWAP-EEE
6392 014777 315 044 033 CALL TARG1 ; ASSEMBLE DEST ADDR INTO D,E
6393 015002 343 XTHL ; SWAP-EEE BACK
6394
6395 015003 072 214 040 LDA CHRCNT ; GET NUMB CHARS DESIRED BY THIS ROUTINE
6396 015006 117 MOV C,A ; C NOW HAS DESIRED. B HAS NUMB CHAR ASSY'D
6397 015007 176 MOVLP: MOV A,M ; START MOVING CHARS TO DESTINATION
6398 015010 022 STAX D ; CHAR TO DEST..
6399 015011 043 INX H ; UPDATE SRC POINTER
6400 015012 023 INX D ; UPDATE DEST POINTER
6401 015013 015 DCR C ; DOWN THE DESIRED COUNT
6402 015014 312 036 032 JZ FIXPNT ; IF GOT DESIRED NUMBER,DONT PASS ANY MORE
6403
6404 015017 005 DCR B ; DOWN THE ASSY'D COUNT
6405 015020 302 007 032 JNZ MOVLP ; KEEP ON KEEPIN' ON
6406
6407 ; WHEN FALL THRU WEVE MOVED ALL THAT WE CAN..NOW PAD THE BUFFER
6408
6409 015023 170 MOV A,B ; CLR ACCUM. B MUST BE ZERO
6410 015024 015 PADLP: DCR C ; DOWN THE DESIRED COUNT
6411 015025 372 042 032 JM FINARG ; IF THAT'S MINUS, WERE ALL DONE..
6412 015030 022 STAX D ; OTHERWISE STACK A ZERO
6413 015031 023 INX D ; UPDAT DEST POINTER
6414 015032 303 024 032 JMP PADLP ; AND CONTINUE TILL DONE
6415
6416 015035 043 FIXLP: INX H ; MUST UPDATE BUFFER POINTER
6417 015036 005 FIXPNT: DCR B ; DOWN THE ASSEMBLED COUNT
6418 015037 302 035 032 JNZ FIXLP ; AND GO BACK TO ADJUST POINTER IF NOT ZERO
6419
6420 015042 042 207 040 FINARG: SHLD RPBUFS ; NOW PUT BACK OUR LITTLE POINTER
6421 015045 311 RET ; AND GET OUT
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 171
SUBRTN.M80 ****KS10 CONSOLE SUBROUTINE FILE
6423
6424 ; ROUTINE FOR SHUFFLING BITS FOR A NICE CRAM FORMAT
6425
6426 015046 176 PLACE: MOV A,M ; GET PIECE OF SRC BYTE
6427 015047 022 STAX D ; PLACE AT DESTINATION
6428 015050 043 INX H ; UPDATE SRC POINTER
6429 015051 023 INX D ; UPDATE DESTINATION POINTER
6430 015052 176 MOV A,M ; GET UPPER 4 BITS OF 12 BIT CHUNK
6431 015053 346 017 ANI ^O17 ; MAKE SURE ONLY 4 BITS WORTH
6432 015055 022 STAX D ; AND PLACE AT THE DESTINATION
6433 015056 023 INX D ; DESTINATION UPDATE
6434 015057 053 DCX H ; BACKUP THE SRC POINTR TO BEGIN OF 24 BITS
6435 015060 311 RET ; AND RETURN
6436
6437 ; ROUTINE TO COMPLETE THE TRAP HANDLING TYPE OPERATION WHICH CHANGES
6438 ; A NORMAL 3 BYTE SUBROUTINE CALL INTO A 2 BYTE TRAP TYPE CALL. IT
6439 ; COSTS 3 BYTES TO ADD ANY SUBROUTINE TO THE TRAP CALL, SO THAT YOU
6440 ; SAVE AT LEAST ONE BYTE FOR ANY SUBROUTINE THAT IS CALLED 3 TIMES.
6441 ; AND YOU SAVE ONE BYTE FOR EACH ADDITIONAL TIME IT IS CALLED.
6442
6443 015061 041 103 032 RTNDIS: LXI H,DLIST ; GET POINTER TO DISPATCH LIST
6444 015064 365 PUSH PSW ; SAVE STATE OF PROCESSOR FLAGS
6445 015065 325 PUSH D ; SAVE "D,E"..TRAP CANT DESTROY REGS
6446 015066 205 ADD L ; ADD OFFSET IN ACCUM TO ADDRESS.
6447 015067 157 MOV L,A ; PUT ADDR PLUS OFFSET BACK
6448 015070 174 MOV A,H ; GET HI ORDER PIECE
6449 015071 316 000 ACI 0 ; NOW ADD IN A CARRY IF THERE WAS ONE
6450 015073 147 MOV H,A ; PUT IT BACK
6451
6452 015074 136 MOV E,M ; NOW GO FETCH ADDR TO BE DISPATCHED TO
6453 015075 043 INX H ; UPDATE TO NEXT
6454 015076 126 MOV D,M ; NOW FETCH HI ORDER PIECE OF ADDR TO BE DISPATCHED TO
6455 015077 353 XCHG ; GET DISPATCH ADDR INTO H,L
6456 015100 321 POP D ; RESTORE D,E. NOW ONLY H,L//RET ADDR ON STACK
6457 015101 361 POP PSW ; RESTORE PROCESSOR FLAGS
6458 015102 351 PCHL ; DISPATCH TO APPROPRIATE SUBROUTINE
6459
6460 015103 365 032 DLIST: .ADDR .MOV5B ; +0
6461 015105 135 004 .ADDR .CRLF ; +2
6462 015107 225 031 .ADDR .ARG16 ; +4
6463 015111 000 027 .ADDR .RUN.. ; +6
6464 015113 220 031 .ADDR .ARG36 ; +8.
6465 015115 220 033 .ADDR .CLRRM ; +10.
6466
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 172
SUBRTN.M80 **** CLRB EXECUTE CODE ****
6468 .SBTTL **** CLRB EXECUTE CODE ****
6469
6470 015117 046 040 CLRBYT: MVI H,^O40 ; THIS HALF GENERATES THE "20000'S" WEIGHT OF ADDR
6471 015121 157 MOV L,A ; THIS GENERATES THE REST OF THE RAM ADDRESS
6472 015122 066 000 MVI M,0 ; CLEAR THAT LOCATION
6473 015124 341 POP H ; FIX H,L
6474 015125 311 RET ; OUT & DONE
6475
6476 .SBTTL **** SOME ERROR CODES ****
6477
6478 015126 RRARG: PLINE RAG ; "?REQUIRES ARG"
(1) 015126 337 RST 3 ; PRINT LINE OF CHARS
(1) 015127 231 037 .ADDR RAG ; BUFF TO PRINT
6479 015131 303 277 003 JMP NORML ; ERROR MUST RESET THE STACK
6480 015134 KILNM: PLINE BB1 ; ?BN BAD NUMBER
(1) 015134 337 RST 3 ; PRINT LINE OF CHARS
(1) 015135 235 037 .ADDR BB1 ; BUFF TO PRINT
6481 015137 072 251 040 MMERR: LDA MMFLG ; SEE IF IN MAINTENACE MODE
6482 015142 247 ANA A ; SET 8080 FLAGS
6483 015143 312 200 001 JZ REINI ; IF NO MM MODE, OUT
6484 015146 315 174 034 CALL DECNET ; FINISH UP ANY MESSAGES
6485 015151 315 116 014 MMERR1: CALL MMCMD ; IF YES, RESET MODE
6486 015154 303 200 001 JMP REINI ; ERROR MUST RESET THE STACK
6487
6488 ; ERRORS INCURRED DURING THE BOOT PROCESS
6489
6490 015157 306 002 D.BTERR: ADI 1*2 ; FAILURE WHEN TRIED TO START UCODE AFTER BOOT
6491
6492 015161 306 002 C.BTERR: ADI 1*2 ; FAILURE DURING THE READING OF THE MICRO-CODE
6493
6494 015163 306 002 B.BTERR: ADI 1*2 ; FAILURE DURING READING OF THE PAGE OF POINTERS
6495
6496 015165 306 002 A.BTERR: ADI 1*2 ; FAILURE DURING THE READING OF THE HOME BLOCK
6497
6498 015167 315 301 032 CALL LTFLT ; THESE BOOT ERRORS ARE FATAL
6499 015172 062 155 040 BTERR1: STA ERRCD+1 ; THIS BIT OF CODE GOES IN HI ORDER BYTE OF NUMBER
6500 015175 CLRB NOPNT ; RESTORE PRINTING
6501 015177 PLINE BTFAIL ; PRINT MESSAGE "?BT "
(1) 015177 337 RST 3 ; PRINT LINE OF CHARS
(1) 015200 122 037 .ADDR BTFAIL ; BUFF TO PRINT
6502 015202 041 154 040 LXI H,ERRCD ; POINT TO THE ERROR CODE
6503 015205 315 303 030 CALL P16 ; PRINT THE 16-BIT NUMBER
6504 015210 PCRLF ; PUT A CRLF AT THE END OF THIS LINE
(2) 015210 347 RST 4
(2) 015211 002 .BYTE 2
6505 015212 303 200 001 JMP REINI ; KILL THE PROCESS
6506
6507 ; CODE FOR WHEN ONLY BOOTSTRAP FAILS TO READIN
6508
6509 015215 041 360 040 L.BTERR: LXI H,STATE ; GET POINTER TO STATE LIGHT
6510 015220 076 001 MVI A,^O01 ; SET FAULT LIGHT, BUT DON'T CHANGE STATE
6511 015222 266 ORA M ; THROW CURRENT STATE WITH FAULT BIT
6512 015223 167 MOV M,A ; PUT STUFF BACK
6513 015224 076 020 MVI A,8*2 ; FAILURE DURING LOADING OF PRE-BOOT PROGRAM
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 172-1
SUBRTN.M80 **** SOME ERROR CODES ****
6514 015226 303 172 032 JMP BTERR1 ; AVOID SOME CODE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 173
SUBRTN.M80 **** SOME ERROR CODES ****
6516
6517 ; SUBROUTINE TO CHECK IF A COMMAND FROM THE CSL BOARD HAS BEEN GRANTED
6518 ; THE BUS. WHICH IT MUST ALWAYS BE GRANTED BECAUSE IT IS THE BUS MASTER.
6519
6520 015231 343 BUSRESP: XTHL ; GET POINTER TO TRAILING ARG
6521 015232 333 301 IN SMSTS ; ***** I/O RD 301 *****
6522 015234 057 CMA ; FIX INVERSION
6523 015235 246 ANA M ; "AND" READ STUFF VS. TRAILING ARG
6524 015236 043 INX H ; UPDATE TO RETURN ADDR
6525 015237 343 XTHL ; SWAP RETURN BACK TO STACK
6526 015240 311 RET ; RETURN.."Z-BIT" CORRESPONDS TO "AND" RESULTS
6527
6528 ; LITTLE ROUTINE TO SET AND OR CLR THE SOFTWARE RUN FLAG
6529
6530 015241 006 004 SETRN: MVI B,STBIT ; WE WANT TO SET THE RUN LIGHT
6531 015243 315 312 032 CALL STATEM ; GO DO IT
6532 015246 017 .BYTE ^O17 ; AND DON'T MASH ANYTHING
6533 015247 257 XRA A ; CLEAR ACCUM
6534 015250 057 CMA ; ACCUM = -1
6535 015251 062 165 040 RNCOM: STA RNFLG ; DATA TO RUN FLAG
6536 015254 311 RET ; AND OUT
6537
6538 015255 006 000 CLRRN: MVI B,0 ; WE DON'T WANT TO SET ANYTHING
6539 015257 315 312 032 CALL STATEM ; JUST GO AND CLEAR SOME THINGS
6540 015262 013 .BYTE ^O13 ; BITS TO KEEP
6541 015263 257 XRA A ; CLEAR ACCUM
6542 015264 303 251 032 JMP RNCOM ; AND OUT.
6543
6544 015267 NOREFRESH: CLRB NOPNT ; TURN TYPING ON
6545 015271 CLRB CHKREF ; SAY NOT TO REPORT OVER AND OVER
6546 015273 315 305 006 CALL CLRUSE ; EXIT FROM USER MODE
6547 015276 PLINE MOSMSG ; MESSAGE TO CTY
(1) 015276 337 RST 3 ; PRINT LINE OF CHARS
(1) 015277 162 037 .ADDR MOSMSG ; BUFF TO PRINT
6548
6549 015301 365 LTFLT: PUSH PSW ; MUST SAVE ACCUM TO GET CORRECT "BT ERR MSG"
6550 015302 006 001 MVI B,1 ; WE MERELY WANT TO SET FAULT LIGHT
6551 015304 315 312 032 CALL STATEM ; GO SET THE LIGHTS
6552 015307 012 .BYTE ^O12 ; BITS TO FLUSH WITH THIS
6553 015310 361 POP PSW ; RESTORE ACCUM
6554 015311 311 RET ; AND NOW SAFE TO RETURN
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 174
SUBRTN.M80 **** SOME ERROR CODES ****
6556
6557 ; ROUTINE TO CLEAR AND SET BITS IN THE STATE WORD, THEN TO LIGHT
6558 ; THE LIGHTS ON THE FRONT PANEL AS SPECIFIED BY THE STATE WORD.
6559
6560 015312 343 STATEM: XTHL ; GET POINTER TO MASK
6561 015313 072 360 040 LDA STATE ; NOW FETCH CURRENT STATE OF THE MACHINE
6562 015316 246 ANA M ; MASK AS SPECIFIED
6563 015317 043 INX H ; UPDATE RETURN POINTER
6564 015320 343 XTHL ; AND PUT IT BACK ON THE STACK
6565
6566 015321 260 ORA B ; NOW THROW IN ANY NEW BITS
6567 015322 062 360 040 STA STATE ; NOW SAVE IT
6568 015325 323 101 OUT LIGHTS ; CHANGE THE LIGHTS
6569 015327 311 RET ; OUT
6570
6571 ; SUBROUTINE TO DECIDE IF "FIRST" POINTS TO AN END-OF-COMMAND CHARACTER.
6572 ; C-BIT SET IF YES, "FIRST" DOES POINT TO END-OF-COMMAND. ACCUMULATOR
6573 ; IS DESTROYED.
6574
6575 015330 345 EOCML: PUSH H ; SAVE "H,L"
6576 015331 052 223 040 LHLD .ARG1 ; GET CURRENT POINTER FOR COMMAND BUFFER
6577
6578 015334 176 MOV A,M ; GET CHARACTER
6579
6580 015335 376 073 CPI SEMIC ; (5.2H) COMMENT BEGINNING?
6581 015337 312 137 032 JZ MMERR ; (5.2H) JUMP IF YES
6582
6583 015342 376 377 CPI EOLCH ; END-OF-COMMAND?
6584 015344 312 362 032 JZ EOLYS ; JUMP IF YES
6585
6586 015347 376 054 CPI COMMA ; OR, END-OF-COMMAND?
6587 015351 312 362 032 JZ EOLYS ; JUMP IF YES
6588
6589 ; HERE IF NOT... CLR "C-BIT" & LEAVE
6590
6591 015354 247 ANA A ; CLR "C-BIT"
6592
6593 015355 341 POP H ; RESTORE "H,L"
6594 015356 311 RET ; RETURN
6595
6596 ; COMMENT FOUND - ASSUME THAT ANYTHING ELSE ON THE LINE IS A COMMENT
6597 ; ALSO. THIS PREVENTS COMMAS IN THE COMMAND TO CAUSE COMMENT TEXT TO
6598 ; BE INTERPRETED AS COMMANDS ALSO.
6599
6600 015357 315 115 010 EOLCM: CALL BFRST ; CLEAR INPUT BUFFER
6601
6602 ; HERE IF YES, AT END-OF-COMMAND
6603
6604 015362 067 EOLYS: STC ; SET CARRY
6605 015363 341 POP H ; RESTORE "H,L"
6606 015364 311 RET ; RETURN
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 175
SUBRTN.M80 **** SOME ERROR CODES ****
6608
6609 ; SUBROUTINE TO MOVE 5 CONTIGUOUS BYTES BEGINNING WITH A SPECIFIED SOURCE
6610 ; ADDRESS,TO ANOTHER BUFFER AREA, ITS ADDRESS ALSO PASSED AS A TRAILING
6611 ; ARGUMENT. SOURCE ADDRESS IS FIRST TRAILING PARAMETER, DESTINATION IS
6612 ; SECOND TRAILING PARAMETER.
6613
6614 015365 341 .MOV5B: POP H ; GET H,L FROM TRAP HANDLER
6615 015366 343 XTHL ; SWAP STACK TOP WITH "H,L"
6616 015367 325 PUSH D ; SAVE "D,E"
6617 015370 305 PUSH B ; SAVE "B,C"
6618 015371 315 040 033 CALL TARG2 ; ASSEMBLE ARGS INTO "B,C" AND "D,E"
6619
6620 015374 315 003 033 CALL MOVREG ; MOVE THE DATA, ARGS PASSED IN REGISTERS
6621 015377 301 POP B ; RESTORE "B,C"
6622 015400 321 POP D ; RESTORE "D,E"
6623
6624 015401 343 XTHL ; RESTORE STACK
6625 015402 311 RET ; AND RETURN
6626
6627 015403 076 005 MOVREG: MVI A,5 ; SET COUNTER TO 5
6628 015405 075 M5B: DCR A ; DOWN COUNTER
6629 015406 304 005 033 CNZ M5B ; AND BE RECURSIVE TILL DOWN COUNTED
6630
6631 015411 012 LDAX B ; BYTE TO ACCUM
6632 015412 022 STAX D ; STORE AT DESTINATION
6633 015413 023 INX D ; UP BOTH PNTRS
6634 015414 003 INX B ; TO NEXT BYTE
6635 015415 311 RET ; AND BACK TO CALLER
6636
6637 ; SUBROUTINE TO COMPARE 2 36-BIT VALUES. IF THE ADDRESSES OF THE 2 36-BIT
6638 ; BUFFERS ARE PASSED AS TRAILING PARAMETERS TO THE ROUTINE. IF BOTH BUFFERS
6639 ; ARE THE SAME, THE "C-BIT" IS CLR UPON RETURN. IF THEY ARE DIFFERENT, THE
6640 ; "C-BIT" IS SET ON RETURN.
6641
6642 015416 343 CMP36: XTHL ; SWAP STACK TOP WITH "H,L"
6643 015417 315 040 033 CALL TARG2 ; GET THE 2 TRAILING ARGS INTO "B,C" & "D,E"
6644 015422 343 XTHL ; PUT RETURN BACK ON STACK
6645 015423 353 XCHG ; SWAP "D,E" & "H,L"
6646 015424 026 005 MVI D,5 ; SET COUNTER TO 4.
6647
6648 015426 012 CMPLP: LDAX B ; GET A BYTE OF DATA
6649 015427 276 CMP M ; COMPARE
6650 015430 300 RNZ ; RETURN WITH Z-CLR IF HAD ERR..
6651 015431 003 INX B ; BUMP POINTER
6652 015432 043 INX H ; BUMP OTHER POINTER
6653 015433 025 DCR D ; DOWN COUNT
6654 015434 302 026 033 JNZ CMPLP ; CONTINUE TILL DONE
6655 015437 311 RET ; NORMAL RETURN
6656
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 176
SUBRTN.M80 **** SOME ERROR CODES ****
6658
6659 ; SUBROUTINE TO ASSEMBLE TRAILING ARGS INTO REGISTER PAIRS.
6660 ; ROUTINE USED TO SAVE CORE ONLY BECAUSE THIS SEQUENCE OF CODING
6661 ; IS REPEATED SO OFTEN. "H,L" POINTS TO THE TRAILING ARG OF THE
6662 ; ORIGINAL CALLER. "D,E" AND "B,C" MUST HAVE BEEN SAVED BEFORE
6663 ; THIS ROUTINE IS CALLED OR THEY WILL BE DESTROYED. IF A SINGLE
6664 ; TRAILING ARG IS TO BE GATHERED UP, IT WILL BE PUT INTO THE REG
6665 ; PAIR "D,E" VIA THE CALL "TARG1". IF TWO TRAILING ARGS TO BE
6666 ; GATHERED UP, THE FIRST WILL BE PUT INTO "B,C" AND THE SECOND
6667 ; WILL BE PUT INTO "D,E". "H,L" IS UPDATED TO POINT TO THE BYTE
6668 ; FOLLOWING THE TRAILING ARGS.
6669
6670 015440 116 TARG2: MOV C,M ; LO ORDER SOURCE TO "C"
6671 015441 043 INX H
6672 015442 106 MOV B,M ; HI ORDER SOURCE TO "B"
6673 015443 043 INX H
6674
6675 015444 136 TARG1: MOV E,M ; LO ORDER SOURCE TO "E"
6676 015445 043 INX H
6677 015446 126 MOV D,M ; HI ORDER SOURCE TO "D"
6678 015447 043 INX H
6679
6680 015450 311 RET ; AND RETURN
6681
6682 ; SUBROUTINE TO ADD 1 TO A 36-BIT BUFFER AND GUARANTEE THAT THE
6683 ; CARRY PROPAGATES CORRECTLY. BUFFER TO BE INCREMENTED IS PASSED
6684 ; AS A TRAILING ARG.
6685
6686 015451 343 INC36: XTHL ; GET POINTER TO TRAILING ARG
6687 015452 315 044 033 CALL TARG1 ; ASSEMBLE ARG INTO "D,E"
6688
6689 015455 343 XTHL ; PUT RETURN BACK ON THE STACK
6690 015456 353 XCHG ; NOW H,L PNTS TO BUFFER TO BE INCREMENTED
6691
6692 015457 257 XRA A ; CLR THE ACCUM
6693 015460 067 STC ; AND SET "C-BIT"
6694
6695 015461 216 INCLP: ADC M ; ADD PIECE OF DATA BUFF, WITH CRY
6696 015462 167 MOV M,A ; AND PUT IT BACK, WITH THE ADDITION
6697 015463 320 RNC ; RETURN IF FINALLY STOPPED CRY'S INTO NEXT BYTE
6698 015464 043 INX H ; NEXT PIECE TO INC
6699 015465 303 061 033 JMP INCLP ; AND CONTINUE IF THERE WAS A CRY
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 177
SUBRTN.M80 **** SOME ERROR CODES ****
6701
6702 ; SUBROUTINE "RDATT"
6703 ;
6704 ; ROUTINE READS I/O REGISTERS 0,1,2,3,103 AND MOVES THE DATA IN THOSE
6705 ; BUFFERS (BUS.BITS 0-35) INTO A RAM AREA WHOSE ADDRESS IS SPECIFIED
6706 ; BY A TRAILING PARAMETER USED WITH THE CALL TO THIS ROUTINE.
6707 ; CALL IS:
6708 ; CALL RDATT
6709 ; DW XXX ; XXX IS PLACE TO MOVE THE 36 BITS OF DATA
6710 ; ACCUMULATOR IS DESTROYED, REG PAIR "D,E" IS INCREMENTED BY 5.
6711
6712 015470 RDATT:
6713 015470 343 XTHL ; SWAP STACK TOP WITH "H,L"
6714 015471 315 044 033 CALL TARG1 ; ASSEMBLE TRAILING ARG INTO "D,E"
6715 015474 343 XTHL ; PUT BACK THE STACK
6716
6717 ; THE REAL READING CODE BEGINS HERE & ALSO SERVES AS AN ALTERNATE ENTRY
6718 ; IF YOU CHOOSE TO PASS THE BUFFER ADDRESS IN REGISTER "D,E"
6719
6720 015475 RDATP:
6721 015475 325 PUSH D ; SAVE "D,E"
6722 015476 333 000 IN D2835 ; ***** I/O RD "0" (BITS 28-35) *****
6723 015500 057 CMA
6724 015501 022 STAX D ; SAVE IN RAM
6725 015502 023 INX D ; UP PNTR TO NEXT BYTE
6726 015503 333 001 IN D2027 ; ***** I/O RD "1" (BITS 20-27) *****
6727 015505 057 CMA
6728 015506 022 STAX D ; SAVE IN RAM
6729 015507 023 INX D ; UP PNTR TO NEXT BYTE
6730 015510 333 002 IN D1219 ; *****I/O RD "2" (BITS 12-19) *****
6731 015512 057 CMA
6732 015513 022 STAX D ; SAVE IN RAM
6733 015514 023 INX D ; UP PNTR
6734 015515 333 003 IN D0411 ; ***** I/O RD "3" (BITS 4-11) *****
6735 015517 057 CMA
6736 015520 022 STAX D ; SAVE
6737 015521 023 INX D ; UP PNTR
6738 015522 333 103 IN D0003 ; ***** I/O RD "103" (BITS 0-03) *****
6739 015524 057 CMA
6740 015525 346 017 ANI ^O17 ; OFF TRASH IN D BITS 7-4
6741 015527 022 STAX D ; SAVE
6742 015530 321 POP D ; RESTORE "D,E"
6743 015531 311 RET ; RETURN
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 178
SUBRTN.M80 **** SOME ERROR CODES ****
6745
6746 ; SUBROUTINE "WDATT"
6747 ; ROUTINE WRITES I/O REGISTERS 102,104,106,110,112 AND GETS ADDRESS
6748 ; EITHER PASSED AS A TRAILING PARAMETER, OR PASSED IN "D,E".
6749 ; CALL IS:
6750 ; CALL WDATT
6751 ; DW XXX ; XXX IS SOURCE OF DATA TO BE WRITTEN
6752
6753 015532 343 WDATT: XTHL ; SWAP STACK TOP WITH "H,L"
6754 015533 315 044 033 CALL TARG1 ; ASSEMBLE TRAILING ARG INTO "D,E"
6755 015536 343 XTHL ; SWAP STACK BACK TO ORIGINAL STATE
6756
6757 ; ALTERNATE ENTRY FOR WHEN PASSING DATA POINTER IN "D,E"
6758
6759 015537 325 WDATP: PUSH D ; SAVE "D,E"
6760 015540 032 LDAX D ; DATA 28-35 TO ACCUM
6761 015541 323 102 OUT W2835 ; ***** I/O WRT "102" (BITS 28-35) *****
6762 015543 023 INX D ; NEXT DATUM
6763
6764 015544 032 LDAX D ; DATA 20-27 TO ACCUM
6765 015545 323 104 OUT W2027 ; ***** I/O WRT "104" (BITS 20-27) *****
6766 015547 023 INX D ; NEXT DATUM
6767
6768 015550 032 LDAX D ; DATA 12-19 TO ACCUM
6769 015551 323 106 OUT W1219 ; ***** I/O WRT "106" (BITS 12-19) *****
6770 015553 023 INX D ; NEXT DATUM
6771
6772 015554 032 LDAX D ; DATA 4-11 TO ACCUM
6773 015555 323 110 OUT W0411 ; ***** I/O WRT "110" (BITS 04-11) *****
6774 015557 023 INX D ; NEXT DATUM
6775
6776 015560 032 LDAX D ; DATA 0-3 TO ACCUM
6777 015561 323 112 OUT W0003 ; ***** I/O WRT "112" (BITS 00-03) *****
6778 015563 321 POP D ; RESTORE "D,E"
6779 015564 311 RET ; RETURN
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 179
SUBRTN.M80 **** SOME ERROR CODES ****
6781
6782 ; SUBROUTINE "ADATT"
6783 ; ROUTINE WRITES I/O REGISTERS 103,105,107,111,113 AND GETS ADDRESS
6784 ; EITHER PASSED AS A TRAILING PARAMETER, OR PASSED IN "D,E".
6785 ; CALL IS:
6786 ; CALL ADATT
6787 ; DW XXX ; XXX IS SOURCE OF DATA TO BE WRITTEN
6788
6789 015565 343 ADATT: XTHL ; SWAP STACK TOP WITH "H,L"
6790 015566 315 044 033 CALL TARG1 ; ASSEMBLE TRAILING ARG INTO "D,E"
6791 015571 343 XTHL ; SWAP STACK BACK TO ORIGINAL STATE
6792
6793 ; ALTERNATE ENTRY FOR WHEN PASSING DATA POINTER IN "D,E"
6794
6795 015572 325 ADATP: PUSH D ; SAVE "D,E"
6796 015573 032 LDAX D ; DATA 28-35 TO ACCUM
6797 015574 323 103 OUT A2835 ; ***** I/O WRT "103" (BITS 28-35) *****
6798 015576 023 INX D ; NEXT DATUM
6799
6800 015577 032 LDAX D ; DATA 20-27 TO ACCUM
6801 015600 323 105 OUT A2027 ; ***** I/O WRT "105" (BITS 20-27) *****
6802 015602 023 INX D ; NEXT DATUM
6803
6804 015603 032 LDAX D ; DATA 12-19 TO ACCUM
6805 015604 323 107 OUT A1219 ; ***** I/O WRT "107" (BITS 12-19) *****
6806 015606 023 INX D ; NEXT DATUM
6807
6808 015607 032 LDAX D ; DATA 4-11 TO ACCUM
6809 015610 323 111 OUT A0411 ; ***** I/O WRT "111" (BITS 04-11) *****
6810 015612 023 INX D ; NEXT DATUM
6811
6812 015613 032 LDAX D ; DATA 0-3 TO ACCUM
6813 015614 323 113 OUT A0003 ; ***** I/O WRT "113" (BITS 00-03) *****
6814 015616 321 POP D ; RESTORE "D,E"
6815 015617 311 RET ; RETURN
6816
6817 ; LOCAL SUBROUTINE TO CLR
6818
6819 015620 341 .CLRRM: POP H ; FIX REG AS MESSED UP BY RST INSTR
6820 015621 343 XTHL ; POINTER TO THE TRAILING PARAM
6821 015622 315 044 033 CALL TARG1 ; ASSY ARG INTO "D,E"
6822 015625 343 XTHL ; FIX "H,L" AND REPLACE FOR RETURN
6823 015626 353 XCHG ; PUT "D,E" STUFF INTO "H,L"
6824 015627 076 005 MVI A,5 ; AND SET STARTING COUNT TO 5
6825 015631 053 CLRT1: DCX H ; DOWN THE MEM ADDRESS
6826 015632 066 000 MVI M,0 ; 0 DATA TO MEM
6827 015634 075 DCR A ; DOWN THE COUNTER
6828 015635 302 231 033 JNZ CLRT1 ; BACK TILL DONE
6829 015640 311 RET ; RETURN
6830
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 180
SUBRTN.M80 **** SOME ERROR CODES ****
6832
6833 ; SUBROUTINE TO SWALLOW SEPARATOR CHARACTERS FROM THE ADDRESS POINTED
6834 ; TO BY "H,L", UP TO THE FIRST NON-SEPARATOR CHARACTER.
6835 ; SEPARATORS ARE: "SPACE"
6836 ; "TAB"
6837 ; ONLY THE "H,L" REGISTER SHOULD BE CHANGED BY THIS ROUTINE
6838
6839 015641 365 SEPCHR: PUSH PSW ; SAVE ACCUM AND STATUS
6840 015642 053 DCX H ; DOWN COUNT H,L SO NXT INSTR WILL MAKE IT EVEN
6841 015643 043 SEPYS: INX H ; UP THE COUNT
6842 015644 176 MOV A,M ; COPY CHARACTER INTO ACCUM
6843 015645 376 040 CPI ' ; IS THE CHAR A "SPACE"
6844 015647 312 243 033 JZ SEPYS ; GO UPDATE "H,L" IF YES..
6845
6846 ; ELSE SEE IF ITS A TAB
6847
6848 015652 376 011 CPI ' ; IS THE CHAR A "TAB"
6849 015654 312 243 033 JZ SEPYS ; GO UPDATE "H,L" IF YES
6850
6851 ; ELSE NO MORE SEPARATORS-TIME TO RETURN
6852
6853 015657 361 POP PSW ; RESTORE ACCUM AND STATUS
6854 015660 311 RET ; ALL DONE RETURN
6855
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 181
SUBRTN.M80 SUBROUTINE TIME DELAY
6857 .SBTTL SUBROUTINE TIME DELAY
6858
6859 ; EACH UNIT OF DELAY COUNTED IN THE TRAILING BYTE IS WORTH 1.02 MICRO-SEC
6860 ; THIS SUBROUTINE WASTES SOME AMOUNT OF TIME. THE GREATER THE TRAILING
6861 ; ARGUMENT, THE MORE TIME IS WASTED...
6862
6863 015661 343 DELAY.: XTHL ; GET POINTER TO TRAILING ARG INTO "H,L"
6864 015662 365 PUSH PSW ; NOW SAVE ACCUM
6865 015663 176 MOV A,M ; GET THE TRAILING ARG INTO ACCUM
6866 015664 043 INX H ; UP DATE TO CORRECT RETURN LOCATION
6867 015665 075 DLYLP: DCR A ; DOWN THE COUNTER
6868 015666 365 PUSH PSW ; ADD MORE DELAY IN THE LOOP
6869 015667 361 POP PSW ; BECAUSE PUSHES AND POPS TAKE LONG TIME
6870 015670 302 265 033 JNZ DLYLP ; LOOP TILL ZERO
6871 015673 361 POP PSW ; RESTORE ACCUM
6872 015674 343 XTHL ; PUT RETURN BACK ONTO THE STACK
6873 015675 311 RET ; AND DONE
6874
6875 .SBTTL STRING COMPARE ROUTINE
6876
6877 ; ROUTINE TO COMPARE A TYPED IN ASCII STRING VERSUS SOME EXPECTED
6878 ; STRING. ENTER WITH "H,L" POINTING TO THE BEGINNING OF THE TYPE-IN
6879 ; BUFFER AND WITH D,E POINTING TO THE EXPECTED STRING. RETURN Z-BIT
6880 ; CLR IF NO MATCH. Z-BIT SET IF MATCH.
6881
6882 015676 032 STRCMP: LDAX D ; GET FIRST EXPECTED CHARACTER
6883 015677 247 ANA A ; SET FLAGS TO SEE IF ZERO BYTE
6884 015700 312 312 033 JZ STREND ; IF ZERO BYTE, END OF EXPECTED STRING.. OUT
6885
6886 015703 276 CMP M ; IF A REAL BYTE, COMPARE AGAINST THE TYPE-IN
6887 015704 300 RNZ ; IF NO MATCH, TAKE ERROR RETURN
6888 015705 023 INX D ; IF MATCH , UPDATE TO NEXT EXPECTED
6889 015706 043 INX H ; AND UPDATE TO NEXT TYPED IN.
6890 015707 303 276 033 JMP STRCMP ; LOOP
6891
6892 015712 042 223 040 STREND: SHLD .ARG1 ; PASS CURRENT POINTER TO ROUTINE THAT CHECKS FOR EOL
6893 015715 315 330 032 CALL EOCML ; CHECK THAT TYPE IN WAS TERMINATED
6894 015720 330 RC ; IF YES, Z-BIT IS SET,... OK TO RETURN
6895
6896 015721 264 ORA H ; CLR Z-BIT FLAG.. H WILL BE NON-ZERO
6897 015722 311 RET ; AND OUT.....
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 182
SUBRTN.M80 STRING COMPARE ROUTINE
6899
6900 ; ROUTINE CALLED WHENEVER KLINIK SWITCH CHANGES STATE.
6901 ; THE ROUTINE EXAMINES THE NEW STATE OF KLINIK, ZAPS THE LIGHTS AS REQUIRED
6902 ; THEN SETS THE KLINIK LINE INTO THE APPROPRIATE STATE. IF KLINIK WAS
6903 ; ESTABLISHED, GOING TO ENABLE POSITION WILL CHANGE NOTHING, BUT ANY SWITCH
6904 ; CHANGE THAT INCREASES THE AMOUNT OF PROTECTION WILL FORCE CHANGE THE MODE
6905 ; OF THE KLINIK LINE.
6906 ; THE ROUTINE IS ENTERED WITH "B" HOLDING THE NEW KLINIK SWITCH STATE, AND
6907 ; "KLNKSW" HOLDING THE OLD STATE. VALUES ARE AS FOLLOWS:
6908 ; ENABLE = 2
6909 ; PROTECT = 6
6910 ; DISABLE = 4
6911
6912 015723 170 KLNKLT: MOV A,B ; COPY KLINIK STATE INTO THE ACCUM
6913 015724 062 124 040 STA KLNKSW ; SAVE THE NEW STATUS
6914 015727 376 004 CPI 4 ; IS SWITCH NOW IN DISABLED POSITION
6915 015731 312 005 034 JZ SETM0 ; GO SET MODE 0 IF YES
6916
6917 015734 376 006 CPI 6 ; IS SWITCH NOW IN THE PROTECT POSITION?
6918 015736 312 360 033 JZ .SETM1 ; IF YES, GO SET MODE 1
6919
6920 ; FALL THRU IF NEW SWITCH POSITION IS THE "ENABLE" POSITION. FIRST
6921 ; CHECK CURRENT MODE. IF IN MODE 3 ALREADY, WE MAKE NO CHANGE.
6922
6923 015741 072 247 040 LDA CSLMODE ; GET CURRENT CSL MODE
6924 015744 376 010 CPI .MODE3 ; IS IT MODE 3
6925
6926 ; FLAGS ARE SET, FALL INTO CODE THAT DOES THE RIGHT THING IF IN MODE 3
6927
6928 015746 304 070 034 CNZ SETM2 ; IF WAS NOT MODE 3, THIS WILL SET MODE 2
6929
6930 ; AND FALL INTO KL.LON CODE
6931
6932 015751 006 002 KL.LON: MVI B,2 ; GET A BIT FOR SETTING THE REMOTE LIGHT ON
6933
6934 ; AND FALL INTO CODE FOR SETTING THE LIGHTS
6935
6936 015753 315 312 032 KL.LAMP: CALL STATEM ; SET LIGHTS AS SPECIFIED IN B REG
6937 015756 375 .BYTE ^O375 ; KEEP ALL LIGHTS, 'CEPT REMOTE
6938 015757 311 RET ; AND DONE WITH THIS MESS
6939
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 183
SUBRTN.M80 UART MODE MODIFICATIONS
6941 .SBTTL UART MODE MODIFICATIONS
6942
6943 ; CODE FOR SETTING THE KLINIK LINE INTO MODE 1
6944
6945 015760 072 262 040 .SETM1: LDA PASSWORD ; GET CURRENT PASSWORD
6946 015763 247 ANA A ; SET FLAGS TO SEE IF ANY PASSWORD EXISTS
6947 015764 312 005 034 JZ SETM0 ; IF NO PASSWORD, THEN SET INTO MODE 0
6948 015767 304 375 033 CNZ SETM1 ; IF PASSWORD EXISTS, SET THINGS INTO MODE 1
6949 015772 302 351 033 JNZ KL.LON ; IF WE WENT MODE 1, THEN MUST TURN ON LIGHT
6950
6951 ; CODE FOR ACTUALLY SETTING THE KLINIK LINE MODE TO 1
6952
6953 015775 076 002 SETM1: MVI A,.MODE1 ; GET MODE 1 FLAG
6954 015777 041 150 010 LXI H,MODE1 ; GET THE MODE 1 DISPATCH
6955 016002 303 112 034 JMP SETM ; SET UP RAM
6956
6957 ; CODE THAT SETS BOTH MODE 0 AND THE APPROPRIATE LIGHTS
6958
6959 016005 SETM0: CLRB KLLINE.ON ; DISABLING KLINIK KILLS CTY AVAILABILITY
6960 016007 006 000 MVI B,0 ; THE PASS LIGHTS OFF IN REGISTER "B"
6961 016011 315 353 033 CALL KL.LAMP ; AND GO DO THE LIGHTS
6962 016014 315 123 034 CALL HANGUP ; CLEAR KLINIK LINE
6963 016017 076 001 MVI A,.MODE0 ; GET THE MODE 0 FLAG
6964 016021 041 135 010 LXI H,MODE0 ; GET THE MODE 0 DISPATCH
6965 016024 303 112 034 JMP SETM ; SET UP RAM
6966
6967 ; CODE TO SET US INTO MODE 3
6968
6969 016027 076 010 SETM3: MVI A,.MODE3 ; GET MODE 3 FLAG
6970 016031 041 332 005 LXI H,MODE3 ; GET THE MODE 3 DISPATCH
6971 016034 303 112 034 JMP SETM ; SET UP RAM
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 184
SUBRTN.M80 UART MODE MODIFICATIONS
6973
6974 ; CODE TO SET US INTO MODE 4
6975
6976 016037 072 156 040 SETM4: LDA USRMD ; SEE IF USER, IF WHICH CASE WE WON'T DO "MODE 4"
6977 016042 247 ANA A ; SET 8080 FLAGS
6978 016043 300 RNZ ; AND OUT IF USER MODE
6979
6980 ; ACCUM MUST .EQ. 0 IF FELL TO HERE
6981
6982 016044 062 252 040 STA MAILFG ; BETTER CLEAR THIS FLAG TOO
6983 016047 062 301 040 STA E.CNT ; USE FASTEST WAY TO CLEAR THIS LOCATION
6984 016052 041 250 041 LXI H,E.BEG-1 ; AND RESET ENVELOPER
6985 016055 042 247 041 SHLD E.BUF
6986 016060 076 020 MVI A,.MODE4 ; GET MODE 4 FLAG
6987 016062 041 376 034 LXI H,MODE4 ; GET THE MODE 4 DISPATCH
6988 016065 303 112 034 JMP SETM ; SET UP RAM
6989
6990 ; SET LINE TO MODE 2
6991
6992 016070 072 247 040 SETM2: LDA CSLMODE ; BEFORE A/G ELSE, SEE WHAT WE ARE DOING NOW
6993 016073 346 003 ANI .MODE0!.MODE1 ; IF MODES 0 OR 1, MUST INTERRUPT KS10
6994 016075 312 105 034 JZ SETM2X ; IF NOT, DON'T BOTHER KS10 AT ALL
6995
6996 016100 076 002 MVI A,KL.ACTIVE ; MUST INFORM THE TEN WE ARE ENTERING KLINIK
6997 016102 315 145 034 CALL WRD34 ; CALL ROUTINE THAT WRITES WORD 34
6998 016105 041 327 010 SETM2X: LXI H,MODE2 ; GET DISPATCH FOR MODE 2
6999 016110 076 004 MVI A,.MODE2 ; SET MODE 2 TO THE STATE FLAG ALSO
7000 016112 062 247 040 SETM: STA CSLMODE
7001 016115 042 346 040 SETDIS: SHLD MODDIS ; AND SET TO KLINIK DISPATCHER
7002 016120 311 RET ; AND ALL DONE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 185
SUBRTN.M80 UART MODE MODIFICATIONS
7004
7005 ; LITTLE ROUTINE TO HANG UP THE KLINIK LINE
7006
7007 016121 KILL.KLINIK: CLRB KLNKSW ; FORCE A RELOOK AT THE REMOTE SWITCH
7008 016123 072 360 040 HANGUP: LDA STATE ; GET CURRENT STATE
7009 016126 346 007 ANI ^O7 ; OFF THE "DTR" SIGNAL
7010 016130 323 101 OUT DTR ; CLR DTR
7011 016132 076 003 MVI A,CARRLOSS ; TELL KS10 THAT KLINIK CARRIER HAS GONE AWAY
7012 016134 315 145 034 CALL WRD34 ; DEPOSIT INTO WORD 34
7013 016137 041 220 001 LXI H,200. * 2 ; SET A TIMING DELAY OF 2 SECONDS
7014 016142 303 076 014 JMP LTLOOP ; GO DO DELAY, AND USE HIS RETURN TO EXIT
7015
7016 ; ROUTINE FOR DOING SIMPLE DEPOSIT INTO KS10 MEMORY AT WORD 34, AND
7017 ; THEN INTERRUPTING THE 10.
7018
7019 016145 365 WRD34: PUSH PSW ; SAVE ACCUM & STATUS
7020 016146 CLRRM DMDAT ; CLEAR A BUFFER
(1) 016146 347 RST 4
(1) 016147 012 .BYTE 10.
(1) 016150 054 040 .ADDR DMDAT+5
7021 016152 361 POP PSW ; FETCH THE ACCUM'S CONTENTS AGAIN
7022 016153 043 INX H ; BUMP H,L (VALUE AFTER A CLRRM = 1ST LOC OF BUFF)
7023 016154 167 MOV M,A ; STORE DATA AT "DMDAT+1"
7024 016155 DEPOS 34 ; DEPOSIT
(1) 016155 247 ANA A ; CLR "C-BIT" FOR USE BY COMMON CODE
(1) 016156 315 203 030 CALL DEPSHT ; AND DO THE DEPOSIT ASSUMING SHORT ADDR
(1) 016161 034 000 .ADDR 34 ; ADDR TO BE ZAPPED PASSED AS TRAILING ARG
7025 016163 303 014 010 JMP POKE10 ; INTERRUPT THE KS10 & USE HIS RETURN
7026
7027 ; CODE USED IN ADDING UP THE CHECKSUMS ON ENVELOPES TO BE SENT
7028
7029 016166 200 CHKADD: ADD B ; HERE TO ADD NEW CHAR TO THE CURRENT SUM
7030 016167 107 MOV B,A ; AND KEEP THE RESULTS IN "B"
7031 016170 043 INX H ; BUMP UP TO LOOK AT THE NEXT CHAR
7032 016171 303 220 034 JMP TSKLP ; BACK TO LOOP
7033
7034 ; THIS IS THE APT ENVELOPE SENDER. WHEN WE HAVE A BUFFER OF INFO TO
7035 ; SEND TO THE APT HOST SYSTEM, THIS IS THE CODE THAT GETS CALLED.
7036
7037 016174 072 252 040 DECNET: LDA MAILFG ; ONLY DO S/G HERE IF THE MAILING FLAG SET
7038 016177 247 ANA A ; SET 8080 FLAGS
7039 016200 310 RZ ; NO FLAG, NO SENDY....
7040
7041 016201 373 EI ; ABSOLUTELY MUST ALLOW INTERRUPTS, IN CASE HOST DIES
7042 016202 072 011 042 LDA ENVMNO ; FIRST THING TO DO IS COMPLEMENT THE MESSAGE #
7043 016205 057 CMA ; FLIP
7044 016206 346 177 ANI ^O177 ; NO SIGN BITS ALLOWED
7045 016210 062 011 042 STA ENVMNO ; PUT IT BACK
7046
7047 016213 041 013 042 LXI H,ENVBUF ; 1ST THING TO DO IS COMPUTE CHECKSUM FOR ENVELOPE
7048 016216 006 000 MVI B,0 ; "B" WILL HOLD THE CURRENT SUM
7049 016220 176 TSKLP: MOV A,M ; GRAB A CHARACTER
7050 016221 376 015 CPI CRCHR ; SEE IF END OF THE ENVELOPE CHARACTER
7051 016223 312 232 034 JZ TSKGO ; IF YES, GO TO THE ACTUAL SENDER
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 185-1
SUBRTN.M80 UART MODE MODIFICATIONS
7052
7053 016226 247 ANA A ; MAYBE THE CHAR WAS A 0, BECAUSE THERE IS NO CRCHR
7054 016227 302 166 034 JNZ CHKADD ; IF NOT, GO ADD THE CHARACTER TO THE SUM
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 186
SUBRTN.M80 UART MODE MODIFICATIONS
7056
7057 ; HERE WHEN TIME TO ACTUALLY MAIL AN ENVELOPE
7058
7059 016232 043 TSKGO: INX H ; UPDATE PAST THE "CR" CHARACTER
7060 016233 066 000 MVI M,0 ; NOW GUARANTEE THAT WE END WITH "CR","0" PAIR
7061 016235 170 MOV A,B ; GRAB THE CURRENT SUM
7062 016236 057 CMA ; COMPLEMENT
7063 016237 074 INR A ; MAKE TWOS COMPLEMENT
7064 016240 346 077 ANI ^O77 ; AND ONLY SIX BITS COUNT
7065
7066 ; NOW MUST DECIDE IF YOU NEED TO ASCII-IZE THE CHECKSUM
7067
7068 016242 376 075 CPI ^O75 ; 75,76,77 DON'T GET ASCII-ED
7069 016244 362 251 034 JP TSKGO1 ; SO JUMP IF ANY OF THOSE THREE
7070 016247 366 100 ORI ^O100 ; HAD TO ASCII-IZE, SO DO IT WITH A 100
7071 016251 062 012 042 TSKGO1: STA ENVCHK ; SAVE IN THE APPROPRIATE PLACE IN THE BUFFER
7072
7073 016254 TSK2TSK: CLRB APTANS ; CLEAR THE ANSWER
7074 016256 KCHAR SYNC ; 2 SYNCS START EVERY MESSAGE
(1) 016256 315 052 004 CALL KCHR ; GO PRINT THE CHARACTER
(1) 016261 001 .BYTE SYNC
7075 016262 KCHAR SYNC
(1) 016262 315 052 004 CALL KCHR ; GO PRINT THE CHARACTER
(1) 016265 001 .BYTE SYNC
7076
7077 016266 021 011 042 LXI D,ENVMNO ; NOW SEND THE REST
7078 016271 315 077 004 CALL KLINE1
7079 016274 072 013 042 LDA ENVBUF ; GRAB FIRST CHAR OF ENVELOPE JUST SENT
7080 016277 376 077 CPI QUES ; IS IT QUESTION MARK?
7081 016301 312 151 032 JZ MMERR1 ; IF IT WAS, ABORT ENVELOPE STUFF, RESET APT
7082
7083 016304 376 045 CPI PERCNT ; IS IT A PER CENT SIGN?
7084 016306 312 151 032 JZ MMERR1 ; IF IT WAS, ABORT ENVELOPE STUFF, RESET APT
7085
7086 016311 072 261 040 APT.WT: LDA APTANS ; NOW WAIT FOR APT SYS TO ANSWER(ACK OR NACK)
7087 016314 247 ANA A ; IF ZERO, GOT NO ANSWER YET
7088 016315 312 311 034 JZ APT.WT ; SO WAIT
7089
7090 ; FINALLY GOT AN ANSWER
7091
7092 016320 376 116 CPI 'N ; WAS IT A NACK??
7093 016322 312 254 034 JZ TSK2TSK ; IF YES, SEND IT OUT AGAIN
7094 016325 DECEX1:
7095 016325 DECEX2:
7096 016325 257 XRA A ; USE FAST WAY TO CLEAR A RAM LOCATION
7097 016326 062 252 040 STA MAILFG ; SAY END OF THIS ENVELOPE
7098 016331 041 013 042 LXI H,ENVBUF ; POINT TO THE BUFFER
7099 016334 042 352 040 SHLD ENVPNT ; SAVE THE POINTER TO THE BUFFER
7100 016337 311 RET ; THEN OUT
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 187
SUBRTN.M80 UART MODE MODIFICATIONS
7102
7103 ; SUBROUTINE TO MOVE A STRING OF CHARACTERS INTO THE TTY INPUT BUFFER,
7104 ; KEEPING TRACK OF THE NUMBER OF COMMAS AND OTHER IMPORTANT FEATURES
7105 ; OF THE STRING. MUST PASS THE SOURCE OF THE CHARACTERS IN REG B,C,
7106 ; SUBROUTINE WILL BOMB REGISTERS D,E AND H,L
7107
7108 016340 001 253 041 MV.ALL: LXI B,E.BEG+2 ; POINT TO THE CHARACTER BUFFER TO BE EXECUTED
7109 016343 315 115 010 CALL BFRST ; RESET CMD CHAIN POINTERS
7110 016346 021 114 041 MV.INP: LXI D,BUFBG ; DE, WILL POINT TO THE INPUT BUFFER
7111 016351 041 204 040 LXI H,EOL ; AND HL WILL POINT TO THE COMMA/EOL COUNTER
7112 016354 066 000 MVI M,0 ; MAKE SURE COUNT BEGINS AT 0
7113
7114 016356 012 MV.IN1: LDAX B ; GET FIRST CHARACTER FROM WHEREVER IT IS
7115 016357 022 STAX D ; AND PUT IT INTO THE BUFFER
7116 016360 003 INX B ; UP POINTER
7117 016361 023 INX D ; AND THIS ONE TOO
7118
7119 ; NOW CHECK FOR COMMA OR EOL
7120
7121 016362 376 054 CPI COMMA ; IS IT A COMMA?
7122 016364 314 374 034 CZ MV.CNT ; IF YES, INCREMENT THE COUNT
7123
7124 ; FALL THRU IF WAS A COMMA BEFORE, EOLCH WILL NOT MATCH
7125
7126 016367 376 377 CPI EOLCH ; IS IT AN END OF LINE?
7127 016371 302 356 034 JNZ MV.IN1 ; IF NOT, THERE IS MORE TO DO
7128
7129 ; HERE IF WAS AN EOL.. NOT ONLY DO WE BUMP THE COUNT, WE ALSO GET OUT
7130
7131 016374 064 MV.CNT: INR M ; UP COUNT
7132 016375 311 RET ; AND OUT
7133
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 188
SUBRTN.M80 MODE 4 FOR DECIDING TO COLLECT AN ENVELOPE OR CTY OUT
7135 .SBTTL MODE 4 FOR DECIDING TO COLLECT AN ENVELOPE OR CTY OUT
7136
7137 ; MODE 4 HANDLER. WATCHES FOR THE FIRST SYNC CHAR, THEN GOES INTO
7138 ; A FINITE STATE MACHINE MODE WHERE IT COLLECTS AN ENVELOPE. WHEN
7139 ; YOU ENTER HERE, REG B HAS A COPY OF THE CHARACTER JUST TYPED.
7140
7141 016376 MODE4:
7142 016376 376 001 M4.0: CPI SYNC ; LOOK FOR A SYNC CHARACTER
7143 016400 302 237 035 JNZ MMOUT ; IF NOT, SIMPLE PRINT OF CHARACTER ON CTY
7144
7145 016403 041 011 035 LXI H,M4.1 ; SHIFT ENVELOPER TO NEXT INPUT STATE
7146 016406 303 115 034 JMP SETDIS ; AND SET INTERRUPT HANDLER TO COME HERE WHEN
7147 ; DONE WITH INTERRUPT
7148
7149 ; STATE 2 OF ENVELOPE EATER. THIS CODE WILL DISCARD ANY ADDITIONAL SYNCS
7150 ; STORE THE MESSAGE NUMBER WHEN IT FINALLY GETS HERE (& FLIC TO STATE 3)
7151 ; OR COLLECT THE FIRST CHARACTER OF A CMD SEQUENCE (& FLIC TO STATE 3).
7152
7153 016411 M4.1:
7154 016411 376 001 CPI SYNC ; IS THIS AN ADDITIONAL SYNC CHAR
7155 016413 310 RZ ; IF YES, IGNORE AND PROCEED
7156
7157 ; FALL THRU IF NOT A SYNC
7158
7159 016414 041 022 035 LXI H,COLLECT ; NOW GO TO NEXT STATE OF ENVELOPE COLLECTOR
7160 016417 042 346 040 SHLD MODDIS ; SET UP FOR INTERRUPT HANDLER TO FIND
7161
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 189
SUBRTN.M80 ENVELOPE COLLECTOR
7163 .SBTTL ENVELOPE COLLECTOR
7164
7165 ; THIS IS WHERE YOU COME ON CHARACTERS THAT ARE PART OF AN ENVELOPE.
7166 ; THIS CODE CHECKS FOR 2 KINDS OF TERMINATORS: (1) END OF ENVELOPE
7167 ; (2) END OF CONTROL SEQUENCE
7168 ; OR ELSE MERELY STUFFS THE CHARACTER INTO THE ENVELOPE BUFFER. WHEN
7169 ; AN ENTIRE MESSAGE HAS BEEN RECEIVED, THEN WE WILL CALCULATE THE
7170 ; CHECKSUMS OR WHATEVER, MAKE WITH THE ACKS, NACKS, AND EXECUTE
7171 ; WHATEVER THE STUFF MAY BE. WHEN YOU ENTER HERE, REG B HAS A COPY
7172 ; OF THE CHARACTER JUST TYPED.
7173
7174 016422 376 044 COLLECT: CPI DOLLAH ; TOPS20 CALLS A SPADE A "DOLLAR"
7175 016424 312 225 035 JZ ACTION ; IF "$", TREAT LIKE AN ALTMODE
7176
7177 016427 376 033 CPI ALT ; IF ALTMODE, THEN END OF CONTROL SEQUENCE
7178 016431 312 225 035 JZ ACTION ; AND JUMP IF IT WAS ALTMODE. EXECUTE CONTROL CHAR
7179
7180 016434 376 015 CPI CRCHR ; IF CARRIAGE RETURN, THEN END OF ENVELOPE
7181 016436 312 071 035 JZ EXECUT ; GO EXECUTE THE ENVELOPE IF <CR>
7182
7183 016441 376 001 CPI SYNC ; ALSO LOOK FOR "SYNC", WHICH MEANS "RESYNC"
7184 016443 312 037 034 JZ SETM4 ; IF YES, THEN MUST RE-SYNC
7185
7186 ; WE MUST BE AWARE OF "RE-SYNCING", IN CASE THE "ALT" OR "CR" WAS GARBLED
7187 ; AS IT CAME DOWN THE LINE, AND WAS MISSED BY THE 8080. RE-SYNCING
7188 ; REQUIRES STARTING AT THE BEGINNING OF MODE4.
7189
7190 ; FALL THRU IF MUST SIMPLY SHOVE THE CHARACTER INTO THE BUFFER
7191
7192 016446 052 247 041 COL.LP: LHLD E.BUF ; GET POINTER TO THE LAST CHARACTER IN THE BUFFER
7193 016451 043 INX H ; BUMP POINTER TO FIRST FREE
7194 016452 167 MOV M,A ; AND STACK THE CHARACTER IN THE BUFFER
7195 016453 042 247 041 SHLD E.BUF ; REPLACE THE POINTER
7196
7197 016456 041 301 040 LXI H,E.CNT ; GET CURRENT CHARACTER COUNT
7198 016461 064 INR M ; UPDATE
7199 016462 176 MOV A,M ; NOW COPY COUNT TO ACCUM FOR TESTING
7200 016463 376 134 CPI ^O134 ; TOO MUCH FOR AN ENVELOPE?
7201 016465 322 207 035 JNC NACK.EN ; IF TOO MANY, NACK IT.. MAYBE HE WILL START OVER
7202 016470 311 RET ; ELSE OUT
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 190
SUBRTN.M80 ENVELOPE COLLECTOR
7204
7205 ; HERE WHEN AN ENVELOPE IS COMPLETE... WE MUST COMPUTE THE CHECKSUM AND
7206 ; COMPARE AGAINST THE CHECK CHARACTER SENT OVER, THEN ACTUALLY EXECUTE
7207 ; THE CONTENTS OF THE ENVELOPE.
7208
7209 016471 072 301 040 EXECUT: LDA E.CNT ; GET CHAR COUNT SO WE CAN TELL WHEN WE FINISH
7210 016474 117 MOV C,A ; PUT IT IN "C"
7211
7212 016475 041 252 041 LXI H,E.BEG+1 ; POINT TO THE CHECKSUM IN THE ENVELOPE BUFFER
7213 016500 176 MOV A,M ; GET CHECKSUM CHARACTER INTO THE ACCUM
7214 016501 043 INX H ; UPDATE PAST THE CHECKSUM JUST COLLECTED
7215 016502 015 DCR C ; AND DOWN THE CHAR COUNT FOR THE THINGS
7216 016503 015 DCR C ; WE JUST PICKED OUT OF THE LIST
7217 016504 015 DCR C ; WE WANT LOOP TO END AT -1, INSTEAD OF 0
7218
7219 016505 206 ENV.LP: ADD M ; ADD CHARACTERS TO CHECKSUM
7220 016506 043 INX H ; NEXT CHARACTER
7221 016507 015 DCR C ; BUT FIRST SEE IF DONE YET
7222 016510 362 105 035 JP ENV.LP ; BACK IF NOT
7223
7224 ; WHEN DONE,CHECK THAT CHECKSUM HAS WORKED OUT TO BE ZERO
7225
7226 016513 346 077 ANI ^O77 ; ONLY SIX BITS COUNT
7227 016515 302 207 035 JNZ NACK.EN ; IF # 0, THEN CHECKSUM FAILED AND "NACK"
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 191
SUBRTN.M80 ENVELOPE COLLECTOR
7229
7230 ; FALL THRU TO HERE IF OK SO FAR
7231
7232 016520 066 377 MVI M,EOLCH ; MARK THE END OF THE ENVELOPE WITH EOL MARKER
7233
7234 ; NOW MUST CHECK THE MESSAGE NUMBER FOR OK-NESS
7235
7236 016522 041 361 040 LXI H,LSTMSG ; GET POINTER TO MESSAGE NUMBER
7237 016525 116 MOV C,M ; SAVE IT IN "C" FOR A LITTLE WHILE
7238 016526 072 251 041 LDA E.BEG ; GRAB CURRENT MESSAGE NUMBER
7239
7240 016531 271 CMP C ; ARE THEY THE SAME?
7241 016532 312 171 035 JZ ACK.EN ; IF YES, DO SIMPLE ACK AND IGNORE MESSAGE
7242
7243 ; IF DIFF, TWAS A GOOD MESSAGE, SAVE NUMBER AND EXECUTE
7244
7245 016535 167 MOV M,A ; SAVE MESSAGE NUMBER AS THE LAST
7246
7247 016536 315 340 034 CALL MV.ALL ; AND MOVE THE STUFF TO A BUFFER FOR EXECUTION
7248 016541 076 041 MVI A,^O41 ; EVERY CMD ENVELOPE EXECUTED RESETS THE ENV #
7249 016543 062 011 042 STA ENVMNO ; SO RESET THE ENVELOPE MESSAGE NUMBER TO 41
7250 016546 315 037 034 CALL SETM4 ; MODE 4 TO GRAB INTERRUPTS CORRECTLY WHILE RUNNING
7251 016551 315 325 034 CALL DECEX1 ; BEFORE EXECUTING, CLEAR ALL OLD MESSAGES
7252 016554 041 165 035 LXI H,OKDN ; TELL NORMAL ENDS TO RETURN HERE FOR FURTHER ORDERS
7253 016557 042 350 040 SHLD NOREND ; PASS INFO IN THE DEDICATED RAM POSITION
7254 016562 303 145 002 JMP DCODE ; AND BEGIN EXECUTION OF THE STRING READ IN
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 192
SUBRTN.M80 ENVELOPE COLLECTOR
7256
7257 016565 373 OKDN: EI ; MUST ALLOW INTERRUPTS HERE
7258 016566 315 174 034 CALL DECNET ; IF YES, MAIL ENVELOPE BEFORE ACK'ING
7259
7260 ; NOW OK TO ACKNOWLEDGE THE COMMAND
7261
7262 016571 315 037 034 ACK.EN: CALL SETM4 ; SEND "ACK" DOWN THE KLINIK LINE
7263
7264 016574 ACK: KLINE M.ACK
(1) 016574 315 072 004 CALL KLINE ; PRINT LINE OF CHARS
(1) 016577 202 035 .ADDR M.ACK ; BUFF TO PRINT
7265 016601 311 RET ; DONE WITH THIS
7266 016602 001 M.ACK: .BYTE SYNC ; SYNC
7267 016603 001 .BYTE SYNC ; SYNC
7268 016604 101 .BYTE 'A ; ACKNOWLEDGE CHAR
7269 016605 033 .BYTE ALT ; ALTMODE
7270 016606 000 .BYTE 0 ; END OF STRING
7271 016607 315 037 034 NACK.EN: CALL SETM4 ; SEND "NACK" DOWN THE KLINIK LINE
7272 016612 NACK: KLINE M.NACK
(1) 016612 315 072 004 CALL KLINE ; PRINT LINE OF CHARS
(1) 016615 220 035 .ADDR M.NACK ; BUFF TO PRINT
7273 016617 311 RET ; BACK TO CALLER
7274
7275 016620 001 M.NACK: .BYTE SYNC ; SYNC
7276 016621 001 .BYTE SYNC ; SYNC
7277 016622 116 .BYTE 'N ; NEGATIVE ACKNOWLEDGE CHAR
7278 016623 033 .BYTE ALT ; ALTMODE
7279 016624 000 .BYTE 0 ; END OF STRING
7280
7281 016625 052 247 041 ACTION: LHLD E.BUF ; GET THE TYPE OF CONTROL THIS WAS(ACK OR NACK)
7282 016630 176 MOV A,M ; PUT IT INTO ACCUM
7283 016631 062 261 040 STA APTANS ; SET IT INTO THE ANSWER WORD
7284 016634 303 037 034 JMP SETM4 ; AND NOW RESET INTERRUPT HANDLER AND OUT
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 193
SUBRTN.M80 ENVELOPE COLLECTOR
7286
7287 ; THIS IS THE CODE DO DO STRAIGHT OUTPUT FROM THE KLINIK LINE TO THE CTY
7288 ; AND INCLUDE A SCHEME FOR BUFFERING THE OUTPUT SO THAT A 9600 BAUD
7289 ; KLINIK LINE WILL OUTPUT OK TO A 300 BAUD CTY. IF INTERRUPTED WHILE
7290 ; PRINTING A CHARACTER, THE CHARACTERS WAITING TO BE PRINTED ARE STACKED
7291 ; AT THE "SYSOUT" POINTER. CHARACTERS THAT ARE REMOVED FROM THE WAITING
7292 ; BUFFER ARE REMOVED VIA THE POINTER "SYSIN".
7293
7294 016637 247 MMOUT: ANA A ; SEE IF THIS IS A NULL CHARACTER
7295 016640 310 RZ ; IF YES, DON'T DO NOTHIN
7296 016641 052 123 042 LHLD SYSOUT ; SEE IF WE ARE BUSY PRINTING
7297 016644 174 MOV A,H ; GET AN INDICATOR
7298 016645 247 ANA A ; SET PC FLAGS
7299 016646 312 307 035 JZ NOTBUSY ; GO IF NOT BUSY
7300
7301 ; FELL TO HERE IF BUSY PRINTING
7302
7303 016651 353 XCHG ; SAVE THE CURRENT "SYSOUT" VALUE (IN D,E)
7304 016652 052 121 042 LHLD SYSIN ; NOW SEE IF THIS IS FIRST TIME IN
7305 016655 174 MOV A,H ; GET THE INDICATOR
7306 016656 247 ANA A ; SET FLAGS
7307 016657 302 270 035 JNZ STCK.Y ; JUMP IF ALREADY STACKING
7308
7309 016662 041 125 042 LXI H,SYSBUF ; FIRST TIME IN, SO SET INPUT FLAG
7310 016665 042 121 042 SHLD SYSIN ; SET IT
7311
7312 016670 041 053 335 STCK.Y: LXI H,-SYSEND ; NOW SEE IF BUFFER IS FULL
7313 016673 031 DAD D ; ADD END TO THE CURRENT TO SEE IF BUFF FULL
7314 016674 174 MOV A,H ; SEE IF ZERO
7315 016675 265 ORA L ; SEE IF ZERO
7316 016676 310 RZ ; IF .EQ. 0 THROW AWAY STUFF..BUFF IS FULL
7317
7318 ; HERE IF NOT FULL. MUST STACK THIS CHARACTER
7319
7320 016677 353 XCHG ; CURRENT PNTR GOES BACK TO HL REG (PNT TO SYSOUT)
7321 016700 160 MOV M,B ; CHAR INTO RAM SPACE
7322 016701 043 INX H ; UP COUNT
7323 016702 066 000 MVI M,0 ; GUARANTEE A ZERO BYTE AT THE END OF BUFFER
7324 016704 303 373 035 JMP SETOUT ; PUT THE POINTER BACK WHERE IT GOES
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 194
SUBRTN.M80 ENVELOPE COLLECTOR
7326
7327 ; HERE IF NOT PRINTING YET.. PRINT FIRST CHARACTER AND PLAN ON SOME MORE
7328
7329 016707 041 125 042 NOTBUSY: LXI H,SYSBUF ; THIS IS THE FIRST TIME IN
7330 016712 042 123 042 SHLD SYSOUT ; SET THE FLAG & THE POINTER
7331
7332 016715 170 MOV A,B ; GET CHAR BACK TO ACCUM SO CAN PRINT IT
7333 016716 107 MORE.: MOV B,A ; WHERE EVER U COME FROM, SAVE ACCUM IN B REG
7334 016717 376 012 CPI LFCHR ; IS THIS A LINE FEED?
7335 016721 302 333 035 JNZ MM.PNT ; IF NO, NOTHING SPECIAL
7336
7337 016724 072 260 040 LDA CNTLQ.ON ; MUST WE ANSWER EVERY <LF> WITH A "CNTROL-Q"
7338 016727 247 ANA A ; IF FLAG .EQ., THEN NO, IF YES THEN WRITE IT
7339 016730 304 056 004 CNZ KCHR0 ; YES, A <LF>, SEND THE SYSTEM A "CONTROL-Q"
7340 016733 170 MM.PNT: MOV A,B ; NO MATTER HOW U GOT HERE, CHAR GOES TO ACCUM
7341 016734 373 EI ; INTERRUPTS ON NOW, BEGIN PRINTING
7342 016735 315 011 004 CALL PCHR1Z ; PRINT A CHAR
7343
7344 ; BACK TO HERE WHEN DONE PRINTING
7345
7346 016740 363 DI ; DON'T BOTHER ME FOR A BIT
7347 016741 052 121 042 LHLD SYSIN ; GRAB POINTER OF THINGS WAITING TO BE PRINTED
7348 016744 174 MOV A,H ; GET FLAG
7349 016745 247 ANA A ; SET FLAGS
7350 016746 312 365 035 JZ DONE.BUF ; IF NOTHIN, ALL DONE
7351
7352 ; HERE WHEN SOMETHING TO DO
7353
7354 016751 176 MOV A,M ; GRAB A CHARACTER TO PRINT
7355 016752 247 ANA A ; MUST FIRST CHECK FOR END OF BUFFER
7356 016753 312 365 035 JZ DONE.BUF ; IF DONE RESET THE POINTERS AND GET OUT
7357
7358 016756 043 INX H ; NEXT POINT
7359 016757 042 121 042 SHLD SYSIN ; SET INTO RAM
7360 016762 303 316 035 JMP MORE. ; DO MORE
7361
7362 ; HERE ON DONE ALL..FALL INTO Z-BUFF CODE
7363
7364 016765 DONE.BUF:
7365 016765 041 000 000 Z.TBUF: LXI H,0 ; WE NEED TO CLEAR SOME BUFFERS
7366 016770 042 121 042 SHLD SYSIN ; CLEAR POINTER
7367 016773 042 123 042 SETOUT: SHLD SYSOUT ; AND CLEAR POINTER
7368 016776 311 RET
7369
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 195
SUBRTN.M80 **** MORE ERROR ESCAPES ****
7371 .SBTTL **** MORE ERROR ESCAPES ****
7372
7373 016777 NOACK: PLINE NOA ; "PRINT NO DATA ACK"
(1) 016777 337 RST 3 ; PRINT LINE OF CHARS
(1) 017000 207 037 .ADDR NOA ; BUFF TO PRINT
7374
7375 017002 041 001 000 LXI H,1 ; ERR CODE IS 1
7376 017005 042 154 040 ERRRTN: SHLD ERRCD ; SET ERROR CODE
7377 017010 ENDCMD
(1) 017010 311 RET ; RETURN TO CALLER
7378
7379 017011 257 NOARB: XRA A ; CLR ACCUM
7380 017012 323 210 OUT BUSCTL ; ***** I/O WRT 210/0 *****
7381 017014 PLINE NBR ; "?NO BUS RESP"
(1) 017014 337 RST 3 ; PRINT LINE OF CHARS
(1) 017015 223 037 .ADDR NBR ; BUFF TO PRINT
7382
7383 017017 041 002 000 LXI H,2 ; ERR CODE IS 2
7384 017022 303 005 036 JMP ERRRTN ; GO SET ERROR CODE
7385
7386 017025 257 NIXOM: XRA A ; CLR ACCUM
7387 017026 323 210 OUT BUSCTL ; *** I/O WRT 210/0 *** CLR NXM BIT AFTR REPORT
7388 017030 PLINE NXMMSG ; "PRINT ?NXM"
(1) 017030 337 RST 3 ; PRINT LINE OF CHARS
(1) 017031 215 037 .ADDR NXMMSG ; BUFF TO PRINT
7389 017033 041 003 000 NIXEX: LXI H,3 ; ERROR CODE 3
7390 017036 303 005 036 JMP ERRRTN ; SET ERROR CODE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 196
SUBRTN.M80 **** MORE ERROR ESCAPES ****
7392
7393 ;>>;WDR.M80
7394 .SBTTL ****DISK TRANSFER CHANNEL COMMAND LIST****
7395
7396 017041 DSKSEQ:
7397
7398 ; A MINOR NOTE: 40000 WEIGHT BIT IS "VALID"
7399 ; 100000 WEIGHT BIT IS "36-BIT XFR"
7400
7401 017041 UBA. 763,001 ; ADDRESS OF UBA IS FIRST ELEMENT OF THE LIST
(1) 017041 001 .BYTE 001 & 377
(1) 017042 346 .BYTE Q.1
(1) 017043 073 .BYTE Q.2
7402 017044 DI. 140,001 ; VALID & "36 BIT XFR" FOR PAGE 1 (1000-1777)
(1) 017044 001 .BYTE 001 & 377
(1) 017045 300 .BYTE Q.1
(1) 017046 000 .BYTE Q.2
7403 017047 LI. D776,P.10 ; GET DRIVE STATUS & CNTRL REG, SO CAN SET UNIT
(1) 017047 374 .BYTE Q.1
(1) 017050 010 .BYTE P.10 & 377
(1) 017051 013 .BYTE Q.2
7404 017052 DI.INDIRECT UNITNM ; NOW SET THE UNIT NUMBER
(1) 017052 132 040 .ADDR UNITNM
(1) 017054 200 .BYTE ^O200
7405 017055 EI. D776,P.12 ; ADDRESS OF DRIVE STATUS
(1) 017055 374 .BYTE Q.1
(1) 017056 012 .BYTE P.12 & 377
(1) 017057 023 .BYTE Q.2
7406 017060 TWAIT 400 ; CHECK THAT THE DRIVE IS PRESENT
(1) 017060 000 001 .ADDR 400
(1) 017062 060 .BYTE <14*4>
7407 017063 WAIT 200 ; CHECK & WAIT FOR READY
(1) 017063 200 000 .ADDR 200
(1) 017065 030 .BYTE <6*4>
7408 017066 LI. D776,P.10 ; ADDR OF DRIVE STATUS REG
(1) 017066 374 .BYTE Q.1
(1) 017067 010 .BYTE P.10 & 377
(1) 017070 013 .BYTE Q.2
7409 017071 DI. 0,40 ; ISSUE CONTROLLER CLR
(1) 017071 040 .BYTE 40 & 377
(1) 017072 000 .BYTE Q.1
(1) 017073 000 .BYTE Q.2
7410 017074 DI.INDIRECT UNITNM ; SET TO UNIT #
(1) 017074 132 040 .ADDR UNITNM
(1) 017076 200 .BYTE ^O200
7411 017077 LI. D776,P.00 ; ADDR OF CONTROLLER STATUS REG
(1) 017077 374 .BYTE Q.1
(1) 017100 000 .BYTE P.00 & 377
(1) 017101 013 .BYTE Q.2
7412 017102 DI. 0,11 ; ISSUE DRIVE CLEAR
(1) 017102 011 .BYTE 11 & 377
(1) 017103 000 .BYTE Q.1
(1) 017104 000 .BYTE Q.2
7413 017105 DI. 0,21 ; SET "READ-IN-PRESET"
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 196-1
DR.M80 ****DISK TRANSFER CHANNEL COMMAND LIST****
(1) 017105 021 .BYTE 21 & 377
(1) 017106 000 .BYTE Q.1
(1) 017107 000 .BYTE Q.2
7414 017110 LI. D776,P.12 ; GET TO THE DRIVE STATUS REGISTER
(1) 017110 374 .BYTE Q.1
(1) 017111 012 .BYTE P.12 & 377
(1) 017112 013 .BYTE Q.2
7415 017113 WAIT 200 ; WAIT FOR IT TO BE READY
(1) 017113 200 000 .ADDR 200
(1) 017115 030 .BYTE <6*4>
7416 017116 TWAIT 100 ; NOW CHECK THAT "PRE-SET" HAS SET VOLUME VALID
(1) 017116 100 000 .ADDR 100
(1) 017120 060 .BYTE <14*4>
7417 017121 LI. D776,P.06 ; ADDR TRACK/SECTOR REG
(1) 017121 374 .BYTE Q.1
(1) 017122 006 .BYTE P.06 & 377
(1) 017123 013 .BYTE Q.2
7418 017124 DI.INDIRECT BLKNUM ; EMPTY FOR NOW
(1) 017124 105 040 .ADDR BLKNUM
(1) 017126 200 .BYTE ^O200
7419 017127 LI. D776,P.34 ; ADDR OF CYLINDER REG
(1) 017127 374 .BYTE Q.1
(1) 017130 034 .BYTE P.34 & 377
(1) 017131 013 .BYTE Q.2
7420 017132 DI.INDIRECT BLKADR ; EMPTY FOR NOW
(1) 017132 112 040 .ADDR BLKADR
(1) 017134 200 .BYTE ^O200
7421 017135 QXFR: LI. D776,P.02 ; ADD OF WORD COUNT REG
(1) 017135 374 .BYTE Q.1
(1) 017136 002 .BYTE P.02 & 377
(1) 017137 013 .BYTE Q.2
7422 017140 DI. 176,000 ; 512 WORDS IS 1024 18-BIT BYTES (A PAGE)
(1) 017140 000 .BYTE 000 & 377
(1) 017141 374 .BYTE Q.1
(1) 017142 000 .BYTE Q.2
7423 017143 LI. D776,P.04 ; ADDR OF UNIBUS ADDRESS REG
(1) 017143 374 .BYTE Q.1
(1) 017144 004 .BYTE P.04 & 377
(1) 017145 013 .BYTE Q.2
7424 017146 DI. 4,000 ; SET SM10 MEM ADDR TO 1000
(1) 017146 000 .BYTE 000 & 377
(1) 017147 010 .BYTE Q.1
(1) 017150 000 .BYTE Q.2
7425 017151 LI. D776,P.00 ; BACK TO STATUS REG
(1) 017151 374 .BYTE Q.1
(1) 017152 000 .BYTE P.00 & 377
(1) 017153 013 .BYTE Q.2
7426 017154 DI. 0,71 ; ISSUE READ
(1) 017154 071 .BYTE 71 & 377
(1) 017155 000 .BYTE Q.1
(1) 017156 000 .BYTE Q.2
7427 017157 EI. D776,P.00 ; NOW READ TO CHECK FOR ERRORS IN XFER
(1) 017157 374 .BYTE Q.1
(1) 017160 000 .BYTE P.00 & 377
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 196-2
DR.M80 ****DISK TRANSFER CHANNEL COMMAND LIST****
(1) 017161 023 .BYTE Q.2
7428 017162 WAIT 200 ; CHECK FOR READY BIT TRUE..
(1) 017162 200 000 .ADDR 200
(1) 017164 030 .BYTE <6*4>
7429 017165 EI. D776,P.12 ; CHECK DRIVE STATUS REG ITSELF
(1) 017165 374 .BYTE Q.1
(1) 017166 012 .BYTE P.12 & 377
(1) 017167 023 .BYTE Q.2
7430 017170 ERRTST 40000 ; TEST "ERR" BIT
(1) 017170 000 100 .ADDR 40000
(1) 017172 040 .BYTE <10*4>
7431
7432 ; IF IT WAS OK, THEN CHECK THE CONTROLLER FOR ERRORS
7433
7434 017173 EI. D776,P.00 ; EXAMINE CONTROLLER
(1) 017173 374 .BYTE Q.1
(1) 017174 000 .BYTE P.00 & 377
(1) 017175 023 .BYTE Q.2
7435 017176 ERRTST 060000 ; DRIVE RDY, NOW SEE IF ENCOUNTERED ERRORS
(1) 017176 000 140 .ADDR 060000
(1) 017200 040 .BYTE <10*4>
7436 017201 ENDLST ; END OF CHANNEL COMMAND LIST
(1) 017201 000 .BYTE 0
(1) 017202 000 .BYTE 0
(1) 017203 050 .BYTE <12*4>
7437
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 197
DR.M80 TAPE TRANSFER CHANNEL COMMAND LIST
7439 .SBTTL TAPE TRANSFER CHANNEL COMMAND LIST
7440
7441 ; DRIVE CONTROLLER REGISTER IS 776440..FOLLOWING COMMANDS APPLY
7442 ; 7=REWIND
7443 ; 11=DRIVE CLEAR
7444 ; 25=ERASE
7445 ; 27=WRITE TAPE MARK
7446 ; 31=SPACE FORWARD(SKIP A FILE)
7447 ; 33=SPACE REVERSE(SKIP A FILE, MOVING TAPE IN REVERSE)
7448 ; 51=WRITE CHECK FORWARD
7449 ; 57=WRITE CHECK REVERSE
7450 ; 61=WRITE FORWARD
7451 ; 71=READ FORWARD(GO!)
7452 ; 77=READ REVERSE(GO!)
7453
7454 017204 MTASEQ: UBA. 763,001 ; ADDRESS OF UBA PAGING RAM
(1) 017204 001 .BYTE 001 & 377
(1) 017205 346 .BYTE Q.1
(1) 017206 073 .BYTE Q.2
7455 017207 DI. 40,001 ; SET VALID IN PAGE 1
(1) 017207 001 .BYTE 001 & 377
(1) 017210 100 .BYTE Q.1
(1) 017211 000 .BYTE Q.2
7456 017212 LI. D772,P.10 ; SET ADDRESS OF DRIVE CONTROL REGISTER
(1) 017212 364 .BYTE Q.1
(1) 017213 010 .BYTE P.10 & 377
(1) 017214 013 .BYTE Q.2
7457 017215 DI. 0,40 ; ISSUE CONTROLLER AND SLAVE CLR
(1) 017215 040 .BYTE 40 & 377
(1) 017216 000 .BYTE Q.1
(1) 017217 000 .BYTE Q.2
7458 017220 DI.INDIRECT TAPEUNIT ; SET TAPE UNIT #
(1) 017220 137 040 .ADDR TAPEUNIT
(1) 017222 200 .BYTE ^O200
7459 017223 LI. D772,P.32 ; SLAVE SELECT/FORMAT/DENSITY REG
(1) 017223 364 .BYTE Q.1
(1) 017224 032 .BYTE P.32 & 377
(1) 017225 013 .BYTE Q.2
7460 017226 DI.INDIRECT DEN.SLV ; SET SLAVE,FORMAT,DENS(TEMP:DENS=1600,F=0,S=0)
(1) 017226 362 040 .ADDR DEN.SLV
(1) 017230 200 .BYTE ^O200
7461 017231 EI. D772,P.12 ; READ THE DRIVE STATUS, TO MAKE SURE IT EXISTS
(1) 017231 364 .BYTE Q.1
(1) 017232 012 .BYTE P.12 & 377
(1) 017233 023 .BYTE Q.2
7462 017234 TWAIT 400 ; CHECK THE "DRIVE PRESENT" BIT
(1) 017234 000 001 .ADDR 400
(1) 017236 060 .BYTE <14*4>
7463 017237 WAIT 200 ; IF WAS PRESENT, WAIT FOR IT TO BE READY
(1) 017237 200 000 .ADDR 200
(1) 017241 030 .BYTE <6*4>
7464 017242 LI. D772,P.06 ; FRAME COUNT REGISTER
(1) 017242 364 .BYTE Q.1
(1) 017243 006 .BYTE P.06 & 377
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 197-1
DR.M80 TAPE TRANSFER CHANNEL COMMAND LIST
(1) 017244 013 .BYTE Q.2
7465 017245 DI. 0,0 ; FRAME COUNT TO 0 IS MAX NUMB OF FRAMES
(1) 017245 000 .BYTE 0 & 377
(1) 017246 000 .BYTE Q.1
(1) 017247 000 .BYTE Q.2
7466 017250 LI. D772,P.00 ; SET ADDRESS TO RH11 CONTROL REGISTER
(1) 017250 364 .BYTE Q.1
(1) 017251 000 .BYTE P.00 & 377
(1) 017252 013 .BYTE Q.2
7467 017253 DI. 0,7 ; ISSUE "REWIND" TO TAPE
(1) 017253 007 .BYTE 7 & 377
(1) 017254 000 .BYTE Q.1
(1) 017255 000 .BYTE Q.2
7468 017256 EI. D772,P.12 ; READ THE DRIVE STATUS TO CHECK FOR READY
(1) 017256 364 .BYTE Q.1
(1) 017257 012 .BYTE P.12 & 377
(1) 017260 023 .BYTE Q.2
7469 017261 WAIT 200 ; WAIT FOR REWIND TO COMPLETE
(1) 017261 200 000 .ADDR 200
(1) 017263 030 .BYTE <6*4>
7470 017264 QTXFR: LI. D772,P.04 ; CONTROLLER TO MEMORY DESTINATION REG
(1) 017264 364 .BYTE Q.1
(1) 017265 004 .BYTE P.04 & 377
(1) 017266 013 .BYTE Q.2
7471 017267 DI. 4,000 ; SET KS10 START ADDRESS TO 1000
(1) 017267 000 .BYTE 000 & 377
(1) 017270 010 .BYTE Q.1
(1) 017271 000 .BYTE Q.2
7472 017272 LI. D772,P.02 ; SET ADDRESS TO WORD COUNT REGISTER
(1) 017272 364 .BYTE Q.1
(1) 017273 002 .BYTE P.02 & 377
(1) 017274 013 .BYTE Q.2
7473 017275 DI. 176,000 ; 1 PAGE OF 512 WORDS IS 1024 18-BIT BYTES
(1) 017275 000 .BYTE 000 & 377
(1) 017276 374 .BYTE Q.1
(1) 017277 000 .BYTE Q.2
7474 017300 LI. D772,P.06 ; FRAME COUNT REGISTER
(1) 017300 364 .BYTE Q.1
(1) 017301 006 .BYTE P.06 & 377
(1) 017302 013 .BYTE Q.2
7475 017303 DI. 0,0 ; FRAME COUNT TO 0 IS MAX NUMBER OF FRAMES
(1) 017303 000 .BYTE 0 & 377
(1) 017304 000 .BYTE Q.1
(1) 017305 000 .BYTE Q.2
7476 017306 LI. D772,P.00 ; SET ADDRESS TO RH11 CONTROL REGISTER
(1) 017306 364 .BYTE Q.1
(1) 017307 000 .BYTE P.00 & 377
(1) 017310 013 .BYTE Q.2
7477 017311 DI.INDIRECT SKP.GO ; ISSUE "XFER CMD" (31=SKIP .OR. 71=RD-IN)
(1) 017311 144 040 .ADDR SKP.GO
(1) 017313 200 .BYTE ^O200
7478 017314 EI. D772,P.12 ; READ THE DRIVE STATUS TO CHECK FOR READY
(1) 017314 364 .BYTE Q.1
(1) 017315 012 .BYTE P.12 & 377
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 197-2
DR.M80 TAPE TRANSFER CHANNEL COMMAND LIST
(1) 017316 023 .BYTE Q.2
7479 017317 WAIT 200 ; WAIT FOR FILE READ TO COMPLETE
(1) 017317 200 000 .ADDR 200
(1) 017321 030 .BYTE <6*4>
7480 017322 EI. D772,P.14 ; LOOK AT THE DRIVE ERROR REGISTER
(1) 017322 364 .BYTE Q.1
(1) 017323 014 .BYTE P.14 & 377
(1) 017324 023 .BYTE Q.2
7481 017325 RETRY.: ERRTST 070300 ; ERRORS WORTH RETRYING??
(1) 017325 300 160 .ADDR 070300
(1) 017327 040 .BYTE <10*4>
7482 017330 FRMERR: ERRTST 103400 ; SEE IF THIS WAS A CORRECTABLE TYPE ERROR
(1) 017330 000 207 .ADDR 103400
(1) 017332 040 .BYTE <10*4>
7483 017333 EI. D772,P.12 ; READ THE DRIVE STATUS TO CHECK FOR ERRORS
(1) 017333 364 .BYTE Q.1
(1) 017334 012 .BYTE P.12 & 377
(1) 017335 023 .BYTE Q.2
7484 017336 ERRTST 40000 ; GET ANY DRIVE ERRORS?
(1) 017336 000 100 .ADDR 40000
(1) 017340 040 .BYTE <10*4>
7485 017341 LI. D772,P.00 ; NOW ADDRESS TO CONTROLLER STATUS
(1) 017341 364 .BYTE Q.1
(1) 017342 000 .BYTE P.00 & 377
(1) 017343 013 .BYTE Q.2
7486 017344 ERRTST 60000 ; CHECK FOR ERRORS THERE.
(1) 017344 000 140 .ADDR 60000
(1) 017346 040 .BYTE <10*4>
7487 017347 ENDLST ; END OF CHANNEL COMMAND LIST
(1) 017347 000 .BYTE 0
(1) 017350 000 .BYTE 0
(1) 017351 050 .BYTE <12*4>
7488
7489 ; QUICK LITTLE ROUTINE TO RESET THE MAGTAPE AFTER IT SUFFERS AN
7490 ; IGNORABLE ERROR.
7491
7492 017352 MTARST: LI. D772,P.10 ; SET ADDRESS OF DRIVE CONTROL REGISTER
(1) 017352 364 .BYTE Q.1
(1) 017353 010 .BYTE P.10 & 377
(1) 017354 013 .BYTE Q.2
7493 017355 DI. 0,40 ; ISSUE CONTROLLER AND SLAVE CLR
(1) 017355 040 .BYTE 40 & 377
(1) 017356 000 .BYTE Q.1
(1) 017357 000 .BYTE Q.2
7494 017360 DI.INDIRECT TAPEUNIT ; FIX UNIT NUMBER
(1) 017360 137 040 .ADDR TAPEUNIT
(1) 017362 200 .BYTE ^O200
7495 017363 LI. D772,P.04 ; CONTROLLER TO MEMORY DESTINATION REG
(1) 017363 364 .BYTE Q.1
(1) 017364 004 .BYTE P.04 & 377
(1) 017365 013 .BYTE Q.2
7496 017366 DI. 4,000 ; SET KS10 START ADDRESS TO 1000
(1) 017366 000 .BYTE 000 & 377
(1) 017367 010 .BYTE Q.1
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 197-3
DR.M80 TAPE TRANSFER CHANNEL COMMAND LIST
(1) 017370 000 .BYTE Q.2
7497 017371 LI. D772,P.06 ; FRAME COUNT REGISTER
(1) 017371 364 .BYTE Q.1
(1) 017372 006 .BYTE P.06 & 377
(1) 017373 013 .BYTE Q.2
7498 017374 DI. 0,0 ; FRAME COUNT TO 0 IS MAX NUMB OF FRAMES
(1) 017374 000 .BYTE 0 & 377
(1) 017375 000 .BYTE Q.1
(1) 017376 000 .BYTE Q.2
7499 017377 ENDLST ; QUICK OUT
(1) 017377 000 .BYTE 0
(1) 017400 000 .BYTE 0
(1) 017401 050 .BYTE <12*4>
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 198
DR.M80 TAPE TRANSFER CHANNEL COMMAND LIST
7501
7502 ;>>;WMSG.M80
7503
7504 017402 077 102 125 .IIF NDF,NOROOM INIER: .ASCIZ /?BUS\/ ; BUS POLLUTED ON POWER UP
7505 017410 077 102 106 BV: .ASCIZ /?BFO/ ; INPUT BUFFER OVERFLOW
7506 017415 077 111 114 CMDNG: .ASCII /?IL/ ; ILLEGAL INSTRUCTION
7507 017420 015 012 000 .BYTE ^O15,^O12,0 ; CR-LF
7508 017423 077 125 111 TTM: .ASCIZ /?UI\/ ; UNKNOWN INTERRRUPT
7509 017430 102 125 123 EBHED: .ASCIZ /BUS 0-35\/ ; MESSAGE HEADER FOR "EB" CMD
7510 017442 113 123 061 KSPRMT: .ASCII /KS10>/ ; PROMPT MESSAGE
7511 017447 377 000 .BYTE ^O377,0
7512 017451 040 103 131 MSG10: .ASCIZ % CYC\SENT/% ; CYCLE TYPE FOR "DB" COMMAND
7513 017464 134 122 103 DRCVD: .ASCIZ %\RCVD/% ; DATA RECEIVED ON BUS (DB CMD)
7514 017473 077 101 057 ECVER: .ASCIZ %?A/B\% ; A & B COPIES OF CRAM BITS DID NOT MATCH
7515 017501 120 103 057 PCMSG: .ASCIZ %PC/% ; OBVIOUS
7516 017505 045 110 114 HLTMS: .ASCIZ .%HLTD/. ; MESSAGE "HALTED/XXXXXX" WHERE XXXXXX IS DATA
7517 017514 077 104 116 EXMS: .ASCIZ /?DNF\/ ; "DID NOT FINISH"-INSTR
7518 017522 077 102 124 BTFAIL: .ASCIZ /?BT / ; DEVICE ERROR OR TIMEOUT DURING BOOT OPERATION
7519 017527 102 124 040 BTMSG1: .ASCIZ /BT SW/ ; MESSAGE SAYS BOOTING, USING BOOT SW
7520 017535 077 104 116 SMERR: .ASCIZ /?DNC\/ ; "DID NOT COMPLETE"-THE HALT
7521 017543 117 106 106 OFFMSG: .ASCIZ /OFF\/ ; MESSAGE SAYS SIGNAL IS "OFF"
7522 017550 077 120 101 PARMSG: .ASCIZ /?PAR ERR / ; REPORT CLOCK FREEZE DUE TO PAR ERR
7523 017562 077 115 122 MOSMSG: .ASCIZ /?MRE\/ ; MEMORY REFRESH ERROR
7524 017570 077 102 103 ERRMSG: .ASCIZ /?BC / ; TA-DA....BOOT CHECK
7525 017575 077 122 125 RN.: .ASCIZ /?RUNNING\/ ; TRYING TO DO A CMD THAT MAY SCREW UP
7526 017607 077 116 104 NOA: .ASCIZ /?NDA\/ ; RECEIVED NO DATA ACKNOWLEDGE ON MEM REQUEST
7527 017615 077 116 130 NXMMSG: .ASCIZ /?NXM\/ ; REFERRENCED NON EXISTANT MEMORY LOCATION
7528 017623 077 116 102 NBR: .ASCIZ /?NBR\/ ; CONSOLE WAS NOT GRANTED BUS ON A REQUEST
7529 017631 077 122 101 RAG: .ASCIZ /?RA/ ; CMD REQUIRES ARGUEMENT.. MUST TYPE SOMETHING
7530 017635 077 102 116 BB1: .ASCIZ /?BN/ ; TYPED A BAD NUMBER(I.E 9 OR X OR # ETC.)
7531 017641 076 076 125 Q.UBA: .ASCIZ />>UBA?/ ; QUERY FOR UNIBUS ADAPTER
7532 017650 076 076 122 Q.RH: .ASCIZ />>RHBASE?/ ; QUERY FOR RH11 TO USE
7533 017662 076 076 125 Q.UNIT: .ASCIZ />>UNIT?/ ; QUERY FOR UNIT TO USE
7534 017672 076 076 124 Q.TCU: .ASCIZ />>TCU?/ ; QUERY FOR TAPE CONTROL UNIT
7535 017701 076 076 104 Q.DEN: .ASCIZ />>DEN?/ ; QUERY FOR TAPE DENSITY
7536 017710 076 076 123 Q.SLV: .ASCIZ />>SLV?/ ; QUERY FOR TAPE SLAVE
7537 017717 077 113 101 KAMSG: .ASCIZ /?KA\/ ; KEEP ALIVE FAILED
7538 017724 077 106 122 FRCMSG: .ASCIZ /?FRC\/ ; HAD A FORCED RELOAD
7539 017732 077 120 127 PWLEN: .ASCIZ /?PWL/ ; PASSWORD LENGTH ERROR
7540 017737 077 116 101 NOACCS: .ASCII /?NA/ ; NOT AVAILABLE (KLINIK LINE THAT IS)
7541 017742 015 012 000 .BYTE ^O15,^O12,0 ; CR-LF
7542 017745 120 127 072 QPW: .ASCII /PW:/ ; ASK FOR A PASSWORD MESSAGE
7543 017750 015 012 000 .BYTE ^O15,^O12,0
7544 017753 117 113 POKMSG: .ASCII /OK/ ; OK THE PW IS VALID
7545 017755 015 012 000 .BYTE ^O15,^O12,0
7546 017760 102 124 040 AUTOMS: .ASCIZ /BT AUTO/ ; BEGINNING AUTO BOOT SEQUENCE
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 199
MSG.M80 TAPE TRANSFER CHANNEL COMMAND LIST
7548
7549 ;>>;WSTORE.M80
7550 .SBTTL *SM10 DATA STORAGE PARAMETERS*
7551
7552 ; NOTE THAT ALL THESE LOCATIONS ARE RAM LOCATIONS AND MAY BE USED
7553 ; WITH THE ASSEMBLY OF SEPARATE MODULES OF CONSOLE CODE....
7554
7555 020000 .= RAMST
7556 020000 000002 ZEROB: .BLKB 2 ; (5.2) ZERO BYTE TO END PRIOR ASCIZ MSG
7557 020002 000002 C80AD: .BLKB 2
7558 020004 000002 CRMAD: .BLKB 2
7559 020006 000002 BYTCNT: .BLKB 2
7560 020010 000002 CRMFN: .BLKB 2
7561 020012 000005 EMBUF: .BLKB 5
7562 020017 000005 MEMAD: .BLKB 5
7563 020024 000005 IOAD: .BLKB 5
7564 020031 000002 ENEXT: .BLKB 2
7565 020033 000002 DNEXT: .BLKB 2
7566 020035 000005 CHRBUF: .BLKB 5
7567 020042 000005 BUSAD: .BLKB 5
7568 020047 000005 DMDAT: .BLKB 5
7569 020054 000006 RAMX1: .BLKB 6
7570 020062 000006 RAMX2: .BLKB 6
7571 020070 000003 ER.LOC: .BLKB 3 ; PLACE TO EXECUTE 8080 "IN'S" AND "OUT'S"
7572 020073 000005 TMPBF2: .BLKB 5
7573 020100 000005 TMPB2: .BLKB 5
7574 020105 000005 BLKNUM: .BLKB 5
7575 020112 000005 BLKADR: .BLKB 5
7576 020117 000001 EXM1: .BLKB 1
7577 020120 000001 NOPNT: .BLKB 1
7578 020121 000001 BT.TYPE: .BLKB 1
7579 020122 000001 P8.TMP: .BLKB 1
7580 020123 000001 ERADDR: .BLKB 1
7581
7582 ; CURRENT KLINIK STATE SWITCH: ENABLE = 2
7583 ; PROTECT = 6
7584 ; DISABLE = 4
7585
7586 020124 000001 KLNKSW: .BLKB 1
7587
7588 020125 000002 APASS: .BLKB 2 ; (5.2D) ADDRESS OF POINTER IN PASSWORD
7589 020127 000001 PWNOK: .BLKB 1 ; (5.2D) FLAG INDICATING VALIDITY OF PW ENTERED
7590
7591 ;KPWPNT:.BLKB 2 ; (5.2D) REPLACED BY APASS, PWNOK,
7592 ;KPWCNT:.BLKB 1 ; (5.2D) PNUM
7593
7594 020130 000001 WATCHC: .BLKB 1
7595 020131 000001 CMDS..: .BLKB 1
7596 020132 000005 UNITNM: .BLKB 5
7597 020137 000005 TAPEUNIT: .BLKB 5
7598 020144 000005 SKP.GO: .BLKB 5
7599 020151 000001 BRKON: .BLKB 1
7600 020152 000002 BRKDT: .BLKB 2
7601 020154 000002 ERRCD: .BLKB 2
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 199-1
STORE.M80 *SM10 DATA STORAGE PARAMETERS*
7602 020156 000001 USRMD: .BLKB 1
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 200
STORE.M80 *SM10 DATA STORAGE PARAMETERS*
7604
7605 020157 000001 RPEND: .BLKB 1
7606 020160 000001 RPCNTR: .BLKB 1
7607 020161 000001 BFCNT: .BLKB 1
7608 020162 000001 STPPD: .BLKB 1
7609 020163 000001 EIFLAG: .BLKB 1
7610 020164 000001 DIFLAG: .BLKB 1
7611 020165 000001 RNFLG: .BLKB 1
7612 020166 000001 CHKPAR: .BLKB 1
7613 020167 000001 CHKREF: .BLKB 1
7614 020170 000002 ECSAV: .BLKB 2
7615 020172 000010 RM100: .BLKB 8
7616 020202 000001 BTMSK: .BLKB 1
7617 020203 000001 BTNUM: .BLKB 1
7618 020204 000001 EOL: .BLKB 1
7619 020205 000002 AM.AI: .BLKB 2
7620 020207 000002 RPBUFS: .BLKB 2
7621 020211 000002 RPLST: .BLKB 2
7622 020213 000001 RPTON: .BLKB 1
7623 020214 000001 CHRCNT: .BLKB 1
7624 020215 000002 BUF.: .BLKB 2
7625 020217 000002 HLSAVE: .BLKB 2
7626 020221 000002 CMD..: .BLKB 2
7627 020223 000002 .ARG1: .BLKB 2
7628 020225 000002 CMCNT: .BLKB 2
7629 020227 000002 FIRST: .BLKB 2
7630 020231 000002 CHKHLT: .BLKB 2
7631 020233 000002 OCTSV: .BLKB 2
7632 020235 000005 SHRTAD: .BLKB 5
7633 020242 000005 RHBASE: .BLKB 5
7634 020247 000001 CSLMODE: .BLKB 1
7635 020250 000001 KACNTR: .BLKB 1
7636 020251 000001 MMFLG: .BLKB 1
7637 020252 000001 MAILFG: .BLKB 1
7638 020253 000001 VERCNT: .BLKB 1
7639 020254 000001 UBANUM: .BLKB 1
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201
STORE.M80 *SM10 DATA STORAGE PARAMETERS*
7641
7642 ; RESTART INDICATOR - 1 - KA FAILED TO CHANGE
7643 ; 2 - FORCED RELOAD
7644 ; 3 - POWER FAIL
7645 ; 4 - BOOT BUTTON PUSHED
7646
7647 020255 000001 GOCODE: .BLKB 1
7648
7649 ; NO AUTOMATIC RELOAD FLAG (SET BY OPERATOR IF DESIRED)
7650
7651 020256 000001 SECRET: .BLKB 1
7652
7653 020257 000001 DIECNT: .BLKB 1
7654 020260 000001 CNTLQ.ON: .BLKB 1
7655 020261 000001 APTANS: .BLKB 1
7656 020262 000007 PASSWORD: .BLKB 7 ; CURRENT PASSWORD SET
7657
7658 020271 000001 PNUM: .BLKB 1 ; (5.2D) NUMBER OF PW CHARACTERS ENTERED SO FAR
7659
7660 ; FLAGS TO INDICATE THAT EXINT SHOULD SET RUN ALSO THEN EXECUTING THE
7661 ; JRST 1000 TO REBOOT THE SYSTEM AFTER A FORCED RELOAD. AND THAT THE
7662 ; CO CMD THAT GETS EXECUTED AFTER THAT SHOULD NOT SET CONTINUE.
7663
7664 020272 000001 HSBFL1: .BLKB 1 ; (5.2E) HSB FLAG 1
7665 020273 000001 HSBFL2: .BLKB 1 ; (5.2E) HSB FLAG 2
7666
7667 ; FLAG TO ENSURE ?NXM DOES NOT PRINT ON POWER UP - WHAT REALLY HAPPENS
7668 ; THERE IS THAT INTERNAL MODE IS SET SO AS TO NOT PRINT IT - THEN IF A
7669 ; CONTROL-\ IS TYPED THE 8080 GETS OUT OF INTERNAL MODE TO HANDLE THIS
7670 ; CHARACTER AND THEN WHEN IS RETURNS FROM THE INTERRUPT INTERNAL MODE
7671 ; IS NOW OFF AND THE ERROR MESSAGE PRINTS.
7672
7673 020274 000001 NXMFLG: .BLKB 1 ; (5.2C) NXM PRINT FLAG
7674
7675 020275 000002 T80DT: .BLKB 2 ; (5.2) LOCATION MOVED TO PROVIDE SPACE AT TOP
7676
7677 ;KPWBUF:.BLKB 6 ; (5.2D) PASSWORD TYPED IN
7678
7679 020277 000001 PWRTRY: .BLKB 1 ; PASSWORD RETRY COUNT
7680 020300 000001 KLLINE.ON: .BLKB 1 ; STATE OF KL FLAG (ON/OFF)
7681 020301 000001 E.CNT: .BLKB 1
7682 020302 000020 CRMBF: .BLKB ^D16
7683 020322 000020 CRMTM: .BLKB ^D16
7684 020342 000002 KATIM1: .BLKB 2
7685 020344 000002 .IIF DF,SCECOD,SCEADR: .BLKB 2 ; LAST FAILING ADDRESS
7686 020346 000002 MODDIS: .BLKB 2
7687 020350 000002 NOREND: .BLKB 2
7688 020352 000002 ENVPNT: .BLKB 2
7689 020354 000001 PARBT: .BLKB 1
7690 020355 000001 TRAPEN: .BLKB 1
7691 020356 000001 MTAUBA: .BLKB 1
7692 020357 000001 DSKUBA: .BLKB 1
7693 020360 000001 STATE: .BLKB 1
7694 020361 000001 LSTMSG: .BLKB 1
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-1
STORE.M80 *SM10 DATA STORAGE PARAMETERS*
7695 020362 000005 DEN.SLV: .BLKB 5
7696 020367 000005 MTBASE: .BLKB 5
7697 020374 000005 DSBASE: .BLKB 5
7698 020401 000031 RPINI: .BLKB ^D25
7699 020432 000062 RPTBFI: .BLKB ^D50
7700 020514 000132 BUFBG: .BLKB ^D90
7701 020646 000001 BUFEN: .BLKB 1
7702 020647 000002 E.BUF: .BLKB 2
7703 020651 000140 E.BEG: .BLKB ^O140
7704 021011 000001 ENVMNO: .BLKB 1
7705 021012 000001 ENVCHK: .BLKB 1
7706 021013 000106 ENVBUF: .BLKB 70 ; EB IS LONGEST COMMAND WITH 67. CHARS
7707 021121 000002 SYSIN: .BLKB 2
7708 021123 000002 SYSOUT: .BLKB 2
7709 021125 000200 SYSBUF: .BLKB ^O200
7710 021325 000001 SYSEND: .BLKB 1 ; AND EMPTY BYTE TO HOLD END OF LIST
7711 001 .IF DF,SCECOD
7712 021326 000001 SC.OFF: .BLKB 1 ; RECOVERY ON OR OFF FLAG
7713 021327 000050 RHSAVE: .BLKB 40. ; BUFFER FOR SAVING RH STUFF
7714 000 .ENDC
7715 021377 FREE:
7716 000000 .END ; END STATEMENT
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-2
STORE.M80 CROSS REFERENCE TABLE
A =%000007 548 583 595 647 655 675 678 681 682 685 689 691 692
694 698 706 715 721 737 738 739 740 741 751 752 757
765 769 770 783 786 788 796 806 818 845 853 868 894
896 904 962 1014 1018 1035 1038 1049 1062 1095 1113 1139 1155
1173 1177 1187 1188 1200 1235 1273 1275 1277 1295 1303 1305 1313
1323 1332 1354 1375 1411 1425 1430 1438 1440 1459 1465 1467 1476
1483 1485 1494 1495 1496 1500 1526 1543 1585 1608 1626 1632 1825
1831 1834 1855 1863 1871 1879 1881 1894 1904 1922 1923 1938 1949
1965 2004 2008 2012 2016 2020 2054 2056 2064 2066 2072 2119 2156
2162 2165 2171 2175 2179 2188 2192 2198 2199 2203 2215 2217 2220
2223 2224 2232 2235 2242 2247 2252 2259 2265 2292 2295 2302 2323
2336 2356 2359 2367 2369 2378 2383 2386 2389 2396 2407 2414 2418
2427 2432 2581 2590 2591 2594 2602 2631 2638 2657 2660 2667 2672
2677 2684 2690 2703 2716 2722 2775 2778 2797 2800 2857 2862 2864
2870 2875 2881 2887 2891 2911 2915 2962 2967 2969 2972 2975 2981
2987 2993 2998 3039 3044 3047 3064 3069 3072 3093 3102 3153 3155
3156 3169 3177 3179 3195 3216 3228 3243 3257 3281 3286 3319 3323
3344 3345 3350 3353 3359 3371 3391 3394 3405 3420 3436 3447 3449
3458 3460 3492 3494 3497 3500 3511 3513 3525 3527 3532 3534 3537
3544 3546 3548 3556 3560 3572 3581 3583 3589 3592 3608 3611 3616
3635 3648 3651 3679 3685 3695 3729 3736 3738 3757 3759 3769 3789
3849 3864 3866 3880 3959 3986 3993 4026 4029 4048 4063 4064 4068
4070 4087 4107 4119 4139 4140 4161 4198 4213 4240 4254 4265 4277
4285 4302 4305 4313 4314 4319 4320 4324 4329 4330 4335 4338 4344
4358 4359 4365 4464 4475 4504 4529 4564 4584 4587 4596 4598 4608
4615 4625 4639 4658 4661 4666 4671 4678 4688 4789 4851 4856 4865
4867 4869 4873 4875 4884 4885 4887 4889 4891 4903 4912 4919 4921
4929 4951 5025 5037 5047 5051 5072 5089 5100 5101 5103 5110 5113
5172 5223 5225 5286 5291 5326 5340 5347 5366 5372 5395 5396 5397
5412 5446 5461 5508 5518 5531 5559 5575 5610 5630 5650 5652 5653
5655 5665 5672 5687 5693 5712 5725 5730 5737 5750 5831 5860 5877
5897 5899 5935 5940 5967 5968 5991 5996 5998 6060 6177 6185 6186
6206 6210 6212 6214 6238 6253 6255 6257 6258 6260 6267 6269 6271
6295 6298 6301 6305 6313 6317 6334 6335 6351 6353 6368 6379 6380
6396 6397 6409 6426 6430 6447 6448 6450 6471 6482 6510 6512 6513
6533 6541 6578 6591 6627 6628 6692 6696 6824 6827 6842 6865 6867
6883 6912 6946 6953 6963 6969 6977 6986 6996 6999 7011 7023 7024
7030 7038 7049 7053 7061 7063 7087 7096 7194 7199 7210 7213 7245
7248 7282 7294 7297 7298 7305 7306 7314 7332 7333 7338 7340 7348
7349 7354 7355 7379 7386
ACK 016574 2209 7264#
ACK.EN 016571 7241 7262#
ACTION 016625 7175 7178 7281#
ADATP 015572 2868 2970 4252 4276 5452 6795#
ADATT 015565 2772 2791 6789#
ALT = 000033 127# 7177 7269 7278
AM.AI 020205 2866 2918 7619#
APASS 020125 2484 2567 2570 2589 7588#
APTANS 020261 7073 7086 7283 7655#
APT.WT 016311 7086# 7088
ARBRES= 000020 90# 2781 2804 2894 3001
ARG = 000000 5789# 5795# 5797# 5801# 7401# 7402# 7403# 7405# 7408# 7409# 7411# 7412# 7413#
7414# 7417# 7419# 7421# 7422# 7423# 7424# 7425# 7426# 7427# 7429# 7434# 7454#
7455# 7456# 7457# 7459# 7461# 7464# 7465# 7466# 7467# 7468# 7470# 7471# 7472#
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-3
STORE.M80 CROSS REFERENCE TABLE
7473# 7474# 7475# 7476# 7478# 7480# 7483# 7485# 7492# 7493# 7495# 7496# 7497#
7498#
ARGBEG 014627 6299 6302#
ARGBG1 014630 6296 6303#
ARGQQ 014737 6359# 6371
ARG1 = 000000 5789# 5795# 5797# 5801# 7401# 7402# 7403# 7405# 7408# 7409# 7411# 7412# 7413#
7414# 7417# 7419# 7421# 7422# 7423# 7424# 7425# 7426# 7427# 7429# 7434# 7454#
7455# 7456# 7457# 7459# 7461# 7464# 7465# 7466# 7467# 7468# 7470# 7471# 7472#
7473# 7474# 7475# 7476# 7478# 7480# 7483# 7485# 7492# 7493# 7495# 7496# 7497#
7498#
ARG16. 014230 3151 3165 3191 3241 3279 3317 3343 3369 3470 3483 3894 3984 4135
4311 4580 4964 6026#
ARG96 014613 3839 6295#
ARROW = 000076 145#
AUTOMS 017760 993 7546#
A.BTER 015165 4613 4793 4824 5049 6496#
A.CRMO 013212 5572 5622#
A.CRMZ 013224 5627#
A0003 = 000113 77# 2243 2379 2668 2871 2973 3540 6813
A0411 = 000111 76# 3539 6809
A1219 = 000107 75# 2237 2371 2662 3538 6805
A16PK 014736 6357# 6374
A2027 = 000105 74# 2236 2370 2661 3495 3535 4868 6801
A256 000224 743# 753 759
A2835 = 000103 73# 2234 2368 2659 3493 3533 4866 6797
B =%000000 622 674 698 706 739 746 785 789 792 799 808 811 817
1038 1040 1188 1215 1411 1842 1855 1857 1863 1871 1881 1894 1904
1923 2008 2012 2016 2030 2108 2162 2172 2179 2190 2192 2195 2295
2302 2336 2356 2359 2407 2712 2719 2734 2745 2864 2870 2969 2972
3286 3293 3323 3582 3598 3602 3609 3610 3612 3613 3633 3653 3796
3799 3867 3868 3879 4121 4196 4208 4234 4244 4985 4986 4996 5085
5095 5098 5122 5123 5167 5188 5205 5230 5232 5276 5283 5344 5345
5371 5378 5380 5383 5384 5399 5401 5406 5410 5422 5424 5425 5427
5434 5436 5441 5460 5467 5470 5472 5474 5485 5486 5487 5491 5492
5511 5512 5529 5537 5655 5663 5681 5684 5688 5692 5750 5754 5875
5889 5959 5976 5978 6037 6051 6069 6077 6080 6085 6095 6111 6119
6123 6130 6162 6169 6179 6182 6187 6208 6241 6242 6280 6288 6311
6356 6369 6373 6386 6404 6409 6417 6530 6538 6550 6566 6617 6621
6631 6634 6648 6651 6672 6912 6932 6960 7029 7030 7048 7061 7108
7114 7116 7321 7332 7333 7340
BBLOOP 011567 4898 4918#
BB1 017635 6480 7530#
BCA.ER 013355 5519 5692#
BCB.ER 013362 5690 5695#
BCCMD 012744 1747 5501#
BCC.ER 013342 5682 5686#
BC.ALP 012770 5512# 5533 5547
BC.BER 013336 5667 5683#
BC.BLP 013051 5557# 5561
BC.BL1 013065 5566# 5577
BC.CER 013326 5595 5606 5680#
BC.CLP 013137 5591# 5613
BC.DB2 013041 5543 5549#
BC.2ND 013046 5538 5556#
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-4
STORE.M80 CROSS REFERENCE TABLE
BC.3RD 013120 5581#
BELL = 000007 122# 2473
BFCNT 020161 2019 2023 2063 2067 2465 7607#
BFOVR 001734 1514# 2022
BFRST 004115 727 1010 1964 2133 2460# 4511 6600 7109
BIT15 = 100000 96# 1659 1661 1663 1665 1668 1670 1672 1676 1679 1683 1685 1687
1691 1702 1751 1787
BLKADR 020112 4780 4812 7420 7575#
BLKNUM 020105 4782 4790 4814 7418 7574#
BLKRDR 011336 4800 4811#
BOOT 010615 1082 4527#
BOOTSW= 000301 47# 969 1078 1088 2091 2643
BPI16 = 002000 87#
BPI8 = 001000 88#
BREAK 014155 3688 5823 5990#
BRKDT 020152 3677 3687 7600#
BRKON 020151 3680 3684 3700 7599#
BSLASH= 000134 141# 1629
BTAUT 010620 994 4528#
BTCHOI 010712 4533 4560 4578#
BTCMD 010630 1744 4533#
BTERR1 015172 6499# 6514
BTFAIL 017522 6501 7518#
BTINT 011401 4715 4774 4832#
BTMSG1 017527 4527 7519#
BTMSK 020202 6157 6196 7616#
BTNUM 020203 6205 7617#
BT.BIT= 000001 97# 4851 4938 5037
BT.GO 010733 4569 4592# 4619 4709
BT.GO1 010741 1342 4594#
BT.SRC 010633 4534# 5027
BT.TYP 020121 4852 4937 5061 7578#
BUFBG 020514 2460 7110 7700#
BUFEN 020646 7701#
BUF. 020215 1993 2006 2070 2461 4512 7624#
BUSAD 020042 2770 2773 2795 2826 2838 5507 5509 5523 5544 7567#
BUSARB= 000115 66# 2248 2384 2673 2776 2876 2976 3498 3542 4278
BUSCTL= 000210 59# 905 2261 2391 2686 2704 2723 2779 2802 2889 2912 2996 3501
3545 3561 3573 7380 7387
BUSRES 015231 2781 2804 2808 2894 2897 2902 3001 3006 6520#
BV 017410 1514 7505#
BYTCNT 020006 7559#
B.BTER 015163 4801 6494#
B2CMD 011755 1789 5025#
C =%000001 689 692 738 743 788 806 809 957 979 1035 1049 2444 2449
3635 3648 3651 3844 3858 4230 4233 4248 4883 4892 5284 5377 5382
5442 5530 5531 5546 5629 5630 5633 5652 5693 5935 5940 6043 6046
6164 6203 6266 6274 6321 6340 6366 6379 6396 6401 6410 6670 7210
7215 7216 7217 7221 7237 7240
CADWR 006267 3525# 3915 4855 4911 5078 5566 5626 5920
CARRIE= 000302 48# 1069
CARRLO= 000003 104# 7011
CCHR = 000103 136# 2454 2835
CECMD 005661 1695 3277#
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-5
STORE.M80 CROSS REFERENCE TABLE
CEDIS 005712 3277 3300#
CHCMD 006176 1717 1827 3457#
CHECKS 002534 782 807 1809#
CHKADD 016166 7029# 7054
CHKBIT 012730 5400 5426 5435 5484#
CHKERR 000355 825 842#
CHKHLT 020231 1112 1126 3949 4092 7630#
CHKHOM 011356 4784 4792 4823#
CHKKA 001236 1117 1244 1251#
CHKPAR 020166 1094 1100 5763 7612#
CHKREF 020167 1137 1149 6545 7613#
CHKSM0= 112317 206# 525# 1809
CHKSM1= 141417 207# 526# 1810
CHKSM2= 161563 208# 527# 1811
CHKSM3= 002015 209# 528# 1812
CHKSTK 014764 6370 6379#
CHNXCT 012407 4945 5242 5275# 5843 5867 5906 5927 5955
CHOOSE 005717 3302# 3333 3360 3383 4162
CHRBUF 020035 2231 2250 2656 2675 7566#
CHRCNT 020214 6303 6395 7623#
CHRRDY 003574 1237 2278#
CLEAN 014771 6306 6385#
CLKCTL= 000206 58# 3180 3450 3461 5726
CLRBYT 015117 599 6470#
CLRLP 000111 644# 649
CLRRN 015255 3457 5780 6538#
CLRT1 015631 6825# 6828
CLRUSE 003305 2102 2117# 3922 4046 5764 6546
CMCNT 020225 1978 2053 2057 2079 7628#
CMDDI 012550 5315 5371#
CMDEI 012472 5317 5326#
CMDEN 012666 5320 5451#
CMDERC 012646 5319 5434#
CMDGO 001624 1427 1445#
CMDGO9 001644 1455 1465#
CMDLI 012476 5316 5331#
CMDLI1 012477 5327 5332#
CMDLST 002143 1190 1655#
CMDNG 017415 1222 2599 7506#
CMDS.. 020131 1429 2464 4375 7595#
CMDTWA 012630 5321 5422#
CMDUBA 012532 5322 5360#
CMDWAI 012577 5318 5394#
CMD.. 020221 4606 4698 4706 7626#
CMNBUF 002732 1900 1921#
CMPLP 015426 6648# 6654
CMP36 015416 910 2825 3774 4827 5592 5603 6642#
CNBCK = 000034 121# 1984 2086 2126 2627
CNTC 004103 1968 2452#
CNTLC = 000003 134# 1967
CNTLO = 000017 133# 1928
CNTLQ = 000021 132# 1943
CNTLQ. 020260 7337 7654#
CNTLS = 000023 131# 1940
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-6
STORE.M80 CROSS REFERENCE TABLE
CNTLU = 000025 130# 1956
CNTLY = 000031 129# 1873 1909
CNTLZ = 000032 128# 1953
CNTS 003476 1941 2214#
CNTSL 003507 2223# 2226
CNTZ 003324 1954 2132#
COCMD 007542 1378 1706 4086#
COINT 007557 4092# 4124
COLLEC 016422 7159 7174#
COL.LP 016446 7192#
COMMA = 000054 119# 1973 2074 6106 6107 6586 7121
CONT.I 014143 5969 5981#
CPCMD 005507 1719 3164#
CPMLT 005515 3169# 3175
CPUCTL= 000212 60# 659 1826 3437 4032 4091 4108
CP1 005527 3164 3173 3177# 3712 3727 4238 5080 5568
CRCHR = 000015 117# 1548 1645 1987 2561 7050 7180
CRLFIN 002136 1638 1645#
CRMAD 020004 3268 3519 3823 3825 3834 3836 5067 5070 5079 5200 7558#
CRMBF 020302 3582 3842 3862 5086 5642 5643 5644 5646 5647 5648 5657 5672 7682#
CRMCTL= 000204 56# 1832 3178 3448 3459 3512 3514 3526 3528 3547 3549 5832
CRMFN 020010 3472 3503 3867 4255 4857 4878 4896 4904 4923 5631 7560#
CRMTM 020322 3840 3843 7683#
CRM.AD 006264 3489 3519# 3726 3861 4237 4242
CSCMD 006163 1715 3446# 3917 5982
CSLMOD 020247 1161 1532 1560 1898 2180 2296 2347 2443 4153 4170 6923 6992 7000
7634#
CTYCTL= 000201 61# 702 719 1554 1854 2341 2428
CTYDAT= 000200 62# 724 1571 1575 1892 2360
CTYONL 003673 2293 2328#
CTYOUT 003747 2349 2359#
CTYPCH 003716 2341# 2342
C.BTER 015161 4538 4946 4955 5035 5915 6492#
C80AD 020002 3091 3096 3101 3110 3112 3134 3139 3141 3154 7557#
D =%000002 572 623 642 646 648 685 693 694 708 741 861 862 870
1190 1199 1202 1212 1213 1214 1273 1277 1335 1389 1400 1416 1434
1605 1606 2029 2105 2106 2107 2711 2714 2717 2733 2860 2908 2938
2939 2942 2965 3019 3020 3024 3042 3067 3556 3558 3599 3601 3687
3842 3872 3907 4022 4075 4195 4205 4206 4243 4246 4250 4275 4348
4458 4469 4561 4772 4773 4775 4776 4969 4970 4980 4987 4997 5086
5101 5103 5105 5106 5114 5117 5166 5189 5197 5234 5277 5280 5281
5293 5297 5299 5300 5360 5361 5385 5396 5407 5409 5411 5413 5451
5459 5469 5471 5473 5475 5660 5822 5876 5888 5905 5907 5913 5960
5990 5993 6000 6003 6004 6017 6038 6050 6070 6084 6096 6110 6131
6155 6175 6176 6186 6189 6206 6218 6250 6287 6339 6343 6345 6346
6347 6359 6398 6400 6412 6413 6427 6429 6432 6433 6445 6454 6456
6616 6622 6632 6633 6646 6653 6677 6721 6724 6725 6728 6729 6732
6733 6736 6737 6741 6742 6759 6760 6762 6764 6766 6768 6770 6772
6774 6776 6778 6795 6796 6798 6800 6802 6804 6806 6808 6810 6812
6814 6882 6888 7077 7110 7115 7117 7313
DATACK= 000001 91# 2808 2902
DBCMD 004563 1674 2767# 5513
DBCOM 004715 2817 2836#
DBERR 004713 2785 2835#
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-7
STORE.M80 CROSS REFERENCE TABLE
DBRDIN 004676 2784 2811 2822#
DB1 004574 2768 2772#
DCCMD 007047 1661 3838#
DCHR = 000104 137# 2816
DCLP 007130 3868# 3881
DCODE 001145 1028 1187# 1504 4992 7254
DCODL 001163 1199# 1216
DECEX1 016325 7094# 7251
DECEX2 016325 3425 7095#
DECNET 016174 1166 2726 2729 2748 3600 5231 6484 7037# 7258
DEFLTE= 000174 94# 853 882 4596
DELAY. 015661 3401 3920 6863#
DEN.SL 020362 4476 4485 4669 7460 7695#
DEPSHT 014203 2199 4063 4064 4070 4119 4661 4666 4671 6012# 7024
DEV 000315 774 806#
DEVERR 012654 5418 5429 5441#
DEVEXI 012676 5447 5455#
DEVLP 000265 784# 797
DFCMD 006220 1685 3481#
DIAG = 000205 57# 1840 2284 3504 3559 4600
DICMD 005335 1670 3061#
DIECNT 020257 1296 1352 1366 7653#
DIEING 001463 1291 1352#
DIFLAG 020164 2986 2999 3070 7610#
DILOCL 012565 5373 5385#
DI.LP 014104 5960# 5979
DI1 005341 3064# 5387 5950 5977
DKCMD 005471 1676 3151#
DLIST 015103 6443 6460#
DLYLP 015665 6867# 6870
DMCMD 005147 1663 2959#
DMCONT 005221 2988 2996#
DMDAT 020047 2155 2960 2979 3062 3905 4062 4067 4117 4268 4654 4655 4665 4670
5385 5585 5949 5960 7020 7568#
DMEM2C 011427 4540 4851# 5917
DMGO 005217 2993# 4280
DMINT 005162 2967# 3908 6021
DM1 005153 2962# 4271
DM2 005157 2965# 5600
DNCMD 005246 1659 3018#
DNDC 007040 3031 3834#
DNDI 005332 3029 3060#
DNDK 005462 3030 3139#
DNDM 005142 2957# 3028
DNEXT 020033 2963 3018 3065 3157 3865 7565#
DNF 007436 3438 4035# 4100
DNLST 005262 3019 3028#
DN2ND 005164 2969# 3073
DOLLAH= 000044 142# 7174
DONE.B 016765 7350 7356 7364#
DRCMD 005633 1763 3252#
DRCVD 017464 2841 7513#
DSBASE 020374 4404 4844 7697#
DSCMD 010310 1767 4387#
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-8
STORE.M80 CROSS REFERENCE TABLE
DSCON 012413 5280# 5311
DSKDFT 011412 4777 4840# 5859
DSKSEQ 017041 5241 7396#
DSKUBA 020357 4396 4840 7692#
DSLST 012452 5292 5315#
DSXFR 012353 4816 4823 5241#
DS1 010331 4389 4398#
DS2 010350 4400 4406#
DTARB = 000114 65# 2257 2387 2682 2982 4027
DTIME 001346 1246 1310#
DTM1 001352 1306 1312#
DTR = 000101 53# 897 3409 7010
D.BTER 015157 4593 6490#
D0003 = 000103 72# 6738
D0411 = 000003 71# 6734
D1219 = 000002 70# 6730
D2027 = 000001 69# 3567 6726
D2835 = 000000 68# 3563 6722
D772 = 000772 187# 7456 7459 7461 7464 7466 7468 7470 7472 7474 7476 7478 7480
7483 7485 7492 7495 7497
D776 = 000776 186# 5795 5797 5801 7403 7405 7408 7411 7414 7417 7419 7421 7423
7425 7427 7429 7434
E =%000003 570 647 678 707 740 1275 1280 1414 1436 2940 3022 3583 3592
3615 3616 3870 4350 4563 4564 5099 5100 5291 5295 5397 5412 5658
6187 6188 6208 6216 6253 6266 6338 6452 6675
EBCMD 004436 907 1731 2703#
EBHED 017430 2725 7509#
EB.RDI 004457 2714# 2720
EB1 004523 2736# 2746
ECBEE 006713 3739 3757# 3778
ECCMD 006627 1729 3720#
ECLP 006661 3736# 3752
ECSAV 020170 3744 3751 7614#
ECVER 017473 3782 7514#
EC1 006637 3724# 3826
EC2 006651 3721 3729#
EICMD 005272 1727 3035#
EIFLAG 020163 2880 2892 3045 7609#
EIGHT = 000070 156#
EIGHT0 010533 4458 4487#
EI1 005302 3036 3039# 3054 5353 5408 5423 5869
EJCMD 006452 1733 3631# 3713
EJLP 006462 3635# 3654
EJLST 006517 3632 3662#
EJ1 006465 3638#
EKCMD 005376 1681 3086#
EK1 005405 3086 3093# 3113
EMBUF 020012 911 1260 1289 2193 2291 2321 2331 2335 2706 2908 3947 4020 4022
4811 4813 4829 4872 4881 4918 4985 5097 5139 5222 5484 5593 5604
5889 6093 7561#
EMCMD 004747 1725 2854#
EMCONT 005017 2882 2889#
EMINT 004764 2862# 6019
EM.CRM 005000 2871# 4870
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-9
STORE.M80 CROSS REFERENCE TABLE
EM1 004755 906 2854 2857# 2933
EM2 004761 2860# 5184 5591 5602
ENACOM 005703 3293# 3327
ENCMD 005116 1721 2937#
ENDIN 003145 1852 2028#
END.US 003243 2091# 2632
ENEC 007026 2949 3823#
ENEI 005324 2947 3053#
ENEK 005431 2948 3110#
ENEM 005106 2931# 2946
ENEXT 020031 2858 2937 3040 3094 3730 7564#
ENLST 005132 2938 2946#
ENVBUF 021013 881 7047 7079 7098 7706#
ENVCHK 021012 7071 7705#
ENVMNO 021011 3422 7042 7045 7077 7249 7704#
ENVPNT 020352 1542 1546 7099 7688#
ENV.LP 016505 7219# 7222
EN2ND 004766 2864# 3048
EOCML 015330 1449 4521 6330 6575# 6893
EOL 020204 1000 1176 1493 2055 4509 7111 7618#
EOLCH = 000377 89# 4199 4214 6583 7126 7232
EOLCM 015357 6600#
EOLYS 015362 6584 6587 6604#
EOL.LK 001126 1163 1172#
EOMRK 003164 1985 1988 1991 2051#
ERADDR 020123 3196 3197 3244 3256 7580#
ERCMD 005540 1759 3189#
ERRCD 020154 1001 1002 1503 4284 4679 5444 5503 5504 5517 5686 5689 5694 5697
6499 6502 7376 7601#
ERRMSG 017570 5696 7524#
ERRRTN 017005 2847 7376# 7384 7390
ER.LOC 020070 3214 3217 3219 7571#
ER.UTL 005612 2715 3204 3227# 5738
ER1 005552 3189 3197#
EXAMSH 014202 1256 1372 2152 2289 2329 3935 3954 4794 4826 6011#
EXCMD 007406 1751 4019#
EXECUT 016471 7181 7209#
EXINT 007415 4024# 4076
EXINTM 007412 1377 4022#
EXIT4 010722 4585# 4588
EXMHL 014211 4807 6016#
EXMS 017514 4045 7517#
EXM1 020117 7576#
E.BEG 020651 4980 6984 7108 7212 7238 7703#
E.BUF 020647 6985 7192 7195 7281 7702#
E.CNT 020301 6983 7197 7209 7681#
FAKLIT 001334 1243 1302#
FICMD 011667 1787 4964#
FILEIN 011252 1336 4565 4773# 4971
FILESH 011257 4776# 5914
FINARG 015042 6411 6420#
FIRST 020227 1191 1509 2462 7629#
FIVE = 000005 153#
FIXLP 015035 6416# 6418
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-10
STORE.M80 CROSS REFERENCE TABLE
FIXPNT 015036 6402 6417#
FI.GET 011715 4981# 5000
FI.MOV 011727 4986# 4999
FI.NXT 011744 4989 4996#
FNDARG 010604 1192 4519#
FOUR = 000004 152#
FRCMSG 017724 1322 7538#
FREE 021377 7715#
FRELOA 001360 1262 1321#
FRMERR 017330 4678 7482#
FXNXT 001724 1502 1507#
GATHER 012216 4982 5088 5166#
GENLP 007066 3848# 3859
GETEN 014671 6316 6328#
GETLP 014650 6313# 6323
GOCODE 020255 1324 1376 2154 2200 4066 4530 7647#
GOODPK 011316 4785 4794#
G.SKP 012245 5174 5184#
H =%000004 549 558 559 561 571 573 584 586 596 598 609 610 612
624 641 645 675 682 690 691 700 736 744 757 765 773
782 794 807 810 812 819 823 860 869 958 1005 1007 1028
1041 1043 1067 1068 1072 1140 1142 1165 1167 1251 1288 1311 1314
1339 1341 1345 1347 1352 1388 1395 1401 1415 1417 1418 1435 1437
1459 1465 1467 1479 1481 1482 1486 1493 1504 1508 1541 1544 1547
1586 1627 1644 1852 1853 1978 2005 2024 2028 2069 2079 2104 2142
2155 2173 2174 2197 2214 2443 2446 2448 2460 2483 2495 2569 2575
2600 2710 2718 2732 2737 2742 2838 2843 2846 2941 3023 3096 3111
3140 3170 3174 3227 3228 3232 3257 3399 3404 3406 3488 3490 3494
3534 3608 3632 3642 3646 3734 3737 3746 3758 3770 3773 3777 3824
3835 3843 3854 3855 3856 3862 3871 3873 3898 3947 4030 4067 4072
4088 4207 4221 4313 4349 4351 4354 4355 4358 4365 4376 4378 4457
4465 4468 4509 4515 4651 4655 4660 4662 4664 4679 4695 4696 4779
4781 4805 4853 4854 4867 4873 4875 4878 4885 4887 4896 4908 4909
4910 4912 4915 4919 4921 4923 4927 4929 4944 5066 5071 5072 5110
5113 5115 5135 5139 5170 5172 5180 5181 5182 5185 5186 5196 5200
5214 5223 5225 5235 5241 5245 5249 5252 5278 5283 5285 5292 5296
5309 5310 5337 5342 5343 5363 5378 5379 5381 5441 5456 5457 5458
5466 5476 5493 5523 5556 5558 5559 5565 5567 5570 5573 5574 5575
5609 5610 5622 5623 5627 5628 5635 5653 5657 5659 5661 5664 5666
5683 5685 5687 5697 5709 5736 5842 5856 5866 5886 5887 5896 5902
5903 5904 5926 5936 5954 5957 5958 5962 5974 5975 5996 5998 6005
6036 6052 6058 6059 6067 6071 6083 6093 6097 6109 6118 6132 6163
6165 6168 6171 6178 6184 6195 6215 6246 6251 6258 6260 6262 6264
6265 6272 6285 6286 6302 6322 6336 6339 6344 6349 6354 6387 6399
6416 6428 6434 6443 6448 6450 6453 6470 6473 6502 6509 6524 6563
6575 6593 6605 6614 6652 6671 6673 6676 6678 6698 6819 6825 6840
6841 6866 6889 6896 6954 6964 6970 6984 6987 6998 7013 7022 7031
7047 7059 7098 7111 7145 7159 7193 7197 7212 7214 7220 7236 7252
7297 7305 7309 7312 7314 7322 7329 7348 7358 7365 7375 7383 7389
HACMD 007573 1329 1370 1704 4107#
HANGUP 016123 2619 6962 7008#
HLSAVE 020217 6167 6227 7625#
HLTCM 007226 1115 3920# 4109
HLTMS 017505 3946 7516#
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-11
STORE.M80 CROSS REFERENCE TABLE
HOMEWD 011235 4725# 4828
HRDERR 013500 5731 5742 5763# 5824
HSBFL1 020272 1345 4030 7664#
HSBFL2 020273 4088 7665#
INBUF 010556 4449 4497 4509#
INCLP 015461 6695# 6699
INC36 015451 2931 2957 3075 3077 4272 6686#
INDIRE= 000077 4526#
INFOBT 010704 1343 4573#
INIER 017402 919 7504#
INIMS 002544 899 1817#
INRDY 010601 4515 4518#
INTCH 002674 1865 1892# 2419 2433
INTON 000020 558#
INTRP 002621 626 1852#
INT2KS= 000116 67# 2266 2267 2397 2398 2691 2692
IOAD 020024 3042 3067 3076 3078 3125 5335 5337 5360 5963 5966 7563#
IORGS 004553 2711 2732 2753#
IOUT 003263 2105# 2143
IO.INC 005363 3053 3060 3075#
KACNTR 020250 1288 7635#
KAMSG 017717 1367 7537#
KATIMX= 000043 42# 1355
KATIM1 020342 860 1252 1302 1310 1312 7684#
KCHR 002052 1584# 2125 7074 7075
KCHR0 002056 1588# 1613 1905 7339
KCHR1 002057 1589# 1591
KILL.K 016121 1071 2309 2476 7007#
KILNM 015134 4315 4471 6331 6480#
KLCMD 007631 1755 4131#
KLDIS 007664 4131 4160#
KLINE 002072 1601# 2475 2482 2599 2612 7264 7272
KLINE1 002077 1605# 1614 7078
KLIRST 004316 2604 2619#
KLLINE 020300 2637 4145 4147 4160 6959 7680#
KLNKLT 015723 1042 6912#
KLNKSW 020124 1039 1912 3390 4173 4185 6913 7007 7586#
KLOFF 007650 4141 4147#
KLPCHR 003651 2304 2316# 2317
KLTOO 003735 2353# 2354
KL.ACT= 000002 105# 6996
KL.DSP 002670 1874 1885#
KL.LAM 015753 6936# 6961
KL.LON 015751 6932# 6949
KL3435 004357 2628 2655#
KPAINI= 003244 41# 876 1251
KSPRMT 017442 1022 4094 4168 7510#
KS.PAR 005704 3294# 3998 4597
L =%000005 681 699 751 818 1303 1305 1313 3153 3169 3195 3229 3243 3255
3281 3319 3344 3371 3405 3492 3532 3611 3986 3993 3996 4139 4319
4865 4889 4891 4984 4998 5107 5284 5377 5442 5488 5650 5665 5673
6001 6256 6257 6338 6446 6447 6471 7315
LACMD 005443 1668 2855 3117# 4056
LBCMD 010660 1749 4560#
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-12
STORE.M80 CROSS REFERENCE TABLE
LBINT 010663 4548 4561#
LBSIGN= 000043 125#
LB.GO 010644 4548#
LB.GO1 010647 1349 4549# 4620
LCCMD 005654 1665 3267# 3722 4236
LCHKR 000217 737# 831
LFCHR = 000012 118# 1646 1990 7334
LFCMD 006211 1683 3470#
LICMD 005450 1672 3037 3124#
LIGHTS= 000101 52# 1282 3392 3395 6568
LIVE10 001212 1156 1234#
LKCMD 005455 1679 3133#
LOAD4 010726 4578 4587#
LRCMD 005623 1761 3241#
LSTMSG 020361 3421 7236 7694#
LTCMD 006057 1753 3390#
LTDLY 006073 3393 3399#
LTFLT 015301 5781 6498 6549#
LTLOOP 006076 959 1068 1341 3401# 3407 5736 7014
L.BTER 015215 1337 4567 4634 4644 4972 6509#
M =%000006 548 560 570 572 583 595 611 644 743 786 809 811 868
1204 1290 1295 1346 1348 1353 1354 1390 1414 1416 1434 1436 1440
1483 1485 1494 1496 1543 1545 1585 1626 1979 2004 2072 2080 2156
2175 2198 2215 2220 2223 2444 2445 2449 2568 2576 2590 2601 2602
2716 2940 2942 3022 3024 3102 3155 3736 3757 3769 3870 3872 4031
4033 4068 4089 4090 4198 4213 4222 4329 4348 4350 4510 4657 4658
4663 4680 4689 4879 4897 4924 5136 5286 5295 5297 5339 5340 5346
5347 5365 5366 5380 5382 5658 5660 5897 5965 5967 6060 6162 6164
6177 6197 6212 6214 6242 6269 6271 6313 6317 6335 6351 6353 6386
6397 6426 6430 6452 6454 6472 6511 6512 6523 6562 6578 6649 6670
6672 6675 6677 6695 6696 6826 6842 6865 6886 7023 7049 7060 7112
7131 7194 7198 7199 7213 7219 7232 7237 7245 7282 7321 7323 7354
MAD000 007333 912 2792 3907 3967# 5451
MAILFG 020252 1550 6982 7037 7097 7637#
MA1000 011230 4550 4724# 4859 4977 5064 5588
MBCMD 011173 1773 4706#
MBINT 011021 4618 4625# 4708
MEMAD 020017 2860 2932 2958 2965 3118 4058 4264 4266 4273 4275 4860 4864 4926
4928 4978 5065 5169 5183 5187 5589 5608 5612 5680 7562#
MEM2CR 011431 4616 4852#
MICROP 011247 4534 4772# 5034
MISS2 001175 1212# 1396
MKCMD 007776 1687 4233#
MMCMD 006116 1791 3419# 6485
MMERR 015137 1224 5699 5719 6481# 6581
MMERR1 015151 1880 6485# 7081 7084
MMFLG 020251 1017 1878 1913 2118 2164 2630 3423 6481 7636#
MMOUT 016637 7143 7294#
MM.PNT 016733 7335 7340#
MODDIS 020346 1885 2496 7001 7160 7686#
MODE0 004135 879 2473# 6964
MODE1 004150 2482# 2606 6954
MODE2 004327 2627# 6998
MODE3 002732 1920# 6970
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-13
STORE.M80 CROSS REFERENCE TABLE
MODE4 016376 6987 7141#
MORE. 016716 7333# 7360
MOSMSG 017562 6547 7523#
MOVLP 015007 6397# 6405
MOVREG 015403 5890 5961 6620 6627#
MOV18B 012707 5362 5386 5466#
MOV18X 012717 5472# 5477
MRCMD 002564 1713 1824# 3901 4835 5501
MRINT 002572 663 1831#
MRKCM 010000 4231 4234#
MRKRT 010034 4250#
MSCMD 010366 1769 4421#
MSG10 017451 2836 7512#
MS1 010407 4423 4432#
MS1.5 010426 4434 4439#
MS2 010445 4441 4448#
MS2.5 010512 4466 4476#
MS3 010515 4451 4478#
MTARST 017352 5252 7492#
MTASEQ 017204 5245 7454#
MTAUBA 020356 4430 4716 7691#
MTBASE 020367 4438 4720 7696#
MTCH1 001536 1205 1388#
MTCH2 001550 1391 1400#
MTCMD 010757 1765 4606#
MTRESE 012401 4682 5252#
MTSETU 011210 4607 4707 4715# 5046
MTSKOK 011037 4631 4639#
MTXFR 012362 4609 4626 5048 5245#
MT.BIT= 000002 98# 4615 5051
MT.1 011003 4610 4615#
MV.ALL 016340 4991 7108# 7247
MV.CNT 016374 7122 7131#
MV.INP 016346 7110#
MV.IN1 016356 7114# 7127
M.ACK 016602 7264 7266#
M.NACK 016620 7272 7275#
M11 003051 1974 1984#
M4.0 016376 7142#
M4.1 016411 7145 7153#
M5B 015405 5878 6628# 6629
NACK 016612 7272#
NACK.E 016607 7201 7227 7271#
NBR 017623 7381 7528#
NEEDRM= ****** U 5505
NEWPAG 011450 4858# 4933
NEXTCR 011630 4932 4937# 5178
NINE = 000071 157#
NIXEX 017033 7389#
NIXOM 017025 2898 3007 7386#
NOA 017607 7373 7526#
NOACCS 017737 2475 7540#
NOACK 016777 2809 2903 7373#
NOACTN 004022 2307 2333 2399#
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-14
STORE.M80 CROSS REFERENCE TABLE
NOARB 017011 2782 2806 2895 3002 7379#
NOECH 003130 2010 2014 2019#
NONFAT 011140 4612 4633 4643 4678# 4954
NONXME= 000100 92# 2897 3006
NOPNT 020120 559 610 1004 1321 1365 1525 1935 1937 2101 2914 3588 5695 5724
6500 6544 7577#
NORDIS 001737 1501 1515#
NOREFR 015267 1141 6544#
NOREND 020350 1009 1515 7253 7687#
NORML 001677 1194 1417 1493# 4695 6479
NOROOM= ****** U 7504
NOTBUS 016707 7299 7329#
NOTRK 014760 6367 6373#
NOTSAM 013652 5836#
NR 013475 5759# 5844
NRSCE 013616 5759 5815#
NUL = 000000 5789# 5795# 5797# 5801# 7401# 7402# 7403# 7405# 7408# 7409# 7411# 7412# 7413#
7414# 7417# 7419# 7421# 7422# 7423# 7424# 7425# 7426# 7427# 7429# 7434# 7454#
7455# 7456# 7457# 7459# 7461# 7464# 7465# 7466# 7467# 7468# 7470# 7471# 7472#
7473# 7474# 7475# 7476# 7478# 7480# 7483# 7485# 7492# 7493# 7495# 7496# 7497#
7498#
NULKL 003665 2298 2323#
NULLJ 000660 1015 1019 1028# 1083 1247 1267 1283 1297 1350 1356 1380 2142 5984
NULLW 000663 1029# 1178 4354 4516
NXMDC 001204 1201 1222#
NXMFLG 020274 7673#
NXMMSG 017615 7388 7527#
NX2 001015 1090 1099#
NX3 001047 1108 1125#
NX4 001076 1133 1148#
N0 000757 1057 1063 1078#
N0.5 000766 971 1082#
N00 000727 1051 1061#
N1 000774 1080 1088# 1506
N2 001021 1097 1106#
N3 001053 1118 1131#
N4 001102 1143 1154#
OCHR = 000117 147# 1934
OCTAL 014416 3747 6040 6073 6098 6133 6155#
OCTLC 014466 6195# 6223
OCTL1 014442 6175# 6180
OCTL3 014510 6208# 6219
OCTL4 014515 6212# 6217
OCTL5 014534 6204 6227#
OCTSV 020233 6190 6209 7631#
OFFMSG 017543 3303 7521#
OFFSET= 000261 1000# 1001# 1002# 1003# 1004# 1073# 1296# 1321# 1365# 1366# 1503# 1912# 1913#
1948# 2101# 2117# 2200# 2463# 2464# 2465# 2485# 2486# 2614# 3390# 3683# 3700#
3949# 4173# 4185# 4833# 4834# 5503# 5504# 5695# 5724# 5763# 6500# 6544# 6545#
6959# 7007# 7073#
OKDN 016565 7252 7257#
OKSCE 013627 5816# 5855
ONE = 000001 149#
ONES 011242 3904 4726# 5584 5605
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-15
STORE.M80 CROSS REFERENCE TABLE
PADLP 015024 6410# 6414
PARBT 020354 2177 3287 3294 3300 3324 3331 3910 3963 3994 4003 4833 7689#
PARDIS 007367 3982 4003#
PARMSG 017550 5765 7522#
PASSME 011055 4641 4646#
PASSSR 011060 4574 4651#
PASSWO 020262 2483 4195 4220 6945 7656#
PASS1 = ****** U 1799
PASS2 = 000000 1808
PCCOM 007305 3439 3953#
PCHR 001743 551 847 1524# 1637 2017 2073 3798 6045 6079 6121
PCHROV 002046 1562 1574#
PCHR0 001755 1527 1532#
PCHR1 002012 1534 1554# 1556
PCHR1Z 002011 1553# 7342
PCHR2 002031 1566# 1568
PCMSG 017501 3956 7515#
PCRAM 006761 3760 3789#
PCRLP 006775 3797# 3800
PECMD 007340 1693 3982#
PERCNT= 000045 143# 7083
PHALF 014366 6102 6108 6118#
PICKUP 010544 4388 4399 4407 4422 4433 4440 4479 4497#
PLACE 015046 3848 3852 6426#
PLNE 002111 574 1623#
PLN1 002113 1626# 1639 3640
PLN2 002127 1630 1638#
PMCMD 006616 1742 3710#
PNT.ON 005726 3302 3305#
PNUM 020271 2485 2580 2584 7658#
POKE10 004014 2396# 7025
POKMSG 017753 2612 7544#
PRMLST 000420 861 875#
PSW =%000011 621 772 781 804 829 843 1114 1116 1236 1242 1450 1468 1474
1487 1524 1529 1540 1553 1569 1574 1588 1593 2031 2109 2166 2202
3199 3203 3215 3218 3797 4681 4683 5332 5348 5710 5715 6018 6020
6039 6044 6049 6068 6078 6086 6094 6112 6120 6129 6202 6319 6357
6444 6457 6549 6553 6839 6853 6864 6868 6869 6871 7019 7021
PULSE 006620 3691 3712#
PWCMD 007717 1775 4185#
PWLEN 017732 4219 7539#
PWNOK 020127 2486 2575 2593 7589#
PWOK1 004225 2571 2580#
PWRCHK 000530 914 955#
PWRTRY 020277 2600 2614 7679#
PWRUP 000100 540 637#
PW.CLR 007761 4190 4220#
PW.ERR 004261 2583 2592 2599#
PW.LOO 007734 4198# 4209
PW.OK 004303 2595 2611#
PW.OUT 004313 2614# 2621
PW.SET 007724 4194#
PW.TST 004242 2562 2589#
PW.WAI 004176 2495 2561#
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-16
STORE.M80 CROSS REFERENCE TABLE
P.00 = 000000 166# 5795 5801 5804 7411 7425 7427 7434 7466 7476 7485
P.02 = 000002 167# 5805 7421 7472
P.04 = 000004 168# 5806 7423 7470 7495
P.06 = 000006 169# 5807 7417 7464 7474 7497
P.10 = 000010 170# 5808 7403 7408 7456 7492
P.12 = 000012 171# 5797 7405 7414 7429 7461 7468 7478 7483
P.14 = 000014 172# 7480
P.16 = 000016 173#
P.20 = 000020 174#
P.22 = 000022 175#
P.24 = 000024 176#
P.26 = 000026 177#
P.30 = 000030 178#
P.32 = 000032 179# 5809 7459
P.34 = 000034 180# 5810 7419
P.36 = 000036 181#
P.40 = 000040 182#
P.42 = 000042 183#
P.44 = 000044 184#
P.46 = 000046 185#
P16 014303 3097 5201 5215 5698 5857 6068# 6503
P16LP 014316 6078# 6081
P16. 014300 3595 3643 3791 5227 6067#
P18 014402 3948 6129#
P36 014336 2839 2844 2919 6094#
P36L2 014371 6120# 6124
P36RH 014356 6108# 6137
P36. 014333 2727 2922 3957 6093#
P8BIT 014240 2736 2741 6036#
P8BITA 014270 3200 3593 4010 5206 5769 5774 6058#
P8BIT1 014241 6037# 6061
P8CRLF 007400 3103 3208 4010# 5779
P8LP 014253 6044# 6047
P8.TMP 020122 6059 7579#
QMXFR 012373 4640 4952 5249#
QPW 017745 2482 7542#
QQLOOP 011520 4885# 4893
QTXFR 017264 5249 7470#
QUES = 000077 144# 7080
QUO = 000042 124#
QXFR 017135 4944 7421#
Q.DEN 017701 4448 7535#
Q.OUT = 000000 115# 1970
Q.RH 017650 4398 4432 7532#
Q.SLV 017710 4478 7536#
Q.TCU 017672 4439 7534#
Q.UBA 017641 4387 4421 7531#
Q.UNIT 017662 4406 7533#
Q.1 = 000000 888# 889# 890# 3967# 4724# 4725# 4726# 5549# 5789# 5795# 5797# 5801# 7401#
7402# 7403# 7405# 7408# 7409# 7411# 7412# 7413# 7414# 7417# 7419# 7421# 7422#
7423# 7424# 7425# 7426# 7427# 7429# 7434# 7454# 7455# 7456# 7457# 7459# 7461#
7464# 7465# 7466# 7467# 7468# 7470# 7471# 7472# 7473# 7474# 7475# 7476# 7478#
7480# 7483# 7485# 7492# 7493# 7495# 7496# 7497# 7498#
Q.2 = 000000 888# 889# 890# 3967# 4724# 4725# 4726# 5549# 5789# 5795# 5797# 5801# 7401#
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-17
STORE.M80 CROSS REFERENCE TABLE
7402# 7403# 7405# 7408# 7409# 7411# 7412# 7413# 7414# 7417# 7419# 7421# 7422#
7423# 7424# 7425# 7426# 7427# 7429# 7434# 7454# 7455# 7456# 7457# 7459# 7461#
7464# 7465# 7466# 7467# 7468# 7470# 7471# 7472# 7473# 7474# 7475# 7476# 7478#
7480# 7483# 7485# 7492# 7493# 7495# 7496# 7497# 7498#
Q.3 = 000377 888# 889# 890# 3967# 4724# 4725# 4726# 5549#
Q.4 = 000007 888# 889# 890# 3967# 4724# 4725# 4726# 5549#
RAG 017631 6478 7529#
RAMMER 000404 862# 871
RAMST = 020000 40# 637 641 999 2452 4694 7555
RAMXCT 005573 3214# 3231 3260
RAMX1 020054 1785 7569#
RAMX2 020062 7570#
RBOUT = 000177 135# 1994
RCCMD 006366 1738 3579#
RCINT 006370 3581# 3783 5081 5569
RCLP 006374 3583# 3618
RCNOP 006431 3590 3607#
RDATP 015475 2909 6720#
RDATT 015470 2705 2822 6712#
RDLST 007010 3734 3806#
RDYMS 003274 2103 2115#
RD.EXM 011461 4865# 4931
READC 006331 3556# 3584 3638 3743 3764 3771 3790 4241 5992
READ.T= 000071 201# 4608 4639 4951 5047
RECVR 013666 5855#
REFERR= 000101 51# 1131 5751
REINI 000600 880 920 963 999# 1007 1333 1915 2104 2455 5782 6483 6486 6505
REMARG 001652 1451 1474#
REMAR1 001675 1477 1487#
REMCTL= 000203 63# 710 722 895 1566 1589 1856 2316 2353 2415
REMDAT= 000202 64# 725 1570 1594 1869 2322 2357
RESET = 000100 50# 1835 3295 3912 3964 5861
RETRY. 017325 4688 7481#
RHBASE 020242 4653 4721 4845 5334 7633#
RHSAVE 021327 5888 5933 5936 5941 5948 5959 7713#
RH.EXE 013600 5801# 5875 5954
RH.LP 013744 5889# 5908
RH.TST 013561 5795# 5842
RM100 020172 2710 2733 4562 4585 5026 5876 5898 5904 7615#
RNCOM 015251 6535# 6542
RNFLG 020165 5711 6535 7611#
RN. 017575 5718 7525#
ROMMSG 000350 841# 842
RPAREN= 000051 126#
RPBUFS 020207 4379 6333 6350 6385 6420 7620#
RPCMD 010124 1657 4301#
RPCNTR 020160 4303 4333 4339 7606#
RPEND 020157 961 1952 2463 3683 3694 4306 4323 7605#
RPFOO 010273 4304 4334 4341 4376#
RPGO 010265 4360 4367#
RPINCB 014716 6343# 6381
RPINI 020401 1005 4376 7698#
RPLST 020211 1006 1433 1441 1480 4328 4352 4377 7621#
RPNEW 010267 1431 4374#
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-18
STORE.M80 CROSS REFERENCE TABLE
RPTBFI 020432 4378 7699#
RPTON 020213 1003 1172 4308 4345 6304 7622#
RPTPAR 013421 1096 5724#
RPTRTN 010166 1174 4323# 4336 4342
RP.OUT 010233 4325 4344#
RP0 010130 4303# 4321
RP1 010151 4301 4311#
RP2 010175 4309 4328#
RP4 010240 4331 4348#
RRARG 015126 1461 6478#
RTNDIS 015061 587 6443#
RUB 003203 1995 2063#
RUNFP = 000300 44# 1106 1325 3432 3923 4038
R.BUSY= 000102 54# 5747
R.RESE= 000102 55#
SAVLST 013606 5804# 5886 5957
SCCMD 005771 1793 3341#
SCDIS 006017 3341 3357#
SCEADR 020344 5822 5836 5856 5919 7685#
SCECOD= 000000 877 878 5728 5784 7685 7711
SCE.GO 014000 5900 5912#
SC.OFF 021326 3351 3354 3357 5729 7712#
SC.TOF 006011 3346 3353#
SECRET 020256 1331 7651#
SEEPAG 011605 4914 4926#
SEMIC = 000073 120# 6580
SEPCHR 015641 1403 4519 6328 6839#
SEPYS 015643 6841# 6844 6849
SETDIS 016115 7001# 7146
SETM 016112 6955 6965 6971 6988 7000#
SETM0 016005 6915 6947 6959#
SETM1 015775 2620 6948 6953#
SETM2 016070 1914 2210 2611 4155 4172 6928 6992#
SETM2X 016105 6994 6998#
SETM3 016027 2648 6969#
SETM4 016037 2124 3419 6976# 7184 7250 7262 7271 7284
SETOUT 016773 7324 7367#
SETRN 015241 3446 3942 6530#
SETUSE 003354 2132 2147# 4086 4120 4167
SEVEN = 000007 155#
SHCMD 007601 1771 4115#
SHRGO 014542 6240#
SHRTAD 020235 6016 6017 7632#
SHR24 014542 3850 6239#
SHR36 014540 5140 5524 5937 5942 6238# 6363
SICMD 006142 1708 3432#
SIX = 000006 154#
SIXTN 010537 4469 4488#
SKP.GO 020144 5246 7477 7598#
SKP.TA= 000031 196# 4625
SKP2 002764 1929 1940#
SKP6 003001 1944 1952#
SKP8 003030 1957 1967#
SLASH = 000057 140# 2071 2738 2921 3099 3201 3594 3792 5203
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-19
STORE.M80 CROSS REFERENCE TABLE
SMCMD 007150 1710 3890#
SMERR 017535 3930 7520#
SMFINI 007325 1837 3932 3963# 5981
SMPAR = 000100 49# 854 5737 5767
SMSTS = 000301 46# 1234 6521
SMVER 007254 3926 3934#
SM1 007161 3890 3898# 4592
SM1.5 007164 1340 3896 3899#
SOFTER 013635 5755 5822#
SP =%000010 637 999 2110 2111 2452 4694 6244 6245 6248 6249
SPACE = 000040 139# 2744 3644 3645 3951 3952 5209 5211 5218 5220 5770 5775
STAR = 000052 123#
STATE 020360 1272 1281 3408 6509 6561 6567 7008 7693#
STATEM 015312 1843 4122 6531 6539 6551 6560# 6936
STBIT = 000004 107# 1279 6530
STCK.Y 016670 7307 7312#
STCMD 007457 1702 4056#
STINT 007470 4062# 4555
STMSK = 000373 106# 1274
STPPD 020162 1948 2214 7608#
STRCMP 015676 4459 4470 6882# 6890
STREND 015712 6884 6892#
SYNC = 000001 116# 7074 7075 7142 7154 7183 7266 7267 7275 7276
SYSBUF 021125 7309 7329 7709#
SYSEND 021325 7312 7710#
SYSIN 021121 7304 7310 7347 7359 7366 7707#
SYSOUT 021123 7296 7330 7367 7708#
SYSUP 000531 957#
SYSUP1 000533 958# 980
S16CHK 010476 4460 4468#
S36BL 014566 6264# 6281
S36LP 014572 6269# 6275
TAB = 000011 138#
TAPDEV 011652 4939 4951#
TAPEUN 020137 4446 4646 7458 7494 7597#
TARG1 015444 1602 6013 6392 6675# 6687 6714 6754 6790 6821
TARG2 015440 6618 6643 6670#
TECMD 005735 1697 3315#
TEDIS 005761 3315 3331#
TEN = 000012 158#
TENCHR 003515 2087 2231#
THREE = 000003 151#
TMPBF2 020073 3767 3776 4059 4073 4075 4551 6171 6184 6195 7572#
TMPB2 020100 2823 2827 2843 3565 3570 3607 3724 3746 3766 3775 4243 4393 4403
4412 4427 4437 4445 4484 4503 5226 5995 6067 7573#
TPCMD 006027 1699 3367#
TPDIS 006047 3367 3381#
TP.SET 010751 3377 4599#
TR 006561 3684# 3696
TRAPEN 020355 1839 2158 2283 3381 3557 4599 4834 7690#
TRCMD 006541 1736 3675#
TRLP 006577 3686 3691#
TRPDEF= 000020 93# 883 4598
TR1 006555 3675 3682#
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-20
STORE.M80 CROSS REFERENCE TABLE
TSKGO 016232 7051 7059#
TSKGO1 016251 7069 7071#
TSKLP 016220 7032 7049#
TSK2TS 016254 7073# 7093
TTCMD 007673 1777 4167#
TTERMS 004066 2429 2437#
TTERMZ 004066 2443#
TTERR 004024 1859 2407#
TTERR1 004046 2410 2423#
TTM 017423 2447 7508#
TTOCOM 003754 2324 2368#
TTYSW = 000300 45# 671
TWO = 000002 150#
T80DT 020275 784 795 1426 1475 3253 3258 3899 3914 6027 6029 7675#
U 003343 2141 2144# 4095 4169
UBANUM 020254 4656 4717 4841 5338 5364 7639#
UBA.RD 013553 5789# 5866 5926
UCHR = 000125 146# 1962
UMCMD 007771 1691 4230#
UNITNM 020132 4413 4573 7404 7410 7596#
UPARR = 000136 148# 1933 1961 2453
UP.LO 003153 2002 2037# 2563 4204
USER 003236 1924 2086#
USRMD 020156 1013 1154 1921 2117 2204 2417 2431 6976 7602#
VDCMD 011765 1783 5034#
VERCNT 020253 5090 5135 7638#
VERCRA 012015 5038 5060#
VERLST 012171 5085 5147#
VERRPT 012260 5116 5196#
VTCMD 012000 1779 5046#
V.BCLP 013302 5658# 5674
V.BLP 012101 5095# 5128 5142
V.BLP1 012104 5097#
V.DONW 012037 5070# 5125
V.ERR 012132 5108 5116#
V.GO 012047 5068 5078#
V.NXME 012071 5088# 5137
V.NXT 012150 5135#
V.VER 013247 5571 5642#
WAITLP 012602 5399# 5414
WATCHC 020130 1056 1061 1073 7594#
WDATP 015537 4024 6759#
WDATT 015532 2794 2978 6753#
WFNC1 006240 3497# 4257
WFUNC 006232 3492# 3876 4877 4895 4922 5632
WRD.DP 003436 2182 2190#
WRD.PR 003413 2167 2172#
WRD31 003354 2151#
WRD34 016145 6997 7012 7019#
W.CRMZ 013221 5557 5626#
W.LOC 013230 5624 5629#
W.LP 013232 5630# 5634
W0003 = 000112 82# 2240 2376 2665 6777
W0411 = 000110 81# 2239 2375 2664 6773
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-21
STORE.M80 CROSS REFERENCE TABLE
W1219 = 000106 80# 2238 2374 2663 6769
W2027 = 000104 79# 2253 2373 2678 6765
W2835 = 000102 78# 2251 2372 2676 6761
XCTMTA 012365 5246# 5250
XCTNOW 012356 5242# 5247 5253
XFRRT 012445 5299 5309#
XXX230 000372 835 853#
XXX235 000461 864 894#
YSRUN 013413 3434 5713 5718#
ZEROB 020000 7556#
ZEROES 007333 3966# 5594
ZMCMD 010050 1740 4264# 5581
ZM1 010071 4272# 4286
Z.TBUF 016765 3424 7365#
. = 021377 536# 546# 557# 568# 581# 593# 608# 619# 633# 7555# 7556# 7557# 7558#
7559# 7560# 7561# 7562# 7563# 7564# 7565# 7566# 7567# 7568# 7569# 7570# 7571#
7572# 7573# 7574# 7575# 7576# 7577# 7578# 7579# 7580# 7586# 7588# 7589# 7594#
7595# 7596# 7597# 7598# 7599# 7600# 7601# 7602# 7605# 7606# 7607# 7608# 7609#
7610# 7611# 7612# 7613# 7614# 7615# 7616# 7617# 7618# 7619# 7620# 7621# 7622#
7623# 7624# 7625# 7626# 7627# 7628# 7629# 7630# 7631# 7632# 7633# 7634# 7635#
7636# 7637# 7638# 7639# 7647# 7651# 7653# 7654# 7655# 7656# 7658# 7664# 7665#
7673# 7675# 7679# 7680# 7681# 7682# 7683# 7684# 7685# 7686# 7687# 7688# 7689#
7690# 7691# 7692# 7693# 7694# 7695# 7696# 7697# 7698# 7699# 7700# 7701# 7702#
7703# 7704# 7705# 7706# 7707# 7708# 7709# 7710# 7712# 7713#
.ARG1 020223 1409 1507 4194 4513 4518 4520 6310 6329 6576 6892 7627#
.ARG16 014625 6301# 6462
.ARG36 014620 6298# 6464
.CLRRM 015620 6465 6819#
.CRLF 002135 1644# 6461
.DSBAS 000452 890# 4116
.IN = 000333 108# 3229
.MODE0= 000001 99# 2297 6963 6993
.MODE1= 000002 100# 2297 6953 6993
.MODE2= 000004 101# 2181 4171 6999
.MODE3= 000010 102# 1561 2181 2297 2348 4154 6924 6969
.MODE4= 000020 103# 1162 1533 1899 6986
.MOV5B 015365 6460 6614#
.MTBAS 000445 889#
.OUT = 000323 109# 3255
.RET = 000311 110# 3216
.RUN.. 013400 5709# 6463
.SETM1 015760 6918 6945#
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-22
STORE.M80 CROSS REFERENCE TABLE
ARG16 445# 3090 3133 3252 3267 3676 6026
ARG36 455# 2769 2959 3061 3117 3124 4019 4502
BUSRES 320# 2781 2804 2808 2894 2897 2902 3001 3006
CLINE 265#
CLRB 511# 1000 1001 1002 1003 1004 1073 1296 1321 1365 1366 1503 1912 1913 1948
2101 2117 2200 2463 2464 2465 2485 2486 2614 3390 3683 3700 3949 4173 4185
4833 4834 5503 5504 5695 5724 5763 6500 6544 6545 6959 7007 7073
CLRRM 461# 3724 4062 4220 4264 4268 5507 7020
CRLF 440# 848 1021 1963 2051 2728 2747 2845 2923 3307 3596 3656 3692 3802 3958
4011 4528 5228 5858 6504
D 325# 888 889 890 3967 4724 4725 4726 5549
DEPOS 474# 2199 4063 4064 4070 4119 4661 4666 4671 7024
DI. 371# 7402 7409 7412 7413 7422 7424 7426 7455 7457 7465 7467 7471 7473 7475
7493 7496 7498
DI.IND 385# 7404 7410 7418 7420 7458 7460 7477 7494
EI. 357# 5795 5797 5801 7405 7427 7429 7434 7461 7468 7478 7480 7483
ENDCMD 306# 1845 2749 2924 3011 3119 3126 3135 3158 3181 3269 3296 3352 3355 3451
3462 3473 3515 3622 3660 3701 3714 3804 3882 4012 4291 7377
ENDLST 427# 5790 5799 5802 7436 7487 7499
ERRTST 406# 5796 5798 7430 7435 7481 7482 7484 7486
EXAM 467# 1256 1372 2152 2289 2329 3935 3954 4794 4826
INTOFF 249# 918 955 1259 1330 1379 2153 2290 2330 3936 3955 4290 4594 4983 5198
5445 5453 5870 5983
INTON 256# 900 1254 1328 1369 2151 2278 2328 3934 3953 4270 4832 4981 5233 5275
5502 5868 5912
KCHAR 225# 7074 7075
KLINE 241# 2475 2482 2599 2612 7264 7272
LI. 343# 7403 7408 7411 7414 7417 7419 7421 7423 7425 7456 7459 7464 7466 7470
7472 7474 7476 7485 7492 7495 7497
LONG.D 499# 1068 1341 5736
MOV5B 435# 3765 3903 4057 4115 4402 4436 4549 4652 4668 4719 4843 4858 4976 5063
5333 5542 5583 5587 5947
PCHAR 217# 1645 1646 1933 1934 1961 1962 2071 2453 2454 2738 2744 2816 2835 2921
3099 3201 3305 3306 3594 3644 3645 3792 3951 3952 5203 5208 5209 5210 5211
5218 5219 5220 5770 5775 6106 6107
PCRLF 272# 848 1021 1963 2051 2728 2747 2845 2923 3307 3596 3656 3692 3802 3958
4011 4528 5228 5858 6504
PLINE 233# 842 899 919 993 1022 1222 1322 1367 1514 2103 2141 2447 2725 2836
2841 3303 3782 3930 3946 3956 4045 4094 4095 4168 4169 4219 4387 4398 4406
4421 4432 4439 4448 4478 4527 5696 5718 5759 5765 5855 6478 6480 6501 6547
7373 7381 7388
PSLASH 299# 2071 2738 2921 3099 3201 3594 3792 5203
PSPACE 291# 2744 3951 3952 5209 5211 5218 5220 5770 5775
PTAB 285#
RD.REG 482#
RUN.. 450# 2767 3035 3481 3579 3631 3682 3710 3720 3838 4235
SETZM 487#
SSCLK 278#
TSTRDY 492# 2316 2341 2353
TWAIT 392# 7406 7416 7462
UBA. 414# 5789 7401 7454
WAIT 399# 7407 7415 7428 7463 7469 7479
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-23
STORE.M80 CROSS REFERENCE TABLE
ACI 5102 6259 6449
ADC 6695
ADD 770 2247 2383 2672 4031 4563 5099 5346 6256 6446 7029 7219
ADI 1936 6199 6352 6490 6492 6494 6496
ANA 690 693 699 707 752 962 1014 1018 1062 1095 1113 1139 1155 1173 1235
1332 1425 1430 1476 1608 1879 1922 2064 2119 2165 2199 2217 2224 2292 2418
2591 2594 2631 2638 2881 2915 2987 3345 3359 3589 3685 3695 3738 3759 3959
4048 4063 4064 4070 4119 4140 4161 4285 4314 4324 4335 4359 4661 4666 4671
5326 5372 5488 5493 5518 5712 5730 6197 6210 6267 6305 6380 6482 6523 6562
6591 6883 6946 6977 7024 7038 7053 7087 7294 7298 7306 7338 7349 7355
ANI 758 970 974 1030 1036 1050 1070 1079 1089 1107 1132 1274 1279 1304 1326
1466 1555 1567 1590 1858 1864 1870 1893 1899 2096 2181 2194 2297 2316 2341
2353 2408 2423 2647 3285 3288 3301 3322 3325 3332 3376 3382 3433 3569 3636
3911 3925 3987 3995 4004 4040 4247 4364 4874 4913 4920 4930 5073 5096 5111
5173 5224 5290 5468 5560 5576 5611 5741 5749 5753 5773 5778 5934 5964 5997
6315 6431 6740 6993 7009 7044 7064 7226
CALL 663 727 847 906 907 910 959 994 1010 1068 1082 1166 1192 1246 1256
1336 1340 1341 1342 1343 1349 1370 1372 1377 1378 1403 1449 1502 1602 1613
1637 1827 1837 1843 1905 1914 1964 2002 2017 2073 2102 2124 2125 2132 2133
2152 2199 2209 2289 2309 2324 2329 2475 2482 2563 2599 2611 2612 2619 2620
2705 2715 2726 2727 2729 2736 2741 2748 2772 2781 2784 2791 2794 2804 2808
2811 2822 2825 2839 2844 2855 2868 2894 2897 2902 2909 2919 2922 2931 2957
2970 2978 3001 3006 3037 3053 3060 3075 3077 3097 3151 3165 3173 3191 3200
3204 3208 3219 3231 3241 3260 3279 3317 3343 3369 3393 3401 3419 3424 3438
3446 3457 3470 3483 3489 3584 3593 3595 3600 3638 3640 3643 3688 3691 3712
3713 3722 3726 3727 3743 3747 3764 3771 3774 3790 3791 3798 3839 3848 3850
3852 3861 3876 3894 3901 3908 3915 3917 3920 3922 3935 3942 3948 3954 3957
3984 4010 4024 4046 4056 4063 4064 4070 4076 4086 4119 4120 4122 4135 4167
4204 4236 4237 4238 4241 4242 4252 4271 4272 4276 4280 4304 4311 4388 4399
4407 4422 4433 4440 4449 4459 4470 4479 4497 4511 4519 4533 4534 4540 4548
4560 4565 4569 4580 4592 4597 4607 4609 4612 4616 4618 4619 4626 4633 4640
4643 4661 4666 4671 4707 4708 4709 4715 4774 4777 4784 4792 4794 4800 4807
4816 4823 4826 4827 4835 4855 4870 4877 4895 4911 4922 4932 4945 4952 4954
4964 4971 4982 4991 5034 5046 5048 5078 5080 5081 5088 5140 5178 5184 5201
5206 5215 5227 5231 5242 5353 5362 5386 5387 5400 5408 5423 5426 5435 5452
5501 5513 5524 5557 5566 5568 5569 5571 5572 5581 5591 5592 5600 5602 5603
5626 5632 5698 5736 5738 5764 5769 5774 5779 5780 5781 5823 5843 5857 5859
5867 5869 5878 5890 5906 5914 5917 5920 5927 5937 5942 5950 5955 5961 5977
5981 5982 5992 6013 6040 6045 6073 6079 6098 6102 6108 6121 6133 6328 6330
6363 6392 6484 6485 6498 6503 6531 6539 6546 6551 6600 6618 6620 6643 6687
6714 6754 6790 6821 6893 6936 6961 6962 6997 7012 7024 7074 7075 7078 7109
7247 7250 7251 7258 7262 7264 7271 7272 7342
CC 6019
CMA 672 787 1034 1099 1125 1148 1278 1439 2058 2216 3220 3358 3564 3568 3924
4039 4047 4307 4374 5651 5654 5740 5748 5752 5768 5772 5777 6522 6534 6723
6727 6731 6735 6739 7043 7062
CMC 4367 5455
CMP 1040 1204 1290 1390 2568 4680 4689 5107 5115 5673 6001 6005 6649 6886 7240
CNC 1451 6021
CNZ 1042 1071 1115 1141 1329 4341 5116 6629 6928 6948 7339
CP 1237 1243
CPI 830 863 1162 1355 1533 1548 1561 1629 1873 1909 1928 1940 1943 1953 1956
1967 1970 1973 1984 1987 1990 1994 2021 2037 2039 2074 2086 2303 2306 2332
2348 2473 2561 2582 2603 2627 3617 4154 4199 4214 4340 4938 4988 5532 6580
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-24
STORE.M80 CROSS REFERENCE TABLE
6583 6586 6843 6848 6914 6917 6924 7050 7068 7080 7083 7092 7121 7126 7142
7154 7174 7177 7180 7183 7200 7334
CZ 1431 1638 1941 1985 1988 1991 4155 4334 4682 7122
DAD 746 792 808 817 2939 3020 4970 5281 5293 5663 6189 7313
DCR 611 769 796 979 1495 1500 2066 2080 2719 2745 3653 3799 3858 3880 4338
4510 4879 4892 4897 4924 4998 5136 5476 5537 5633 6046 6080 6123 6179 6188
6203 6216 6218 6255 6274 6280 6340 6366 6369 6373 6401 6404 6410 6417 6628
6653 6827 6867 7215 7216 7217 7221
DCX 646 1311 1395 1481 1482 2069 3174 3404 3610 3613 4221 5117 5214 5342 5343
5344 5379 5381 5470 5471 5474 5475 5485 5486 6215 6248 6249 6272 6434 6825
6840
DI 539 620 1255 1371 2279 2325 7346
EI 908 1011 1257 1373 2032 2113 2221 2310 2399 7041 7257 7341
IN 671 724 725 969 973 1029 1033 1069 1078 1088 1106 1131 1234 1325 1554
1566 1589 1854 1856 1869 1892 2091 2316 2341 2353 2643 3432 3563 3567 3923
4038 5747 5751 5767 5771 5776 6521 6722 6726 6730 6734 6738
INR 560 845 1215 1353 1979 2020 2054 2576 2581 2601 3615 3866 4208 4320 4330
5530 5899 5968 6321 7063 7131 7198
INX 549 571 573 584 596 645 744 789 794 810 812 869 870 1202 1212
1213 1214 1347 1388 1400 1401 1415 1435 1437 1508 1544 1586 1606 1627 2005
2110 2111 2173 2174 2197 2569 2717 2718 2737 2742 2941 3023 3111 3140 3737
3758 3770 3824 3835 3854 3855 3856 3871 3873 4206 4207 4349 4351 4781 4909
4927 4996 4997 5071 5098 5106 5122 5186 5296 5310 5383 5384 5411 5491 5558
5574 5609 5659 5661 5664 5902 5974 6003 6163 6165 6176 6178 6244 6245 6246
6322 6336 6345 6346 6347 6387 6399 6400 6413 6416 6428 6429 6433 6453 6524
6563 6633 6634 6651 6652 6671 6673 6676 6678 6698 6725 6729 6733 6737 6762
6766 6770 6774 6798 6802 6806 6810 6841 6866 6888 6889 7022 7031 7059 7116
7117 7193 7214 7220 7322 7358
JC 1194 1262 1337 1461 2768 2854 3036 3086 3164 3189 3277 3315 3341 3367 3675
3721 3890 3982 4131 4190 4389 4400 4423 4434 4441 4451 4538 4567 4578 4593
4801 4824 4946 4972 5035 5049 5125 5128 5533 5844 5915
JM 1283 1356 1501 2010 3739 3760 5538 6411
JMP 540 551 574 587 599 626 835 871 920 1057 1083 1097 1118 1143 1216
1224 1297 1306 1350 1380 1396 1506 1614 1639 1915 2143 2210 2226 2455 2476
2606 2621 2817 2847 2933 3048 3054 3073 3103 3113 3175 3327 3333 3360 3377
3383 3425 3439 3752 3783 3826 3896 3932 3998 4100 4109 4124 4162 4231 4257
4309 4321 4466 4516 4521 4555 4574 4588 4620 4933 4992 5000 5027 5038 5068
5142 5247 5250 5253 5311 5327 5418 5429 5447 5547 5624 5682 5690 5699 5719
5782 5908 5979 5984 6061 6137 6223 6296 6299 6323 6371 6414 6479 6486 6505
6514 6542 6699 6890 6955 6965 6971 6988 7014 7025 7032 7146 7254 7284 7324
7360 7384 7390
JNC 1267 1455 4301 4610 4631 4641 6331 7201
JNZ 649 753 759 774 797 825 831 963 980 1015 1019 1080 1090 1096 1108
1117 1133 1156 1163 1174 1247 1333 1534 1562 1859 1865 1874 1880 1924 1929
1944 1957 1974 2087 2298 2307 2333 2349 2410 2419 2429 2433 2592 2628 2632
2746 2782 2785 2806 2882 2895 2898 2988 3002 3007 3302 3407 3590 3618 3654
3800 3859 3926 4209 4315 4325 4331 4342 4460 4471 4613 4634 4644 4793 4893
4939 4955 4989 4999 5108 5414 5477 5519 5595 5606 5667 5674 5713 5731 6047
6081 6124 6180 6217 6219 6275 6281 6306 6316 6374 6405 6418 6654 6828 6870
6949 7054 7127 7143 7227 7307 7335
JP 2014 2720 3881 4172 4360 4898 5373 5634 6367 6381 7069 7222
JZ 864 914 971 975 1031 1051 1063 1178 1201 1205 1244 1291 1391 1427 1477
1527 1556 1568 1591 1630 1900 1954 1968 1995 2022 2167 2182 2293 2304 2317
2342 2354 2562 2571 2583 2595 2604 2648 2809 2903 3346 3434 3686 3696 3778
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-25
STORE.M80 CROSS REFERENCE TABLE
4141 4286 4336 4785 4914 4931 5137 5174 5561 5577 5613 5742 5755 5824 5900
5969 6204 6370 6402 6483 6581 6584 6587 6844 6849 6884 6915 6918 6947 6994
7051 7081 7084 7088 7093 7175 7178 7181 7184 7241 7299 7350 7356
LDA 795 961 1013 1017 1039 1061 1094 1112 1137 1154 1161 1172 1176 1260 1272
1289 1331 1429 1475 1525 1532 1560 1839 1878 1898 1921 1935 2019 2053 2063
2118 2154 2158 2164 2177 2180 2193 2250 2283 2291 2296 2321 2331 2335 2347
2417 2431 2580 2593 2630 2637 2675 2880 2914 2986 3197 3256 3258 3287 3300
3324 3331 3357 3381 3408 3503 3557 3588 3684 3694 3910 3963 3994 4003 4066
4153 4160 4170 4284 4323 4333 4393 4412 4427 4445 4484 4562 4656 4716 4840
4937 5338 5364 5517 5711 5729 5933 5963 6196 6205 6304 6395 6481 6561 6923
6945 6976 6992 7008 7037 7042 7079 7086 7209 7238 7337
LDAX 862 1199 1389 1605 2714 3879 4246 4986 5095 5105 5114 5123 5205 5345 5371
5467 5472 5487 5492 6000 6004 6175 6631 6648 6760 6764 6768 6772 6776 6796
6800 6804 6808 6812 6882 7114
LHLD 1191 1302 1310 1433 1480 1507 1515 1542 1885 1993 2567 2589 2918 2937 3018
3101 3110 3139 3154 3519 3607 3751 3823 3834 3914 4194 4328 4512 4518 4573
4646 4698 4811 4813 4864 4872 4881 4918 4926 5070 5097 5169 5222 5484 5608
5680 5919 5995 6029 6209 6227 6310 6333 6350 6385 6576 7192 7281 7296 7304
7347
LXI 559 610 637 641 642 674 736 782 799 807 860 861 958 999 1005
1007 1028 1068 1190 1251 1288 1335 1339 1341 1345 1352 1417 1493 1504 1852
1978 2079 2104 2142 2155 2214 2443 2452 2460 2483 2495 2575 2600 2710 2711
2732 2733 2838 2843 2846 2860 2908 2938 2965 3019 3042 3067 3096 3399 3582
3632 3633 3687 3734 3746 3842 3843 3862 3867 3898 3907 3947 4022 4030 4067
4072 4075 4088 4195 4243 4275 4354 4376 4378 4458 4469 4509 4515 4561 4655
4679 4694 4695 4772 4779 4853 4878 4896 4923 4944 4969 4980 4985 5066 5085
5086 5135 5139 5181 5200 5241 5245 5249 5252 5280 5292 5299 5337 5360 5385
5451 5511 5523 5556 5570 5623 5628 5657 5697 5736 5822 5842 5856 5866 5875
5876 5886 5888 5889 5904 5913 5926 5936 5954 5957 5959 5960 6017 6059 6067
6093 6155 6171 6184 6195 6311 6443 6502 6509 6954 6964 6970 6984 6987 6998
7013 7047 7077 7098 7108 7110 7111 7145 7159 7197 7212 7236 7252 7309 7312
7329 7365 7375 7383 7389
MOV 548 570 572 583 595 647 675 678 681 682 685 689 691 692 694
698 706 738 739 740 741 743 751 757 765 786 788 806 809 811
818 868 1035 1038 1049 1188 1273 1275 1277 1295 1303 1305 1313 1354 1411
1414 1416 1434 1436 1440 1459 1465 1467 1483 1485 1494 1496 1543 1585 1626
1855 1863 1871 1881 1894 1904 1923 2004 2008 2012 2016 2072 2156 2162 2175
2179 2192 2198 2215 2220 2223 2295 2302 2336 2356 2359 2407 2444 2449 2590
2602 2716 2864 2870 2940 2942 2969 2972 3022 3024 3102 3153 3155 3169 3195
3228 3243 3257 3281 3286 3319 3323 3344 3371 3405 3492 3494 3532 3534 3556
3583 3592 3608 3611 3616 3635 3648 3651 3736 3757 3769 3870 3872 3986 3993
4068 4139 4198 4213 4313 4319 4329 4348 4350 4358 4365 4564 4658 4865 4867
4873 4875 4885 4887 4889 4891 4912 4919 4921 4929 5072 5100 5101 5103 5110
5113 5172 5223 5225 5283 5284 5286 5291 5295 5297 5340 5347 5366 5377 5378
5380 5382 5396 5397 5412 5441 5442 5531 5559 5575 5610 5630 5650 5652 5653
5655 5658 5660 5665 5687 5693 5750 5897 5935 5940 5967 5996 5998 6060 6162
6164 6177 6186 6187 6206 6208 6212 6214 6242 6253 6257 6258 6260 6266 6269
6271 6313 6317 6335 6338 6339 6351 6353 6379 6386 6396 6397 6409 6426 6430
6447 6448 6450 6452 6454 6471 6512 6578 6670 6672 6675 6677 6696 6842 6865
6912 7023 7030 7049 7061 7194 7199 7210 7213 7237 7245 7282 7297 7305 7314
7321 7332 7333 7340 7348 7354
MVI 644 715 721 783 785 853 894 896 957 1323 1346 1348 1375 1545 1831
1834 1842 2171 2188 2203 2232 2242 2252 2259 2265 2323 2367 2378 2386 2389
2396 2414 2427 2445 2657 2667 2677 2684 2690 2703 2712 2734 2778 2797 2800
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-26
STORE.M80 CROSS REFERENCE TABLE
2862 2875 2887 2967 2975 2981 2993 3039 3044 3047 3064 3069 3072 3093 3156
3177 3179 3216 3229 3255 3353 3391 3420 3436 3449 3458 3500 3511 3525 3544
3546 3560 3679 3729 3789 3796 3844 3849 3864 4026 4029 4033 4087 4090 4121
4196 4222 4230 4233 4240 4254 4265 4277 4464 4475 4529 4584 4587 4596 4598
4608 4615 4625 4639 4663 4678 4688 4789 4851 4856 4869 4883 4903 4951 4984
5025 5037 5047 5051 5089 5461 5466 5508 5546 5565 5629 5672 5681 5684 5737
5831 5877 5991 6043 6077 6119 6238 6295 6298 6301 6356 6470 6472 6510 6513
6530 6538 6550 6627 6646 6824 6826 6932 6953 6960 6963 6969 6986 6996 6999
7011 7048 7060 7112 7232 7248 7323
NOP 537 538 4035 4036
ORA 648 700 708 819 1177 1200 1280 1314 1526 1632 1857 2172 2190 2195 2432
3170 3293 3406 3558 3996 4248 4657 5339 5365 5413 5666 5688 5754 5965 6511
6566 6896 7315
ORI 701 709 846 1484 7070
OUT 659 702 710 719 722 854 895 897 905 1282 1570 1571 1575 1594 1826
1832 1835 1840 2234 2236 2237 2238 2239 2240 2243 2248 2251 2253 2257 2261
2266 2267 2284 2322 2357 2360 2368 2370 2371 2372 2373 2374 2375 2376 2379
2384 2387 2391 2397 2398 2415 2428 2659 2661 2662 2663 2664 2665 2668 2673
2676 2678 2682 2686 2691 2692 2704 2723 2776 2779 2798 2802 2871 2876 2889
2912 2973 2976 2982 2996 3178 3180 3295 3392 3395 3409 3437 3448 3450 3459
3461 3493 3495 3498 3501 3504 3512 3514 3526 3528 3533 3535 3538 3539 3540
3542 3545 3547 3549 3559 3561 3573 3912 3964 4027 4032 4091 4108 4278 4600
4866 4868 5726 5832 5861 6568 6761 6765 6769 6773 6777 6797 6801 6805 6809
6813 7010 7380 7387
PCHL 1182 1469 1516 1886 2114 2944 3026 4368 4699 5302 6125 6228 6458
POP 561 612 804 823 829 843 1043 1072 1116 1142 1167 1242 1468 1486 1487
1529 1540 1547 1569 1574 1593 1644 2024 2028 2029 2030 2031 2105 2106 2107
2108 2109 2202 2448 3203 3218 3232 3490 3601 3602 3646 3777 3797 4244 4465
4468 4662 4664 4683 4775 4805 4908 4915 5180 5185 5188 5189 5232 5234 5235
5309 5348 5363 5401 5409 5410 5424 5427 5436 5456 5457 5458 5459 5460 5529
5573 5635 5683 5685 5692 5709 5715 5896 5907 5962 5978 5993 6020 6044 6049
6050 6051 6052 6078 6083 6084 6085 6086 6109 6110 6111 6112 6118 6120 6168
6182 6264 6285 6286 6287 6288 6302 6344 6354 6357 6456 6457 6473 6553 6593
6605 6614 6621 6622 6742 6778 6814 6819 6853 6869 6871 7021
PUSH 558 586 598 609 621 622 623 624 772 773 781 1041 1067 1114 1140
1165 1236 1418 1450 1474 1479 1524 1541 1553 1588 1853 2166 2446 3199 3215
3227 3488 3598 3599 3642 3773 4234 4355 4457 4651 4660 4681 4696 4773 4776
4854 4910 5166 5167 5170 5182 5196 5197 5230 5276 5277 5278 5285 5300 5332
5361 5399 5406 5407 5422 5425 5434 5512 5567 5622 5627 5710 5887 5903 5905
5958 5975 5976 5990 6018 6036 6037 6038 6039 6058 6068 6069 6070 6071 6094
6095 6096 6097 6129 6130 6131 6132 6169 6202 6241 6250 6251 6262 6265 6319
6343 6349 6444 6445 6549 6575 6616 6617 6721 6759 6795 6839 6864 6868 7019
RAL 683 684 1261 1266 1460 3282 3283 3284 3320 3321 3372 3373 3374 3375 3988
3989 3990 3991 5124 5127
RAR 676 677 679 680 4005 4006 4007 4008 4886 4890 5288 5289 6213 6270
RC 4408 4480 4498 5349 6894
RET 562 613 1315 1488 1510 1530 1551 1572 1576 1595 1647 1845 2033 2045 2059
2081 2127 2269 2311 2400 2420 2450 2466 2497 2585 2615 2694 2749 2828 2924
3011 3079 3119 3126 3135 3158 3181 3209 3221 3233 3245 3261 3269 3296 3304
3308 3352 3355 3410 3451 3462 3473 3515 3550 3575 3622 3660 3701 3714 3804
3882 3965 4012 4049 4146 4156 4175 4223 4291 4346 4380 4414 4486 4505 4586
4601 4672 4710 4722 4817 4830 4836 4846 4916 4947 4956 5190 5236 5243 5354
5367 5388 5462 5478 5494 5615 5636 5675 5716 6006 6022 6030 6053 6087 6113
6289 6421 6435 6474 6526 6536 6554 6569 6594 6606 6625 6635 6655 6680 6743
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-27
STORE.M80 CROSS REFERENCE TABLE
6779 6815 6829 6854 6873 6897 6938 7002 7100 7132 7202 7265 7273 7368 7377
RLC 2159 2160 2161 4394 4395 4428 4429
RM 2038
RNC 4953 6697
RNZ 1549 1910 2075 2097 2916 4077 4690 5074 5402 5428 5489 6002 6650 6887 6978
RP 2040
RRC 766 767 768 844 1037 2178 2191 3649 3650
RST 842 848 899 900 918 919 955 993 1000 1001 1002 1003 1004 1021 1022
1073 1222 1254 1259 1296 1321 1322 1328 1330 1365 1366 1367 1369 1379 1503
1514 1645 1646 1912 1913 1933 1934 1948 1961 1962 1963 2051 2071 2101 2103
2117 2141 2151 2153 2200 2278 2290 2328 2330 2447 2453 2454 2463 2464 2465
2485 2486 2614 2725 2728 2738 2744 2747 2767 2769 2816 2835 2836 2841 2845
2921 2923 2959 3035 3061 3090 3099 3117 3124 3133 3201 3252 3267 3303 3305
3306 3307 3390 3481 3579 3594 3596 3631 3644 3645 3656 3676 3682 3683 3692
3700 3710 3720 3724 3765 3782 3792 3802 3838 3903 3930 3934 3936 3946 3949
3951 3952 3953 3955 3956 3958 4011 4019 4045 4057 4062 4094 4095 4115 4168
4169 4173 4185 4219 4220 4235 4264 4268 4270 4290 4387 4398 4402 4406 4421
4432 4436 4439 4448 4478 4502 4527 4528 4549 4594 4652 4668 4719 4832 4833
4834 4843 4858 4976 4981 4983 5063 5198 5203 5208 5209 5210 5211 5218 5219
5220 5228 5233 5275 5333 5445 5453 5502 5503 5504 5507 5542 5583 5587 5695
5696 5718 5724 5759 5763 5765 5770 5775 5855 5858 5868 5870 5912 5947 5983
6026 6106 6107 6478 6480 6500 6501 6504 6544 6545 6547 6959 7007 7020 7073
7373 7381 7388
RZ 1609 1633 1971 2065 2120 2205 2218 2225 2474 2639 2812 3171 3689 4041 4200
4215 4684 5437 7039 7155 7295 7316
SHLD 1006 1009 1252 1312 1409 1441 1509 1546 2006 2070 2461 2462 2484 2496 2570
2866 3112 3141 3214 3472 3744 3825 3836 3899 4073 4352 4377 4379 4513 4520
4606 4665 4706 4780 4782 4812 4814 4928 5067 5079 5183 5187 5226 5444 5612
5642 5643 5644 5646 5647 5648 5686 5836 6016 6157 6167 6190 6329 6420 6892
6985 7001 7099 7160 7195 7253 7310 7330 7359 7366 7367 7376
STA 784 1056 1100 1126 1149 1281 1324 1376 1426 1550 1937 1952 2023 2055 2057
2067 2204 2231 2584 2656 2858 2892 2963 2999 3040 3045 3065 3070 3094 3157
3196 3217 3244 3294 3351 3354 3421 3422 3423 3565 3570 3680 3730 3865 4092
4145 4147 4255 4266 4303 4306 4308 4339 4345 4375 4396 4413 4430 4446 4476
4485 4530 4585 4599 4717 4790 4841 4852 4857 4904 5026 5061 5090 5246 5509
5631 5689 5694 5898 5941 5966 6303 6499 6535 6567 6913 6982 6983 7000 7045
7071 7097 7249 7283
STAX 3609 3612 3868 4205 4250 4987 5469 5473 6359 6398 6412 6427 6432 6632 6724
6728 6732 6736 6741 7115
STC 3931 4366 4531 4806 5331 5454 6011 6604 6693
SUB 4089
SUI 2009 2013 2044 4171 6314 6318
XCHG 745 747 791 793 816 822 1412 1445 1624 2739 2743 2865 2867 2943 3025
3875 3877 4356 5213 5216 5298 5662 5671 6015 6156 6455 6645 6690 6823 7303
7320
XRA 655 737 904 1187 1438 1825 1938 1949 1965 2056 2235 2369 2660 2722 2775
2857 2891 2911 2962 2998 3350 3394 3447 3460 3497 3513 3527 3537 3548 3572
3581 4107 4302 4305 4344 4504 4884 5395 5446 5725 5860 6185 6334 6368 6533
6541 6692 7096 7379 7386
XTHL 547 550 569 582 585 594 597 1584 1587 1601 1603 1623 6012 6014 6161
6240 6247 6391 6393 6520 6525 6560 6564 6615 6624 6642 6644 6686 6689 6713
6715 6753 6755 6789 6791 6820 6822 6863 6872
.ADDR 842 876 879 880 881 899 911 912 919 993 1022 1222 1256 1322 1367
1372 1514 1657 1659 1661 1663 1665 1668 1670 1672 1674 1676 1679 1681 1683
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-28
STORE.M80 CROSS REFERENCE TABLE
1685 1687 1691 1693 1695 1697 1699 1702 1704 1706 1708 1710 1713 1715 1717
1719 1721 1725 1727 1729 1731 1733 1736 1738 1740 1742 1744 1747 1749 1751
1753 1755 1759 1761 1763 1765 1767 1769 1771 1773 1775 1777 1779 1783 1785
1787 1789 1791 1793 1809 1810 1811 1812 2103 2141 2152 2199 2289 2329 2447
2475 2482 2599 2612 2706 2725 2770 2773 2792 2795 2823 2826 2827 2836 2841
2932 2946 2947 2948 2949 2958 2960 2979 3028 3029 3030 3031 3062 3076 3078
3091 3118 3125 3134 3253 3268 3303 3677 3724 3766 3767 3775 3776 3782 3840
3904 3905 3930 3935 3946 3954 3956 4020 4045 4058 4059 4062 4063 4064 4070
4094 4095 4116 4117 4119 4168 4169 4219 4220 4264 4268 4273 4387 4398 4403
4404 4406 4421 4432 4437 4438 4439 4448 4478 4503 4527 4550 4551 4653 4654
4661 4666 4669 4670 4671 4720 4721 4794 4826 4828 4829 4844 4845 4859 4860
4977 4978 5064 5065 5315 5316 5317 5318 5319 5320 5321 5322 5334 5335 5507
5543 5544 5584 5585 5588 5589 5593 5594 5604 5605 5696 5718 5759 5765 5796
5798 5855 5948 5949 6027 6460 6461 6462 6463 6464 6465 6478 6480 6501 6547
7020 7024 7264 7272 7373 7381 7388 7404 7406 7407 7410 7415 7416 7418 7420
7428 7430 7435 7458 7460 7462 7463 7469 7477 7479 7481 7482 7484 7486 7494
.ASCII 7506 7510 7540 7542 7544
.ASCIZ 841 1817 2115 2144 3662 3663 3664 3665 4487 4488 5815 5816 7504 7505 7508
7509 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525
7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7546
.BLKB 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570
7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7586 7588 7589 7594 7595
7596 7597 7598 7599 7600 7601 7602 7605 7606 7607 7608 7609 7610 7611 7612
7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627
7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7647 7651 7653
7654 7655 7656 7658 7664 7665 7673 7675 7679 7680 7681 7682 7683 7684 7685
7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700
7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7712 7713
.BYTE 848 877 878 882 883 884 885 886 887 888 889 890 891 892 1000
1001 1002 1003 1004 1021 1073 1296 1321 1365 1366 1503 1645 1646 1656 1658
1660 1662 1664 1667 1669 1671 1673 1675 1678 1680 1682 1684 1686 1690 1692
1694 1696 1698 1701 1703 1705 1707 1709 1712 1714 1716 1718 1720 1724 1726
1728 1730 1732 1735 1737 1739 1741 1743 1746 1748 1750 1752 1754 1758 1760
1762 1764 1766 1768 1770 1772 1774 1776 1778 1782 1784 1786 1788 1790 1792
1794 1844 1912 1913 1933 1934 1948 1961 1962 1963 2051 2071 2101 2117 2126
2200 2453 2454 2463 2464 2465 2485 2486 2614 2728 2738 2744 2747 2753 2754
2755 2756 2757 2758 2759 2760 2767 2769 2781 2804 2808 2816 2835 2845 2894
2897 2902 2921 2923 2959 3001 3006 3035 3061 3090 3099 3117 3124 3133 3201
3252 3267 3305 3306 3307 3390 3402 3481 3579 3594 3596 3631 3644 3645 3656
3676 3682 3683 3692 3700 3710 3720 3724 3748 3749 3765 3792 3802 3806 3807
3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3838 3851 3903
3921 3949 3951 3952 3958 3967 4011 4019 4057 4062 4115 4123 4173 4185 4220
4235 4264 4268 4402 4436 4502 4528 4549 4652 4668 4719 4724 4725 4726 4833
4834 4843 4858 4976 5063 5141 5147 5148 5149 5150 5151 5152 5153 5154 5155
5156 5157 5203 5208 5209 5210 5211 5218 5219 5220 5228 5333 5503 5504 5507
5525 5542 5549 5583 5587 5695 5724 5763 5770 5775 5789 5790 5795 5796 5797
5798 5799 5801 5802 5804 5805 5806 5807 5808 5809 5810 5811 5858 5938 5943
5947 6026 6041 6042 6074 6075 6099 6100 6106 6107 6134 6135 6364 6500 6504
6532 6540 6544 6545 6552 6937 6959 7007 7020 7073 7074 7075 7266 7267 7268
7269 7270 7275 7276 7277 7278 7279 7401 7402 7403 7404 7405 7406 7407 7408
7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423
7424 7425 7426 7427 7428 7429 7430 7434 7435 7436 7454 7455 7456 7457 7458
7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473
7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7492
VER 5.2 KS10 CONSOLE PROGRAM CROSS - MICRO PROCESSOR ASSEMBLER 6(31) 5-JAN-81 09:51 PAGE 201-29
STORE.M80 CROSS REFERENCE TABLE
7493 7494 7495 7496 7497 7498 7499 7507 7511 7541 7543 7545
.END 7716
.ENDC 1000 1001 1002 1003 1004 1073 1296 1321 1365 1366 1503 1805 1813 1912 1913
1948 2101 2117 2200 2463 2464 2465 2485 2486 2614 3390 3683 3700 3949 4173
4185 4833 4834 5503 5504 5695 5700 5724 5761 5763 5985 6500 6544 6545 6959
7007 7073 7714
.IF 1000 1001 1002 1003 1004 1073 1296 1321 1365 1366 1503 1799 1808 1912 1913
1948 2101 2117 2200 2463 2464 2465 2485 2486 2614 3390 3683 3700 3949 4173
4185 4833 4834 5503 5504 5505 5695 5724 5728 5763 5784 6500 6544 6545 6959
7007 7073 7711
.IFF 1000 1001 1002 1003 1004 1073 1296 1321 1365 1366 1503 1912 1913 1948 2101
2117 2200 2463 2464 2465 2485 2486 2614 3390 3683 3700 3949 4173 4185 4833
4834 5503 5504 5695 5724 5763 6500 6544 6545 6959 7007 7073
.IFT 1000 1001 1002 1003 1004 1073 1296 1321 1365 1366 1503 1912 1913 1948 2101
2117 2200 2463 2464 2465 2485 2486 2614 3390 3683 3700 3949 4173 4185 4833
4834 5503 5504 5695 5724 5763 6500 6544 6545 6959 7007 7073
.IIF 877 878 7504 7685
.LIST 35 888 889 890 1000 1001 1002 1003 1004 1073 1296 1321 1365 1366 1503
1912 1913 1948 2101 2117 2200 2463 2464 2465 2485 2486 2614 3390 3683 3700
3949 3967 4173 4185 4724 4725 4726 4833 4834 5503 5504 5549 5695 5724 5763
6500 6544 6545 6959 7007 7073
.MACRO 217 225 233 241 249 256 265 272 278 285 291 299 306 320 325
343 357 371 385 392 399 406 414 427 435 440 445 450 455 461
467 474 482 487 492 499 511
.NLIST 34 888 889 890 1000 1001 1002 1003 1004 1073 1296 1321 1365 1366 1503
1912 1913 1948 2101 2117 2200 2463 2464 2465 2485 2486 2614 3390 3683 3700
3949 3967 4173 4185 4724 4725 4726 4833 4834 5503 5504 5549 5695 5724 5763
6500 6544 6545 6959 7007 7073
.RADIX 165 189 888 889 890 1256 1372 2152 2199 2289 2316 2329 2341 2353 3935
3954 3967 4063 4064 4070 4119 4661 4666 4671 4724 4725 4726 4794 4826 5146
5158 5549 5789 5790 5795 5796 5797 5798 5799 5801 5802 7024 7401 7402 7403
7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418
7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7434 7435 7436
7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468
7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483
7484 7485 7486 7487 7492 7493 7494 7495 7496 7497 7498 7499
.SBTTL 30 85 113 212 531 532 629 666 730 997 1185 1227 1383 1650 1797
1820 1848 2229 2272 2403 2698 2699 2763 2850 2927 2952 2953 3014 3033 3057
3058 3082 3108 3115 3122 3128 3137 3146 3160 3184 3236 3248 3263 3272 3311
3335 3363 3386 3413 3428 3442 3453 3465 3476 3577 3625 3668 3704 3716 3821
3829 3830 3885 3971 4015 4052 4082 4102 4111 4127 4165 4179 4226 4260 4294
4382 4417 4524 4558 4604 4702 4729 4849 4959 5020 5029 5041 5055 5256 5497
5704 6468 6476 6857 6875 6941 7135 7163 7371 7394 7439 7550
.TITLE 1815
ERRORS DETECTED: 0
*FOR22.DAT,KNS10.PNT/M80/OCT/CRF/EQ:PASS2:SCECOD=CONDEF.M80,CHKSMS.M80,HCORE.M80,CMDS.M80,SUBRTN.M80,DR.M80,MSG.M80,STORE.M80
RUN-TIME: 10 20 3 SECONDS
CORE USED: 21K
READ I/O 0
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
!R DATA 28 ! R DATA 29 !! R DATA 30 ! R DATA 31 ! R DATA 32 !! R DATA 33 ! R DATA 34 ! R DATA 35 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
READ I/O 1
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
!R DATA 20 ! R DATA 21 !! R DATA 22 ! R DATA 23 ! R DATA 24 !! R DATA 25 ! R DATA 26 ! R DATA 27 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
READ I/O 2
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
!R DATA 12 ! R DATA 13 !! R DATA 14 ! R DATA 15 ! R DATA 16 !! R DATA 17 ! R DATA 18 ! R DATA 19 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
READ I/O 3
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
!R DATA 4 ! R DATA 5 !! R DATA 6 ! R DATA 7 ! R DATA 8 !! R DATA 9 ! R DATA 10 ! R DATA 11 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
READ I/O 100
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! REC PE ! UBA3 PE !! SPARE ! CRAM ! MEM !! DP PARITY ! CRA PARITY ! UBA2 PE !
! L ! L !! ! PARITY ERR ! PARITY ERR !! ERR L ! ERR L ! L !
! ! !! L ! L ! L !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
READ I/O 101
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! MMC REF !
! PI REQ 1 ! PI REQ 2 !! PI REQ 3 ! PI REQ 4 ! PI REQ 5 !! PI REQ 6 ! PI REQ 7 ! ERR B !
! ! !! ! ! !! ! ! H !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
READ I/O 102
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
! R AC LO ! R RESET !! R MEM BUSY ! R I/O BUSY ! R BAD DATA !! R COM ADR ! R I/O DATA ! R DATA !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
READ I/O 103
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
! UBA1 PE ! UBA4 PE !! R PAR RIGHT ! R PAR LEFT ! R DATA 0 !! R DATA 1 ! R DATA 2 ! R DATA 3 !
! L ! L !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
READ I/O 300
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! CTY ! CTY CHAR !! KLINIK ! KLINIK ! DPM !! RUN (1) ! EXECUTE ! CONTINUE !
! BIT # ! LENGTH !! BIT # ! LENGTH ! HALT LOOP !! H ! H ! H !
! (SW) ! (SW) !! (SW) ! (SW) ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
READ I/O 301
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! 10 ! NXM !! SPARE ! BUS ! PE (1) !! CONSOLE ! BOOT ! DATA ACK !
! INTERRUPT ! H !! ! REQ ! H !! ENABLE H ! H ! H !
! H ! !! H ! ! !! (SW) ! (SW) ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
READ I/O 302
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! REMOTE !! REMOTE EN ! TERMINAL ! KLINIK !
! 0 ! 0 !! 0 ! 0 ! PROTECT H !! H ! CARRIER ! CARRIER !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
READ I/O 303
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! R CLK !! CRAM CLK ! DPE/M CLK ! RAM !
! 0 ! 0 !! 0 ! 0 ! ENB (0) !! ENA ! ENABLE ! ERROR !
! ! !! ! ! H !! H ! L ! L !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
WRT I/O 204
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! CRAM ! CRM ADR ! SS !! DP ! STACK ! CRAM !
! 0 ! 0 !! WRITE ! LOAD ! MODE !! RESET ! RESET ! RESET !
! ! !! ! ! !! H ! H ! H !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
WRT I/O 205
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! MAINT ! !! CLR 10 ! ! !! ! ! !
! CLK ! MAINT !! INTERRUPT ! TRAP ! DIAG 10 !! DIAG 4 ! DIAG 2 ! DIAG 1 !
! PULSE ! ENB !! L ! EN ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
WRT I/O 206
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
! 0 ! 0 !! 0 ! 0 ! 0 !! 0 ! SINGLE ! CLK RUN !
! ! !! ! ! !! ! CLK H ! H !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
WRT I/O 210
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! CHECK ! CONSOLE !! XMIT ADR ! XMIT DATA ! CRA T CLK !! CRA R CLK ! LATCH ! CLOSE !
! NXM ! REQ !! (1) ! (1) ! ENB (1) !! ENB (1) ! DATA ! LATCHS !
! ! !! ! ! !! ! (1) ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
WRT I/O 212
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
! 0 ! 0 !! 0 ! 0 ! 0 !! RUN ! EXECUTE ! CONTINUE !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
WRT 100
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
! RESET ! PE DETECT !! CRM PE ! DP PE ! CACHE !! 1 MSEC ! 0 ! 0 !
! ! ENABLE !! DETECT ! DETECT ! ENABLE !! ENABLE H ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
WRT 101
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! MODEM !! ! ! !
! 0 ! 0 !! 0 ! 0 ! DTR !! STATE ! REMOTE ! FAULT !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
WRT 102/103 DATA/ADR
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
! DATA 28 ! DATA 29 !! DATA 30 ! DATA 31 ! DATA 32 !! DATA 33 ! DATA 34 ! DATA 35 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
WRT 104/105 DATA/ADR
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
! DATA 20 ! DATA 21 !! DATA 22 ! DATA 23 ! DATA 24 !! DATA 25 ! DATA 26 ! DATA 27 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
WRT 106/107 DATA/ADR
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
! DATA 12 ! DATA 13 !! DATA 14 ! DATA 15 ! DATA 16 !! DATA 17 ! DATA 18 ! DATA 19 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
WRT 110/111 DATA/ADR
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
! DATA 4 ! DATA 5 !! DATA 6 ! DATA 7 ! DATA 8 !! DATA 9 ! DATA 10 ! DATA 11 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
WRT 112/113 DATA/ADR
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
! 0 ! 0 !! 0 ! 0 ! DATA 0 !! DATA 1 ! DATA 2 ! DATA 3 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
WRT 114/115 ADR/DATA
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
! 0 ! 0 !! 0 ! 0 ! BAD DATA !! COM/ADR ! I/O DATA ! DATA !
! ! !! ! ! CYCLE !! CYCLE ! CYCLE ! CYCLE !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
WRT 116
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! CSL INTERRUPT !
! 0 ! 0 !! 0 ! 0 ! 0 !! 0 ! 0 ! THE 10 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
WRT I/O 200 CTY UART WRITE STATUS REGISTER(DATA BUFFER IS I/O 201)
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
! HUNT MODE ! UART !! REQUEST ! RESET ! SEND !! RECEIVE ! TERMINAL ! TRANSMIT !
! ON(SYNC) ! RESET !! TO SEND L ! ERRORS ! BREAK CHAR !! ENABLE ! READY ! ENABLE !
! ! !! ! ! H !! ! L ! !
******************************************************************************************************************************
WRT I/O 200 CTY UART READ STATUS REGISTER(DATA BUFFER IS I/O 201)
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
! DATA SET ! BRK/SYNC !! FRAMING ! OVERRUN ! PARITY !! TRANSMITTER ! RECEIVER ! TRANSMITTER !
! READY ! DETECT !! ERROR ! ERROR ! ERROR !! EMPTY ! READY ! READY !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************
WRT I/O 202 REMOTE UART WRITE STATUS REGISTER(DATA BUFFER IS I/O 203)
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
! HUNT MODE ! UART !! REQUEST ! RESET ! SEND !! RECEIVE ! TERMINAL ! TRANSMIT !
! ON(SYNC) ! RESET !! TO SEND L ! ERRORS ! BREAK CHAR !! ENABLE ! READY ! ENABLE !
! ! !! ! ! H !! ! L ! !
******************************************************************************************************************************
WRT I/O 202 REMOTE UART READ STATUS REGISTER(DATA BUFFER IS I/O 203)
******************************************************************************************************************************
! DBUS7 ! DBUS6 !! DBUS5 ! DBUS4 ! DBUS3 !! DBUS2 ! DBUS1 ! DBUS0 !
! ! !! ! ! !! ! ! !
! ! !! ! ! !! ! ! !
! DATA SET ! BRK/SYNC !! FRAMING ! OVERRUN ! PARITY !! TRANSMITTER ! RECEIVER ! TRANSMITTER !
! READY ! DETECT !! ERROR ! ERROR ! ERROR !! EMPTY ! READY ! READY !
! ! !! ! ! !! ! ! !
******************************************************************************************************************************