>
xml地图|网站地图|网站标签 [设为首页] [加入收藏]

银河vip登录网址并按从小到大排序

- 编辑:银河至尊官网网址 -

银河vip登录网址并按从小到大排序

 编制程序达成将AREA1为首地址的拾叁个字节单元数据搬移到以AREA2为首地址的内部存款和储蓄器中去,并按从小到大排序

请大神们帮小编看一下以此顺序哪出错了,特别多谢!!
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锐界N ;彰显矩形条
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

 DATA  SEGMENT
       AREA1  DB        04H,01H,02H,07H,0AH,05H,06H,03H,08H,09H
       AREA2  DB        10 DUP(?)
        DATA  ENDS
        CODE  SEGMENT
              ASSUME    CS:CODE,DS:DATA
      START:  MOV       AX,DATA
              MOV       DS,AX
              MOV       SI,OFFSET AREA1
              MOV       DI,OFFSET AREA2
              MOV       CX,10
      AGAIN:  MOV       AL,[SI]
              MOV       [DI],AL
              INC       SI
              INC       DI
              DEC       CX
              JNZ       AGAIN
              MOV       CX,0AH
              DEC       CX
      OUTLP:  MOV       DX,CX
              MOV       BX,OFFSET AREA2
       INLP:  MOV       AL,[BX]
              CMP       AL,[BX+1]
              JNA       NEXT
              XCHG      AL,[BX+1]
              MOV       [BX],AL
       NEXT:  INC       BX
              DEC       DX
              JNZ       INLP
              LOOP      OUTLP

DATE PROC NEALAND ;呈现日期子程序
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

              MOV       AH,4CH
              INT       21H
        CODE  ENDS
              END       START

TIME PROC NEA福特Explorer ;呈现时间子程序
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

BCDASC PROC NEAEnclave ;时间数值调换到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

BCDASC1 PROC NEAOdyssey ;日期数值调换到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
银河vip登录网址并按从小到大排序。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

本文由计算机新闻发布,转载请注明来源:银河vip登录网址并按从小到大排序