diff --git a/.program2.asm.swp b/.program2.asm.swp new file mode 100644 index 0000000..6621a76 Binary files /dev/null and b/.program2.asm.swp differ diff --git a/boot.asm b/boot.asm index 81c1fcf..10ba484 100755 --- a/boot.asm +++ b/boot.asm @@ -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 diff --git a/boot.bin b/boot.bin index 9bd7e47..748faff 100644 Binary files a/boot.bin and b/boot.bin differ diff --git a/disk.img b/disk.img index 63870a6..1915991 100755 Binary files a/disk.img and b/disk.img differ diff --git a/program2.asm b/program2.asm index c9dc910..befce53 100755 --- a/program2.asm +++ b/program2.asm @@ -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 diff --git a/program2.bin b/program2.bin index 5b14988..266d452 100644 Binary files a/program2.bin and b/program2.bin differ