Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
MICRO CONTROLLER
REPORT
Submitted by:
Niraj Kachariya: 151020011011
Priyank Joshi: 151020011016
Submitted To:
Jatin Upadhyay
`
(3) Write an assembly language program to load Accumulator with
data byte 82H and store that data in register B.
Assume that initially all the registers are reset.
Flowchart:
Start
Load Accumulator
with 82H
Stop
Code:
Memory
Mnemonics Hex code Remark
Location
C000 MVI A,82 H 3E Load accumulator with 82 H
C001 82
C002 MOV B,A 47 Store the data of Accumulator in register B
C003 RST 1 CF Halt the program
Registers Status:
Before the execution
A = 00H
B =00H
Flag CY =0
`
After the execution
A = 82H
B = 82H
Flag CY =0
Start
Load Accumulator
with A0 H
Decrement the
Accumulator
Stop
`
Code:
Memory
Mnemonics Hex code Remark
Location
C000 MVI A,A0 H 3E Load accumulator with A0 H
C001 A0
C002 DCR A 3D Decrement the register A.
Store the data of accumulator to the F120 memory
C004 STA F120H 32
location
C005 20
C006 F1
C007 RST 1 CF Halt the program
Registers Status:
Before the execution
A = 82 H
B = 82 H
Flag CY =0
Registers Status:
Before the execution
A = A0 H
B = 82 H
Flag CY =0
Memory location F120 H: 9F H
`
After the execution
A = A0 H
B = F1 H
C = 20 H
Flag CY =0
Memory location F120 H: A0 H
Flowchart:
Start
Load register B
with data F1 H
Load register C
with data 20 H
Stop
`
Code:
Memory Hex
Mnemonics Remark
Location code
C000 MVI A,A0 3E Load accumulator with A0 H
C001 A0
C002 LXI B ,F120 01 Load register pair B with F120 H
C003 20
C004 F1
Move the data of Accumulator to the memory location specified
C005 STAX B 02
by the BC register pair.
C008 RST 1 CF Halt
(6) Write an ALP to load register B with data byte that is stored at
the memory location, where memory location is stored in the HL
pair register.
Flowchart:
Start
Load register B
with the data byte
Stop
`
Code:
Memory
Mnemonics Hex code Remark
Location
C000 MVI A,A0 3E Load register A with A0
C001 A0
C002 LXI H,E000 21 Load register pair H at location E000
C003 00
C004 E0
C005 MOV M,A 77 Move data of accumulator to memory location of HL
Copy the data to register B specified by the memory
C006 MOV B,M 46
address location of HL register pair
C007 RST 1 CF Halt
Registers Status:
Before the execution
A = A0 H
B = F1 H
C = 20 H
H = 00 H
L = 00H
Flag CY =0
`
(7) Write an assembly language program to compliment any
number without using CMA instructions.
Flowchart:
Start
Load Accumulator
with FF H
Stop
Code:
Memory
Mnemonics Hex code Remark
Location
C000 MVI A,FF H 3E, FF Load accumulator with FF H
C002 MVI B,10 H 06, 10 Load reg. b with FF H
Substract value of Ragister B with Ragister A and
C004 SUB B 90
store data in Accumulator
C006 RST 1 CF Halt
`
Registers Status:
Before the execution
A = A0 H
B = A0 H
Flag CY =0
VALUE IN ACCUMULATOR : EF
Start
Move data of
register B to A
Move data of
register B to C
`
Stop
Code:
Registers Status:
Before the execution
A = 01H
B = 02H
C = 03 H
Flag CY =0
`
Flowchart:
Start
Stop
Code:
Memory
Mnemonics Hex code Remark
Location
C000 LXI H,1122 21 Load register pair HL immediate
C003 LXI D,2233 11 Load register pair DE immediate
`
C006 XCHG EB Exchange the data of HL and DE register pair
Store the data of HL register pair to the
C009 SHLD E004H 22
memory location pointed by E004H
Again exchange the data of register pair HL
C00A XCHG EB
and DE
Store the data of HL register pair to the
C00F SHLD E006H 22
memory location pointed by E006H
C012 RST 1 CF Halt
Registers Status:
Before the execution
H = 00
L = 00
D = 00
E = 00
Flag = 0
`
Start
Stop
Code:
Memory
Mnemonics Hex code Remark
Location
Copy the data contents of the memory location to the
C000 LHLD C250H 2A
HL register pair
Store the data contents of the HL register pair to the
C003 SHLD E310H 22
memory location specified
C005 RST 1 CF
Registers Status:
Before the execution
H = 11H
L = 22H
Flag = 0
`
Memory location E310 H: A5 H
Flowchart:
Start
Load Accumulator
with 9A H
Stop
Code:
Memory
Mnemonics Hex code Remark
Location
C000 MVI A,9A H 3E 01 Load accumulator with 9A H
C002 RLC 07 Rotate the accumulator data left
C004 RRC 0F Rotate the accumulator right
C006 RST 1 CF
`
Registers Status:
Before the execution
A = 9A H
Flag CY =0
Final Result:
A = 5A H
Flag CY = 0
(12) Write an assembly language program to set carry flag and load
the accumulator with data A8H. After that rotate the accumulator
left and right through carry.
Assume initially that the carry flag is set to 1 OR we can set the carry flag register by the
instruction code “CMC”.
Flowchart:
Start
Load Accumulator
with A8 H
`
Rotate the accumulator
left through carry
Stop
Code:
Registers Status:
Before the execution
A = 5A H
Flag CY = 1
Start
NO YES
Stop Stop
`
Code:
Memory
Mnemonics Hex code Remark
Location
C000 MVI A,11 H 3E Load accumulator with 11 H
C002 MVI B,22 H 06 Load reg. b with 22 H
Compare the data of accumulator with the data of
C004 CMP B B8
register B
C005 JC CA00 DA Jump on carry, the conditional statement
C007 JNC CB00 D2 Jump on no carry, the conditional statement
CA00 MVI D,01 H 16 A<B then store 01 H in the register D
CA02 MOV A,D 7A Move the data of register D to Accumulator
Copy the data of accumulator to memory location
CA03 STA D000H 32
specified
CA06 RST 1 CF
CB00 MVI D,10 H 16 A>B then load 10 H in register D
CB02 MOV A,D 7A Move the data of register D to accumulator
Copy the contents of the accumulator to the memory
CB03 STA D000H 32
location specified
CB06 RST 1 CF
Registers Status:
Before the execution
A = A5 H
B = 03 H
D = 22 H
Flag CY =0
`
(14) Write an assembly language programme for addition operation
for two 8 bit numbers stored in memory location D101 H and D102
h. Store the result at D103 H.
Flowchart :
Start
Load Accumulator
DATA
STORE DATA IN
MEMORY
LOCATION
ADD B IN
ACCUMULATOR
STORE DATA IN
MEMORY
LOCATION
Stop
`
CODE :
Memory
Mnemonics Hex code Remark
Location
C000 MVI A,01 H 3E,01 Load accumulator with 01 H
C002 STA D101H 32,01,D1 Store Accumulator data in location D101H
C005 MVI A,02H 3E,02 Load accumulator with 02 H
C007 STA D102H 32,D1,02 Store Accumulator data in location D102H
C00A LDA D101 3A,01,D1 Copy data from location to accumulator
C00D MOV B,A 47 Move content of A into B
C00E LDA D102 3A,02,D1 Copy data from location to accumulator
C011 MOV C,A 4F Move content of A into C
C012 ADD B 80 ADD B in accumulator
C013 STA D103 32,03,D1 Store accumulator data in location D103
C016 RST 1 CF STOP
Result:
D101H = 01H
D102H = 02H
D103H = 03H
(16)Write an assembly language programme to subtract two 8 bit
numbers.
Flowchart :
Start
Load Register A
and B
Substract B
STOP
`
CODE :
Memory
Mnemonics Hex code Remark
Location
C000 MVI A,02 H 3E, 02 Load accumulator with 02 H
C002 MVI B,01 H 06, 01 Load reg. b with 01 H
Substract value of Ragister B with Ragister A and store
C004 SUB B 90
data in Accumulator
C005 RST 1 CF Halt
Result :
Accumulator : 01H
(17) Write an assembly language programme for 1’s and 2’s
compliment of any 8 bit number using CMA instruction.
Flowchart:
Start
Load Register A
Use Instruction
CMA
INR A
`
Code :
Memory Location Mnemonics Hex code Remark
C000 MVI A,02 H 3E, 02 Load accumulator with 02 H
C002 CMA 2F 1’S Compliment Of A
C003 INR A 3C Incriment in A
C006 RST 1 CF Halt
Result :
1’s Compliment : FD H
2’s Compliment : FE H
(18) Write an ALP for logical operation of any data. (Logical
operations: AND ,OR, XOR, NOT)
Flow chart :
Start
Logical
Operations
Stop
`
Code :
Memory
Mnemonics Hex code Remark
Location
C000 MVI A,11 H 3E, 11 Load accumulator with 11 H
C002 MVI B,10 H 06, 10 Load reg. b with 10 H
Result :
ANA Operation : A=10H
ANI Operation : ANI 01 ;A=01H
ORI Operation : ORI 10 ; A=11H
ORA Operation : A=11H
XRA Operation : A=01H
XRI Operation : XRI 10;A=01H
19. Write an ALP to mask off most significant four bits.
Start
Load accumulator
with 55H
And operation of 0F H
with Accumulator
Stop
`
Code:
Memory Location Mnemonics Remark
Register status
A=55 H
Start
Move 00 H to A
`
Load data of B, C pair
to A
Decrement L
Stop
Code
Memory Location Mnemonics Remark
`
C00D INX D Increase the D, E pair
Registers status
L=10 H
C=10 H
B= DD H
E=30 H
D=DD H
After the execution
Data of DD10 H= Data of DD30 H
Data of DD11 H= Data of DD31 H
Like….
Data of DD1F=Data of DD3F
`
Load counter with the
number of register B
Load A with 00 H
Add E
DCR C
JNZ
Stop
Code
Memory Location Mnemonics Remarks
C000 MVI E, 55 H Move 8 bit number to register E
`
C00C JNZ C007 Jump on non zero
Registers status
E= 55 H
B= 03 H
C=03 H
A=00 H
After the execution
E=55 H
B= 03 H
C=00 H
A= FF H
AC =1
22 Write an ALP to multiply 16 bit number with 8 bit multiplier.
Store the result at D000 H memory location.
Start
Load multiplier in
register C
Load A with 00 H
`
Add M
Decrement C
Stop
`
Registers status
H= 00 H
L= 0F H
C=02 H
A= 00 H
After the execution
H= 00 H
L= 0F H
C=00 H
At Location EEEE= 001D H
C=0
Start
Load register C
with 00 H
`
Load A with the Number that we have to
divide
Compare B with A
Subtract B
Increment C
Stop
Code
Memory location Mnemonics Remarks
C000 MVI C, 00H Load C with 00 H
C002 LDA D000 H Load A with the data
of D000
`
C005 MOV B,A Move data of A to B
C006 LDA D001H Load A with the data
of D001
C009 CMP B Compare B with A
C00A JC C012 If carry jump in L2
C00D SUB B Subtract B
C00E INR C Increment A
C00F JMP C009 Jump on L1
C012 STA E001 H Save data of A to
E001 H
C015 MOV A,C Move data of C to A
C016 STA E000 H Store data of A to
E000 H
Registers status
If data at D000 is 0B H
And Data at D001 is 18 H
B=0B H
A= 18 H
C= 00 H
After the execution
A =02 H (2)
C=02 H (2)
`
26. Write an ALP to find the number of odd and even numbers from
the given 10 8-bit numbers.
Start
Load 00 H in register C
Load B with 00 H
Load D with 0A H
( 10)
Decrement C
If carry is there
`
Increment B Increment C
Decrement D
Stop
Code
Memory Location Mnemonics Remark
C000 LXI H,FF00 Load H-L pair with
data of address FF00
C003 MVI D,0A H Load D with 0A H
C005 MVI C,00 H Load C with 00 H
C007 MVI B, 00 H Load B with 00 H
C009 MOV A,M Move data of M to A
C00A RRC Rotate right through
carry
C00B JC C012 Jump on carry
C00E INR B Increment B
C00F JMP C013 Jump on
C012 INR C Increment c
C013 INX H Increment H-Lpair
`
C014 DCR D Decrement D
C015 JNZ C009 Jump on Non Zero
Register Status
B=00 H
C=00H
D=0A H
After Execution
If there are 5 even and five odd numbers in memory location FF00 H to
FFFF H
B=05 H
C=05 H
D=00 H
27. Write an ALP to find the biggest number in array of five 8 bit
data.
Start
Load C with 05 H
`
Load A with 00 H
Decrement C
Move data of M to A
Compare M
If carry is there
Move data of M to A
Decrement C
Stop
`
Code
Memory Mnemonics Remarks
Location
C000 LXI H, Load data of D000 in H-L pair
D000H
C003 MVI C,05 Load C with 05 H
H
C005 MVI A, 00 Load A
H
with 00 H
C007 MVI B,00 Load B with 00 H
H
C009 MOV A,M Move data of M to A
C00A DCR C Decrement c
C00B INX H Increment pair H-L
C00C CMP M Compare M
C00D JC C010 Jump on Carry
C010 MOV A,M Move data of memory to A
C011 JMP C014 Jump
C014 DCR C Decrement c
C015 JNZ C00A Jump on non zero
C018 STA FFFF Store to FFFF
Register Status
`
C=05 H
A=00H
B=00H
After execution
C=00H
At location FFFF biggest number among the location D000 to D005 is
saved
Start
Decrement counter
If zero flag is 1
Stop
`
Code
Memory Location Mnemonics Remark
C000 LXI H, D05F H Initialize register pair H, L
with location D05F H
`
C00D JNZ C008 Jump on C008
`
Before the Execution
D050= 11H
D05F= 22 H
E000= 00 H
`
25. You are given a set of 100 resistors with 10 k values and
asked to test them for 10 percent tolerance. Reject all the
resisters that are outside the tolerance and give the final
number of resistors you found within the tolerance.
Start
Compare D
Value of zero
flag Increment B (zero flag
is 1)
Decrement Counter
If zero
Stop
`
Code
Memory Location Mnemonics Remarks
Initialize M with data of D000
C000 LXI H, D000 H
Copy the value 0A h in Register
C003 MVI D, 0A H D
Compare D
C008 CMP D
Jump on F001
C009 JZ F001
Increment pair
C00C INX H
Decrement counter
C00D DCR C
Jump on non zero to C008
C00E JNZ C008
Increment register B
F001 INR B
Jump on C008
F002 JMP C008
Before Execution
C=0A H
B= 00 H
After Execution
C= 00 H
B = 04 H
`
28. Write an ALP to find the smallest number in array of five 8 bit
data.
Start
Load C with 05 H
Load A with 00 H
Load B with 00 H
Decrement C
Move data of M to A
Compare M
If carry is not
there
Move data of M to A
`
Decrement C
STOP
Code
Memory Location Mnemonics Remarks
C000 LXI H, D000H Load data of D000 in
H-L pair
C003 MVI C,0A H Load C with 0A H
C005 MVI A, 00 H Load A with 00 H
C007 MVI B,00 H Load B with 00 H
C009 MOV A,M Move data of M to A
C00A DCR C Decrement c
C00B INX H Increment pair H-L
C00C CMP M Compare M
C00D JNC C010 Jump on Not Carry
C010 MOV A,M Move data of memory
`
to A
C011
C014 DCR C Decrement c
C015 JNZ C00B Jump on non zero
C018 STA FFFF Store to FFFF
Register Status
C=0A H
A=00H
B=00H
After execution
C=00H
At location FFFF smallest number among the location D000 to D005 is
saved
`
29. Write an ALP to arrange the array of five 8 bit numbers in ascending order.
Start
STOP
Code
MEMORY MNEMONIC Remark
C000 LXI H,D000H Load the array size to
the HL pair
C003 MOV C,M Copy the array size to
C register
C004 DCR C Decrement C by 1
C005 MOV D,C Copy content of C to
D register
`
C006 LXI H,D001H Load the first data to
the HL pair
C009 MOV A,M Copy the data to the
accumulator
C00A INX H Increment memory by
1
C00B CMP M Compare accumulator
and memory content
C00C JC C014 Jump on carry to the
label C014
C00F MOV B,M Copy memory
content to B register
C010 MOV M,A Copy accumulator
content to memory
C011 DCX H Decrement memory
by 1
C012 MOV M,B Copy B register’s
content to memory
C013 INX H Increment memory by
1
C014 DCR D Decrement D by 1
C015 JNZ C009 Jump on non-zero to
the label C009
C018 DCR C Decrement C by 1
C019 JNZ C005 Jump on non-zero to
the label C005
C01C HLT Program ends
Registers Status: -
Before the execution: -
D000 = 00 D001 = 06 D002 = 0A D003 = 03 D004 = 01 D005 = 04
After the execution: -
D000 = 00 D001 = 01 D002 = 03 D003 = 04 D004 = 06 D005 = 0A
`
30. Write an ALP to arrange the array of five 8 bit numbers in ascending order.
Start
STOP
Code
MEMORY MNEMONIC Remark
C000 LXI H,D000H Load the array size to the HL pair
C003 MOV C,M Copy the array size to C register
C004 DCR C Decrement C by 1
C005 MOV D,C Copy content of C to D register
C006 LXI H,D001H Load the first data to the HL pair
`
C009 MOV A,M Copy the data to the accumulator
C00A INX H Increment memory by 1
C00B CMP M Compare accumulator and memory content
C00C JNC C014 Jump on carry to the label C014
C00F MOV B,M Copy memory content to B register
C010 MOV M,A Copy accumulator content to memory
C011 DCX H Decrement memory by 1
C012 MOV M,B Copy B register’s content to memory
C013 INX H Increment memory by 1
C014 DCR D Decrement D by 1
C015 JNZ C009 Jump on non-zero to the label C009
C018 DCR C Decrement C by 1
C019 JNZ C005 Jump on non-zero to the label C005
C01C HLT Program ends
Registers Status: -
Before the execution: -
D000 = 00 D001 = 0A D002 = 04 D003 =02 D004 = 01 D005 =06
After the execution: -
D000 =0A D001 =06 D002 =04 D003 = 02 D004 = 01 D005 = 00
31. Write an ALP for a2+b2 operation, where a and b are stored at D000
and D001 memory location respectively.
Flowchart:
Start
Load Register B
with 02 And
Store data inn
location D000
`
Load Register D
with 02 and store
data into location
D001
Load Accumulator
With 00H
Move from
register B to C
LOOP1:ADD B
Decrement Register C
LOOP 2:ADD D
Decrement Register E
Stop
`
Code:
Memory
Mnemonics Hex code Remark
Location
C000 MVI B,02H 06,02 Load register B with 8 bit data
C002 MOV A,B 78 Move from register b to a
C003 STA D000H 32,00,DO Store accumulator data in memory location DOOO
C006 MVI D,01H 16,01 Load register D with 8 bit data
C008 MOV A,D 7A Move from register D to a
Store accumulator data in memory location
C009 STA D001 32,01,DO
D001H
C00C MVI A,00H 3E,00 Load register A with 8 bit data
C00E MOV C,B 48 Move from register B to C
C00F L1:ADD B 80 ADD Register B
C010 DCR C 0D Decrement Register C
C011 JNZ L1 C2 Conditional jump to loop1
C014 MVI D,02H 0F Load register D with 8 bit data
C016 MOV E,D 5A Move from register D to E
C017 L2:ADD D 82 ADD Register D
C018 DCR E 1D Decrement Register E
C019 JNZ L2 C2,17,00 Conditional jump to loop2
C01C HLT 76 Halt
Result :
a = Register B = 02H=D000H
b = Register D = 02H=D001H
a^2+b^2 = 04H In accumulator
32. Write an ALP to find factorial of any number that is stored at D034
memory location.
Code :
Memory
Mnemonics Hex code Remark
Location
MVI B,04H
C000 0604 Load register B with 8 bit data
C002 MOV C,B 48 Move from register b to C
C003 DCR B 05 Decrement B
C004 LOOP 1 :MOV D,B 50 Move from register B to D
C005 MVI A,00H 3E,00 Load register A with 8 bit data
`
C007 Loop 2 :ADD C 81 ADD Register C
C008 DCR D 15 Decrement register d
JNZ Loop 2
C009 C2,07,00 Conditional loop
C00C MOV C,A 4F MOVE REGISTER A TO C
DCR B
C00D 05 Decrement Register B
JNZ L1
C00E C2 Conditional jump to loop1
C011 STA D034H 32,34,D0 Store accumulator data in location
C014 HLT 76 Halt
Start
Load Register B
with 04
Move Register
FROM B to C
DCR Register B
LOOP 1:Move
and data in d000
from register B to
D
Load Accumulator
With 00H
`
LOOP 2 : ADD C
DCR D
Conditional jump to
loop2
DCR B
Conditional jump to
loop1
Store accumulator
data in location D034
Stop
Result :
Factorial of 04 is 24 satisfied
`
33. Write an ALP to generate Fibonacci number up to 13.
Memory
Mnemonics Hex code Remark
Location
C000 MVI A,01H 3E,01 Load register A with 8 bit data
C002 MVI C,0D 0E,0D Load register C with 8 bit data
C003 LXI H,D000 21,00,D0 Store data into register
C004 LXI D,D001 11,01,D0 Store data into register
C005 L1 :STAX D 12 Store data from accumulator
C007 LDAX D 1A Store data to accumulator
C008 ADD M 86 Add M
C009 INX D 13 Increment register pair
C00C INX H 23 Increment register pair
C00D DCR C 0D Decrement register pair
C00E JNZ L1 C2 Conditional jump
C011 RST 1 76 Halt
Start
ADD M
STOP
Control Word
0 0 0 0 0 0 0 0
00 H
`
Code
Memory Location Mnemonics
C000 MVI A,00 H
C002 OUT 30
C004 IN 33
C006 MOV C,A
C007 IN 32
C009 MOV B,A
C00A IN 31
Control Word
0 0 0 0 1 1 1 1
OF H
`
Code
Memory location Mnemonics
C000 MVI A, FF H
C002 OUT 30
C004 MVI A, FE H
C006 OUT 31
C008 MVI A, FD H
COOA OUT 32
C00C MVI A, 0A H
C00E OUT 33
Control Word
0 0 0 0 0 0 1 0
02 H
`
Memory Location Mnemonics
C000 MVI A, 02 H
C002 OUT 30
C004 IN 31
C006 OUT 32
Timer LSB = 5E H
Control Word
1 1 x x x x x x
C0 H
`
Code
`
38) Write an ALP for 8255:8255 is configured in mode 0, i.e. simple input-
output mode. Ports A, B, C are in mode 0. Show register data on the
corresponding LED’s. **
1 0 0 0 0 0 0 0
39) 8255 is configured in mode 0 i.e. Simple input – output mode. Where port
A, B, C are as input mode. Read the data from all 3 ports and store in
different register. **
1 0 0 1 1 0 1 1
`
40. Write an ALP for Logic control interface: Your LCI board is working on
the 8255 control word register. Blink the All LED’s to the corresponding port
A and B alternatively
1 0 0 0 0 0 0 0
DELAY :
Memory Location Mnemonics
C000 MVI H,0A
C002 L1 : MVI D,64H
C004 L2 :MVI E,DE
C006 L3 : DCR E
C007 JNZ L2
C00A DCR D
`
C00B JNZ L1
C00E DCR H
C00F JNZ L1
C012 HLT
C0 H All green Go
PORT Address
1 20 H - 2F H
2 28 H – 2F H
3 30 H – 37 H
4 38 H – 3F H
`
C013 CALL D000 (4)
C016 MVI A,70
C018 OUT 20
C01A MVI A,C0
C01C OUT 28
C01E CALL D000(4)
C021 MVI A,C0H
C023 OUT 28H
C025 MVI A,70
C027 OUT 30
C029 CALL D000 (4)
C02C MVI A,87
C02E OUT 28
C030 MVI A,B0
C031 OUT 30
C032 CALL D000 (4)
C034 MVI A,70
C037 OUT 28
C039 MVI A,C0
C03B OUT 30
C03F CALL D000(4)
C042 MVI A,C0H
C044 OUT 30H
C046 MVI A,70
C048 OUT 38
C04A CALL D000 (4)
C04D MVI A,87
C04F OUT 30
C051 MVI A,B0
C053 OUT 38
C055 CALL D000 (4)
C058 MVI A,70
C05A OUT 30
C05C MVI A,C0
C05E OUT 38
C060 CALL D000(4)
C063 MVI A,C0H
C065 OUT 38H
C067 MVI A,70
C069 OUT 20
`
C06B CALL D000 (4)
C06E MVI A,87
C070 OUT 38
C072 MVI A,B0
C074 OUT 20
C076 CALL D000 (4)
C079 MVI A,70
C07B OUT 38
C07D MVI A,C0
C07F OUT 20
C081 CALL D000(4)
C084 HLT
DELAY :
Memory Location Mnemonics
C000 MVI H,0A
C002 L1 : MVI D,64H
C004 L2 :MVI E,DE
C006 L3 : DCR E
C007 JNZ L2
C00A DCR D
C00B JNZ L1
C00E DCR H
C00F JNZ L1
C012 HLT