标签:
assume cs:code
stack segment
db 16 dup (0)
stack ends
code segment
mov ax,4c00h
int 21h
start:mov ax,stack
mov ss,ax
mov sp,16
mov ax,0
push cs
push ax
mov bx,0
retf
code ends
end start
assume cs:code
code segment
start:mov ax,1
mov cx,3
call s
mov bx,ax
mov ax,4c00h
int 21h
s:add ax,ax
loop s
ret
code ends
end start
debug单步执行结果看出(bx)=8cube:mov ax,bx
mul bx
mul bx
retassume cs:code
data segment
db 'conversation'
data ends
code segment
start: mov ax,data
mov ds,ax
mov si,0 ;ds:si指向字符串(批量数据)所在空间的首地址
mov cx,12 ;cx存放字符串的长度
call capital
mov ax.4c00h
int 21h
captical:add byte ptr [si],11011111b
loop captical
ret
code ends
end start
子程序开始:子程序使用的寄存器压栈
子程序内容
子程序使用的寄存器出栈
返回(ret,retf)captical: push cx
push si
change: mov cl,[si]
mov ch,0
jcxz ok
and byte ptr [si],11011111b
inc si
imp short change
ok: pop si
pop cx
ret标签:
原文地址:http://blog.csdn.net/u013018721/article/details/51264199