;Name: CPUMODE.ASM
;Function: Report current CPU working mode
;Version : 0.1b
;Author : Purple Endurer
;Develop Environment : Microsoft (R) Programmer's WorkBench version 2.1.49
;
;Note: Options -> Project Templates -> Set Project Template...
; Select "DOS COM"
;
;Date summary
;Mar 23, 2002 Created
;Apr 5, 2002 Added EMM detector
;Apr 6, 2002 Added china messages
.286
cseg segment
assume cs:cseg, ds:cseg
ORG 100h
Start:
mov ax, 1100h
mov bh, 10h
mov bl, 0
mov cx, 1
mov dx, 0bbh
mov bp, offset huang1
int 10h
mov dx, 0c6h
mov bp, offset huang2
int 10h
mov dx, 0d6h
mov bp, offset zhi1
int 10h
mov dx, 0beh
mov bp, offset zhi2
int 10h
mov dx, 0b1h
mov bp, offset bin1
int 10h
mov dx, 0f3h
mov bp, offset bin2
int 10h
mov dx, 0b9h
mov bp, offset gong1
int 10h
mov dx, 0a4h
mov bp, offset gong2
int 10h
mov dx, 0d7h
mov bp, offset zhuo1
int 10h
mov dx, 0f7h
mov bp, offset zhuo2
int 10h
mov dx, 0c4h
mov bp, offset mo1
int 10h
mov dx, 0a3h
mov bp, offset mo2
int 10h
mov dx, 0cah
mov bp, offset shi1
int 10h
mov dx, 0bdh
mov bp, offset shi2
int 10h
mov bx, offset strMyname
mov cx, 6
lblUnlock:
add byte ptr [ bx], 0b1h
inc bx
loop lblUnlock
mov dx, offset strMsg
mov ah, 09h
int 21h
mov dx, offset strReal
smsw cx
;jcxz lblReport
test cx, 1
je lblReport
mov dx, offset strProtected
lblReport:
mov ah, 09h
int 21h
mov ax, 3567h
int 21h
mov di, 0ah
mov si, offset strEmmName
mov cx, 8
cld
repz cmpsb
jnz lblEnd
mov ah, 09h
mov dx, offset strEmmActive
int 21h
lblEnd:
mov dx, offset strWaitMsg
mov ah, 09h
int 21h
mov ah, 08h
int 21h
mov ax, 1104h
mov bl, 0
int 10h
mov ax, 4c00h
int 21h
;----------------------------------
strEmmName db "EMMXXXX0"
strEmmActive db 0ah, 0dh, "EMM386 Active!$"
strMsg db "CPU MODE Reportor V0.1b"
db 0dh, 0ah
db "Copyright (c) "
strMyname db 0ah, 15h, 25h, 0dh, 00h, 042h
db " Apr 6, 2002. All rights reserved!"
db 0ah, 0dh
db "CPU", 0b9h, 0a4h, 0d7h, 0f7h, 0c4h, 0a3h, 0cah, 0bdh, ": $"
strReal db "Real$"
strProtected db "Protected$"
strWaitMsg db 0dh, 0ah, "Press any key to end...$"
huang1 db 04H, 4H, 3fH, 4H, 4H, 0ffH, 1H, 1fH, 11H, 1fH, 11H, 1fH, 10H, 4H, 18H, 60H
huang2 db 040H, 50H, 0f8H, 40H, 44H, 0feH, 10H, 0f8H, 10H, 0f0H, 10H, 0f0H, 0H, 60H, 18H, 4H
zhi1 db 01H, 1H, 1H, 0ffH, 1H, 1H, 1H, 3fH, 0H, 2H, 11H, 50H, 50H, 90H, 0fH, 0H
zhi2 db 0H, 0H, 4H, 0feH, 0H, 0H, 10H, 0f8H, 0H, 0H, 80H, 84H, 12H, 12H, 0f0H, 0H
bin1 db 0H, 20H, 11H, 0H, 0fcH, 0bH, 48H, 28H, 29H, 11H, 29H, 25H, 45H, 81H, 3H, 0H
bin2 db 10H, 10H, 0f4H, 12H, 10H, 0feH, 10H, 50H, 50H, 70H, 50H, 48H, 48H, 6aH, 86H, 2H
gong1 db 0H, 0H, 07fH, 1H, 1H, 1H, 1H, 1H, 1H, 1H, 1H, 1H,/
01H, 0ffH, 0H, 0H
gong2 db 0H, 08H, 0fcH, 0H, 0H, 0H, 0H, 0H, 0H, 0H, 0H, 0H, 04H,/
0feH, 0H, 0H
zhuo1 db 09H, 09H, 09H, 11H, 12H, 32H, 54H, 98H, 10H, 10H,/
10H, 10H, 10H, 10H, 10H, 10H
zhuo2 db 0H, 0H, 04H, 0feH, 80H, 80H, 90H, 0f8H, 80H, 80H, 88H,/
0fcH, 80H, 80H, 80H, 80H
mo1 db 11H, 11H, 1fH, 11H, 0fdH, 13H, 32H, 3bH, 56H, 53H, 90H,/
1fH, 10H, 10H, 11H, 16H
mo2 db 10H, 14H, 0feH, 10H, 18H, 0fcH, 08H, 0f8H, 08H, 0f8H,/
40H, 0feH, 040H, 0b0H, 0eH, 04H
shi1 db 0H, 0H, 0H, 0H, 0ffH, 0H, 0H, 3eH, 08H, 08H, 08H, 09H,/
0eH, 70H, 20H, 0H
shi2 db 80H, 0a0H, 90H, 84H, 0feH, 80H, 80H, 80H, 80H, 40H,/
40H, 20H, 22H, 12H, 0aH, 04H
;=================================
cseg ends
end