DATA SEGMENT ;自编解密小程序
S1 DB 30H,39H,31H,30H,32H,38H,33H,32H,34H,37H,35H,34H,36H,36H,37H,33H,38H,31H,39H,35H,51H
S2 DB 5 DUP(?)
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA,ES:DATA
BEGIN:MOV AX,DATA
MOV DS,AX
MOV ES,AX
MOV SI,OFFSET S1
MOV DI,OFFSET S2
MOV CX,4
L1:MOV AH,07H
INT 21H
MOV [DI],AL
INC DI
LOOP L1
MOV BX,51H
MOV [DI],BX
MOV DI,OFFSET S2
MOV CX,40
L2:MOV AL,[SI]
MOV AH,[SI+1]
CMP AL,[DI]
LOOPZ L3
ADD SI,2
JMP L2
L3:
MOV DL,AH
MOV AH,02H
INT 21H
MOV SI,OFFSET S1
INC DI
CMP BYTE PTR[SI],'W'
CMP BYTE PTR[DI],'Q'
LOOPNZ L2
MOV AH,4CH
INT 21H
CODE ENDS
END BEGIN
data segment ;数制转换
s0 dw 38a6h
s1 db 10 DUP(?)
data ends
code segment
assume cs:code,ds:data
start: mov ax,data
mov ds,ax
mov si,offset s1
mov ax,s0
mov dx,0
mov bx,10
l1: mov dx,0
div bx
mov [si],dl
inc si
cmp ax,0
jnz l1
mov ah,4ch
int 21h
code ends
end start
|