|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 半生缘 于 2013-3-5 21:15 编辑
- assume cs:code,ds:data,ss:stack
- stack segment
- dw 16 dup(1)
- stack ends
- data segment
- db 0,0,0,0,0,0,0,0,0,0,'hd部分 的push和pop
- 去掉分号就能使 不去掉分号就画不了图 他中间也没有改变 那几个值的
- 一(t单步)调试 到s1上边的 mov cx,bx 就说无效指令 运行倒是没问题:dizzy:
- 谁能帮忙解释一下 谢谢:'(
- data ends
- code segment
- wxh: push cx
- push si
- s: call xh
- inc si
- loop s
- pop si
- pop cx
- ret
- xh: push cx
- push di
- mov cx,bx
- s1: call hd
- inc di
- loop s1
- pop di
- pop cx
- ret
- hd: push ax
- push dx
- push di
- push si
- ;push dx
- ;push di
- ;push si
- mov ax,0a000h
- mov es,ax
- mov ax,320 ;一行320个
- ;pop si
- mul si ;计算横坐标
- ;pop di
- add di,ax
- ;pop dx ;计算坐标点
- mov es:[di],dl
- pop si
- pop di
- pop dx
- pop ax
- ret
- start: mov ax,data
- mov ds,ax
- mov ax,stack
- mov ss,ax
- mov sp,10h
-
- mov ax,13h
- int 10h
-
- mov cx,100 ;宽度
- mov bx,100 ;高度
- mov si,50 ;起点纵坐标
- mov di,110 ;起点横坐标
- mov dx,6b8ch ;颜色
- call wxh
- mov ah,1
- int 21h
- mov ax,4c00h
- int 21h
- code ends
- end start
复制代码 hd部分 的push和pop
去掉分号就能使 不去掉分号就画不了图 他中间也没有改变 那几个值的
一(t单步)调试 到s1上边的 mov cx,bx 就说无效指令 运行倒是没问题:dizzy:
谁能帮忙解释一下 谢谢:'(
|
|