• Experimental tasks
(1) Using debug, use the e command and the a command to write instructions to memory in two ways
Machine Code Assembly Instructions
B8 4e mov ax,4e20h
Add ax,1416h
BB XX mov bx,2000h
D8 Add Ax,bx
C3 mov Bx,ax
D8 Add Ax,bx
B8 1a mov Ax,001ah
BB-XX mov bx,0026h
XX D8 Add Al,bl
XX DC Add AH,BL
XX C7 Add Bh,al
B4 XX mov ah,0
XX D8 Add Al,bl
9c Add al,9ch
Part 1: Writing instructions to memory with a command, stepping with the T command
Final Result:
Part 2: Writing instructions to memory with the e command, stepping with the T command
Final Result:
Summarize:
From the experimental results can be seen in the e command and a command two ways to write instructions to memory the same result, but with a command result is more concise, that is, the format of the assembly instruction in memory to write a machine instruction.
(2) write the following 3 instructions to the memory unit starting from 2000:0, using these 3 instructions to calculate 2 of the 8-way
MOV ax,1
Add Ax,ax
JMP 2000:0003
Final Result:
(3) The ROM on the motherboard of the PC is written with a production date, in a few units of memory FFF00H~FFFFFH, please find this production date and try to change it
Summarize:
We modified the production date of the ROM with the e command, but the date remains the same because ROM read-only memory cannot modify the value of the memory.
(4) Fill in the data in the memory unit starting with b8100h, such as:
-e b810:0000 01 01 02 02 03 03 04 04
Change the value:
After changing the address:
Summarize:
Input different data in memory, the phenomenon is different, after changing the address, the same is true.
Lab 1 Viewing CPU and memory, programming with machine instructions and assembly instructions