You are on page 1of 6

1.

PROGRAM ROM 1000H-103FH data


1 5 data 2 EXTERNAL DATA
RAM 2000H
2 5 data 5 EXTERNAL DATARAM
3000H
3 data 2 5 255
4
ORG
1000H
DB
1,3,5,6,8,9,10,0,30,28 (,
)
ORG
00H

XDATA (2000H)=0AH, (2001H)=14H, (2002H)=00H,


(2003H)=(3CH),
XDATA (3000H)=06H, (3001H)=08H, (3002H)=0BH,
(3003H)=0DH, (3004H)=0EH, (3005H)=21H,
2. PROGRAM ROM 2000H-207FH data
EXTERNAL DATARAM
1 ROM 2000H-203FH data EXTERNAL DATA
RAM2540H-257FH
2 ROM 2040H-207FH data EXTERNAL DATA
RAM2500H-253FH

4
ORG
2000H
DB
1,3, (,
DATA)
ORG
203EH
DB
7,28H
ORG
2040H
DB
5,9AH, (, DATA)

ORG
207EH
DB
33H, 66H
ORG
00H

3. PROGRAM ROM 1000H-13FFH ( A )


1400H-17FFH( B ) data
1 A B byte
EXTERNAL DATA RAM 2000H-27FFH
2 (1000H)=38H, (1400H)=8AH, 38H x 8AH =1E30H
1EH EXTERNAL DATA RAM 2000H, 30H EXTERNAL
DATA RAM 2001HEXTERNAL
DATA RAM (2000H)=1EH, (2001H)=30H
3 (
END )

ORG

JMP $
1000H

DB
38H,93H,57H, (, 1024
)
ORG
1400H
DB
8AH, 0F3H, 0ACH, (,
1024 )

XDATA (2000H)=1EH, (2001H)=30H, (2002H)=8BH,


(2003H)=89H, (2004H)=3AH, (2005H)=74H, ,

4. PROGRAM ROM 1000H-13FFH ( A )


1400H-17FFH( B ) data
1 AB 8 SIGNED number
2
EXTERNAL DATA RAM 2000H
3 (1000H)=93H(1400H)=05H SIGNED
number 05H > 93H EXTERNAL DATA RAM 2000H
05HEXTERNAL DATA RAM 2001H 93H
EXTERNAL DARA RAM (2000H)=05H,
(2001H)=93H
4 (
END )
JMP

$
ORG
1000H
DB
93H,32H,99H (, 1024
DATA)
ORG
1400H
DB
05H, 7AH, 0FAH (, 1024
DATA)
EXTERNAL DATA RAM (2000H)=05H,
(2001H)=93H, (2002H)=7AH, (2003H)=32H, (2004H)=0FAH,
(2005H)=99H,
5. External Data Memory 2000H-21FFH (
A ) 3000H-31FFH ( B ) 4000H-

41FFH ( C ) data
5000H-51FFH ( D )
1 A B C byte
unsigned number
D
2
(2000H)=38H, (2001H)=18H, (2002H)=9AH, (2003H)=0C8H, ,
(3000H)=48H, (3001H)=09H, (3002H)=9BH, (3003H)=0D8H,
(4000H)=28H, (4001H)=07H, (4002H)=9CH, (4003H)=0A8H
EXTERNAL DATA RAM
(5000H)=48H, (5001H)=18H, (5002H)=9CH, (5003H)=0D8H

3
6. External Data Memory 1000H-13FFH ( A )
1400H-17FFH( B ) data
1 A B byte unsigned number
A B
2 (1000H)=38H, (1001H)=08H, (1002H)=9AH, (1003H)=0C8H,
, (1400H)=8AH, (1401H)=08H, (1402H)=80H, (1403H)=0FFH,
EXTERNAL DATA RAM
(1000H)= 8A H, (1001H)=08H, (1002H)=9AH, (1003H)=0FFH, ,
(1400H)= 38H, (1401H)=08H, (1402H)=80H, (1403H)=0C8H,

7. PROGRAM ROM 1000H-13FFH ( A )


1400H-17FFH( B ) data
1 AB 8 unsigned number
2 A
B
EXTERNAL DATA RAM 2000H 0
0FFH
3 (1000H)=93H
(1400H)=05H93H05H=1DH......02HEXTERNAL DARA
RAM (2000H)=1DH, (2001H)=02H
4 (
END )

JMP

$
ORG
1000H
DB
93H,32H,99H (, 1024
DATA)
ORG
1400H
DB
05H, 7AH, 0H (, 1024
DATA)
EXTERNAL DATA RAM (2000H)=1DH,
(2001H)=02H, (2002H)=00H, (2003H)=32H, (2004H)=0FFH,
(2005H)=0FFH,
8. PROGRAM ROM 2000H-23FFH signed number

1 X
2 X2
3 bytes X
bit 1
4 bytes EXTERNAL DATA RAM
2000H
5 X=14H
X2=0190H 01H 90H
6 X=F4H -12 signed number
X2=144D=0090H X 16
1 8090H
80H 90H
7
JMP
ORG
DB

$
2000H
14H,0F4H,88H ()

EXTERNAL DATA RAM (2000H)=00H,


(2001H)=90H, (2002H)=80H, (2003H)=90H,
(2004H)=0B8H, (2005H)=40H,
X


9. Write a program to process data stored in the external code memory from
1000H to 104FH. The rule of the processing is as follows :
1 If the data is even, copy it to external data memory started from
2000H.
2 If the data is odd, copy it to on-chip memory started from 40H.
Find out how many odd numbers and how many even numbers during the processing.
Stored the number of odd numbers in A and the number of even numbers in B.

10. A register 8-bitSIGNED number

byte

byte