Wang Shuang Assembly Language Third Edition 5th Chapter experiment 4

Source: Internet
Author: User

Sub-question (3)

The function of the following program is to copy "Mov ax,4c00h" before the instructions to memory 0:200, complete the program. On-machine debugging, track running results.

Assume Cs:code

Code segment

MOV ax, CS ; CS is the segment address of the program entry, and that's where we're going to start copying.

MOV Ds,ax

MOV ax,0020h

MOV Es,ax

MOV bx,0

MOV cx, CX ; When the program just loaded, CX stored the program size, here I am not sure of the answer, I tried to see mov ax,4c00h int 21h will not be copied, but there is a line more behind

S:mov AL,[BX]

MOV Es:[bx],al

Inc BX

Loop s

MOV ax,4c00h

int 21h

Code ends

End

Wang Shuang Assembly Language Third Edition 5th Chapter experiment 4

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.