文件名称:sfs
介绍说明--下载内容均来自于网络,请自行研究使用
DW 256 DUP(?)
STACK1 ENDS
DDATA SEGMENT
MES1 DB The least number is:$
MES2 DB 0AH,0DH, The largest number is:$
NUMB DB 0D9H,07H,8BH,0C5H,0EBH,04H,9DH,0F9H
DDATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DDATA
START: MOV AX,DDATA
MOV DS,AX
MOV SI,OFFSET NUMB
MOV CX,0008H
JCXZ A4
MOV BH,[SI]
MOV BL,BH
A1: LODSB AL=DS:[SI],SI=SI+1
CMP AL,BH
JBE A2
MOV BH,AL
JMP A3
A2: CMP AL,BL
JAE A3
MOV BL,AL
A3: LOOP A1
A4: MOV DX,OFFSET MES1 show mes1
MOV AH,09H
INT 21H
MOV AL,BL show the least number
AND AL,0F0H get the highest 4 bits
SHR AL,4
CMP AL,0AH
JB C2
ADD AL,07H
C2: ADD AL,30H
MOV DL,AL show character
MOV AH,02H
INT 21H
MOV AL,BL
AND AL,0FH get the lowest 4 bits
CMP AL,0AH
JB C3
ADD AL,07H
C3: ADD AL,30H
MOV DL,AL show character
MOV AH,02H
INT 21H
MOV DX,OFFSET MES2 show mes2
MOV AH,09H
INT 21H -DW 256 DUP (?) STACK1 ENDSDDATA SEGMENTMES1 DB The least number is: $ MES2 DB 0AH, 0DH, The largest number is: $ NUMB DB 0D9H, 07H, 8BH, 0C5H, 0EBH, 04H, 9DH, 0F9HDDATA ENDSCODE SEGMENT ASSUME CS: CODE, DS: DDATASTART: MOV AX, DDATA MOV DS, AX MOV SI, OFFSET NUMB MOV CX, 0008H JCXZ A4 MOV BH, [SI] MOV BL, BHA1: LODSB AL = DS: [SI], SI = SI+ 1 CMP AL, BH JBE A2 MOV BH, AL JMP A3A2: CMP AL, BL JAE A3 MOV BL, ALA3: LOOP A1A4: MOV DX, OFFSET MES1 show mes1 MOV AH, 09H INT 21H MOV AL, BL show the least number AND AL , 0F0H get the highest 4 bits SHR AL, 4 CMP AL, 0AH JB C2 ADD AL, 07H C2: ADD AL, 30H MOV DL, AL show character MOV AH, 02H INT 21H MOV AL, BL AND AL, 0FH get the lowest 4 bits CMP AL, 0AH JB C3 ADD AL, 07HC3: ADD AL, 30H MOV DL, AL show character MOV AH, 02H INT 21H MOV DX, OFFSET MES2 show mes2 MOV AH, 09H INT 21H
STACK1 ENDS
DDATA SEGMENT
MES1 DB The least number is:$
MES2 DB 0AH,0DH, The largest number is:$
NUMB DB 0D9H,07H,8BH,0C5H,0EBH,04H,9DH,0F9H
DDATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DDATA
START: MOV AX,DDATA
MOV DS,AX
MOV SI,OFFSET NUMB
MOV CX,0008H
JCXZ A4
MOV BH,[SI]
MOV BL,BH
A1: LODSB AL=DS:[SI],SI=SI+1
CMP AL,BH
JBE A2
MOV BH,AL
JMP A3
A2: CMP AL,BL
JAE A3
MOV BL,AL
A3: LOOP A1
A4: MOV DX,OFFSET MES1 show mes1
MOV AH,09H
INT 21H
MOV AL,BL show the least number
AND AL,0F0H get the highest 4 bits
SHR AL,4
CMP AL,0AH
JB C2
ADD AL,07H
C2: ADD AL,30H
MOV DL,AL show character
MOV AH,02H
INT 21H
MOV AL,BL
AND AL,0FH get the lowest 4 bits
CMP AL,0AH
JB C3
ADD AL,07H
C3: ADD AL,30H
MOV DL,AL show character
MOV AH,02H
INT 21H
MOV DX,OFFSET MES2 show mes2
MOV AH,09H
INT 21H -DW 256 DUP (?) STACK1 ENDSDDATA SEGMENTMES1 DB The least number is: $ MES2 DB 0AH, 0DH, The largest number is: $ NUMB DB 0D9H, 07H, 8BH, 0C5H, 0EBH, 04H, 9DH, 0F9HDDATA ENDSCODE SEGMENT ASSUME CS: CODE, DS: DDATASTART: MOV AX, DDATA MOV DS, AX MOV SI, OFFSET NUMB MOV CX, 0008H JCXZ A4 MOV BH, [SI] MOV BL, BHA1: LODSB AL = DS: [SI], SI = SI+ 1 CMP AL, BH JBE A2 MOV BH, AL JMP A3A2: CMP AL, BL JAE A3 MOV BL, ALA3: LOOP A1A4: MOV DX, OFFSET MES1 show mes1 MOV AH, 09H INT 21H MOV AL, BL show the least number AND AL , 0F0H get the highest 4 bits SHR AL, 4 CMP AL, 0AH JB C2 ADD AL, 07H C2: ADD AL, 30H MOV DL, AL show character MOV AH, 02H INT 21H MOV AL, BL AND AL, 0FH get the lowest 4 bits CMP AL, 0AH JB C3 ADD AL, 07HC3: ADD AL, 30H MOV DL, AL show character MOV AH, 02H INT 21H MOV DX, OFFSET MES2 show mes2 MOV AH, 09H INT 21H
(系统自动生成,下载前可以参看下载内容)
下载文件列表
sfs
...\新建 文本文档.txt
...\新建 文本文档.txt