Specifications
CONSTRUCTION
2087 E607 ANI 07H Checks only first three bits
2089 EAA021 JPE ERR If 2 bits are at logic-1 jumps to 21A0
208C 326C21 STA 216CH Store the No. (Collector-Id)into mem.
208F C39220 JMP P4 Jumps to select lead configuration
;Lead configuration selection program
2092 216A21 P4: LXI H,216AH Extracts Base-Id from memory location
2095 7E MOV A,M 216A to the accumulator
2096 FE05 CPI 05H If the number is 05,
2098 CABA20 JZ P4A jumps to subroutine 4A
209B FE06 CPI 06H If the number is 06,
209D CAD020 JZ P4B jumps to the subroutine 4B
20A0 FE03 CPI 03H If the number is 03,
20A2 CAE620 JZ P4C jumps to the subroutine 4C
20A5 FE02 CPI 02H If the number is 02,
20A7 CABA20 JZ P4A jumps to the subroutine 4A
20AA FE01 CPI 01H If the number is 06,
20AC CAD020 JZ P4B jumps to the subroutine 4B
20AF FE04 CPI 04H If the number is 04,
20B1 CAE620 JZ P4C jumps to the subroutine 4C
20B4 CDFC20 M: CALL DISPLAY Jumps to display the lead configuration
selected in P4A or P4B or P4C
20B7 C30020 JMP MAIN Jumps back to start
;Lead configuration selection (Base Id.=05 or 02)
20BA 216C21 P4A: LXI H,216CH Extracts Collector-Id from memory
location
20BD 7E MOV A,M 216C to the accumulator
20BE FE01 CPI 01H If it is = 01, jumps to 20CA
20C0 CACA20 JZ E If it is = 04, points to lead
configuration “EbC”
20C3 217521 LXI H,2175H in data table
20C6 C3B420 JMP M Jumps to display the lead
configuration pointed
20C9 00 NOP NOP
20CA 217121 E: LXI H,2171H Points to lead config.”CbE” and jumps
20CD C3B420 JMP M display the configuration
;Lead configuration selection (Base Id.= 06 or 01)
20D0 216C21 P4B: LXI H,216CH Extracts Collector-Id from memory
location
20D3 7E MOV A,M 216C to the accumulator
20D4 FE02 CPI 02H If it is STE02, jumps to 20E0
20D6 CAE020 JZ B I If it is =04, points to lead
20D9 217D21 LXI H,217DH configuration “bEC” in data table
20DC C3B420 JMP M Jumps to display the lead
configuration pointed
20DF 00 NOP No oPeration
20E0 217921 B: LXI H,2179H Points to lead configuration “bCE”
20E3 C3B420 JMP M and jumps display the configuration
;Lead configuration selection (Base Id.=03 or 04)
20E6 216C21 P4C: LXI H,216CH Extracts Collector-Id from memory
location
20E9 7E MOV A,M 216C to the accumulator
20EA FE01 CPI 01H If it is =01, jumps to 20F6
20EC CAF620 JZ C If it is =02, points to lead
20EF 218121 LXI H,2181H configuration “ECb” in data table
20F2 C3B420 JMP M Jumps to display the lead
20F5 00 NOP configuration pointed; no operation
20F6 218521 C: LXI H,2185H Points to lead configuration “CEb”
20F9 C3B420 JMP M and jumps to display the configuration
;Display routine using 8279 of the kit (if present)
2140 0E04 MVI C,03 Sets the counter to count 4 characters
2142 3E90 MVI A,90 Sets cont.8279 to auto-incr. mode
2144 320160 STA 6001 Address of 8279 cont. reg.=6001
2147 7E MOV A,M Moves 1st data character from mem.
Loc. pointed to by calling instruction.
2148 2F CMA Inverts data (refer note below)
2149 320060 STA,6000 Stores data in 8279 data reg.
(addr=6000)
214C 0D DCR C Decrements counter
214D CA5421 JZ 2154 Returns to calling program if count=0
2150 23 INX H Increments memory pointer
2151 C34721 JMP2147 Jumps to get next character from
memory
2154 C9 RET Returns to the calling program
Note: In the microprocessor kit used, data is inverted before feeding the 7-seg display.
;Alternative Display Subroutine to be used with interface circuit of Fig. 4
2107 0608 MVI B,08H Store 0000 1000 in reg.B
2109 3E00 MVI A,00H Out 00H through Port C to latch data
in all
Memory Map And Software listing in 8085 Assembly Language
RAM Locations used for program :2000H - 21BBH
Stack pointer initialised :2FFFH
Monitor Program :0000H - 0FFFH
Display Data Table :2160H - 219AH
Control/Status Register of 8155 :80H
Port A (Input) of 8155 :81H
Port B (Output) of 8155 :82H
Port C (Output) of 8155 :83H
Address Op Code Label Mnemonic Comments
;Initialisation, base and type identification
2000 31FF2F MAIN: LXI SP,2FFFH Initialisation of the ports. A as the
2003 3E0E MVI A,0EH input and C as the output port.
2005 D380 OUT 80H Sends 07 through port C to make SW1,
2007 3E07 MVI A,07H SW2, SW3 ON and SW4 OFF.
2009 D383 OUT 83H Time delay should be allowed before
200B CD3320 CALL DELAY measuring the logic voltages across
200E CD3320 CALL DELAY capacitors C1, C2, and C3, so that
2011 CD3320 CALL DELAY they charge to the peak values.
2014 AF XRA A Clears the accumulator
2015 DB81 IN 81H Input data from interface through.
portA 2017E607 ANI 07H Test only first 3 bits, masking others
2019 326A21 STA 216AH Stores the number in memory.
201C CA2A20 JZ P If the number is zero jumps to 202A
201F EA3D20 JPE P2 If the number has even no. of 1s,
jumps to 203D (refer note 2)
2022 E26820 JPO P3 If the number has odd no. of 1s, jump
to 2068 (refer note 1)
2025 00 NOP No operation
2026 00 NOP No operation
2027 00 NOP No operation
2028 00 NOP No operation
2029 00 NOP No operation
202A 218921 P: LXI H,2189H Points to message “PUSH” in data
table
202D CDFC20 CALL DISPLAY Displays the message
2030 C30020 JMP MAIN Jumps to start.
;Delay sub-routine
2033 11FFFF DELAY: LXI D,FFFFH Loads DE with FFFF
2036 1B DCX D Decrements DE
2037 7A MOV A,D Moves result into Acc.
2038 B3 ORA E OR E with Acc.
2039 C23620 JNZ 2036 If not zero, jumps to 2036
203C C9 RET Returns to calling program
;Collector identification program for PNP transistors
203D 216A21 P2: LXI H,216AH Points of Base-Id in data table
2040 7E MOV A,M Extracts the number to the
accumulator
2041 D383 OUT 83H Send the number to the interface
2043 216021 LXI H,2160H Points to message ‘PnP’ in data table
2046 CDFC20 CALL DISPLAY Displays the message
2049 CD3320 CALL DELAY Waits for few moments
204C CD3320 CALL DELAY Waits for few moments
204F CD3320 CALL DELAY Waits for few moments
2052 AF XRA A Clears the accumulator
2053 DB81 IN 81H Seeks data from the interface
2055 E607 ANI 07H Masks all bits except bits 0,1 and 2
2057 EAA021 JPE ERR If the data contains even no. of 1s
jumps to error processing routine
205A 326B21 STA 216BH Stores the data (Emitter-Id) in memory
205D 47 MOV B,A Moves the Emitter-Id. to B register
205E 3A6A21 LDA 216AH Extracts Base-Id from memory
2061 90 SUB B Subtracts Emitter-Id from Base-Id
2062 326C21 STA 216CH Stores the result(Collector-Id)in mem.
2065 C39220 JMP P4 Jumps to select lead configuration
;Collector identification program for NPN transistors
2068 216A21 P3: LXI H,216AH Points to Base-Id in data table
206B 7E MOV A,M Extract the number to the accumulator
206C FE07 CPI 07H Refer note 1
206E CAB621 JZ ER Jumps to error processing routine
2071 EE0F XRI 0FH Refer note 2
2073 D383 OUT 83H Send the number to the interface
2075 216421 LXI H,2164H Points to the message “nPn”
2078 CDFC20 CALL DISPLAY Displays the same
207B CD3320 CALL DELAY Waits for few moments
207E CD3320 CALL DELAY Waits for few moments
2081 CD3320 CALL DELAY Waits for few moments
2084 AF XRA A Clears the accumulator
2085 DB81 IN 81H Seeks data from the interface
Address Op Code Label Mnemonic Comments
12