马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
试验9 这两段代码有点意思. 这只是把字符串放入栈中. 希望新手有点收获. 我就是新手.收获不小.呵呵assume cs:codesg,ds:datasg,ss:stacksg
datasg segment
db 'welcome to masm!'
datasg ends
stacksg segment
dw 8 sup(0)
stacksg ends
codesg segment
start: mov ax,datasg
mov ds,ax
mov ax,stacksg
mov ss,ax
mov cx,8H
mov bx,0EH
mov sp,10H
s:
push [bx]
dec bx
dec bx
loop s
mov ax,4c00H
int 21H
codesg ends
end start
assume cs:codesg,ds:datasg,ss:stacksg
datasg segment
db 'welcome to masm!'
datasg ends
stacksg segment
dw 8 sup(0)
stacksg ends
codesg segment
start: mov ax,datasg
mov ds,ax
mov ax,stacksg
mov ss,ax
mov cx,8H
mov bx,10H
mov sp,10H
s:
dec bx
dec bx
push [bx]
loop s
mov ax,4c00H
int 21H
codesg ends
end start
|