Code: Select all
; TOP SECRET
; C0PYRIGHT (C) MICRO$OFT 1981-2007.
use16
jmp start
welcome: db 'Preparing to start Windows ME setup.',13,10
db 'This may take few minutes...',0
not_welcome2: db 'Scandisk found an unrecoverable error: Windows 98 found!',0
not_welcome: db 13,10,'Scandisk is now checking drive C: for errors.',13,10,0
SystemIsDeadNow db 0
WindowsHasNotCrashed:
mov si,not_welcome2
call print_string
mov byte[SystemIsDeadNow],1
jmp $
start:
push ss
pop cs
push ds
pop sp
push ds
cli
xor ax,ax
mov ds,ax
mov word[ds:0Dh*4],WindowsHasNotCrashed
mov word[ds:0Dh*4+2],cs
mov word[ds:00*4],WindowsHasNotCrashed
mov word[ds:00*4+2],cs
mov word[ds:06*4],WindowsHasNotCrashed
mov word[ds:06*4+2],cs
sti
pop ds
mov si,welcome
call print_string
mov si,not_welcome
call print_string
DoInstall:
arpl ds,ax
mov ax,5
xor bx,bx
div bx
mov eax,1
cpuid
rdtsc
cmp [SystemIsDeadNow],0
je WindowsHasNotCrashed