0001 *********************************************************** 0002 * * 0003 * 3P+S Testing Program for Sol-20 * 0004 * * 0005 *********************************************************** 0006 * 0007 * FileName 3P+S.P 0008 * 0009 * SET OPERATORS * 0010 ORG 0F000H 0011 XEQ 0C004H 0012 * 0000 * LINKER TO TEST ROUTINES 0000 OSOUT EQU 0E917H 0000 OSIN EQU 0E91EH 0000 INA EQU 092FH 0000 INB EQU 0E935H 0000 EORMS EQU E994H 0000 BENTR EQU 0E75EH 0000 TEXTO EQU 0E9BFH 0000 CRLF EQU 0E9E3H 0000 * 0000 * CONSTANTS 0000 ON EQU 0FFH 0000 OFF EQU 00H 0000 PAMSK EQU 02H 0000 PBMSK EQU 03H 0000 SIMSK EQU 01H 0000 SAMSK EQU 00H 0000 PSTAT EQU 0FAH 0000 SENSE EQU 0FFH 0092 MASK1 EQU 3FH Mask used to Remove D7 and D6 from result 0093 MASK2 EQU 3FH Mask used to Remove D7 and D6 from result 0094 GMSK1 EQU 015H Complemented Mask used to check result 0095 GMSK2 EQU 02AH Complemented Mask used to check result 0000 * 0013 * BEGINING OF MAIN ROUTINE * 0014 * 0016 LXI H,M1 Load Message Pointer 0017 CALL TEXTO Output Message 0018 CALL PATST Parallel Port A <2> 0019 CALL PBTST Parallel Port B <3> 0020 CALL SITST Serial Port D <1> 0021 CALL SSTST Status Port C <0> 0022 LXI H,M2 Load Message Pointer 0023 CALL TEXTO Output it 0024 CALL EORMS Go back to Solos/Cuter 0025 * 0028 * 0029 * END OF MAIN ROUTINE * 0030 * 0031 * PARALLEL PORT A TESTER 0032 * 0033 PATST EQU $ 0034 MVI A,PAMSK Load Port Index 0035 STA PORT 0036 MVI A,OFF Load Print Flag 0037 STA FLAG 0038 LXI H,MPA Load Message Pointer 0039 CALL TEXTO Output Message 0040 PA1 NOP 0041 CALL ICHK Check the Port 0042 CALL PAST Check for O.K. to print 0043 CALL NEXT Check for the continue command 0044 RZ Loop Exit when Command is Given 0045 JMP PA1 0046 * 0048 * 0049 * End of the Parallel Port A and Strobe A Test Routine 0050 * 0051 * PARALLEL PORT B TESTER 0052 * 0053 PBTST EQU $ 0054 MVI A,PBMSK Load Port Index 0055 STA PORT 0056 MVI A,OFF Load Print Flag 0057 STA FLAG 0058 LXI H,MPB Load Message Pointer 0059 CALL TEXTO Output Message 0060 PB1 NOP 0061 CALL ICHK Check the Port 0062 CALL PAST Check for O.K. to print 0063 CALL NEXT Check for Continue Command 0064 RZ Loop Exit when Command is Given 0065 JMP PB1 Continue to Loop 0066 * 0068 * 0069 * End of Parallel Port B and Strobe B Test Routine 0070 * 0071 * STATUS PORT CHECK 0072 * 0073 SSTST EQU $ 0074 MVI A,SAMSK Load Accumulator with 00H 0075 STA ERRS Store Accumulator in Location ERRS 0076 STA PORT Store Accumulator in Location Port 0077 MVI A,OFF Load Print Flag 0078 STA FLAG 0079 LXI H,MSST Load Message Pointer 0080 CALL TEXTO Output Message 0000 * 0081 SSTL1 EQU $ Label Point 0082 CALL SINT1 Output First Check Mask 0083 CALL SCK1 Verify that the Mask received is correct 0084 CALL SINT2 Output Second Check Mask 0085 CALL SCK2 Verify that the Mask received is correct 0086 CALL PAST Output Condition of Status Check 0087 CALL NEXT Check for Continue Command 0088 RZ Loop Exit when Command is Given 0089 JMP SSTL1 Continue to Loop 0090 * 0096 * 0097 * End of the Status Ports Test Routine 0098 * 0099 * SERIAL PORT TESTER 0100 * 0101 SITST EQU $ 0102 MVI A,SIMSK Load Port Index 0103 STA PORT 0104 MVI A,OFF Load Print Flag 0105 STA FLAG 0106 LXI H,MSP Load Message Pointer 0107 CALL TEXTO Output Message 0108 LXI H,MTBE Load Message Pointer 0109 CALL TEXTO Output Message 0110 CALL TPRTO Call for TBE 0111 LXI H,MRDA Load Message Pointer 0112 CALL TEXTO Output Message 0113 CALL TPRTI Call for RDA 0114 LXI H,MSP Load Message Pointer 0115 CALL TEXTO Output Message 0116 LXI H,MTROK Load Message Pointer 0117 CALL TEXTO Output it 0118 SP1 NOP 0119 CALL ICHK Check the Port 0120 CALL PAST Check if O.K. to print 0000 CALL NEXT Check to See if done 0000 JNZ SP1 Loop till finished 0121 RET Return when finished 0122 * 0129 * 0130 * End of the Serial Interface Testing Routine 0131 * 0132 * Begining of Status Masking and Checking Subroutines 0133 * 0134 * SET UP STATUS PORT PATTERN #1 0135 * 0136 SINT1 EQU $ 0137 MVI A,00H SET PUS=1,PIE=0 0138 OUT PSTAT Output to Sol Status Port 0139 MVI A,08H SET C2,C4=1;C3,C5=0:P.C.=0 0140 OUT SAMSK Output to 3P+S Status Port 0141 RET 0142 * 0143 * SET UP STATUS PORT PATTERN #2 0144 * 0145 SINT2 NOP 0146 MVI A,18H SET PUS=0,PIE=1 0147 OUT PSTAT Output to Sol Status Port 0148 MVI A,03H SET C2,C4=0;C3,C5=1:P.C.=1 0149 OUT SAMSK Output to 3P+S Status Port 0150 RET 0151 * 0152 * FIRST CHECK OF CORRECT STATUS 0153 * 0154 SCK1 NOP 0155 CALL TPRTI Input 3P+S Status Port 0156 ANI MASK1 Mask Out C0 and C1 0157 XRI GMSK1 Check with Expect Value 0158 STA ERRS Store Errors if any 0000 IN PAMSK Clear FA Flag 0000 IN PBMSK Clear FB Flag 0159 RET 0160 * 0161 * SECOND CHECK OF CORRECT STATUS 0162 * 0163 SCK2 NOP 0164 CALL TPRTI Input 3P+S Status Port 0165 ANI MASK2 Mask Out C0 and C1 0166 XRI GMSK2 Check with Expect Value 0167 MOV B,A Save Accumulator in B Register 0168 LDA ERRS Load Accumulator with Error Data 0169 ORA B "OR" in New Error Data if any 0170 STA ERRS Store Error data 0000 IN PAMSK Clear FA Flag 0000 IN PBMSK Clear FB Flag 0171 RET 0172 * 0173 * End of Status Masking and Checking Subroutines 0174 * 0175 * CHECK THE PORTS * 0176 * 0177 ICHK LDA PORT EMPTY BUFFERS 0178 LXI D,0 Load D and E Registers with 00H 0179 XRA A Zero Out Acculumator by "XOR" with itself 0180 STA ERRS Store accumulator in ERRS 0181 LOOP MOV B,E Move Data in E to Output Register B 0182 CALL TPRTO Output Data (Port Specified by Port Index) 0183 CALL TPRII Input Data (Port Specified by Port Index) 0184 XRA E Check Data Send with Data Received 0185 JZ POOK NOT BAD "If Data is Good skip to Pook" 0186 MOV B,A Store Accumulator in B Register 0187 LDA ERRS Load Accumulator with ERRS 0188 ORA B "OR" in New Error Data 0189 STA ERRS Store Error Data 0190 POOK NOP 0191 INX D Increment Loop index 0192 MOV A,D Move D Register to Accumulator 0193 CPI 4 Check to see if finished <1024 LOOPS?> 0194 JNZ LOOP No then loop again 0195 RET After we are finished return 0196 * 0197 PAST NOP 0198 LDA FLAG Load Accumulator with Flag Byte 0199 ANI OFF Check to see if Print Flag Set 0200 RZ Return if flag is set 0201 LDA ERRS Load Accumulator with Error Data 0202 CALL BINOT Output it in Bit format 0203 MVI B,0 Load B Register with 00H 0204 MVI A,00H Load Accumulator with Flag Data 0205 STA FLAG Store Accumulator in Flag Byte 0206 CALL CRLF Output a CR and a LF 0207 LXI H,MWAIT Tell them you waiting 0208 CALL TEXTO Output it 0209 RET Go back home 0210 * 0211 * End of ICHK ( The Port Checking Routine) 0212 * 0213 * INPUT AND CHECK FOR "PROCEED" 0214 * 0215 NEXT NOP 0216 CALL PORTI Input from System Input 0217 CALL INB Check for "Escape" Value 0000 CPI 'D' 0000 CZ DOUT Check for Dig output request 0218 CPI 'P' Check for "Continue" Value 0219 RET 0220 * 0000 * Outputs a Selected Charactor to Port Under Test 0000 * 0000 DOUT NOP 0000 CALL PORTI Input from System I/O 0000 CALL INB Check for Escape 0000 CPI 'P' Check for Return Request 0000 JNZ DOUT1 0000 MVI A,20H 0000 STA 0CCFFH Clean Up the Screen 0000 MVI A,'P' 0000 RET 0000 DOUT1 NOP 0000 IN SENSE Input Selected Charactor from Sense Switch 0000 MOV B,A 0000 CALL TPRTO Output it to Selected Port 0000 XRA A Clean up and set for input 0000 CALL TPRTI Input from Selected Port 0000 STA 0CCFFH Put it on the Screen 0000 JMP DOUT Loop till return Requested 0000 * 0221 * PORT INPUT ROUTINE * 0222 * 0223 PORTI EQU $ 0224 CALL OSIN Input Using Solos/Cutter Jump Table 0225 RET 0000 * 0226 TPRTI EQU $ 0227 LDA PORT Load Accumulator with Port Index 0228 CPI SAMSK Check to See if this port is called 0229 JZ SAPIT IF SO, JUMP TO IT 0000 CPI SIMSK CHECK TO SEE IF THIS PORT IS CALLED 0000 JZ SIPIT IF SO, JUMP TO IT 0000 CPI PAMSK CHECK TO SEE IF THIS PORT IS CALLED 0000 JZ PAPIT IF SO, JUMP TO IT 0000 CPI PBMSK CHECK TO SEE IF THIS PORT IS CALLED 0000 JZ PBPIT IF SO, JUMP TO IT 0000 JMP ERPRT IF I GOT HERE OOPS! 0000 * 0000 SAPIT EQU $ 0230 IN SAMSK Input from Port 00H 0231 RET 0232 * 0238 SIPIT EQU $ 0239 CALL SAPIT Input Status Information from Port 00H 0240 ANI 40H Test for Serial Data Ready 0241 JZ SIPIT If Data is not ready go and wait for it 0242 IN SIMSK Input Serial Data 0243 RET 0244 * 0245 PAPIT EQU $ 0248 IN PAMSK Input from Port 02H 0249 RET 0250 * 0251 PBPIT EQU $ 0254 IN PBMSK Input form Port 03H 0255 RET 0256 * 0257 * End of Port Input Routines 0258 * 0259 * PORT OUTPUT ROUTINE * 0260 * 0261 TPRTO EQU $ 0262 LDA PORT Load Accumulator with Port Index 0263 CPI SAMSK Check to see if this port is called 0264 JZ SAPOT IF SO, JUMP TO IT 0000 CPI SIMSK CHECK TO SEE IF THIS PORT IS CALLED 0000 JZ SIPOT IF SO, JUMP TO IT 0000 CPI PAMSK CHECK TO SEE IF THIS PORT IS CALLED 0000 JZ PAPOT IF SO, JUMP TO IT 0000 CPI PBMSK CHECK TO SEE IF THIS PORT IS CALLED 0000 JZ PBPOT IF SO, JUMP TO IT 0000 JMP ERPRT IF I GOT HERE OOPS! 0265 * 0000 SAPOT EQU $ 0266 OUT SAMSK Output to Port 00H 0267 RET 0268 * 0274 SIPOT EQU $ 0275 IN SAMSK Input Status Information from Port 00H 0276 RAL Rotate Status Flag into carry 0277 JNC SIPOT If Buffer is not empty go to wait area 0278 MOV A,B Move Data into Accumulator 0279 OUT SIMSK Output Data 0280 RET 0281 * 0282 PAPOT EQU $ 0285 MOV A,B Move The data to the Accumulator 0286 OUT PAMSK Output to Port 02H 0287 RET 0288 * 0289 PBPOT EQU $ 0292 MOV A,B Move the Data to the Accumulator 0293 OUT PBMSK Output to Port 03H 0294 RET 0295 * 0296 * End of Output Routines 0297 * 0298 ERPRT EQU $ 0299 LXI H,MERR 0300 CALL TEXTO 0301 JMP 0C004H Jump to Solos Monitor 0302 * 0000 * MESSAGE STORAGE AREA 0000 * 0026 M1 ASC "^KMJJJJ^******** 3P+S Test Program ********^MJ^/" 0027 M2 ASC "^M^**** 3P+S Test Program Completed **** /" 0000 * 0047 MPA ASC "Testing the Parallel Port A and Strobe A /" 0000 * 0067 MPB ASC "^M^Testing the Parallel Port B and Strobe B /" 0000 * 0091 MSST ASC "^M^Testing the Status Ports and Load Strobe /" 0000 * 0123 MSP ASC "^M^ " 0124 ASC " " 0125 ASC "^M^Testing the Serial Interface /" 0126 MTBE ASC " TBE ? /" 0127 MRDA ASC "^AAAAAAAAA^ RDA ? /" 0128 MTROK ASC " now testing ^AAAAAAAAAAAAAAA^/" 0000 * 0303 MERR ASC "^MJ^ Error Input/Output Found /" 0304 * 0305 MWAIT ASC "I will run above test until P key is depressed/" 0307 * 0308 *** RAM *** 0309 * 0000 ORG 0C900H 0310 PORT DS 1 Port index store here 0311 ERRS DS 1 Error Data Stored Here 0312 FLAG DS 1 Flag Data Stored Here 0313 * 0314 * End of Ram Area 0315 * 0537 * 0538 * END OF 3P+S * 0539 * 0540 END