毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 课程设计 >> 正文

微机原理课程设计_钟表显示_汇编课程设计 第4页

更新时间:2007-10-25:  来源:毕业论文

CALL    xymaxmin
MOV AX,y2
MOV BX,y1
CALL subab
MOV  y2y1,AX
MOV AX,x2
MOV BX,x1
CALL subab
MOV  SI,0
CMP  SI,AX
JE   zhixian
JMP  lopx
zhixian:     JMP  zhixianxs
lopx:        MOV  x2x1,AX
MOV  AX,xmin
MOV       x,AX
line0x:      SUB       AX,xmin
MOV       DX,0
MOV       CX,y2y1
MUL       CX
MOV       CX,x2x1
DIV       CX
MOV       DX,0
CMP       DL,s

JE        zhengx
MOV       CX,AX
MOV       AX,xminy
SUB       AX,CX
JMP       kk2x
zhengx:        ADD       AX,xminy
kk2x:         MOV       y,AX
CALL      DIan

INC       x
MOV       AX,x
CMP       AX,xmax
JBE       line0x
JMP       quit12

zhixianxs:    MOV       AX,xmin
MOV       x,AX
MOV       AX,ymin
MOV       y,AX
lopxx:        CALL      DIan

INC       y
MOV       AX,ymax
CMP       AX,y
JAE      lopxx
quit12:      MOV       s,0
POPa
POP       y2
POP       y1
POP       x2
POP       x1
RET
linex         ENDP


;**************************liney      x=(x2-x1)(y-y1)/(y2-y1)+x1
;*****************y++

sjx  PROC NEAR
PUSH      x1
PUSH      x2
PUSH      y1
PUSH      y2
pusha
CALL      xymaxmin
MOV       AX,y2
MOV       BX,y1
CALL      subab
MOV       y2y1,AX
MOV       SI,0
CMP       SI,AX
JE        to_sjxx
sjx_lop1:     MOV       AX,x2
MOV       BX,x1
CALL      subab
MOV       x2x1,AX
MOV       SI,0
CMP       SI,AX
JE        to_sjxy
MOV       DX,0
MOV       AX,y2y1
MOV       CX,x2x1
DIV       CX
CMP       AX,1
JE        to_sjxx
CMP       AX,0
JE        to_sjxx
JMP       to_sjxy
to_sjxx:      MOV       s,0
CALL      sjxx
JMP       sjx_quit
to_sjxy:      MOV       s,0
CALL      sjxy
sjx_quit:     POPa
POP       y2
POP       y1
POP       x2
POP       x1
MOV       s,0
RET
sjx           ENDP

liney  PROC NEAR
PUSH      x1
PUSH      x2
PUSH      y1
PUSH      y2
pusha
CALL      xymaxmin
MOV       AX,y2
MOV       BX,y1
CALL      subab
MOV       y2y1,AX
MOV       SI,0
CMP       SI,AX
JE        heng
JMP       lop1
heng:         JMP       hengxian
lop1:         MOV AX,x2
MOV BX,x1
CALL subab
MOV       x2x1,AX
MOV       AX,ymin
MOV       y,AX

line0y: SUB   AX,ymin
MOV   DX,0
MOV       CX,x2x1
MUL       CX
MOV       CX,y2y1
DIV       CX
MOV       DX,0
CMP       DL,s
JE        zhengy
MOV       CX,AX
MOV       AX,yminx
SUB       AX,CX
JMP       kky
zhengy:       ADD       AX,yminx
kky:         MOV       x,AX

CALL      DIan
INC       y
MOV       AX,y
CMP       AX,ymax
JBE       line0y
JMP       quity
hengxian:     MOV       AX,ymin
MOV       y,AX
MOV       AX,xmin
MOV       x,AX
lopy:         CALL      DIan
INC       x
MOV       AX,xmax
CMP       AX,x
JAE       lopy

quity:       MOV       s,0
POPa
POP      y2
POP      y1
POP      x2
POP      x1
RET
liney         ENDP

 

 


;***************************linex***y=(y2-y1)*(x-x1)/(x2-x1)+y1
;****in (x1,y1),(x2,y2)******************x++
sjxx  PROC NEAR
pusha
PUSH      x1
PUSH      x2
PUSH      x3
PUSH      y1
PUSH      y2
PUSH      y3

CALL      xymaxmin
MOV       AX,xmin
MOV       sjx_xmin,AX
MOV       AX,ymin
MOV       sjx_ymin,AX
MOV       AX,xmax
MOV       sjx_xmax,AX
MOV       AX,ymax
MOV       sjx_ymax,AX
MOV       AX,xminy
MOV       sjx_xminy,AX


MOV AX,y2
MOV BX,y1
CALL subab
MOV       sjx_y2y1,AX
MOV AX,x2
MOV BX,x1
CALL subab
MOV       DL,s
MOV       s2,DL
MOV       s,0
MOV       SI,0
CMP       SI,AX
JE        sjx_zhixian
JMP       sjx_lopx
sjx_zhixian:
MOV       x1,AX
MOV       AX,x3
MOV       x2,AX
MOV       AX,y3
MOV       y2,AX
JMP       sjx_zhixianxs
sjx_lopx:     MOV       sjx_x2x1,AX
MOV       AX,x3
MOV       x2,AX
MOV       AX,y3
MOV       y2,AX
MOV       AX,sjx_xmin
MOV       x1,AX

sjx_line0x:   SUB       AX,sjx_xmin
MOV       DX,0                         ;***y=(y2-y1)*(x-x1)/(x2-x1)+y1
MOV       CX,sjx_y2y1
MUL       CX
MOV       CX,sjx_x2x1
DIV       CX
MOV       DX,0
CMP       DL,s2
JE        sjx_zhengx
MOV       CX,AX
MOV       AX,sjx_xminy
SUB       AX,CX
JMP       sjx_kk2
sjx_zhengx:
ADD       AX,sjx_xminy
sjx_kk2:
MOV       y1,AX
CALL      linex
CALL      liney
INC       x1
MOV       AX,x1
CMP       AX,sjx_xmax
JBE       sjx_line0x
JMP       sjx_quit12

上一页  [1] [2] [3] [4] [5] [6] 下一页

微机原理课程设计_钟表显示_汇编课程设计 第4页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。