Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only data less then 30H needs to copy into memory location
3000H onwards.
LXI H,2000
LXI D,3000
MVI C,0A
BACK: MOV A, M
CPI 30
JNC NEXT
STAX D
INX D
NEXT: INX H
DCR C
JNZ BACK
HLT
Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only data less then or equals to 30H needs to copy into memory
location 3000H onwards.
LXI H,2000
LXI D,3000
MVI C,0A
BACK: MOV A, M
CPI 31 H (30 + 1)
JNC NEXT
STAX D
INX D
NEXT: INX H
DCR C
JNZ BACK
HLT
Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only data greater then 30H needs to copy into memory location
3000H onwards.
LXI H,2000
LXI D,3000
MVI C,0A
BACK: MOV A, M
CPI 31 (30H +1)
JC NEXT
STAX D
INX D
NEXT: INX H
DCR C
JNZ BACK
HLT
Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only data greater or equals to 30H needs to copy into memory
location 3000H onwards.
LXI H,2000
LXI D,3000
MVI C,0A
BACK: MOV A, M
CPI 30
JC NEXT
STAX D
INX D
NEXT: INX H
DCR C
JNZ BACK
HLT
Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only data in the range [30, 33] needs to copy into memory
location 3000H onwards.
LXI H,2000
LXI D,3000
MVI C,0A
BACK: MOV A, M
CPI 30
JC NEXT
CPI 34 (33 + 1)
JNC NEXT
STAX D
INX D
NEXT: INX H
DCR C
JNZ BACK
HLT
Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only data in the range (30, 33) needs to copy into memory
location 3000H onwards.
LXI H,2000
LXI D,3000
MVI C,0A
BACK: MOV A, M
CPI 31 (30+1)
JC NEXT
CPI 34
JNC NEXT
STAX D
INX D
NEXT: INX H
DCR C
JNZ BACK
HLT
Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only even data needs to copy into memory location 3000H
onwards.
LXI H,2000
LXI D,3000
MVI C,0A
BACK: MOV A, M
RAR
JC NEXT
MOV A, M
STAX D
INX D
NEXT: INX H
DCR C
JNZ BACK
HLT
Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only odd data needs to copy into memory location 3000H
onwards.
LXI H,2000
LXI D,3000
MVI C,0A
BACK: MOV A, M
RAR
JNC NEXT
MOV A, M
STAX D
INX D
NEXT: INX H
DCR C
JNZ BACK
HLT
Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only Positive data needs to copy into memory location 3000H
onwards.
LXI H,2000
LXI D,3000
MVI C,0A
BACK: MOV A, M
RAL
JC NEXT
MOV A, M
STAX D
INX D
NEXT: INX H
DCR C
JNZ BACK
HLT
Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and copy
only Negative data needs to copy into memory location 3000H
onwards.
LXI H,2000
LXI D,3000
MVI C,0A
BACK: MOV A, M
RAL
JNC NEXT
MOV A, M
STAX D
INX D
NEXT: INX H
DCR C
JNZ BACK
HLT
Write an ALP (Assembly level Program) to check the data byte
from the memory array located from 2000H to 2009H and count
the number of data less then 80H and store your result on
memory location 3000H.
LXI H,2000
MVI C,0A
MVI B,00
BACK: MOV A, M
CPI 80
JNC NEXT
INR B
NEXT: INX H
DCR C
JNZ BACK
MOV A, B
STA 3000
HLT
Write an ALP to Add the content of memory location 2000H to
2009H and store your result on 3000H (Lower byte) and 3001H
(higher byte).
LXI H,2000
MVI C,0A
MVI B,00
MVI A,00
BACK: ADD M
JNC NEXT
INR B
NEXT: INX H
DCR C
JNZ BACK
STA 3000
MOV A, B
STA 3001
HLT
Write an ALP to multiply the content of memory location 2000H
with 2001H and store your result on 3000H (Lower byte) and
3001H (higher byte).
LXI H,2000
MVI B,00
MVI A,00
MOV D, M
INX H
MOV C, M
BACK: ADD D
JNC NEXT
INR B
NEXT: INX H
DCR C
JNZ BACK
STA 3000
MOV A, B
STA 3001
HLT
Write an ALP to divide the content of memory location 2000H by
the content of memory location 2001H and store your result on
3000H (quotient) and 3001H (Reminder).
LXI H,2000
MVI B,00
MOV A, M
INX H
MOV C, M
BACK: INR B
SUB C
JP BACK
DCR B
ADD C
STA 3001
MOV A, B
STA 3000
HLT