master
Your Name 6 years ago
parent 371e11776e
commit 4c45d42fcb

Binary file not shown.

@ -3,7 +3,7 @@
[bits 16]
pre:
cmp ah, 0x0F
cmp ah, 0x0F ; checking if coming from other app or first load - setting ah to 0F before jmping back to the bootloader
je welcome
mov [bootdev], dl ; Save boot device number
jmp welcome
@ -23,12 +23,47 @@ welcome:
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 ah, 06h ; Set overall background
xor al, al ; and clear entire screen
xor cx, cx ; Upper left corner CH=row, CL=column = 0
mov dx, 184Fh ; lower right corner DH=row, DL=column = 25 x 80 / textmode
mov bh, 1Eh ; YellowOnBlue
int 10H ; execute interrupt
int 10h
mov ah, 06h; top bar, make background
xor cx, cx
mov dx, 0x004F
mov bh, 30h
int 10h
mov ah, 02h ;top bar setting the position and then write title to it
mov bh, 0h
mov dh, 0h
mov dl, 20h
int 10h
mov si, title
call wolf_print
mov ah, 06h; bottom bar, make background
mov cx, 0x1800
mov dx, 0x184F
mov bh, 30h
int 10h
mov ah, 02h ;bottom bar setting the position and then write title $
mov bh, 0h
mov dh, 18h
mov dl, 20h
int 10h
mov si, title
call wolf_print
mov ah, 02h ;sets cursor to top to write
mov bh, 0h
@ -36,11 +71,11 @@ welcome:
mov dl, 2h
int 10h
mov si, wolf_wel_msg
call wolf_print
mov si, wolf_wel_msg
call wolf_print
mov si, xpub
call wolf_print
; mov si, xpub
; call wolf_print
start:
mov ah, 0x00
@ -145,12 +180,12 @@ over:
jmp start
; Moved the data before the boot signature but after the code
wolf_wel_msg db 'Welcome to this publication..., press a key',0x0D,0x0A,0
wolf_wel_msg db 'Welcome to this publication..., press a key to ENTER',0x0D,0x0A,0
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
xpub db 0x0D, 0x0A, 0x20, 0xB1, 0x20, 0x20, 0x20, 0xB1, 0x20, 0xB1, 0xB1, 0xB1, 0x20, 0x20, 0xB1, 0x20, 0x20, 0x20, 0xB1,0x20,0xB1,0xB1,0xB1, 0x20, 0x0D, 0x0A,0x20,0x20,0xB1,0x20,0xB1,0x20,0x20,0xB1,0x20,0x20,0xB1, 0x20,0xB1,0x20,0x20,0x20,0xB1,0x20,0xB1,0x20,0x20, 0xB1, 0x0D,0x0A,0x20,0x20,0x20,0xB1, 0x20,0x20,0x20,0xB1,0xB1, 0xB1,0x20,0x20,0xB1,0x20,0x20,0x20,0xB1,0x20,0xB1,0xB1,0xB1,0x20,0x0D,0x0A,0x20,0x20,0xB1,0x20,0xB1, 0x20,0x20,0xB1,0x20,0x20,0x20,0x20,0xB1,0x20,0x20,0x20,0xB1,0x20,0xB1,0x20,0x20,0xB1,0x0D,0x0A,0x20,0xB1, 0x20,0x20,0x20,0xB1,0x20,0xB1,0x20,0x20,0x20,0x20,0x20,0xB1,0xB1,0xB1,0x20,0x20,0xB1,0xB1,0xB1, 0x20, 0
;xpub db 0x0D, 0x0A, 0x20, 0xB1, 0x20, 0x20, 0x20, 0xB1, 0x20, 0xB1, 0xB1, 0xB1, 0x20, 0x20, 0xB1, 0x20, 0x20, 0x20, 0xB1,0x20,0xB1,0xB1,0xB1, 0x20, 0x0D, 0x0A,0x20,0x20,0xB1,0x20,0xB1,0x20,0x20,0xB1,0x20,0x20,0xB1, 0x20,0xB1,0x20,0x20,0x20,0xB1,0x20,0xB1,0x20,0x20, 0xB1, 0x0D,0x0A,0x20,0x20,0x20,0xB1, 0x20,0x20,0x20,0xB1,0xB1, 0xB1,0x20,0x20,0xB1,0x20,0x20,0x20,0xB1,0x20,0xB1,0xB1,0xB1,0x20,0x0D,0x0A,0x20,0x20,0xB1,0x20,0xB1, 0x20,0x20,0xB1,0x20,0x20,0x20,0x20,0xB1,0x20,0x20,0x20,0xB1,0x20,0xB1,0x20,0x20,0xB1,0x0D,0x0A,0x20,0xB1, 0x20,0x20,0x20,0xB1,0x20,0xB1,0x20,0x20,0x20,0x20,0x20,0xB1,0xB1,0xB1,0x20,0x20,0xB1,0xB1,0xB1, 0x20, 0
title db 'NOT MY DEFAULT',0
bootdev db 0x80 ; Boot device number

Binary file not shown.

Binary file not shown.

@ -1,6 +1,5 @@
[org 0x2000]
start:
mov ah, 01h ;make cursor invisible
mov cx, 2607h
@ -57,11 +56,8 @@ start:
mov si, msg2
call print
mov ah, 06h ;draw rect on background
mov cx, 0404h
mov dx, 113Dh
mov bh, 2Eh
int 10h
call wait_for_key
@ -69,7 +65,7 @@ start:
wait_for_key:
mov ah, 0x00
int 0x16
cmp al, "0"
cmp ah, 01h
je exit_bootloader
jmp over

Binary file not shown.
Loading…
Cancel
Save