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

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

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

 

sjx_zhixianxs: MOV       AX,sjx_xmin
MOV       x1,AX
MOV       AX,sjx_ymin
MOV       y1,AX
sjx_lopxx:
CALL      linex
CALL      liney
INC       y1
MOV       AX,sjx_ymax
CMP       AX,y1
JAE      sjx_lopxx
sjx_quit12:  MOV       s,0
POP       y3
POP      y2
POP      y1
POP       x3
POP      x2
POP      x1
POPa
RET
sjxx           ENDP

 

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


sjxy  PROC NEAR
PUSH      x1
PUSH      x2
PUSH      x3
PUSH      y1
PUSH      y2
PUSH      y3
pusha
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,yminx
MOV       sjx_yminx,AX
MOV AX,y2
MOV BX,y1
CALL subab
MOV       sjx_y2y1,AX
MOV       SI,0
CMP       SI,AX
JE        sjxy_heng
JMP       sjxy_lop1
sjxy_heng:
MOV       DL,s
MOV       s2,DL
MOV       s,0
MOV       AX,x3
MOV       x2,AX
MOV       AX,y3
MOV       y2,AX
JMP       sjxy_hengxian
sjxy_lop1:    MOV      AX,x2
MOV      BX,x1            ;x=(x2-x1)(y-y1)/(y2-y1)+x1
CALL     subab
MOV       DL,s
MOV       s2,DL
MOV       s,0
MOV       sjx_x2x1,AX
MOV       AX,x3
MOV       x2,AX
MOV       AX,y3
MOV       y2,AX
MOV       AX,sjx_ymin
MOV       y1,AX

sjxy_line0y:  SUB       AX,sjx_ymin
MOV       DX,0
MOV       CX,sjx_x2x1
MUL       CX
MOV       CX,sjx_y2y1
DIV       CX
MOV       DX,0
CMP       DL,s2
JE        sjxy_zhengy
MOV       CX,AX
MOV       AX,sjx_yminx
SUB       AX,CX
JMP       sjxy_kky3
sjxy_zhengy:
ADD       AX,sjx_yminx
sjxy_kky3:
MOV       x1,AX
CALL      linex

CALL      liney
INC       y1
MOV       AX,y1
CMP       AX,sjx_ymax
JBE       sjxy_line0y
JMP       sjxy_quity
sjxy_hengxian:     MOV       AX,sjx_ymin
MOV       y1,AX
MOV       AX,sjx_xmin
MOV       x1,AX
sjxy_lopy:    CALL      liney
CALL      linex
INC       x1
MOV       AX,sjx_xmax
CMP       AX,x1
JAE       sjxy_lopy

sjxy_quity:  MOV       s,0
POPa
POP       y3
POP      y2
POP      y1
POP       x3
POP      x2
POP      x1
RET
sjxy          ENDP

;
xymaxmin      PROC      NEAR
PUSHa
PUSH      x1
PUSH      x2
PUSH      y1
PUSH      y2
MOV       AX,x1
CMP       AX,x2
JAE       x1dyx2
MOV       xmin,AX    ;x1<x2
MOV       AX,y1
MOV       xminy,AX
MOV       AX,x2
MOV       xmax,AX
JMP       ymaxmin
x1dyx2:       MOV       xmax,AX
MOV       AX,x2
MOV       xmin,AX
MOV       AX,y2
MOV       xminy,AX        ;xminx 所对应的y
ymaxmin:      MOV       AX,y1
CMP       AX,y2
JAE       y1dyy2
MOV       ymin,AX
MOV       AX,x1
MOV       yminx,AX       ;所对应的x
MOV       AX,y2
MOV       ymax,AX
JMP       xymax_quit
y1dyy2:       MOV       ymax,AX
MOV       AX,y2
MOV       ymin,AX
MOV       AX,x2
MOV       yminx,AX
xymax_quit:
POP      y2
POP      y1
POP      x2
POP      x1
POPa
RET
xymaxmin      ENDP

DIan PROC NEAR           ;画一点x,y
PUSHa
MOV       AH,s
MOV       s3,AH
MOV       AH,SIgle
AND       AH,80h
CMP       AH,0
JE        puanduan
paint:
MOV AL,color
MOV BH,page1
MOV       DX,y
MOV CX,x        ;列号
MOV AH,0ch
INT 10h
JMP       DIanquit
puanduan:
CALL      readerdian
MOV       DIancolor,AL
MOV       AH,SIgle

AND       AH,7fh
CMP       AH,0
JE        NEw0
CMP       AH,1
JE        NEw1
CMP       AH,2
JE        NEw2
CMP       AH,3
JE        NEw3
CMP       AH,4
JE        NEw4
CMP       AH,5
JE        NEw5
CMP       AH,6
JE        NEw6
JMP       DIanquit

NEw0:         CMP       DIancolor,0
JE        topaint
JMP       DIanquit
NEw1:         CMP       DIancolor,0
JE        topaint
MOV       AH,color_hour
CMP       DIancolor,AH
JE        topaint
JMP       DIanquit
topaint:      JMP       paint

NEw2:         MOV       AH,color_min
CMP       DIancolor, AH
JE        topaint
JMP       DIanquit
NEw3:         JMP       NEw0
NEw4:         JMP       NEw0
NEw5:         MOV       AH,color_hour
CMP       DIancolor,AH
JE        topaint
JMP       DIanquit
NEw6:         CMP       DIancolor,0
JE        topaint
JMP       DIanquit
MOV       AX,x
MOV       BX,x0
CALL      SUBab
CMP       AX,5
JA        topaint
MOV       AX,y
MOV       BX,y0
CALL      SUBab
CMP       AX,5
JA        topaint


DIanquit:     MOV       AH,s3
MOV       s,AH
POPa
RET
DIan ENDP

yuanxin       PROC
MOV       AL,color_second
ADD       AL,1
MOV       BH,PAGE1
MOV       DX,y0
MOV       CX,x0
MOV       AH,0ch
INT       10h
DEC       DX
MOV       AH,0ch
INT       10h
DEC       CX
MOV       AH,0ch
INT       10h
INC       DX
MOV       AH,0ch
INT       10h
INC       DX
MOV       AH,0ch
INT       10h
INC       CX
MOV       AH,0ch
INT       10h
INC       CX
MOV       AH,0ch
INT       10h
SUB       DX,1
MOV       AH,0ch
INT       10h
DEC       DX
MOV       AH,0ch
INT       10h

RET
yuanxin       ENDP

readerdian    PROC
MOV       BH,page1
MOV       DX,y
MOV       CX,x        ;列号
MOV       AH,0dh
INT       10h
RET
readerdian    ENDP


b1002         PROC      NEAR           ;入口DX-光标定位
MOV       BH,0
MOV       AH,02h
INT       10h
RET
b1002         ENDP


CLear         PROC
MOV       DX,0410h
CALL      b1002
MOV       CX,6000
MOV       BH,PAGE1
MOV       AL,' '
MOV       AH,0ah
INT       10h
RET
CLear         ENDP


;      12根******************************
skin2         PROC
PUSHa
MOV       AL,color6
MOV       color,AL

MOV       CX,12
MOV       AX,0
skin2_kk1:    PUSH      CX

PUSH      AX
MOV       BX,r0
MOV       CX,y0
MOV       DX,x0

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

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

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