|
Assume (DS) = 2050H, (ES) = 3600H, (SI) = 00A0H, (BX) = 0100H, (BP) = 1020H, (SS) = 2100H The offset address of the data variable VAL is 0050H, please indicate the following instructions EA and PA of the source operand.
1.MOV AX, [100H]
2.MOV AX, [BX]
3.MOV AX, ES: [BX]
4.MOV AX, VAL [BP] [SI]
5.MOV AX, VAL
four. (12 points) Know the definition of a data segment as follows, draw the storage of variables in memory
DSEG SEGMENT
X1 DB 0, ’1’,-1,31H
X2 DW 10, ’ABCD’
X3 DW X2
DSEG ENDS
Fives. (10 points) If the instructions are filled in the brackets of the program: LOOP L20
What are the contents of the four registers AX, BX, CX, and DX after the execution of the program?
CSEG SEGMENT
ASSUME CS: CSEG
BEGIN: MOV AX, 01H
MOV BX, 02H
MOV DX, 0AH
MOV CX, 03H
L20: INC AX
ADD BX, AX
SHR DX, 1
()
MOV AH, 4CH
INT 21H
CSEG ENDS
END BEGIN
6. (10 points) Fill in the instructions in the box according to the given function.
1 X> 1
The following program implements Y = X -1≤X≤1
-1 x <-1
DATA SEGMENT
X DB?
Y DB?
DATA ENDS
STACK SEGMENT STACK
DB 100 DUP (0)
STACK ENDS
CODE SEGMENT
ASSUME CS: CODE, DS: DATA, SS: STACK
START: MOV AX, DATA
MOV AL, X
JG NEXT1
CMP AL, -1
MOV Y, AL
NEXT1: MOV Y, 1
JMP EXIT
NEXT2: MOV Y, -1
EXIT: MOV AH, 4CH
INT 21H
CODE ENDS
END START
Seven. (10 points) Use uncompressed BCD code to achieve 23 + 15 operations. Try writing a program. |
|