Question

In: Computer Science

Micro-processing/ DEBUGGING- Show how the instruction MOV [DI], DX can be assembled into memory address CS:100

Micro-processing/ DEBUGGING- Show how the instruction MOV [DI], DX can be assembled into memory address CS:100

Solutions

Expert Solution

ASSEMBLE (A) command.

Syntax: A STARTING ADDRESS

Here STARTING ADDRESS is the address at which the machine code of the first instruction of the program is to be stored.

Say if we need to assemble the instruction

ADD [BX+SI+1234H], AX

and store its machine code in mem

ory starting at address CS: 100, we start with the command

A CS:100 ( )

The response to this command input is the display of the starting address in the form  

1234:0100_

After typing the instruction to be assembled in following this address, the tile key is depressed, and the instruction is assembled into machine code; it is stored in memory; and the starting address of the next instruction is displayed. For our example, we have

1234:0100 ADD [BX + SI+1234],

AX ( ) 1234:0104_

Now either the next instruction is entered or the () key is depressed to terminate the assemble command. We can view the machine code that was produced for the instruction by issuing a DUMP command. Notice that the address displayed as the starting point of the next instruction is 1234:0104. Therefore, the machine code for the ADD instruction took up 4 bytes of memory, CS: 100, CS: 101, CS: 102, and CS: 103. The command needed to display this machine code is

D CS: 100 103( )


Related Solutions

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT