Lab 1 Viewing CPU and memory, programming with machine instructions and assembly instructions

Source: Internet
Author: User

Experimental tasks

First, 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

(1) Use the A command to write instructions to memory and step through the T command

(2) Use the E command to write the instruction to memory and step with the T command

T command execution process, consistent results

Summary:both a command and e command can write instructions to memory, but the a command is more concise

The T command stepping can clearly see the execution of each step

Second, write the following 3 instructions to write the memory unit starting from 2000:0, using these 3 instructions to calculate 2 of the 8 Sub-party

mov ax,1

Add Ax,ax

JMP 2000:0003

After the execution of the three

Summary: calculates 2 of 8 times to execute 7 Add, that is, the total execution 16 times T

Third, view the contents in memory

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

The date has not changed

Summary: use the e command to modify the production date of the Rom without changing the date

ROM (read-only memory) is read-only memory, unable to modify the value of the memory

four, to the memory from B8100h The beginning of the unit to fill in the data, such as:

-E b810:0000 01 01 02 02 03 03 04 04

Position Change

Pattern changes

Color change

Lab 1 Viewing CPU and memory, programming with machine instructions and assembly instructions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.