|
|
|
@ -2,12 +2,12 @@
|
|
|
|
|
|
|
|
|
|
[bits 16]
|
|
|
|
|
|
|
|
|
|
;cmp dl, 0x05
|
|
|
|
|
;je welcome
|
|
|
|
|
|
|
|
|
|
pre:
|
|
|
|
|
cmp ah, 0x0F
|
|
|
|
|
je welcome
|
|
|
|
|
mov [bootdev], dl ; Save boot device number
|
|
|
|
|
jmp welcome
|
|
|
|
|
|
|
|
|
|
; Use the boot drive number passed to us by BIOS in register DL
|
|
|
|
|
welcome:
|
|
|
|
|
xor ax,ax ; We want a segment of 0 for DS for this question
|
|
|
|
|
mov ds,ax ; Set AX to appropriate segment value for your situation
|
|
|
|
@ -15,9 +15,26 @@ welcome:
|
|
|
|
|
mov bx,0x8000 ; Stack segment can be any usable memory
|
|
|
|
|
mov ss,bx ; This places it with the top of the stack @ 0x80000.
|
|
|
|
|
mov sp,ax ; Set SP=0 so the bottom of stack will be @ 0x8FFFF
|
|
|
|
|
cld ; Set the direction flag to be positive direction
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cld ; Set the direction flag to be positive direction
|
|
|
|
|
|
|
|
|
|
mov ah, 01h ;make cursor invisible
|
|
|
|
|
mov cx, 2607h
|
|
|
|
|
int 10h
|
|
|
|
|
|
|
|
|
|
mov ah, 06h ; Scroll up function
|
|
|
|
|
xor al, al ; Clear entire screen
|
|
|
|
|
xor cx, cx ; Upper left corner CH=row, CL=column
|
|
|
|
|
mov dx, 184FH ; lower right corner DH=row, DL=column
|
|
|
|
|
mov bh, 1Eh ; YellowOnBlue
|
|
|
|
|
int 10H ; execute interrupt
|
|
|
|
|
|
|
|
|
|
mov ah, 02h ;sets cursor to top to write
|
|
|
|
|
mov bh, 0h
|
|
|
|
|
mov dh, 2h
|
|
|
|
|
mov dl, 2h
|
|
|
|
|
int 10h
|
|
|
|
|
|
|
|
|
|
mov si, wolf_wel_msg
|
|
|
|
|
call wolf_print
|
|
|
|
@ -130,7 +147,7 @@ wolf_kernel_load db 'Loading program',0x0D,0x0A,0
|
|
|
|
|
wolf_error_msg db 'Program not found!',0x0D,0x0A,0
|
|
|
|
|
wolf_error_msg1 db 'Press any key to restart..',0
|
|
|
|
|
|
|
|
|
|
bootdev db 0 ; Boot device number
|
|
|
|
|
bootdev db 0x80 ; Boot device number
|
|
|
|
|
|
|
|
|
|
times 510-($-$$) db 0
|
|
|
|
|
dw 0xAA55
|
|
|
|
|