各位大侠帮忙解答下,我崩溃中,谢谢大家了。 程序设计题 不管是会一个还是两个当然都能标准的解答最好啦~
1、编写程序,将数据区中以字节变量BUFFER为首地址的100个单元清零。2、在分辨率为640X480、16色的屏幕上绘制一个周期的正弦波。3、编写一个打印ASCII码文...
1、编写程序,将数据区中以字节变量BUFFER为首地址的100个单元清零。
2、在分辨率为640X480、16色的屏幕上绘制一个周期的正弦波。
3、编写一个打印ASCII码文件的程序,基本功能为把缓冲区FILE_BUFFER的字符送到打印区PRT_BUFFER,并检查行尾、换行符和TAB符。
回答的不管是不是完美祝福你们一生幸福、全家和睦,看到但没回答的也祝你们快乐、平安,至少你们关注过。谢谢大家了。 展开
2、在分辨率为640X480、16色的屏幕上绘制一个周期的正弦波。
3、编写一个打印ASCII码文件的程序,基本功能为把缓冲区FILE_BUFFER的字符送到打印区PRT_BUFFER,并检查行尾、换行符和TAB符。
回答的不管是不是完美祝福你们一生幸福、全家和睦,看到但没回答的也祝你们快乐、平安,至少你们关注过。谢谢大家了。 展开
2个回答
展开全部
SETSCREEN MACRO
MOV AH,0
MOV AL,12H
INT 10
ENDM
WRITEDOT MACRO
MOV AH,0CH
MOV AL,04H
MOV CX,ANGLE
ADD CX,140
MOV DX,TEMP
INT 10H
ENDM
DATA SEGMENT
SINE DB 00,03,07,10,14,17,21,24,28,31,
35,38,42,45,48,52,55,58,62,65,
68,72,75,78,81,85,88,91,94,97,
100,103,106,109,112,115,118,120,
123,126,129,131,134,136,139,141,
144,146,149,151,153,155,158,160,
162,164,166,168,170,171,173,175,
177,178,180,181,183,184,185,187,
188,189,190,191,192,193,194,195,
196,196,197,198,198,199,199,199,
200,200,200,200
ANGLE DW 0
TEMP DW 0
DATA ENDS
STACK SEGMENT
DB 64 DUP(?)
STACK ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA,SS:STACK
MAIN PROC FAR
START:PUSH DS
PUSH AX
PUSH BX
MOV AX,DATA
MOV DS,AX
MOV AX,STACK
MOV SS,AX
SETSCREEN
ENDM
AGAIN: LEA BX,SINE
MOV AX,ANGLE
CMP AX,180
JLE QUAD1
SUB AX,180
QUAD1:CMP AX,90
JLE QUAD2
NEG AX
ADD AX,180
QUAD2:ADD BX,AX
MOV AL,SINE[BX]
PUSH AX
MOV AH,0
CMP ANGLE,180
JGE BIGDIS
NEG AL
ADD AL,240
JMP READY
BIGDIS: ADD AX,240
READY:MOV TEMP,AX
POP AX
WRITEDOT
ADD ANGLE,1
CMP ANGLE,360
JLE AGAIN
MOV AH,07
INT 21H
MOV AH,0
MOV AL,3
INT 10
POP BX
POP DS
RET
MAIN ENDP
CODE ENDS
END START
;这个是画正弦波的
MOV AH,0
MOV AL,12H
INT 10
ENDM
WRITEDOT MACRO
MOV AH,0CH
MOV AL,04H
MOV CX,ANGLE
ADD CX,140
MOV DX,TEMP
INT 10H
ENDM
DATA SEGMENT
SINE DB 00,03,07,10,14,17,21,24,28,31,
35,38,42,45,48,52,55,58,62,65,
68,72,75,78,81,85,88,91,94,97,
100,103,106,109,112,115,118,120,
123,126,129,131,134,136,139,141,
144,146,149,151,153,155,158,160,
162,164,166,168,170,171,173,175,
177,178,180,181,183,184,185,187,
188,189,190,191,192,193,194,195,
196,196,197,198,198,199,199,199,
200,200,200,200
ANGLE DW 0
TEMP DW 0
DATA ENDS
STACK SEGMENT
DB 64 DUP(?)
STACK ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA,SS:STACK
MAIN PROC FAR
START:PUSH DS
PUSH AX
PUSH BX
MOV AX,DATA
MOV DS,AX
MOV AX,STACK
MOV SS,AX
SETSCREEN
ENDM
AGAIN: LEA BX,SINE
MOV AX,ANGLE
CMP AX,180
JLE QUAD1
SUB AX,180
QUAD1:CMP AX,90
JLE QUAD2
NEG AX
ADD AX,180
QUAD2:ADD BX,AX
MOV AL,SINE[BX]
PUSH AX
MOV AH,0
CMP ANGLE,180
JGE BIGDIS
NEG AL
ADD AL,240
JMP READY
BIGDIS: ADD AX,240
READY:MOV TEMP,AX
POP AX
WRITEDOT
ADD ANGLE,1
CMP ANGLE,360
JLE AGAIN
MOV AH,07
INT 21H
MOV AH,0
MOV AL,3
INT 10
POP BX
POP DS
RET
MAIN ENDP
CODE ENDS
END START
;这个是画正弦波的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询