| |

VerySource

 Forgot password?
 Register
Search
View: 1668|Reply: 3

Can anyone help me solve the following problems

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-26 13:20:01
| Show all posts |Read mode
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.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-18 14:00:01
| Show all posts
This kind of post must be ignored ... Typical homework post ..... the answer is open ...
I'm too lazy to do the decoration, and even the problem scores are "sticky" ... I took the test ~~~ I took U ~~~~~ this funny brother ~~
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-4-19 15:00:01
| Show all posts
Nothing to do, let me do it for you
1. PA = 2050H EA = 0100H
2. PA = 2050H EA = 0100H
3. PA = 3600H EA = 0100H
4. PA = 2100H EA = 0050H + 1020H + 00A0H
5. PA = 2100H EA = 0050H


Fourth, the picture is not easy to draw here

5. AX = 4C04H BX = 000BH CX = 0000H DX = 0001H
6. I can't see where your boxes are, and I don't know where to fill them.

Seven, code segment
       assume cs: code
           main proc far
                 push ds
                 xor ax, ax
                 push ax
                 mov ax, 0203h
                 mov bx, 0105h
                 add ax, bx
                 aaa
                 ret
           endp
       code ends
            end main
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-7-15 12:15:01
| Show all posts
Thank you
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list