|

楼主 |
发表于 2011-7-4 10:32:04
|
显示全部楼层
本帖最后由 张国祥 于 2011-7-4 10:32 编辑
king嗜血法师 发表于 2011-7-4 02:57
你应该把你写的代码发上来,这样很难明白你的意思。
这个是我写的:
- assume cs:codesg
- codesg segment
- dw 0123h,0456h,0789h,0abch,0defh,0fedh,0cbah,0987h
- dw 0,0,0,0,0,0,0,0,0,0 ;10个字单元做栈空间
- start: mov ax,cs
- mov ss,ax
- mov sp,36 ;设栈顶
- mov ax,0
- mov ds,ax
- mov bx,0 ;DS:[BX]=0:0
- mov cx,8
- s: push [bx]
- pop cs:[bx]
- add bx,2
- loop s
- mov ax,4c00h
- int 21h
- codesg ends
- end start
复制代码 这个是我增加栈空间而更改的:
- assume cs:codesg
- codesg segment
- dw 0123h,0456h,0789h,0abch,0defh,0fedh,0cbah,0987h
-
- dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;增加的栈空间
- start: mov ax,cs
- mov ss,ax
- mov sp,50 ;设栈顶
-
- mov ax,0
- mov ds,ax
- mov bx,0 ;DS:[BX]=0:0
-
- mov cx,8
-
- s: push [bx]
- pop cs:[bx]
- add bx,2
- loop s
-
- mov ax,4c00h
- int 21h
-
- codesg ends
- end start
复制代码
|
|