16428图形汇编程序
答案:1 悬赏:50 手机版
解决时间 2021-08-20 20:01
- 提问者网友:抽煙菂渘情少年
- 2021-08-20 06:19
谁知道。我要例程。我按网上做的总是在检测LCD忙时没反映,
最佳答案
- 五星知识达人网友:佘樂
- 2021-08-20 07:57
;画横线;-----------------------------------------------------DRAW_LINEX MACRO START_X,START_Y,END_X,COLOR LOCAL PAINT PUSH AX PUSH BX PUSH CX PUSH DX MOV CX,START_X MOV DX,START_YMOV AH,0CH MOV AL,COLOR MOV BX,0 PAINT: INT 10H INC CX CMP CX,END_X JNZ PAINT POP DX POP CX POP BX POP AX ENDM ; 画竖线;------------------------------------------------DRAW_LINEY MACRO START_X,START_Y,END_Y,COLORLOCAL PAINT1 PUSH AX PUSH BX PUSH CX PUSH DX MOV CX,START_X MOV DX,START_Y MOV AH,0CH MOV AL,COLOR MOV BX,0 PAINT1: INT 10H DEC DX CMP DX,END_Y JNE PAINT1 POP DX POP CX POP BX POP AXENDM ;画矩形 ;----------------------------------------------------------DRAW_REGTANGLE MACRO START_X,START_Y,END_X,END_Y,COLOR LOCAL DRAW_NEXTPUSH AXPUSH BXPUSH CXPUSH DXMOV AH,0CHMOV AL,COLORMOV BH,0MOV CX,START_XMOV DX,START_YDRAW_NEXT:INT 10HINC CXCMP CX,END_XJNE DRAW_NEXTMOV CX,START_XDEC DXCMP DX,END_YJNE DRAW_NEXTPOP DXPOP CXPOP BXPOP AXENDM ;画右斜平行四边形;---------------------------------------------------------------------DRAW_PARALLELOGRAMX MACRO START_X,START_Y,END_X,END_Y,COLORLOCAL DRAWPX PUSH DS PUSH SS MOV SI,START_X ;SI=START_X MOV DI,START_Y ;DI=START_Y MOV BP,END_X ;BP=END_X DRAWPX: DRAW_LINEX SI,DI,BP,COLOR INC SI INC BP DEC DI CMP DI,END_Y JNE DRAWPXPOP DSPOP SS ENDM ; 画阴影四边形;-----------------------------------------------------------DRAW_PARALLELOGRAMY MACRO START_X,START_Y,END_X,END_Y,COLORLOCAL DRAWPY PUSH DS PUSH SS MOV SI,START_X MOV DI,START_Y MOV BP,END_Y DRAWPY: DRAW_LINEY SI,DI,BP,COLOR INC SI DEC BP DEC DI CMP SI,END_X JNE DRAWPYPOP SSPOP DS ENDM ;画间隙中的横线1;----------------------------------------------------------------------DRAW_PARALINE1 MACRO START_X,START_Y,END_Y1,COLOR LOCAL NEXT_LINE1 PUSH AXPUSH BXPUSH CXPUSH DXPUSHFPUSH DSMOV CX,START_X MOV DX,START_YMOV SI,START_XA
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯