home *** CD-ROM | disk | FTP | other *** search
- ;
- ; ╔═══════════════════════════════════════╗
- ; ║ Product No.002 of Pound Group ║
- ; ║ By He-Zhantao , THE E.D. ║
- ; ║ Copyright (c) 1994.12 Beijing ║
- ; ╚═══════════════════════════════════════╝
- ;
- ;Only for Chinese MS_DOS 6.21 using Chinese under other Chinese system
-
-
- .286
- .model tiny
- .code
- org 100h
-
- start:
- jmp begin
- oldint16off dw 0
- oldint16seg dw 0
- forcechinese db 0
- force db 0
-
- herc db 0 ; 1 is herc
- herc_sum dw 0
- herc_sum_1 dw 0
- lastkeyoff dw 0
- chinese equ 0f8h
- english equ 0f9h
- int16entry:
- cmp ax,"PD"
- jnz isnottest
- cmp bx,"IN"
- jnz isset
- mov ax,"OK"
- mov bl,cs:[force]
- iret
- isset:
- cmp bx,"SF"
- jz setforce16
- cmp bx,"SN"
- jnz isnottest
- mov cs:[force],byte ptr 0
- iret
- setforce16:
- mov cs:[force],byte ptr 1
- iret
-
-
- isnottest:
- push es
- push di
- push si
- ; if a000:0 rw b800:0 xx
- call need_check
- jz dout
- needchinese:
-
- cmp ax,0db00h
- jnz nextint16
- cmp cx,1
- jnz dout
- cmp dx,0
- jnz dout
-
- mov ax,0
- mov dx,058h
- mov es:[bx+14h], word ptr 03a8h
- pop si
- pop di
- pop es
- iret
-
- nextint16:
- cmp ax,0db80h
- jnz dout
- cmp cx,1
- jnz dout
- mov ax,0
- mov dx,58h
- pop si
- pop di
- pop es
- iret
- dout:
- jmp int16out
- int16out:
- pop si
- pop di
- pop es
-
- directexit:
- jmp dword ptr cs:[oldint16off]
-
- need_check proc near
- pusha
- cmp cs:[herc],0
- jz isnot_hercvideo
- call addall_herc
- cmp ax,cs:[herc_sum]
- mov cs:[herc_sum_1],ax
- popa
- ret
- isnot_hercvideo:
- push ds
- mov ax,40h
- mov ds,ax
- cmp ds:[49h],byte ptr 3
- ja isgraph
- mov ax,0a000h
- mov ds,ax
- xor ax,ax
- add ax,ds:[0]
- add ax,ds:[2000h]
- add ax,ds:[4000h]
- add ax,ds:[6000h]
- add ax,ds:[8000h]
- add ax,ds:[0a000h]
- add ax,ds:[0c000h]
- add ax,ds:[0e000h]
- cmp ax,0fff8h
- pop ds
- popa
- ret
- isgraph:
- cmp cs:[force],1
- pop ds
- popa
- ret
- need_check endp
-
- addall_herc proc near
- push ds
- push bx
- mov bx,40h
- mov ds,bx
- mov bx,ds:[1ah]
- cmp bx,cs:[lastkeyoff]
- mov cs:[lastkeyoff],bx
- jnz nextcompadd
- pop bx
- pop ds
- mov ax,cs:[herc_sum_1]
- ret
-
- nextcompadd:
- cmp byte ptr ds:[bx],0dh
- pop bx
- pop ds
- jz needadd
- mov ax,cs:[herc_sum_1]
- ret
- needadd:
- mov ax,cs:[herc_sum_1]
- mov cs:[herc_sum],ax
- push si
- push ds
- mov ax,0b800h
- mov ds,ax
- mov si,08000h
- nextadd:
- dec si
- dec si
- add ax,ds:[si]
- cmp si,0
- jnz nextadd
- pop ds
- pop si
- ret
- addall_herc endp
-
- begin:
- mov ax,"PD" ; Reload test.
- mov bx,"IN"
- int 16h
- cmp ax,"OK"
- jnz nomodiflag
- mov cs:[force],bl
- nomodiflag:
- mov dx,offset copyright
- call setoutinfo ; Copyright.
-
- mov bl,cs:[80h]
- xor bh,bh
- cmp bl,0
- jz noprompt ; Prompt
-
- add bx,7fh
- mov bx,cs:[bx]
- or bx,02000h ; upcase
- cmp bx,"?/"
- jz help
- cmp bx,"n/"
- jz force_act
- cmp bx,"f/"
- jz normal
- jmp noprompt
- normal:
- inc cs:[forcechinese] ; 2 is Normal
- force_act:
- inc cs:[forcechinese] ; 1 is Force
- noprompt:
- push cs
- pop ds
- mov ax,"PD" ; Reload test.
- mov bx,"IN"
- int 16h
- cmp ax,"OK"
- jz exist
-
- int 11h
- and al,030h
- cmp al,030h
- jnz isnot_HERC
- mov cs:[herc],byte ptr 1 ; is HERC ?
-
- call addall_herc ; all herc checksum in ax
- mov cs:[herc_sum],ax
-
- isnot_HERC:
- mov ax,3516h
- int 21h
- mov cs:[oldint16off],bx
- mov cs:[oldint16seg],es
- mov dx,offset int16entry
- push cs
- pop ds
- mov ax,2516h
- int 21h
- mov dx,offset begin
- add dx,110h
- mov cl,4
- shr dx,cl
- mov ah,31h
- int 21h
- help:
- mov dx,offset helpinfo
- jmp outinfo
-
- exist:
- mov ax,"PD"
- mov bx,"SF"
- cmp cs:[forcechinese],byte ptr 2
- jnz ifitisforce
- mov bx,"SN"
- int 16h
- mov dx,offset setnormalinfo
- jmp outinfo
-
- ifitisforce:
- cmp cs:[forcechinese],byte ptr 1
- jnz isnotsetforce
- execset:
- int 16h
- mov dx,offset setforceinfo
- jmp outinfo
- isnotsetforce:
- mov dx,offset existinfo
- jmp outinfo
-
- outinfo:
- call setoutinfo
- mov ah,4ch
- int 21h
- setoutinfo proc near
- push cs
- pop ds
- mov ah,9
- call need_check
- jz english_system
- nextstring:
- inc dx
- mov bx,dx
- cmp cs:[bx],byte ptr "$"
- jnz nextstring
- inc dx
- english_system:
- int 21h
- ret
- setoutinfo endp
-
- copyright db 'Free Chinese COMMAND Copyright (c) 1994 HUST HaXing Co. He-Zhantao The E.D.',10,13
- db '$'
- db '┐¬╖┼╓╨╬─ COMMAND ░µ╚¿╦∙╙╨ (c) 1994 ╗¬╓╨└φ╣ñ┤≤╤º╗¬╨╦╣½╦╛ ║╬╒╜╠╬ The E.D.',10,13
- db '$'
-
- existinfo db 'Hello, I have residented!',0dh,0ah
- db '$'
- db '─·║├, FCC ╥╤╛¡╫ñ┴⌠ !',0dh,0ah
- db '$'
- helpinfo db ' /? for help ',0dh,0ah
- db ' /f for use Force Chinese MODE (any chinese system) ',0dh,0ah
- db ' /n for use AutoDetect MODE (some direct_video chinese system)',0dh,0ah
- db ' He Zhantao 010-8404488 call 18120 (Chinese) ',0dh,0ah
- db ' Min YiHua 027-7801940 call 7570 ',0dh,0ah
- db ' HUST HuaXing Co. 027-7877936 027-7801975 ',0dh,0ah
- db ' We have another Version of FCC can run under any DOS Version',0dh,0ah
- db ' Welcome call me. For OEM .' ,0dh,0ah
- db '$'
- db ' /? ░∩╓·╨┼╧ó ',0dh,0ah
- db ' /f ╔Φ╓├╬¬╟┐╓╞╓╨╬──ú╩╜ (╢╘╚╬╥Γ║║╫╓╧╡═│)',0dh,0ah
- db ' /n ╔Φ╓├╬¬╫╘╢»╩╢▒≡─ú╩╜ (╢╘╓º│╓╓▒╜╙╨┤╞┴║║╫╓╧╡═│╩╣╙├)',0dh,0ah
- db ' ╗¬╓╨└φ╣ñ┤≤╤º╗¬╨╦╣½╦╛ ║╬╒╜╠╬ 01-8404488 ║⌠ 18120 (║║) ',0dh,0ah
- db ' ╗¬╓╨└φ╣ñ┤≤╤º╗¬╨╦╣½╦╛ π╔╥╒╗¬ 027-7801940 ║⌠ 7570 ',0dh,0ah
- db ' ╗¬╓╨└φ╣ñ┤≤╤º╗¬╨╦╣½╦╛ 027-7877936 027-7801975 ',0dh,0ah
- db ' ╗╣╙╨┐╔╘┌╚╬╥Γ DOS ░µ▒╛╧┬╘╦╨╨╡─┐¬╖┼╓╨╬─ COMMAND !',0dh,0ah
- db ' ╗╢╙¡┴¬╧╡, ╤░╟≤ OEM ║╧╫≈╗∩░Θ ',0dh,0ah
- db '$'
-
- setnormalinfo db 'Free Chinese COMMAND set to Force Chinese MODE',0dh,0ah,'$'
- db '┐¬╖┼╓╨╬─ COMMAND ╔Φ╓├╬¬╟┐╓╞╓╨╬──ú╩╜ ',0dh,0ah,'$'
- setforceinfo db 'Free Chinese COMMAND set to AutoDetect MODE',0dh,0ah,'$'
- db '┐¬╖┼╓╨╬─ COMMAND ╔Φ╓├╬¬╫╘╢»╩╢▒≡─ú╩╜ ',0dh,0ah,'$'
-
- end start
-