Ascending Order:-Address Label Mnemonics Opcod E Comments
Ascending Order:-Address Label Mnemonics Opcod E Comments
OPCOD
ADDRESS LABEL MNEMONICS COMMENTS
E
9100 LDA 9400 3A 00 94 Load the accumulator direct
9103 SUI 01 D6 01 Subtract 01 from A
9105 MOV D,A 57 Move the A value to D register
9106 MOV E, A 5F Move the A value to E register
9107 LOOP2 MOV B,D 42 Move the D register value to B
9108 LXI H 9200 21 00 92 Load HL pair indirect
OPCOD
ADDRESS LABEL MNEMONIC E COMMENTS
8000 LXI D,FA02 11 02 FA Load DE pair immediately
8003 MVI B,00 06 00 Move immediate 00 to B
register
8005 MVI C,01 0E 01 Move immediate 01 to C
register
8007 LDA FAOO 3A 00 FA Directly load accumulator
800A MOV H,A 67 Move content of acc. To H
800B LOOP MOV A,B 78 Move content of B register to
acc.
800C STAX D 12 Store accumulator indirect
800D INX D 13 Increment DE pair by 01
800E ADD C 81 Add content of C register to
acc.
800F MOV B,C 41 Move content of C to B register
8010 MOV C,A 4F Move content of acc. To C
register
8011 DCR H 25 Decrement H register by 01
8012 JNZ LOOP C2 0C 80 Jump on no zero loop
8015 HLT 76 Stop the program
PRIME NUMBER SERIES:-