DATA  SEGMENT
    MUS_FREQ  DW        330,392,330,294,330,392,330,294,330
              DW        330,392,330,294,262,294,330,392,294
              DW        262,262,220,196,196,220,262,294,330,262
              DW        -1
    MUS_TIME  DW        3 DUP (5000),2500,2500,5000,2500,2500,10000
              DW        2 DUP (5000,5000,2500,2500),10000
              DW        3 DUP (5000,2500,2500),10000
        DATA  ENDS
        STCK  SEGMENT
         STK  DB        200  DUP(?)
         TOP  EQU       LENGTH  STK
        STCK  ENDS

请大神们帮本身看一下这几个顺序哪出错了,不菲谢!!
STACK1 SEGMENT STACK
DW 200 DUP
STACK1 ENDS
DATA SEGMENT
SPACE DB 1000 DUP
PATTERN DB 6 DUP ,0C9H,26 DUP ,0BBH,6 DUP
DB 6 DUP ,0BAH,26 DUP ,0BAH,6 DUP
DB 6 DUP ,0C8H,26 DUP ,0BCH,6 DUP
DBUFFER DB 8 DUP ,12 DUP
DBUFFER1 DB 20 DUP
STR1 DB 0DH,0AH, ‘PLEASE INPUT DATE OR TIME OR QUIT: $’
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA,ES:DATA,SS:STACK1
START: MOV AX,0001H ;设置突显方式为40*25彩色文本情势
INT 10H
MOV AX,DATA
MOV DS,AX
MOV ES,AX
MOV BP,OFFSET SPACE
MOV DX,0B00H
MOV CX,1000
MOV BX,0040H
MOV AX,1300H
INT 10H
MOV BP,OFFSET PATTE奥迪Q3N ;呈现矩形条
MOV DX,0B00H
MOV CX,120
MOV BX,004EH
MOV AX,1301H
INT 10H
LEA DX,ST牧马人1 ;展现提醒消息
MOV AH,9
INT 21H
MOV AH,1 ;从键盘输入单个字符
INT 21H
CMP AL,44H ;AL=’D’?
JNE A
CALL DATE ;呈现系统日期
A: CMP AL,54H ;AL=’T’?
JNE B
CALL TIME ;展现系统时间
B: CMP AL,51H ;AL=’Q’?
JNE START
MOV AH,4CH ;返回dos状态
INT 21H

汇编的主次陷入了死循环
代码如下,指标是想将乘法表存入result开头的41个字节中。小编感到写的准确性,
但正是陷入死循环了,亲各位大神匡助看看啊,多谢。

        CODE  SEGMENT
              ASSUME    DS:DATA, SS:STCK, CS:CODE
      START:  MOV       AX,DATA
              MOV       DS,AX
              MOV       AX,STCK
              MOV       SS,AX
              MOV       AX,TOP
              MOV       SP,AX
              LEA       SI, MUS_FREQ
                  ;SI?频率表首地址
              LEA       BP,DS: MUS_TIME
                  ;BP?音长表首地址
      FREG1:  MOV       DI,[SI]
                  ;当前音符的功能?DI
              CMP       DI,-1
                  ;判别是还是不是是停止符号
              JE        END_MUS1
                  ;结束符,转到END_MUS1
              MOV       BX,DS:[BP]
                  ;当前音符的音长?BX
              CALL      GENSOUND
                  ;调用发声子程序
              ADD       SI,2
              ADD       BP,2
                  ;SI和BP分别指向下一个音
                  ;符的功能和音长
              JMP       FREG1
                  ;转到FREG1,继续发声
    GENSOUND  PROC      NEAR
              PUSH      AX
              PUSH      BX
              PUSH      CX
              PUSH      DX
              PUSH      DI
              MOV       AL,0B6H
              OUT       43H,AL      ;设置8253方式3
              MOV       DX,12H
              MOV       AX,3280H
              DIV       DI          ;总括计数初值
              OUT       42H,AL
              MOV       AL,AH
              OUT       42H,AL      ;向放大计时器2写入计数值
              IN        AL,61H
              MOV       AH,AL
              OR        AL,3
              OUT       61H,AL
       ;使PB0和PB1输出1,其余PB口不变
       ;运转发声
      WAIT1:  MOV       CX,22480
     DELAY1:  LOOP      DELAY1
              DEC       BX
              JNZ       WAIT1       ;延时,调节音长
              MOV       AL,AH
              OUT       61H,AL
        ;PB0=PB1=0,关电火花计时器和喇叭
              POP       DI
              POP       DX
              POP       CX
              POP       BX
              POP       AX
              RET
    GENSOUND  ENDP

DATE PROC NEA牧马人 ;彰显日期子程序
dis:MOV AH,2AH ;取日期
INT 21H
MOV SI,0
MOV AX,CX
MOV BX,100
DIV BL
MOV BL,AH
CALL BCDASC1 ;日期数值转换来相应的ASCII码字符
MOV AL,BL
CALL BCDASC1
INC SI
MOV AL,DH
CALL BCDASC1
INC SI
MOV AL,DL
CALL BCDASC1
MOV BP,OFFSET DBUFFER1
MOV DX,0C0DH
MOV CX,20
MOV BX,004EH
MOV AX,1301H
INT 10H
MOV AH,02H ;设置光标地点
MOV DX,0300H
MOV BH,0
INT 10H
MOV BX,0018H
REPEA: MOV CX,0FFFFH ;延时
REPEAT:LOOP REPEAT
DEC BX
JNZ REPEA
MOV AH,01H ;读键盘缓冲区字符到AL存放器
INT 16H
JE dis
JMP START
MOV AX,4C00H
INT 21H
RET
DATE ENDP

DATA SEGMENT
ROW DB 0
LIE DB 1
RESULT DB ‘R’
DATA ENDS
STACK SEGMENT STACK
DW 100H DUP
STACK ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA,SS:STACK
START:
MOV AX,DATA
MOV DS,AX
MOV AL,RESULT
PUSH AX
MOV AX,0001H
PUSH AX
MOV BX,0
MOV CX,9
L1:
INC ROW
SUB CX,BX
MOV DX,CX
L2:
POP AX
CMP AX,1
JZ JI
JMP OU
JI:
MOV AL,ROW
MUL LIE
MOV AH,AL
MOV AL,00H
PUSH AX
MOV AX,0000H
PUSH AX
JMP CON
OU:
MOV DH,BL
POP BX
MOV AL,ROW
MUL LIE
MOV BL,AL
PUSH BX
MOV BH,00H
MOV BL,DH
MOV DH,00H
MOV AX,0001H
PUSH AX
JMP CON
CON:
INC LIE
LOOP L2
MOV CX,DX
INC BX
MOV LIE,BL
INC LIE
LOOP L1

   END_MUS1:  NOP
              MOV       AH,4CH
              INT       21H
                 ;程序甘休
        CODE  ENDS
              END       START

TIME PROC NEA传祺 ;呈现时间子程序
DISPLAY1:MOV SI,0
MOV BX,100
DIV BL
MOV AH,2CH ;取时间
INT 21H
MOV AL,CH
CALL BCDASC ;将时刻数值转变来ASCII码字符
INC SI
MOV AL,CL
CALL BCDASC
INC SI
MOV AL,DH
CALL BCDASC
MOV BP,OFFSET DBUFFER
MOV DX,0C0DH
MOV CX,20
MOV BX,004EH
MOV AX,1301H
INT 10H
MOV AH,02H
MOV DX,0300H
MOV BH,0
INT 10H
MOV BX,0018H
RE: MOV CX,0FFFFH
REA: LOOP REA
DEC BX
JNZ RE
MOV AH,01H
INT 16H
JE DISPLAY1
JMP START
MOV AX,4C00H
INT 21H
RET
TIME ENDP

 MOV AX,'$' PUSH AX LEA DX,RESULT MOV AH,09H INT 21H MOV AH,4CH INT 21H

 

BCDASC PROC NEA本田CR-V ;时间数值转换到ASCII码字符子程序
PUSH BX
CBW
MOV BL,10
DIV BL
ADD AL,’0′
MOV DBUFFER[SI],AL
INC SI
ADD AH,’0′
MOV DBUFFER[SI],AH
INC SI
POP BX
RET
BCDASC ENDP

CODE ENDS
END START

BCDASC1 PROC NEAEscort ;日期数值转变到ASCII码字符子程序
PUSH BX
CBW
MOV BL,10
DIV BL
ADD AL,’0′
MOV DBUFFER1[SI],AL
INC SI
ADD AH,’0′
MOV DBUFFER1[SI],AH
INC SI
POP BX
RET
BCDASC1 ENDP
CODE ENDS
END START

cursor equ 45H
attrib equ 2fh
code segment
assume cs:code,ds:code
start:
jmp go
oldcur dw ?
OLD1C DW 2 DUP
NEWINT1C:
PUSHF
CALL DWORD PTR CS:OLD1C
push ax
PUSH BX
PUSH CX
PUSH DX
XOR BH,BH
MOV AH,3
INT 10H
MOV CS:OLDCUR,DX
MOV AH,2
xor bh,bh
MOV DX,CURSOR
INT 10H
MOV AH,2 ;读取系统时钟
INT 1AH
PUSH DX
PUSH CX
POP BX
PUSH BX
CALL SHOWBYTE
CALL SHOWCOLON
POP BX
XCHG BH,BL
CALL SHOWBYTE
CALL SHOWCOLON
POP BX
CALL SHOWBYTE
MOV DX,CS:OLDCUR
MOV AH,2
XOR BH,BH
INT 10H
POP DX
POP CX
POP BX
POP AX
IRET
SHOWBYTE PROC NEAR
PUSH BX
MOV CL,4
MOV AL,BH
SHR AL,CL
ADD AL,30H
CALL SHOW
CALL CURMOVE
POP BX
MOV AL,BH
AND AL,0FH
ADD AL,30H
CALL SHOW
CALL CURMOVE
RET
SHOWBYTE ENDP

SHOWCOLON PROC NEAR
MOV AL,’:’
CALL SHOW
CALL CURMOVE
RET
SHOWCOLON ENDP

CURMOVE PROC NEAR
PUSH AX
PUSH BX
PUSH CX
PUSH DX
MOV AH,3
MOV BH,0
INT 10H
INC DL
MOV AH,2
INT 10H
POP DX
POP CX
POP BX
POP AX
RET
CURMOVE ENDP

SHOW PROC NEAR
PUSH AX
PUSH BX
PUSH CX
MOV AH,09H
MOV BX,attrib
MOV CX,1
INT 10H
POP CX
POP BX
POP AX
RET
SHOW ENDP

GO:
PUSH CS
POP DS
MOV AX,351CH ;取中断向量
INT 21H
MOV OLD1C,BX ;保存原中断向量
MOV BX,ES
MOV OLD1C+2,BX
MOV DX,OFFSET NEWINT1C ;置新的中断向量
MOV AX,251CH
INT 21H
MOV DX,OFFSET GO
SUB DX,OFFSET START
MOV CL,4
SHR DX,CL
ADD DX,11H
MOV AX,3100H ;截止并驻留
INT 21H
CODE ENDS
END START