Java教程

8086汇编-实验3-编程、编译、链接、跟踪

本文主要是介绍8086汇编-实验3-编程、编译、链接、跟踪,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

汇编程序编写:
assume cs:code
code 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
code ends

寄存器:ax bx ss sp

ax, bx, ss, sp, 2000:10 x, 2000:12 y
step0:mov ax,2000h

ax=2000h, bx, ss, sp, 2000:10 x, 2000:12 y
step1:mov ss,ax

ax=2000h, bx, ss=2000h, sp, 2000:10 x, 2000:12 y
step2:mov sp,0

ax=2000h, bx, ss=2000h, sp=0, 2000:10 x, 2000:12 y
step3:add sp,10

ax=2000h, bx, ss=2000h, sp=10, 2000:10 x, 2000:12 y
step4:pop ax

ax=x, bx, ss=2000h, sp=12, 2000:10 x, 2000:12 y
step5:pop bx

ax=x, bx=y, ss=2000h, sp=14, 2000:10 x, 2000:12 y
step6:push ax

ax=x, bx=y, ss=2000h, sp=12, 2000:10 x, 2000:12 x
step7:push bx

ax=x, bx=y, ss=2000h, sp=10, 2000:10 y, 2000:12 x
step8:pop ax

ax=y, bx=y, ss=2000h, sp=12, 2000:10 x, 2000:12 y
step9:pop bx

ax=y, bx=x, ss=2000h, sp=14, 2000:10 x, 2000:12 y

这篇关于8086汇编-实验3-编程、编译、链接、跟踪的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!