求大神帮修改汇编语言的代码!!!
求大神帮我给代码添加尽可能多的注释,哪怕是很弱智的注释也行,最好一眼看上去密密麻麻的!!!
其次请大神在原有功能不变的前提下,帮我改一下代码。(因为是copy别人的,怕交上去被发现)
就这两个要求!!!尽快呀!!!急要!!!可以追加点数!!!
proth equ 290h
protlr equ 298h
protly equ 2a0h
DATA SEGMENT
min1 DB 00h,01h,02h,03h,04h,05h,06h,07h
BUFF1 DB 15H, 09H, 15H, 11H, 55H, 0FFH, 5EH, 11H
BUFF2 DB 7bh, 49h, 0f1h, 41h, 0ffh, 28h, 0fch, 22h
FREQ_L DW 524,20,524,20,784,20,784,20,880,20,880,20
DW 784,20,698,20,698,20,660,20,660,20,588,20
DW 588,20,524,20,784,20,784,20,698,20,698,20
DW 660,20,660,20,588,20,784,20,784,20,698,20
DW 698,20,660,20,660,20,588,20,0
DATA ENDS
STACK SEGMENT PARA STACK 'STACK'
DB 32 DUP(?)
STACK ENDS
code segment
assume cs:code,ds:data,ss:stack
start:
mov ax,cs
mov ds,ax
mov dx,offset int3
mov ax,250bh
int 21h
in al,21h
and al,0f7h
out 21h,al
mov cx,3
sti
ll: jmp ll
int3:
mov ax,data
mov ds,ax
push cx
agn0: mov cx,80h
d0: mov ah,01h
push cx
mov cx,0008h
mov si,offset min1
next0: mov al,[si]
mov bx,offset buff1
xlat ;得到第一行码
mov dx,proth
out dx,al
mov al,ah
mov dx,protlr
out dx,al ;显示第一行红
mov al,0
out dx,al
shl ah,01
inc si
push cx
mov cx,0ffh;ffh
delay0: loop delay0 ;延时
pop cx
loop next0
pop cx
call delay
loop d0
mov al,00
mov dx,protlr
out dx,al
agn2: mov cx,80h ;agn1为显示黄色
d2: mov si,offset min1
mov ah,01
push cx
mov cx,0008h
next2: mov al,[si]
mov bx,offset buff2
xlat
mov dx,proth
out dx,al
mov al,ah
mov dx,protlr
out dx,al
mov al,0
out dx,al
shl ah,01
inc si
push cx
mov cx,0ffh;ffh
delay2: loop delay2
pop cx
loop next2
pop cx
call delay
loop d2
mov al,00
mov dx,protlr
out dx,al
jmp yinyue
DELAY PROC NEAR ;延迟子程序
push cx
mov cx,0ffh;ffh
ccc: loop ccc
pop cx
ret
DELAY ENDP
a2: MOV AH,4CH ;返回
INT 21H
pop cx
yinyue:
pop cx
push cx
mov dx,28bH ;设置8255 A口输出
mov al,10000000B
out dx,al
MOV AX,DATA
MOV DS,AX
MOV AL,0B6H
MOV DX,283H
OUT DX,AL
LEA DI,FREQ_L
NXT: MOV AX,34DEH
MOV DX,0012H
MOV BX,[DI]
CMP BX,0
JZ DONE
DIV BX
MOV DX,280H
OUT DX,AL
MOV AL,AH
OUT DX,AL
MOV DX,288H
IN AL,DX
MOV AH,AL
OR AL,3
MOV DX,288H
OUT DX,AL
INC DI
INC DI
MOV BX,[DI]
CALL DLAY
INC DI
INC DI
MOV AL,AH
OUT DX,AL
CALL DLAY2
JMP NXT
DONE: MOV AH,4CH
INT 21H
DLAY PROC
PUSH AX
AGAIN1: MOV CX,16578
AGAIN: IN AL,61H
AND AL,10H
CMP AL,AH
JE AGAIN
MOV AH,AL
LOOP AGAIN
DEC BL
JNZ AGAIN1
POP AX
RET
DLAY ENDP
DLAY2 PROC
MOV CX,1328
REPEAT1:
IN AL,61H
AND AL,10H
CMP AL,AH
JE REPEAT1
MOV AH,AL
LOOP REPEAT1
RET
DLAY2 ENDP
pop cx
mov al,20h
out 20h,al
loop next
in al,21h
or al,08h
out 21h,al
sti
mov ah,4ch
int 21h
next:
iret
code ends
end start