Assembly language: Experiment three programming, compiling, connecting, tracking

Source: Internet
Author: User

1) Save the following program as T1.ASM to generate T1.exe

Assume CS:CODESG

CODESG segment

MOV ax,2000h

MOV Ss,ax

MOV sp,0

Add sp,10

Pop ax

Pop bx

Push AX

Push BX

Pop ax

Pop bx

MOV ax,4c00h

int 21H

CODESG Endsend

2) with debug tracking t1.exe execution process, write out each step after the relevant register content and stack top content

3) PSP first 2 bytes is CD20, load T1.exe with debug, view PSP content

-D ds:0

Attention:

DS is the head segment address of the PSP after the program is loaded

DS+10H is the segment address of the main program

Cs:ip Point to Ds+10h:0

Assembly language: Experiment three programming, compiling, connecting, tracking

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.