Detection site 6.1

Source: Internet
Author: User
(1) The following program implementation uses memory 0-0 in sequence ~ Rewrite the data in the program in unit 0: 15 to complete the program
Assume Cs: codesg

Codesg segment

DW 0123 H, 0456 H, 0789 H, 0 abch, 0 defh, 0 fedh, 0 cbah, 0987 H

Start: mov ax, 0
MoV ds, ax
MoV BX, 0

MoV CX, 8
S: mov ax, [BX]
MoV Cs: [BX], ax; complete code
Add Bx, 2
Loop s

MoV ax, 4c00h
Int 21 h

Codesg ends
End start

(2) The following program implementation uses memory 0: 0 in sequence ~ Data in the content rewriting program in unit 0: 15 is transferred using stacks. Stack space is set in the program. Completion program:
Assume Cs: codesg

Codesg segment

DW 0123 H, 0456 H, 0789 H, 0 abch, 0 defh, 0 fedh, 0 cbah, 0987 H

DW 0, 0, 0, 0, 0, 0, 0, 0

Start: mov ax, Cs; complete code
MoV SS, ax
MoV sp, 24 h; complete code

MoV ax, 0
MoV ds, ax
MoV BX, 0
MoV CX, 8

S: Push [BX]
Pop Cs: [BX]; supplemented code
Add Bx, 2
Loop s

MoV ax, 4c00h
Int 21 h

Codesg ends
End start

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.