From 63a43d51d088c206975b642c77c2928a04044de9 Mon Sep 17 00:00:00 2001 From: Christoffer Bubach Date: Tue, 22 Dec 2015 17:24:24 +0100 Subject: [PATCH] new indentation style --- boot/BOS_boot.asm | 2 +- bos.img | Bin 1474560 -> 1474560 bytes kernel/16bit/a20.asm | 12 +- kernel/16bit/mem.asm | 62 +-- kernel/16bit/variables.asm | 2 +- kernel/fat12/fat12.asm | 32 +- kernel/fdc/dma.asm | 106 ++-- kernel/int/debug.asm | 618 ++++++++++----------- kernel/int/isr.asm | 756 ++++++++++++------------- kernel/kbd/keyboard.asm | 660 +++++++++++----------- kernel/kbd/keymap.asm | 136 ++--- kernel/kernel.sys | Bin 18440 -> 18440 bytes kernel/shell/clock.asm | 208 +++---- kernel/shell/commands.asm | 1078 ++++++++++++++++++------------------ kernel/shell/shell.asm | 269 +++++---- kernel/sound/speaker.asm | 62 +-- kernel/system/services.asm | 122 ++-- kernel/vars/strings.asm | 12 +- kernel/vga/font8x16.asm | 514 ++++++++--------- kernel/vga/mario.asm | 234 ++++---- kernel/vga/text.asm | 526 +++++++++--------- kernel/vga/vga.asm | 311 +++++------ 22 files changed, 2865 insertions(+), 2857 deletions(-) diff --git a/boot/BOS_boot.asm b/boot/BOS_boot.asm index 432465c..8fde3a3 100755 --- a/boot/BOS_boot.asm +++ b/boot/BOS_boot.asm @@ -263,7 +263,7 @@ found: ; the file is loaded ; ;-----------------------; quit: - jmp 0x0000:0x8000 ; jump to loaded file (64kb in mem) + jmp 0x0000:0x8000 ; jump to loaded file (64kb in mem) ;-------------------------------------; diff --git a/bos.img b/bos.img index 113e9feca4f11ebda3b84f9422b6115655a4a20b..f03b123f5169432dfc925bf5f17fe673830e6545 100755 GIT binary patch delta 580 zcmZY6OH0E*5C`zx_^eH9Vp|js5=8?dDW++)R1lg66%-$-lqgaPf+z9RlNTc%^rjf- zNqSQ7;0yO4_yxqzV8O2;c+md}g$4(H*~c!Z3vGts|l6Jr5OwF7YL7Z zT4{$wLfdfljWTMBk`~_i|6Zsc6gJCJs3MX{EZe1%wrT45*{q{kdA+D*O{1vg=PXmp zX7bj2#+q~VVg{2f`s^(vX)ZY0pJ3Jfn?x+9Xo};yYi>ayuYv53Gu;=)rlh^&#U;Bw z&1y(2yRI-FNyV-YvkN4yU5~S;6R&ydH7N+t1>MjCz0e2!5P<=Rf(S8)!yrf?!w@7O z`QkNGx1YfU?VtL(o2~vF;YrrdDSsFlA|Q3tX>d$uQaj%d2Ym9q`uKP9X%QVm>qf>Q U{62hm&X@5&#C7zEfcG)zFS4VtZ2$lO delta 972 zcmZo@h-zqv+Q6sAvt^^Uo3w&4Eno1ve)!g>g=D;zc!|i2(%k^b}w~fC0rcpw{Dz zn;Bhr1awi&#MFl(KiMiISO7(Yhd~8sSTduEnURUJqoa|buCb+og|3OEg{iKExw)aP zi?gMRqoaYdse!QzP~{!QO%c{2lk0MnH^=2H73MWj&{c2^3i1!KQefCMS+GHIvta|1 zoGO1>qn(FKiRR{bAj8?EL}7D1kP+lkBEGpF#PBWQ+q}LxVqSa1JVqd90%B$$W&vVW zAZ7z%b|B^eVoo6D0%C3;<^f_}Am#&NejpYAVnHAl0%Bnx7TF##Pjtoo`U@%?UH|JD z7+OLP2ZMv;Lu(6&f8Z;GUY^_)1QvH#*9j88-~yqaOq&K#Kf%2nByKPTLeJe|5&~BL zzyoYf!xIR-5N3{nVIx?*C77;f5DyiE7_>p42PDz31wtbnlm~X;g)a~q?jVNGU<)p= zKKbaB(IRBqR)S z!3GJKLFfxGae-@)s1b$GaEBh~0IN4R0->kD9P~f~Y;M6*2n`Qu0TD<@i-`2FfGh?8 D7XLv# diff --git a/kernel/16bit/a20.asm b/kernel/16bit/a20.asm index 2935bd5..1b81c72 100644 --- a/kernel/16bit/a20.asm +++ b/kernel/16bit/a20.asm @@ -42,10 +42,10 @@ enable_a20: ; test if A20 is set ; ;------------------------; a20_test: - mov al, byte [fs:0] - mov ah, al - not al - xchg al, byte [gs:0x10] - cmp ah, byte [fs:0] - mov [gs:0x10], al + mov al, byte [fs:0] + mov ah, al + not al + xchg al, byte [gs:0x10] + cmp ah, byte [fs:0] + mov [gs:0x10], al ret \ No newline at end of file diff --git a/kernel/16bit/mem.asm b/kernel/16bit/mem.asm index 0446e02..7057d93 100755 --- a/kernel/16bit/mem.asm +++ b/kernel/16bit/mem.asm @@ -12,40 +12,40 @@ ; out: eax = mem in bytes, 0 = error ; ;-----------------------------------------; getmem: - push dx - push cx - push ebx + push dx + push cx + push ebx - xor eax, eax - xor ebx, ebx - mov ax, 0xE801 - xor dx, dx - xor cx, cx - int 0x15 - jnc .cont1 - xor eax, eax - jmp .end ; failed! :'( + xor eax, eax + xor ebx, ebx + mov ax, 0xE801 + xor dx, dx + xor cx, cx + int 0x15 + jnc .cont1 + xor eax, eax + jmp .end ; failed! :'( - .cont1: - mov si, ax - or si, bx - jne .cont - mov ax, cx - mov bx, dx + .cont1: + mov si, ax + or si, bx + jne .cont + mov ax, cx + mov bx, dx - .cont: - cmp ax, 0x3C00 - jb .below_16 - movzx eax, bx - add eax, 0x100 - shl eax, 16 ; eax = eax * 65536 - jmp .end + .cont: + cmp ax, 0x3C00 + jb .below_16 + movzx eax, bx + add eax, 0x100 + shl eax, 16 ; eax = eax * 65536 + jmp .end - .below_16: - shl eax, 10 ; eax = eax * 1024 + .below_16: + shl eax, 10 ; eax = eax * 1024 .end: - pop ebx - pop cx - pop dx - ret \ No newline at end of file + pop ebx + pop cx + pop dx + ret \ No newline at end of file diff --git a/kernel/16bit/variables.asm b/kernel/16bit/variables.asm index 0d739b0..a102a59 100755 --- a/kernel/16bit/variables.asm +++ b/kernel/16bit/variables.asm @@ -10,7 +10,7 @@ ; needed to get back to 16-bit mode ; ;---------------------------------------; realmode_cs dw 0 - ridtr: dw 0x3FF + ridtr: dw 0x3FF dd 0 ;----------------; diff --git a/kernel/fat12/fat12.asm b/kernel/fat12/fat12.asm index 832df8f..18becda 100644 --- a/kernel/fat12/fat12.asm +++ b/kernel/fat12/fat12.asm @@ -54,7 +54,7 @@ virtual at 0 ; could use "at esi" instead fat12_data fat12_data - sizeof.fat12_data = $-$$ + sizeof.fat12_data = $-$$ end virtual ;---------------------------------------------; @@ -65,7 +65,7 @@ .jumper db 0,0,0 .oem db 0,0,0,0,0,0,0,0 .sectorsize dw 0 - .sect_per_clust db 0 + .sect_per_clust db 0 .reserved_sect dw 0 ; reserved sectors, 1 for bootsector. .fats_per_drive db 0 .root_entries dw 0 @@ -82,7 +82,7 @@ .disk_id dd 0 ; random ident number on format. .volume_label db 0,0,0,0,0,0,0,0,0,0,0 .filesystem db 0,0,0,0,0,0,0,0 ; "FAT12 " or "FAT16 " - .code: times 448 db 0 + .code: times 448 db 0 .boot_signature db 0,0 ; 0x55,0xAA } @@ -224,20 +224,20 @@ init_fat12: push eax ;... - ;-----------------------------; - ; calculate root location ; - ;-----------------------------; - xor eax, eax - mov al, byte [fd0.boot.fats_per_drive] - mul word [fd0.boot.sectors_per_fat] - add ax, word [fd0.boot.reserved_sect] - mov [fd0.root_dir], ax + ;-----------------------------; + ; calculate root location ; + ;-----------------------------; + xor eax, eax + mov al, byte [fd0.boot.fats_per_drive] + mul word [fd0.boot.sectors_per_fat] + add ax, word [fd0.boot.reserved_sect] + mov [fd0.root_dir], ax -; working with -;mov si, [drive] -;mov ax, [si+fat12.boot.sectorssize] +; working with +;mov si, [drive] +;mov ax, [si+fat12.boot.sectorssize] - ; a bit more code here + ; a bit more code here pop eax ret @@ -265,7 +265,7 @@ calc_lfn_chksum: inc esi ; prepare for next character loop .l1 - pop esi + pop esi pop cx ret diff --git a/kernel/fdc/dma.asm b/kernel/fdc/dma.asm index 39f3a84..d5eca64 100755 --- a/kernel/fdc/dma.asm +++ b/kernel/fdc/dma.asm @@ -29,65 +29,65 @@ ; out: nothing. ; ;-----------------------------------; dma_transfer: - push eax - push edx - push esi - cli - or bh, bh - jz .dont_read + push eax + push edx + push esi + cli + or bh, bh + jz .dont_read - mov bh, bl - add bh, 0x48 - jmp .read - .dont_read: - mov bh, bl - add bh, 0x44 - .read: - dec esi + mov bh, bl + add bh, 0x48 + jmp .read + .dont_read: + mov bh, bl + add bh, 0x44 + .read: + dec esi - movzx eax, bl - mov dx, word [(eax*2)+dma_mask_reg] - mov al, bl - or al, 0x04 - out dx, al ; disable the channel + movzx eax, bl + mov dx, word [(eax*2)+dma_mask_reg] + mov al, bl + or al, 0x04 + out dx, al ; disable the channel - movzx eax, bl - mov dx, word [(eax*2)+dma_clear_reg] - mov al, 0 - out dx, al ; initialize flip-flop + movzx eax, bl + mov dx, word [(eax*2)+dma_clear_reg] + mov al, 0 + out dx, al ; initialize flip-flop - movzx eax, bl - mov dx, word [(eax*2)+dma_mode_reg] - mov al, bh - out dx, al ; set DMA mode + movzx eax, bl + mov dx, word [(eax*2)+dma_mode_reg] + mov al, bh + out dx, al ; set DMA mode - movzx eax, bl - mov dx, word [(eax*2)+dma_addr_port] - mov al, cl - out dx, al ; write low offset part - mov al, ch - out dx, al ; and high offset part + movzx eax, bl + mov dx, word [(eax*2)+dma_addr_port] + mov al, cl + out dx, al ; write low offset part + mov al, ch + out dx, al ; and high offset part - movzx eax, bl - mov dx, word [(eax*2)+dma_page_port] - mov eax, ecx - shr eax, 16 - out dx, al ; write page. + movzx eax, bl + mov dx, word [(eax*2)+dma_page_port] + mov eax, ecx + shr eax, 16 + out dx, al ; write page. - movzx eax, bl - mov dx, word [(eax*2)+dma_count_port] - mov eax, esi - out dx, al ; low count - mov al, ah - out dx, al ; high count + movzx eax, bl + mov dx, word [(eax*2)+dma_count_port] + mov eax, esi + out dx, al ; low count + mov al, ah + out dx, al ; high count - movzx eax, bl - mov dx, word [(eax*2)+dma_mask_reg] - mov al, bl - out dx, al ; enable channel + movzx eax, bl + mov dx, word [(eax*2)+dma_mask_reg] + mov al, bl + out dx, al ; enable channel - sti - pop esi - pop edx - pop eax - ret \ No newline at end of file + sti + pop esi + pop edx + pop eax + ret \ No newline at end of file diff --git a/kernel/int/debug.asm b/kernel/int/debug.asm index ae2d6fe..1962064 100755 --- a/kernel/int/debug.asm +++ b/kernel/int/debug.asm @@ -9,377 +9,377 @@ ;----------------; ; variables ; ;----------------; - dbg_head db 'ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»',0 - dbg_head2 db 'º BOS 0.05 - ERROR: ',0 - dbg_head3 db 'º º',0 - dbg_press db 'º Press any key to continue... º',0 - dbg_restart db 'º Press a key to restart the PC... º',0 - dbg_footer db 'ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ',0 - dbg_close_row db ' º',0 - dbg_keypress db 1 ; 0 = restart, 1 = wait for key - dbg_error db ' none. ',0 ; error msg to show, max 14 chars + dbg_head db 'ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»',0 + dbg_head2 db 'º BOS 0.05 - ERROR: ',0 + dbg_head3 db 'º º',0 + dbg_press db 'º Press any key to continue... º',0 + dbg_restart db 'º Press a key to restart the PC... º',0 + dbg_footer db 'ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ',0 + dbg_close_row db ' º',0 + dbg_keypress db 1 ; 0 = restart, 1 = wait for key + dbg_error db ' none. ',0 ; error msg to show, max 14 chars - ;--------------------------------------; - ; I'll start with the common regs.. ; - ;--------------------------------------; - debug_eax db 'º EAX: 0x', 0 - debug_ebx db ' EBX: 0x', 0 - debug_ecx db 'º ECX: 0x', 0 - debug_edx db ' EDX: 0x', 0 - debug_esp db 'º ESP: 0x', 0 - debug_ebp db ' EBP: 0x', 0 - debug_esi db 'º ESI: 0x', 0 - debug_edi db ' EDI: 0x', 0 + ;--------------------------------------; + ; I'll start with the common regs.. ; + ;--------------------------------------; + debug_eax db 'º EAX: 0x', 0 + debug_ebx db ' EBX: 0x', 0 + debug_ecx db 'º ECX: 0x', 0 + debug_edx db ' EDX: 0x', 0 + debug_esp db 'º ESP: 0x', 0 + debug_ebp db ' EBP: 0x', 0 + debug_esi db 'º ESI: 0x', 0 + debug_edi db ' EDI: 0x', 0 - ;-------------------; - ; state to print ; - ;-------------------; - state_eax dd 0 - state_ebx dd 0 - state_ecx dd 0 - state_edx dd 0 - state_esp dd 0 - state_ebp dd 0 - state_esi dd 0 - state_edi dd 0 + ;-------------------; + ; state to print ; + ;-------------------; + state_eax dd 0 + state_ebx dd 0 + state_ecx dd 0 + state_edx dd 0 + state_esp dd 0 + state_ebp dd 0 + state_esi dd 0 + state_edi dd 0 - ;-----------------------------------; - ; "fake stack" to save regs on.. ; - ;-----------------------------------; - stack_eax dd 0 - stack_eax2 dd 0 - stack_ebx dd 0 - stack_edx dd 0 + ;-----------------------------------; + ; "fake stack" to save regs on.. ; + ;-----------------------------------; + stack_eax dd 0 + stack_eax2 dd 0 + stack_ebx dd 0 + stack_edx dd 0 ;-------------------------------; ; original cursor placment.. ; ;-------------------------------; - state_cursor dw 0 + state_cursor dw 0 ;-------------------------------------------------; ; mostly in debug purpose, and in lack of MM.. ; ;-------------------------------------------------; - scr_buffer: times 180 dd 0 ; 720 = box buffer size (char+attrib) + scr_buffer: times 180 dd 0 ; 720 = box buffer size (char+attrib) ;--------------------------------------------; ; dump regs.. does not use the stack. ; ;--------------------------------------------; dump_regs: - mov [state_eax], eax - mov [state_ebx], ebx - mov [state_ecx], ecx - mov [state_edx], edx - mov [state_esp], esp - mov [state_ebp], ebp - mov [state_esi], esi - mov [state_edi], edi + mov [state_eax], eax + mov [state_ebx], ebx + mov [state_ecx], ecx + mov [state_edx], edx + mov [state_esp], esp + mov [state_ebp], ebp + mov [state_esi], esi + mov [state_edi], edi - call .get_cur - mov [state_cursor], bx + call .get_cur + mov [state_cursor], bx - mov dx, 0 ; row counter - mov esi, (0xB8000+840) - mov edi, scr_buffer - .big_loop: - mov cx, 0 ; col counter - .small_loop: - movsb ; copy creen content - inc cx ; increase counter - cmp cx, 72 ; have we copied 72 bytes? - je .end_small ; if we have, end small loop - jmp .small_loop ; if not continue with next byte - .end_small: - inc dx ; increase row count - cmp dx, 10 ; check if all ten is copied - je .end_big ; if it is, end. - add esi, 88 ; else continue with next row - jmp .big_loop + mov dx, 0 ; row counter + mov esi, (0xB8000+840) + mov edi, scr_buffer + .big_loop: + mov cx, 0 ; col counter + .small_loop: + movsb ; copy creen content + inc cx ; increase counter + cmp cx, 72 ; have we copied 72 bytes? + je .end_small ; if we have, end small loop + jmp .small_loop ; if not continue with next byte + .end_small: + inc dx ; increase row count + cmp dx, 10 ; check if all ten is copied + je .end_big ; if it is, end. + add esi, 88 ; else continue with next row + jmp .big_loop .end_big: - mov bx, 420 ; row 5 char 20 - call .set_cur - mov ebp, dbg_head - call .print - mov bx, 500 ; row 6 char 20 - call .set_cur - mov ebp, dbg_head2 - call .print - mov ebp, dbg_error - call .print - mov ebp, dbg_close_row - call .print - mov bx, 580 ; row 7 char 20 - call .set_cur - mov ebp, dbg_head3 - call .print + mov bx, 420 ; row 5 char 20 + call .set_cur + mov ebp, dbg_head + call .print + mov bx, 500 ; row 6 char 20 + call .set_cur + mov ebp, dbg_head2 + call .print + mov ebp, dbg_error + call .print + mov ebp, dbg_close_row + call .print + mov bx, 580 ; row 7 char 20 + call .set_cur + mov ebp, dbg_head3 + call .print - mov bx, 660 ; row 8 char 20 - call .set_cur - mov ebp, debug_eax - call .print - mov eax, [state_eax] ; eax - call .print_hex32 - mov ebp, debug_ebx - call .print - mov eax, [state_ebx] ; ebx - call .print_hex32 - mov ebp, dbg_close_row - call .print + mov bx, 660 ; row 8 char 20 + call .set_cur + mov ebp, debug_eax + call .print + mov eax, [state_eax] ; eax + call .print_hex32 + mov ebp, debug_ebx + call .print + mov eax, [state_ebx] ; ebx + call .print_hex32 + mov ebp, dbg_close_row + call .print - mov bx, 740 ; row 9 char 20 - call .set_cur - mov ebp, debug_ecx - call .print - mov eax, [state_ecx] ; ecx - call .print_hex32 - mov ebp, debug_edx - call .print - mov eax, [state_edx] ; edx - call .print_hex32 - mov ebp, dbg_close_row - call .print + mov bx, 740 ; row 9 char 20 + call .set_cur + mov ebp, debug_ecx + call .print + mov eax, [state_ecx] ; ecx + call .print_hex32 + mov ebp, debug_edx + call .print + mov eax, [state_edx] ; edx + call .print_hex32 + mov ebp, dbg_close_row + call .print - mov bx, 820 ; row 10 char 20 - call .set_cur - mov ebp, debug_esp - call .print - mov eax, [state_esp] ; esp - call .print_hex32 - mov ebp, debug_ebp - call .print - mov eax, [state_ebp] ; ebp - call .print_hex32 - mov ebp, dbg_close_row - call .print + mov bx, 820 ; row 10 char 20 + call .set_cur + mov ebp, debug_esp + call .print + mov eax, [state_esp] ; esp + call .print_hex32 + mov ebp, debug_ebp + call .print + mov eax, [state_ebp] ; ebp + call .print_hex32 + mov ebp, dbg_close_row + call .print - mov bx, 900 ; row 11 char 20 - call .set_cur - mov ebp, debug_esi - call .print - mov eax, [state_esi] ; esi - call .print_hex32 - mov ebp, debug_edi - call .print - mov eax, [state_edi] ; edi - call .print_hex32 - mov ebp, dbg_close_row - call .print + mov bx, 900 ; row 11 char 20 + call .set_cur + mov ebp, debug_esi + call .print + mov eax, [state_esi] ; esi + call .print_hex32 + mov ebp, debug_edi + call .print + mov eax, [state_edi] ; edi + call .print_hex32 + mov ebp, dbg_close_row + call .print - mov bx, 980 ; row 12 char 20 - call .set_cur - mov ebp, dbg_head3 - call .print - mov bx, 1140 ; row 14 char 20 - call .set_cur - mov ebp, dbg_footer - call .print - mov bx, 1060 ; row 13 char 20 - call .set_cur + mov bx, 980 ; row 12 char 20 + call .set_cur + mov ebp, dbg_head3 + call .print + mov bx, 1140 ; row 14 char 20 + call .set_cur + mov ebp, dbg_footer + call .print + mov bx, 1060 ; row 13 char 20 + call .set_cur - cmp [dbg_keypress], 1 - je .wait_key + cmp [dbg_keypress], 1 + je .wait_key ;----------------------------------; ; wait for scancode and restart ; ;----------------------------------; - mov ebp, dbg_restart - call .print - mov bx, 1093 ; row 13 char 46 - call .set_cur + mov ebp, dbg_restart + call .print + mov bx, 1093 ; row 13 char 46 + call .set_cur .no_new1: - mov al, [kbd_head] - mov ah, [kbd_tail] - cmp ah, 63 - jne .check1 - cmp al, 0 - je .no_new1 - mov [kbd_tail], 0 - jmp .done_check1 + mov al, [kbd_head] + mov ah, [kbd_tail] + cmp ah, 63 + jne .check1 + cmp al, 0 + je .no_new1 + mov [kbd_tail], 0 + jmp .done_check1 .check1: - mov bl, ah - inc bl - cmp bl, al - je .no_new1 - inc [kbd_tail] + mov bl, ah + inc bl + cmp bl, al + je .no_new1 + inc [kbd_tail] .done_check1: - mov esi, kbd_buffer - movzx eax, [kbd_tail] - add esi, eax - mov ah, byte [esi] ; ah = scancode - cmp ah, 0xFA ; check for some stuff.. - je .no_new1 - cmp ah, 0xE0 - je .no_new1 - cmp ah, 0xE1 - je .no_new1 - test ah, 0x80 - jnz .no_new1 + mov esi, kbd_buffer + movzx eax, [kbd_tail] + add esi, eax + mov ah, byte [esi] ; ah = scancode + cmp ah, 0xFA ; check for some stuff.. + je .no_new1 + cmp ah, 0xE0 + je .no_new1 + cmp ah, 0xE1 + je .no_new1 + test ah, 0x80 + jnz .no_new1 - call reboot ; in commands.inc + call reboot ; in commands.inc ;--------------------------; ; wait for key and quit ; ;--------------------------; .wait_key: - mov ebp, dbg_press - call .print - mov bx, 1091 ; row 13 char 51 - call .set_cur + mov ebp, dbg_press + call .print + mov bx, 1091 ; row 13 char 51 + call .set_cur .no_new2: - mov al, [kbd_head] - mov ah, [kbd_tail] - cmp ah, 63 ; if we are at the buffer end, - jne .check2 ; we must check that head != 0 - cmp al, 0 - je .no_new2 ; we don't have new keys to read - mov [kbd_tail], 0 ; "increase" to 0 (loop buffer) - jmp .done_check2 + mov al, [kbd_head] + mov ah, [kbd_tail] + cmp ah, 63 ; if we are at the buffer end, + jne .check2 ; we must check that head != 0 + cmp al, 0 + je .no_new2 ; we don't have new keys to read + mov [kbd_tail], 0 ; "increase" to 0 (loop buffer) + jmp .done_check2 .check2: - mov bl, ah - inc bl ; head should be +1 compared to tail - cmp bl, al - je .no_new2 - inc [kbd_tail] ; increase + mov bl, ah + inc bl ; head should be +1 compared to tail + cmp bl, al + je .no_new2 + inc [kbd_tail] ; increase .done_check2: - mov esi, kbd_buffer - movzx eax, [kbd_tail] - add esi, eax - mov ah, byte [esi] ; ah = scancode - cmp ah, 0xFA ; check for some stuff.. - je .no_new2 - cmp ah, 0xE0 - je .no_new2 - cmp ah, 0xE1 - je .no_new2 - test ah, 0x80 - jnz .no_new2 + mov esi, kbd_buffer + movzx eax, [kbd_tail] + add esi, eax + mov ah, byte [esi] ; ah = scancode + cmp ah, 0xFA ; check for some stuff.. + je .no_new2 + cmp ah, 0xE0 + je .no_new2 + cmp ah, 0xE1 + je .no_new2 + test ah, 0x80 + jnz .no_new2 - mov dx, 0 ; restore screen as - mov edi, (0xB8000+840) ; it was before. - mov esi, scr_buffer ; same loops as above - .big_loop2: ; but exchanged esi and edi - mov cx, 0 + mov dx, 0 ; restore screen as + mov edi, (0xB8000+840) ; it was before. + mov esi, scr_buffer ; same loops as above + .big_loop2: ; but exchanged esi and edi + mov cx, 0 .small_loop2: - movsb - inc cx - cmp cx, 72 - je .end_small2 - jmp .small_loop2 + movsb + inc cx + cmp cx, 72 + je .end_small2 + jmp .small_loop2 .end_small2: - inc dx - cmp dx, 10 - je .end_big2 - add edi, 88 - jmp .big_loop2 + inc dx + cmp dx, 10 + je .end_big2 + add edi, 88 + jmp .big_loop2 .end_big2: - mov bx, [state_cursor] - call .set_cur - mov [dbg_keypress], 1 - mov [dbg_error], ' ' ; restore variables. - mov [dbg_error+1], 'n' ; ugly.. - mov [dbg_error+2], 'o' - mov [dbg_error+3], 'n' - mov [dbg_error+4], 'e' - mov [dbg_error+5], '.' - mov [dbg_error+6], ' ' - mov [dbg_error+7], ' ' - mov [dbg_error+8], ' ' - mov [dbg_error+9], ' ' - mov [dbg_error+10], ' ' - mov [dbg_error+11], ' ' - mov [dbg_error+12], ' ' - mov [dbg_error+13], ' ' - mov [dbg_error+14], 0 - ret + mov bx, [state_cursor] + call .set_cur + mov [dbg_keypress], 1 + mov [dbg_error], ' ' ; restore variables. + mov [dbg_error+1], 'n' ; ugly.. + mov [dbg_error+2], 'o' + mov [dbg_error+3], 'n' + mov [dbg_error+4], 'e' + mov [dbg_error+5], '.' + mov [dbg_error+6], ' ' + mov [dbg_error+7], ' ' + mov [dbg_error+8], ' ' + mov [dbg_error+9], ' ' + mov [dbg_error+10], ' ' + mov [dbg_error+11], ' ' + mov [dbg_error+12], ' ' + mov [dbg_error+13], ' ' + mov [dbg_error+14], 0 + ret ;-------------------------------; ; subfunctions to inc cursor ; ;-------------------------------; .set_cur: - mov [stack_eax2], eax - mov [stack_edx], edx ; can it get any uglier? - mov al, 0x0E - mov ah, bh - mov dx, 0x3D4 - out dx, ax - inc ax - mov ah, bl - out dx, ax - mov edx, [stack_edx] - mov eax, [stack_eax2] - ret + mov [stack_eax2], eax + mov [stack_edx], edx ; can it get any uglier? + mov al, 0x0E + mov ah, bh + mov dx, 0x3D4 + out dx, ax + inc ax + mov ah, bl + out dx, ax + mov edx, [stack_edx] + mov eax, [stack_eax2] + ret .get_cur: - mov [stack_eax2], eax - mov [stack_edx], edx - mov dx, 0x3D4 - mov al, 0x0E - out dx, al - inc dx - in al, dx - mov bh, al - mov al, 0x0F - dec dx - out dx, al - inc dx - in al, dx - mov bl, al - mov edx, [stack_edx] - mov eax, [stack_eax2] - ret - ;--------------------------------; - ; subfunction to print a char ; - ; bl = char, bh = attrib ; - ;--------------------------------; - .print_char: - mov [stack_eax], eax - mov [stack_ebx], ebx - call .get_cur - mov eax, ebx - mov ebx, [stack_ebx] - mov [es:(eax*2 + 0xB8000)], bx - mov ebx, eax - inc bx - call .set_cur - mov ebx, [stack_ebx] - mov eax, [stack_eax] - ret + mov [stack_eax2], eax + mov [stack_edx], edx + mov dx, 0x3D4 + mov al, 0x0E + out dx, al + inc dx + in al, dx + mov bh, al + mov al, 0x0F + dec dx + out dx, al + inc dx + in al, dx + mov bl, al + mov edx, [stack_edx] + mov eax, [stack_eax2] + ret + ;--------------------------------; + ; subfunction to print a char ; + ; bl = char, bh = attrib ; + ;--------------------------------; + .print_char: + mov [stack_eax], eax + mov [stack_ebx], ebx + call .get_cur + mov eax, ebx + mov ebx, [stack_ebx] + mov [es:(eax*2 + 0xB8000)], bx + mov ebx, eax + inc bx + call .set_cur + mov ebx, [stack_ebx] + mov eax, [stack_eax] + ret ;------------------------------------------; ; subfunction to print 32-bit hex value ; ; IN: eax = value, bh = color. ; ;------------------------------------------; .print_hex32: - mov ecx, 8 + mov ecx, 8 .print_it: - rol eax, 4 - movzx edx, al - and edx, 0x0F - or edx, 0x30 - cmp edx, 0x39 - jna .cont - add edx, 7 + rol eax, 4 + movzx edx, al + and edx, 0x0F + or edx, 0x30 + cmp edx, 0x39 + jna .cont + add edx, 7 .cont: - mov bl, dl - call .print_char - loop .print_it - ret - ;-----------------------------------------; - ; subfunction to display asciiz string ; - ; Input: ebp = string ; - ;-----------------------------------------; - .print: - mov al, byte [ebp] - or al, al - jz .done - mov bl, al - mov bh, 0x40 ; standard color for this... - call .print_char - inc ebp - jmp .print - .done: - ret \ No newline at end of file + mov bl, dl + call .print_char + loop .print_it + ret + ;-----------------------------------------; + ; subfunction to display asciiz string ; + ; Input: ebp = string ; + ;-----------------------------------------; + .print: + mov al, byte [ebp] + or al, al + jz .done + mov bl, al + mov bh, 0x40 ; standard color for this... + call .print_char + inc ebp + jmp .print + .done: + ret \ No newline at end of file diff --git a/kernel/int/isr.asm b/kernel/int/isr.asm index f45357d..6b3a019 100755 --- a/kernel/int/isr.asm +++ b/kernel/int/isr.asm @@ -12,460 +12,460 @@ ; Unhandled Interrupt ; ;------------------------; u_isr: - mov [dbg_keypress], 0 ; in debug.inc - mov [dbg_error], 'U' - mov [dbg_error+1], 'n' - mov [dbg_error+2], 'h' - mov [dbg_error+3], 'a' - mov [dbg_error+4], 'n' - mov [dbg_error+5], 'd' - mov [dbg_error+6], 'l' - mov [dbg_error+7], 'e' - mov [dbg_error+8], 'd' - mov [dbg_error+9], ' ' - mov [dbg_error+10], 'I' - mov [dbg_error+11], 'n' - mov [dbg_error+12], 't' - mov [dbg_error+13], ' ' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 ; in debug.inc + mov [dbg_error], 'U' + mov [dbg_error+1], 'n' + mov [dbg_error+2], 'h' + mov [dbg_error+3], 'a' + mov [dbg_error+4], 'n' + mov [dbg_error+5], 'd' + mov [dbg_error+6], 'l' + mov [dbg_error+7], 'e' + mov [dbg_error+8], 'd' + mov [dbg_error+9], ' ' + mov [dbg_error+10], 'I' + mov [dbg_error+11], 'n' + mov [dbg_error+12], 't' + mov [dbg_error+13], ' ' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 00 ; ;-------------------------------; isr00: - mov [dbg_keypress], 0 - mov [dbg_error], 'D' - mov [dbg_error+1], 'i' - mov [dbg_error+2], 'v' - mov [dbg_error+3], 'i' - mov [dbg_error+4], 'd' - mov [dbg_error+5], 'e' - mov [dbg_error+6], ' ' - mov [dbg_error+7], 'e' - mov [dbg_error+8], 'r' - mov [dbg_error+9], 'r' - mov [dbg_error+10], 'o' - mov [dbg_error+11], 'r' - mov [dbg_error+12], ' ' - mov [dbg_error+13], ' ' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'D' + mov [dbg_error+1], 'i' + mov [dbg_error+2], 'v' + mov [dbg_error+3], 'i' + mov [dbg_error+4], 'd' + mov [dbg_error+5], 'e' + mov [dbg_error+6], ' ' + mov [dbg_error+7], 'e' + mov [dbg_error+8], 'r' + mov [dbg_error+9], 'r' + mov [dbg_error+10], 'o' + mov [dbg_error+11], 'r' + mov [dbg_error+12], ' ' + mov [dbg_error+13], ' ' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 01 ; ;-------------------------------; isr01: - mov [dbg_keypress], 0 - mov [dbg_error], 'D' - mov [dbg_error+1], 'e' - mov [dbg_error+2], 'b' - mov [dbg_error+3], 'u' - mov [dbg_error+4], 'g' - mov [dbg_error+5], ' ' - mov [dbg_error+6], 'f' - mov [dbg_error+7], 'a' - mov [dbg_error+8], 'u' - mov [dbg_error+9], 'l' - mov [dbg_error+10], 't' - mov [dbg_error+11], ' ' - mov [dbg_error+12], ' ' - mov [dbg_error+13], ' ' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'D' + mov [dbg_error+1], 'e' + mov [dbg_error+2], 'b' + mov [dbg_error+3], 'u' + mov [dbg_error+4], 'g' + mov [dbg_error+5], ' ' + mov [dbg_error+6], 'f' + mov [dbg_error+7], 'a' + mov [dbg_error+8], 'u' + mov [dbg_error+9], 'l' + mov [dbg_error+10], 't' + mov [dbg_error+11], ' ' + mov [dbg_error+12], ' ' + mov [dbg_error+13], ' ' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 02 ; ;-------------------------------; isr02: - mov [dbg_keypress], 0 - mov [dbg_error], 'N' - mov [dbg_error+1], 'M' - mov [dbg_error+2], 'I' - mov [dbg_error+3], ' ' - mov [dbg_error+4], 'i' - mov [dbg_error+5], 'n' - mov [dbg_error+6], 't' - mov [dbg_error+7], 'e' - mov [dbg_error+8], 'r' - mov [dbg_error+9], 'r' - mov [dbg_error+10], 'u' - mov [dbg_error+11], 'p' - mov [dbg_error+12], 't' - mov [dbg_error+13], ' ' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'N' + mov [dbg_error+1], 'M' + mov [dbg_error+2], 'I' + mov [dbg_error+3], ' ' + mov [dbg_error+4], 'i' + mov [dbg_error+5], 'n' + mov [dbg_error+6], 't' + mov [dbg_error+7], 'e' + mov [dbg_error+8], 'r' + mov [dbg_error+9], 'r' + mov [dbg_error+10], 'u' + mov [dbg_error+11], 'p' + mov [dbg_error+12], 't' + mov [dbg_error+13], ' ' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 03 ; ;-------------------------------; isr03: - mov [dbg_keypress], 0 - mov [dbg_error], 'B' - mov [dbg_error+1], 'r' - mov [dbg_error+2], 'e' - mov [dbg_error+3], 'a' - mov [dbg_error+4], 'k' - mov [dbg_error+5], 'p' - mov [dbg_error+6], 'o' - mov [dbg_error+7], 'i' - mov [dbg_error+8], 'n' - mov [dbg_error+9], 't' - mov [dbg_error+10], ' ' - mov [dbg_error+11], ' ' - mov [dbg_error+12], ' ' - mov [dbg_error+13], ' ' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'B' + mov [dbg_error+1], 'r' + mov [dbg_error+2], 'e' + mov [dbg_error+3], 'a' + mov [dbg_error+4], 'k' + mov [dbg_error+5], 'p' + mov [dbg_error+6], 'o' + mov [dbg_error+7], 'i' + mov [dbg_error+8], 'n' + mov [dbg_error+9], 't' + mov [dbg_error+10], ' ' + mov [dbg_error+11], ' ' + mov [dbg_error+12], ' ' + mov [dbg_error+13], ' ' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 04 ; ;-------------------------------; isr04: - mov [dbg_keypress], 0 - mov [dbg_error], 'O' - mov [dbg_error+1], 'v' - mov [dbg_error+2], 'e' - mov [dbg_error+3], 'r' - mov [dbg_error+4], 'f' - mov [dbg_error+5], 'l' - mov [dbg_error+6], 'o' - mov [dbg_error+7], 'w' - mov [dbg_error+8], ' ' - mov [dbg_error+9], 'f' - mov [dbg_error+10], 'a' - mov [dbg_error+11], 'u' - mov [dbg_error+12], 'l' - mov [dbg_error+13], 't' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'O' + mov [dbg_error+1], 'v' + mov [dbg_error+2], 'e' + mov [dbg_error+3], 'r' + mov [dbg_error+4], 'f' + mov [dbg_error+5], 'l' + mov [dbg_error+6], 'o' + mov [dbg_error+7], 'w' + mov [dbg_error+8], ' ' + mov [dbg_error+9], 'f' + mov [dbg_error+10], 'a' + mov [dbg_error+11], 'u' + mov [dbg_error+12], 'l' + mov [dbg_error+13], 't' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 05 ; ;-------------------------------; isr05: - mov [dbg_keypress], 0 - mov [dbg_error], 'B' - mov [dbg_error+1], 'o' - mov [dbg_error+2], 'u' - mov [dbg_error+3], 'n' - mov [dbg_error+4], 'd' - mov [dbg_error+5], 's' - mov [dbg_error+6], ' ' - mov [dbg_error+7], 'c' - mov [dbg_error+8], 'h' - mov [dbg_error+9], 'e' - mov [dbg_error+10], 'c' - mov [dbg_error+11], 'k' - mov [dbg_error+12], ' ' - mov [dbg_error+13], ' ' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'B' + mov [dbg_error+1], 'o' + mov [dbg_error+2], 'u' + mov [dbg_error+3], 'n' + mov [dbg_error+4], 'd' + mov [dbg_error+5], 's' + mov [dbg_error+6], ' ' + mov [dbg_error+7], 'c' + mov [dbg_error+8], 'h' + mov [dbg_error+9], 'e' + mov [dbg_error+10], 'c' + mov [dbg_error+11], 'k' + mov [dbg_error+12], ' ' + mov [dbg_error+13], ' ' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 06 ; ;-------------------------------; isr06: - mov [dbg_keypress], 0 - mov [dbg_error], 'I' - mov [dbg_error+1], 'n' - mov [dbg_error+2], 'v' - mov [dbg_error+3], 'a' - mov [dbg_error+4], 'l' - mov [dbg_error+5], 'i' - mov [dbg_error+6], 'd' - mov [dbg_error+7], ' ' - mov [dbg_error+8], 'o' - mov [dbg_error+9], 'p' - mov [dbg_error+10], 'c' - mov [dbg_error+11], 'o' - mov [dbg_error+12], 'd' - mov [dbg_error+13], 'e' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'I' + mov [dbg_error+1], 'n' + mov [dbg_error+2], 'v' + mov [dbg_error+3], 'a' + mov [dbg_error+4], 'l' + mov [dbg_error+5], 'i' + mov [dbg_error+6], 'd' + mov [dbg_error+7], ' ' + mov [dbg_error+8], 'o' + mov [dbg_error+9], 'p' + mov [dbg_error+10], 'c' + mov [dbg_error+11], 'o' + mov [dbg_error+12], 'd' + mov [dbg_error+13], 'e' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 07 ; ;-------------------------------; isr07: - mov [dbg_keypress], 0 - mov [dbg_error], 'N' - mov [dbg_error+1], 'o' - mov [dbg_error+2], ' ' - mov [dbg_error+3], 'c' - mov [dbg_error+4], 'o' - mov [dbg_error+5], 'p' - mov [dbg_error+6], '.' - mov [dbg_error+7], ' ' - mov [dbg_error+8], 'a' - mov [dbg_error+9], 'v' - mov [dbg_error+10], 'a' - mov [dbg_error+11], 'i' - mov [dbg_error+12], 'l' - mov [dbg_error+13], '.' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'N' + mov [dbg_error+1], 'o' + mov [dbg_error+2], ' ' + mov [dbg_error+3], 'c' + mov [dbg_error+4], 'o' + mov [dbg_error+5], 'p' + mov [dbg_error+6], '.' + mov [dbg_error+7], ' ' + mov [dbg_error+8], 'a' + mov [dbg_error+9], 'v' + mov [dbg_error+10], 'a' + mov [dbg_error+11], 'i' + mov [dbg_error+12], 'l' + mov [dbg_error+13], '.' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 08 ; ;-------------------------------; isr08: - mov [dbg_keypress], 0 - mov [dbg_error], 'D' - mov [dbg_error+1], 'o' - mov [dbg_error+2], 'u' - mov [dbg_error+3], 'b' - mov [dbg_error+4], 'l' - mov [dbg_error+5], 'e' - mov [dbg_error+6], ' ' - mov [dbg_error+7], 'f' - mov [dbg_error+8], 'a' - mov [dbg_error+9], 'u' - mov [dbg_error+10], 'l' - mov [dbg_error+11], 't' - mov [dbg_error+12], ' ' - mov [dbg_error+13], ' ' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'D' + mov [dbg_error+1], 'o' + mov [dbg_error+2], 'u' + mov [dbg_error+3], 'b' + mov [dbg_error+4], 'l' + mov [dbg_error+5], 'e' + mov [dbg_error+6], ' ' + mov [dbg_error+7], 'f' + mov [dbg_error+8], 'a' + mov [dbg_error+9], 'u' + mov [dbg_error+10], 'l' + mov [dbg_error+11], 't' + mov [dbg_error+12], ' ' + mov [dbg_error+13], ' ' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 09 ; ;-------------------------------; isr09: - mov [dbg_keypress], 0 - mov [dbg_error], 'C' - mov [dbg_error+1], 'o' - mov [dbg_error+2], 'p' - mov [dbg_error+3], 'r' - mov [dbg_error+4], 'o' - mov [dbg_error+5], '.' - mov [dbg_error+6], ' ' - mov [dbg_error+7], 's' - mov [dbg_error+8], 'e' - mov [dbg_error+9], 'g' - mov [dbg_error+10], 'm' - mov [dbg_error+11], 'e' - mov [dbg_error+12], 'n' - mov [dbg_error+13], 't' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'C' + mov [dbg_error+1], 'o' + mov [dbg_error+2], 'p' + mov [dbg_error+3], 'r' + mov [dbg_error+4], 'o' + mov [dbg_error+5], '.' + mov [dbg_error+6], ' ' + mov [dbg_error+7], 's' + mov [dbg_error+8], 'e' + mov [dbg_error+9], 'g' + mov [dbg_error+10], 'm' + mov [dbg_error+11], 'e' + mov [dbg_error+12], 'n' + mov [dbg_error+13], 't' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 10 ; ;-------------------------------; isr0A: - mov [dbg_keypress], 0 - mov [dbg_error], 'I' - mov [dbg_error+1], 'n' - mov [dbg_error+2], 'v' - mov [dbg_error+3], 'a' - mov [dbg_error+4], 'l' - mov [dbg_error+5], 'i' - mov [dbg_error+6], 'd' - mov [dbg_error+7], ' ' - mov [dbg_error+8], 'T' - mov [dbg_error+9], 'S' - mov [dbg_error+10], 'S' - mov [dbg_error+11], '!' - mov [dbg_error+12], ' ' - mov [dbg_error+13], ' ' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'I' + mov [dbg_error+1], 'n' + mov [dbg_error+2], 'v' + mov [dbg_error+3], 'a' + mov [dbg_error+4], 'l' + mov [dbg_error+5], 'i' + mov [dbg_error+6], 'd' + mov [dbg_error+7], ' ' + mov [dbg_error+8], 'T' + mov [dbg_error+9], 'S' + mov [dbg_error+10], 'S' + mov [dbg_error+11], '!' + mov [dbg_error+12], ' ' + mov [dbg_error+13], ' ' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 11 ; ;-------------------------------; isr0B: - mov [dbg_keypress], 0 - mov [dbg_error], 'N' - mov [dbg_error+1], 'o' - mov [dbg_error+2], ' ' - mov [dbg_error+3], 's' - mov [dbg_error+4], 'e' - mov [dbg_error+5], 'g' - mov [dbg_error+6], 'm' - mov [dbg_error+7], 'e' - mov [dbg_error+8], 'n' - mov [dbg_error+9], 't' - mov [dbg_error+10], '!' - mov [dbg_error+11], ' ' - mov [dbg_error+12], ' ' - mov [dbg_error+13], ' ' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'N' + mov [dbg_error+1], 'o' + mov [dbg_error+2], ' ' + mov [dbg_error+3], 's' + mov [dbg_error+4], 'e' + mov [dbg_error+5], 'g' + mov [dbg_error+6], 'm' + mov [dbg_error+7], 'e' + mov [dbg_error+8], 'n' + mov [dbg_error+9], 't' + mov [dbg_error+10], '!' + mov [dbg_error+11], ' ' + mov [dbg_error+12], ' ' + mov [dbg_error+13], ' ' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 12 ; ;-------------------------------; isr0C: - mov [dbg_keypress], 0 - mov [dbg_error], 'S' - mov [dbg_error+1], 't' - mov [dbg_error+2], 'a' - mov [dbg_error+3], 'c' - mov [dbg_error+4], 'k' - mov [dbg_error+5], ' ' - mov [dbg_error+6], 'f' - mov [dbg_error+7], 'a' - mov [dbg_error+8], 'u' - mov [dbg_error+9], 'l' - mov [dbg_error+10], 't' - mov [dbg_error+11], '!' - mov [dbg_error+12], ' ' - mov [dbg_error+13], ' ' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'S' + mov [dbg_error+1], 't' + mov [dbg_error+2], 'a' + mov [dbg_error+3], 'c' + mov [dbg_error+4], 'k' + mov [dbg_error+5], ' ' + mov [dbg_error+6], 'f' + mov [dbg_error+7], 'a' + mov [dbg_error+8], 'u' + mov [dbg_error+9], 'l' + mov [dbg_error+10], 't' + mov [dbg_error+11], '!' + mov [dbg_error+12], ' ' + mov [dbg_error+13], ' ' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 13 ; ;-------------------------------; isr0D: - mov [dbg_keypress], 0 - mov [dbg_error], 'T' - mov [dbg_error+1], 'r' - mov [dbg_error+2], 'i' - mov [dbg_error+3], 'p' - mov [dbg_error+4], 'l' - mov [dbg_error+5], 'e' - mov [dbg_error+6], ' ' - mov [dbg_error+7], 'f' - mov [dbg_error+8], 'a' - mov [dbg_error+9], 'u' - mov [dbg_error+10], 'l' - mov [dbg_error+11], 't' - mov [dbg_error+12], '!' - mov [dbg_error+13], ' ' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'T' + mov [dbg_error+1], 'r' + mov [dbg_error+2], 'i' + mov [dbg_error+3], 'p' + mov [dbg_error+4], 'l' + mov [dbg_error+5], 'e' + mov [dbg_error+6], ' ' + mov [dbg_error+7], 'f' + mov [dbg_error+8], 'a' + mov [dbg_error+9], 'u' + mov [dbg_error+10], 'l' + mov [dbg_error+11], 't' + mov [dbg_error+12], '!' + mov [dbg_error+13], ' ' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 14 ; ;-------------------------------; isr0E: - mov [dbg_keypress], 0 - mov [dbg_error], 'P' - mov [dbg_error+1], 'a' - mov [dbg_error+2], 'g' - mov [dbg_error+3], 'e' - mov [dbg_error+4], ' ' - mov [dbg_error+5], 'f' - mov [dbg_error+6], 'a' - mov [dbg_error+7], 'u' - mov [dbg_error+8], 'l' - mov [dbg_error+9], 't' - mov [dbg_error+10], '!' - mov [dbg_error+11], ' ' - mov [dbg_error+12], ' ' - mov [dbg_error+13], ' ' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'P' + mov [dbg_error+1], 'a' + mov [dbg_error+2], 'g' + mov [dbg_error+3], 'e' + mov [dbg_error+4], ' ' + mov [dbg_error+5], 'f' + mov [dbg_error+6], 'a' + mov [dbg_error+7], 'u' + mov [dbg_error+8], 'l' + mov [dbg_error+9], 't' + mov [dbg_error+10], '!' + mov [dbg_error+11], ' ' + mov [dbg_error+12], ' ' + mov [dbg_error+13], ' ' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 16 ; ;-------------------------------; isr10: - mov [dbg_keypress], 0 - mov [dbg_error], 'C' - mov [dbg_error+1], 'o' - mov [dbg_error+2], 'p' - mov [dbg_error+3], 'r' - mov [dbg_error+4], 'o' - mov [dbg_error+5], 'c' - mov [dbg_error+6], 'e' - mov [dbg_error+7], 's' - mov [dbg_error+8], 's' - mov [dbg_error+9], 'o' - mov [dbg_error+10], 'r' - mov [dbg_error+11], '!' - mov [dbg_error+12], ' ' - mov [dbg_error+13], ' ' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'C' + mov [dbg_error+1], 'o' + mov [dbg_error+2], 'p' + mov [dbg_error+3], 'r' + mov [dbg_error+4], 'o' + mov [dbg_error+5], 'c' + mov [dbg_error+6], 'e' + mov [dbg_error+7], 's' + mov [dbg_error+8], 's' + mov [dbg_error+9], 'o' + mov [dbg_error+10], 'r' + mov [dbg_error+11], '!' + mov [dbg_error+12], ' ' + mov [dbg_error+13], ' ' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 17 ; ;-------------------------------; isr11: - mov [dbg_keypress], 0 - mov [dbg_error], 'A' - mov [dbg_error+1], 'l' - mov [dbg_error+2], 'i' - mov [dbg_error+3], 'g' - mov [dbg_error+4], 'n' - mov [dbg_error+5], 'm' - mov [dbg_error+6], 'e' - mov [dbg_error+7], 'n' - mov [dbg_error+8], 't' - mov [dbg_error+9], ' ' - mov [dbg_error+10], 'c' - mov [dbg_error+11], 'h' - mov [dbg_error+12], 'k' - mov [dbg_error+13], '.' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'A' + mov [dbg_error+1], 'l' + mov [dbg_error+2], 'i' + mov [dbg_error+3], 'g' + mov [dbg_error+4], 'n' + mov [dbg_error+5], 'm' + mov [dbg_error+6], 'e' + mov [dbg_error+7], 'n' + mov [dbg_error+8], 't' + mov [dbg_error+9], ' ' + mov [dbg_error+10], 'c' + mov [dbg_error+11], 'h' + mov [dbg_error+12], 'k' + mov [dbg_error+13], '.' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 18 ; ;-------------------------------; isr12: - mov [dbg_keypress], 0 - mov [dbg_error], 'M' - mov [dbg_error+1], 'a' - mov [dbg_error+2], 'c' - mov [dbg_error+3], 'h' - mov [dbg_error+4], 'i' - mov [dbg_error+5], 'n' - mov [dbg_error+6], 'e' - mov [dbg_error+7], ' ' - mov [dbg_error+8], 'c' - mov [dbg_error+9], 'h' - mov [dbg_error+10], 'e' - mov [dbg_error+11], 'c' - mov [dbg_error+12], 'k' - mov [dbg_error+13], '!' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'M' + mov [dbg_error+1], 'a' + mov [dbg_error+2], 'c' + mov [dbg_error+3], 'h' + mov [dbg_error+4], 'i' + mov [dbg_error+5], 'n' + mov [dbg_error+6], 'e' + mov [dbg_error+7], ' ' + mov [dbg_error+8], 'c' + mov [dbg_error+9], 'h' + mov [dbg_error+10], 'e' + mov [dbg_error+11], 'c' + mov [dbg_error+12], 'k' + mov [dbg_error+13], '!' + mov [dbg_error+14], 0 + call dump_regs ;-------------------------------; ; Exception Interrupt no. 19 ; ;-------------------------------; isr13: - mov [dbg_keypress], 0 - mov [dbg_error], 'S' - mov [dbg_error+1], 'I' - mov [dbg_error+2], 'M' - mov [dbg_error+3], 'D' - mov [dbg_error+4], ' ' - mov [dbg_error+5], 'f' - mov [dbg_error+6], 'l' - mov [dbg_error+7], 'o' - mov [dbg_error+8], 'a' - mov [dbg_error+9], 't' - mov [dbg_error+10], '.' - mov [dbg_error+11], '-' - mov [dbg_error+12], 'p' - mov [dbg_error+13], '.' - mov [dbg_error+14], 0 - call dump_regs + mov [dbg_keypress], 0 + mov [dbg_error], 'S' + mov [dbg_error+1], 'I' + mov [dbg_error+2], 'M' + mov [dbg_error+3], 'D' + mov [dbg_error+4], ' ' + mov [dbg_error+5], 'f' + mov [dbg_error+6], 'l' + mov [dbg_error+7], 'o' + mov [dbg_error+8], 'a' + mov [dbg_error+9], 't' + mov [dbg_error+10], '.' + mov [dbg_error+11], '-' + mov [dbg_error+12], 'p' + mov [dbg_error+13], '.' + mov [dbg_error+14], 0 + call dump_regs @@ -473,57 +473,57 @@ isr13: ; ISR 20. The timer. ; ;--------------------------; isr20: - pusha - push gs - push fs - push ds - push es + pusha + push gs + push fs + push ds + push es - call timer ; in timer.inc + call timer ; in timer.inc - pop es - pop ds - pop fs - pop gs - popa - iret + pop es + pop ds + pop fs + pop gs + popa + iret ;--------------------------; ; Keyboard IRQ. ISR 21. ; ;--------------------------; isr21: - pusha - push gs - push fs - push ds - push es - push esi + pusha + push gs + push fs + push ds + push es + push esi - call keyboard_isr ; Located in keyboard.inc + call keyboard_isr ; Located in keyboard.inc - pop esi - pop es - pop ds - pop fs - pop gs - popa - iret + pop esi + pop es + pop ds + pop fs + pop gs + popa + iret ;---------------------; ; Interrupt no. 50 ; ;---------------------; isr32: - push gs - push fs - push ds - push es - - call interrupt_32 ; Located in sys_ints.inc - - pop es - pop ds - pop fs - pop gs - iret \ No newline at end of file + push gs + push fs + push ds + push es + + call interrupt_32 ; Located in sys_ints.inc + + pop es + pop ds + pop fs + pop gs + iret \ No newline at end of file diff --git a/kernel/kbd/keyboard.asm b/kernel/kbd/keyboard.asm index 282bbe2..c2b9413 100755 --- a/kernel/kbd/keyboard.asm +++ b/kernel/kbd/keyboard.asm @@ -11,199 +11,199 @@ ; Variabels ; ;--------------; - ;--------------------------------------------------------------------------------; - ; _______________________ Keyboard buffer system ; - ; | | | | | | | | | | | | ; - ; +---------------------+ ; - ; | +----------> kbd_head, here is where we put new scan-codes. ; - ; +--------------------> kbd_tail, where we last read a key. this means ; - ; that we have 4 new scan-codes to read before we catch up. ; - ;--------------------------------------------------------------------------------; - kbd_buffer db ' A 64-byte ' - db ' keyboard buffer ' - kbd_head db 1 ; head must be +1 from tail - kbd_tail db 0 - - ;-------------------------------------------------------------------------; - ; _________________ Flag byte: ; - ; |1|1|0|0|0|1|1|1| ; - ; +---------------+ 1 = True 0 = False ; - ; | | | | | | | +---> shift key ; - ; | | | | | | +-----> ctrl key ; - ; | | | | | +-------> alt key ; - ; | | | | +---------> reserved bit ; - ; | | | +-----------> reserved bit ; - ; | | +-------------> reserved bit ; - ; | +---------------> ctrl + alt + del ; - ; +-----------------> key released ; - ;-------------------------------------------------------------------------; - kbd_flags db 0 ; flag byte - - ;-------------------------------------------------------------------------; - ; _________________ LED status byte: ; - ; |0|0|0|0|0|1|1|1| ; - ; +---------------+ 1 = True 0 = False ; - ; | | +---> scroll lock ; - ; | +-----> num lock ; - ; +-------> caps lock ; - ;-------------------------------------------------------------------------; - kbd_status db 0 ; LED statusbyte + ;--------------------------------------------------------------------------------; + ; _______________________ Keyboard buffer system ; + ; | | | | | | | | | | | | ; + ; +---------------------+ ; + ; | +----------> kbd_head, here is where we put new scan-codes. ; + ; +--------------------> kbd_tail, where we last read a key. this means ; + ; that we have 4 new scan-codes to read before we catch up. ; + ;--------------------------------------------------------------------------------; + kbd_buffer db ' A 64-byte ' + db ' keyboard buffer ' + kbd_head db 1 ; head must be +1 from tail + kbd_tail db 0 + + ;-------------------------------------------------------------------------; + ; _________________ Flag byte: ; + ; |1|1|0|0|0|1|1|1| ; + ; +---------------+ 1 = True 0 = False ; + ; | | | | | | | +---> shift key ; + ; | | | | | | +-----> ctrl key ; + ; | | | | | +-------> alt key ; + ; | | | | +---------> reserved bit ; + ; | | | +-----------> reserved bit ; + ; | | +-------------> reserved bit ; + ; | +---------------> ctrl + alt + del ; + ; +-----------------> key released ; + ;-------------------------------------------------------------------------; + kbd_flags db 0 ; flag byte + + ;-------------------------------------------------------------------------; + ; _________________ LED status byte: ; + ; |0|0|0|0|0|1|1|1| ; + ; +---------------+ 1 = True 0 = False ; + ; | | +---> scroll lock ; + ; | +-----> num lock ; + ; +-------> caps lock ; + ;-------------------------------------------------------------------------; + kbd_status db 0 ; LED statusbyte ;----------------------; ; Keyboard IRQ ; ;----------------------; keyboard_isr: - push eax - - ;-------------------------; - ; get the scancode ; - ;-------------------------; - xor eax, eax - in al, 0x60 - - ;------------------------------; - ; check if key was released ; - ;------------------------------; - test al, 0x80 - jz .key_down - and byte [kbd_flags], 01111111b ; key up.. - - cmp al, 42+128 ; left shift up? - je .shift_up - cmp al, 54+128 ; right shift up? - je .shift_up - - cmp al, 29+128 ; ctrl up? - je .ctrl_up - - cmp al, 83+128 ; del up? - je .del_up - - cmp al, 56+128 ; alt up? - je .alt_up - jmp .end - - ;--------------------; - ; it was released ; - ;--------------------; - .shift_up: - and byte [kbd_flags], 11111110b - jmp .end - - .del_up: - jmp .CAD_off - - .ctrl_up: - and byte [kbd_flags], 11111101b ; ctrl off. - jmp .CAD_off - - .alt_up: - and byte [kbd_flags], 11111011b ; alt off. - jmp .CAD_off - - .CAD_off: - test byte [kbd_flags], 01000000b - jz .CAD_is_off - and byte [kbd_flags], 10111111b ; ctrl+alt+del bit off. - .CAD_is_off: - jmp .end - - ;----------------------------------------------; - ; a key was pressed, check for special keys ; - ;----------------------------------------------; - .key_down: - or byte [kbd_flags], 10000000b - - .shift: - cmp al, 42 - jnz .check_rshift - or byte [kbd_flags], 00000001b - jmp .end - - .check_rshift: - cmp al, 54 - jnz .check_ctrl - or byte [kbd_flags], 00000001b - jmp .end - - .check_ctrl: - cmp al, 29 - jnz .check_alt - or byte [kbd_flags], 00000010b - jmp .end - - .check_alt: - cmp al, 56 - jnz .ctrl_alt_del - or byte [kbd_flags], 00000100b - jmp .end - - .ctrl_alt_del: - test byte [kbd_flags], 00000110b ; check for ctrl+alt - jz .check_caps - cmp al, 83 ; check for delete - jne .check_caps - or byte [kbd_flags], 01000000b ; ctrl+alt+del bit on. - - ;-------------------------------------; - ; toggle caps, num and scroll lock ; - ;-------------------------------------; - .check_caps: - cmp al, 58 - jnz .check_num - xor byte [kbd_status], 4 - call update_leds - jmp .end - - .check_num: - cmp al, 69 - jnz .check_scroll - xor byte [kbd_status], 2 - call update_leds - jmp .end - - .check_scroll: - cmp al, 70 - jnz .end - xor byte [kbd_status], 1 - call update_leds - jmp .end - - ;-----------------------------------; - ; put the scancode in the buffer ; - ;-----------------------------------; - .end: - push eax - mov edi, kbd_buffer - xor eax, eax - mov al, [kbd_head] - add edi, eax - pop eax - stosb - cmp [kbd_head], 63 ; if we reach the buffer - jne .cont1 ; end, go back to 0. - cmp [kbd_tail], 0 - je .error - mov [kbd_head], 0 - jmp .quit - .cont1: - mov ah, [kbd_tail] - mov al, [kbd_head] - add al, 1 - cmp ah, al - je .error - inc [kbd_head] - jmp .quit - .error: - call beep ; pc_speaker.inc - mov [kbd_head], 1 ; fix it as good - mov [kbd_tail], 0 ; as possible.. :S - .quit: - mov al, 0x20 - out 0x20, al - pop eax - ret + push eax + + ;-------------------------; + ; get the scancode ; + ;-------------------------; + xor eax, eax + in al, 0x60 + + ;------------------------------; + ; check if key was released ; + ;------------------------------; + test al, 0x80 + jz .key_down + and byte [kbd_flags], 01111111b ; key up.. + + cmp al, 42+128 ; left shift up? + je .shift_up + cmp al, 54+128 ; right shift up? + je .shift_up + + cmp al, 29+128 ; ctrl up? + je .ctrl_up + + cmp al, 83+128 ; del up? + je .del_up + + cmp al, 56+128 ; alt up? + je .alt_up + jmp .end + + ;--------------------; + ; it was released ; + ;--------------------; + .shift_up: + and byte [kbd_flags], 11111110b + jmp .end + + .del_up: + jmp .CAD_off + + .ctrl_up: + and byte [kbd_flags], 11111101b ; ctrl off. + jmp .CAD_off + + .alt_up: + and byte [kbd_flags], 11111011b ; alt off. + jmp .CAD_off + + .CAD_off: + test byte [kbd_flags], 01000000b + jz .CAD_is_off + and byte [kbd_flags], 10111111b ; ctrl+alt+del bit off. + .CAD_is_off: + jmp .end + + ;----------------------------------------------; + ; a key was pressed, check for special keys ; + ;----------------------------------------------; + .key_down: + or byte [kbd_flags], 10000000b + + .shift: + cmp al, 42 + jnz .check_rshift + or byte [kbd_flags], 00000001b + jmp .end + + .check_rshift: + cmp al, 54 + jnz .check_ctrl + or byte [kbd_flags], 00000001b + jmp .end + + .check_ctrl: + cmp al, 29 + jnz .check_alt + or byte [kbd_flags], 00000010b + jmp .end + + .check_alt: + cmp al, 56 + jnz .ctrl_alt_del + or byte [kbd_flags], 00000100b + jmp .end + + .ctrl_alt_del: + test byte [kbd_flags], 00000110b ; check for ctrl+alt + jz .check_caps + cmp al, 83 ; check for delete + jne .check_caps + or byte [kbd_flags], 01000000b ; ctrl+alt+del bit on. + + ;-------------------------------------; + ; toggle caps, num and scroll lock ; + ;-------------------------------------; + .check_caps: + cmp al, 58 + jnz .check_num + xor byte [kbd_status], 4 + call update_leds + jmp .end + + .check_num: + cmp al, 69 + jnz .check_scroll + xor byte [kbd_status], 2 + call update_leds + jmp .end + + .check_scroll: + cmp al, 70 + jnz .end + xor byte [kbd_status], 1 + call update_leds + jmp .end + + ;-----------------------------------; + ; put the scancode in the buffer ; + ;-----------------------------------; + .end: + push eax + mov edi, kbd_buffer + xor eax, eax + mov al, [kbd_head] + add edi, eax + pop eax + stosb + cmp [kbd_head], 63 ; if we reach the buffer + jne .cont1 ; end, go back to 0. + cmp [kbd_tail], 0 + je .error + mov [kbd_head], 0 + jmp .quit + .cont1: + mov ah, [kbd_tail] + mov al, [kbd_head] + add al, 1 + cmp ah, al + je .error + inc [kbd_head] + jmp .quit + .error: + call beep ; pc_speaker.inc + mov [kbd_head], 1 ; fix it as good + mov [kbd_tail], 0 ; as possible.. :S + .quit: + mov al, 0x20 + out 0x20, al + pop eax + ret @@ -211,18 +211,18 @@ keyboard_isr: ; Update the keyboard LED's ; ;------------------------------; update_leds: - push ax + push ax - call kbd_wait - mov al, 0xED - out 0x60, al - call kbd_wait - mov al, [kbd_status] - out 0x60, al - call kbd_wait + call kbd_wait + mov al, 0xED + out 0x60, al + call kbd_wait + mov al, [kbd_status] + out 0x60, al + call kbd_wait - pop ax - ret + pop ax + ret @@ -230,17 +230,17 @@ update_leds: ; keyboard wait ; ;------------------; kbd_wait: - jmp $+2 - in al, 0x64 - test al, 1 - jz .ok - jmp $+2 - in al, 0x60 - jmp kbd_wait - .ok: - test al, 2 - jnz kbd_wait - ret + jmp $+2 + in al, 0x64 + test al, 1 + jz .ok + jmp $+2 + in al, 0x60 + jmp kbd_wait + .ok: + test al, 2 + jnz kbd_wait + ret @@ -250,131 +250,131 @@ kbd_wait: ; bh = flag-byte, bl = led-byte ; ;-------------------------------------------------------; getc: - push esi - - .no_new: - mov al, [kbd_head] - mov ah, [kbd_tail] - cmp ah, 63 - jne .check2 - cmp al, 0 - je .no_new - mov [kbd_tail], 0 - jmp .done_check - .check2: - mov bl, ah - inc bl - cmp bl, al - je .no_new - inc [kbd_tail] - .done_check: - - mov esi, kbd_buffer - movzx eax, [kbd_tail] - add esi, eax - mov ah, byte [esi] ; ah = scancode - movzx esi, byte [esi] ; esi = scancode - - ;------------------; - ; some checks.. ; - ;------------------; - cmp ah, 0xFA - je .no_new - cmp ah, 0xE0 - je .no_new - cmp ah, 0xE1 - je .no_new - test ah, 0x80 - jnz .no_new - - ;--------------------------------; - ; check for caps, shift & alt ; - ;--------------------------------; - test [kbd_status], 00000100b - jnz .caps - test [kbd_flags], 00000001b - jnz .shift - - ;------------------; - ; normal keymap ; - ;------------------; - mov al, [esi+keymap] ; scancode + keymap = ascii - jmp .end - - ;--------------------; - ; capslock keymap ; - ;--------------------; - .caps: - test [kbd_flags], 00000001b - jnz .caps_and_shift - - mov al, [esi+keymap_caps] - jmp .end - - ;--------------------------; - ; caps and shift keymap ; - ;--------------------------; - .caps_and_shift: - mov al, [esi+keymap_caps_shift] - jmp .end - - ;-----------------; - ; shift keymap ; - ;-----------------; - .shift: - mov al, [esi+keymap_shift] - jmp .end - - ;---------------------------; - ; set registers and exit ; - ;---------------------------; - .end: - mov bl, [kbd_status] - mov bh, [kbd_flags] - - pop esi - ret + push esi + + .no_new: + mov al, [kbd_head] + mov ah, [kbd_tail] + cmp ah, 63 + jne .check2 + cmp al, 0 + je .no_new + mov [kbd_tail], 0 + jmp .done_check + .check2: + mov bl, ah + inc bl + cmp bl, al + je .no_new + inc [kbd_tail] + .done_check: + + mov esi, kbd_buffer + movzx eax, [kbd_tail] + add esi, eax + mov ah, byte [esi] ; ah = scancode + movzx esi, byte [esi] ; esi = scancode + + ;------------------; + ; some checks.. ; + ;------------------; + cmp ah, 0xFA + je .no_new + cmp ah, 0xE0 + je .no_new + cmp ah, 0xE1 + je .no_new + test ah, 0x80 + jnz .no_new + + ;--------------------------------; + ; check for caps, shift & alt ; + ;--------------------------------; + test [kbd_status], 00000100b + jnz .caps + test [kbd_flags], 00000001b + jnz .shift + + ;------------------; + ; normal keymap ; + ;------------------; + mov al, [esi+keymap] ; scancode + keymap = ascii + jmp .end + + ;--------------------; + ; capslock keymap ; + ;--------------------; + .caps: + test [kbd_flags], 00000001b + jnz .caps_and_shift + + mov al, [esi+keymap_caps] + jmp .end + + ;--------------------------; + ; caps and shift keymap ; + ;--------------------------; + .caps_and_shift: + mov al, [esi+keymap_caps_shift] + jmp .end + + ;-----------------; + ; shift keymap ; + ;-----------------; + .shift: + mov al, [esi+keymap_shift] + jmp .end + + ;---------------------------; + ; set registers and exit ; + ;---------------------------; + .end: + mov bl, [kbd_status] + mov bh, [kbd_flags] + + pop esi + ret ;------------------------------; ; "press any key to..." ; ;------------------------------; wait_key: - push eax - push ebx - push esi - - .no_new: - mov al, [kbd_head] - mov ah, [kbd_tail] - cmp ah, 63 - jne .check2 - cmp al, 0 - je .no_new - mov [kbd_tail], 0 - jmp .done_check - .check2: - mov bl, ah - inc bl - cmp bl, al - je .no_new - inc [kbd_tail] - .done_check: - - mov esi, kbd_buffer - movzx eax, [kbd_tail] - add esi, eax - mov ah, byte [esi] ; ah = scancode - cmp ah, 0xFA ; check for some stuff.. - je .no_new - cmp ah, 0xE0 - je .no_new - cmp ah, 0xE1 - je .no_new - test ah, 0x80 - jnz .no_new - - pop esi - pop ebx - pop eax - ret \ No newline at end of file + push eax + push ebx + push esi + + .no_new: + mov al, [kbd_head] + mov ah, [kbd_tail] + cmp ah, 63 + jne .check2 + cmp al, 0 + je .no_new + mov [kbd_tail], 0 + jmp .done_check + .check2: + mov bl, ah + inc bl + cmp bl, al + je .no_new + inc [kbd_tail] + .done_check: + + mov esi, kbd_buffer + movzx eax, [kbd_tail] + add esi, eax + mov ah, byte [esi] ; ah = scancode + cmp ah, 0xFA ; check for some stuff.. + je .no_new + cmp ah, 0xE0 + je .no_new + cmp ah, 0xE1 + je .no_new + test ah, 0x80 + jnz .no_new + + pop esi + pop ebx + pop eax + ret \ No newline at end of file diff --git a/kernel/kbd/keymap.asm b/kernel/kbd/keymap.asm index ccd7b4f..7f47c3d 100755 --- a/kernel/kbd/keymap.asm +++ b/kernel/kbd/keymap.asm @@ -7,79 +7,79 @@ ;----------------------------------------------------------; keymap: - db 0 - db '1234567890-=', bspace - db tab,'qwertyuiop[]',enter_key - db ctrl_key,'asdfghjkl;',39,'`',lshift - db '\','zxcvbnm,./',rshift,prnscr,alt_key,' ' - db caps,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,numlock - db scroll,home,arrowup,pgup,num_sub,arrowleft,center5,arrowright - db num_plus,_end,arrowdown,pgdn,_ins,del + db 0 + db '1234567890-=', bspace + db tab,'qwertyuiop[]',enter_key + db ctrl_key,'asdfghjkl;',39,'`',lshift + db '\','zxcvbnm,./',rshift,prnscr,alt_key,' ' + db caps,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,numlock + db scroll,home,arrowup,pgup,num_sub,arrowleft,center5,arrowright + db num_plus,_end,arrowdown,pgdn,_ins,del keymap_caps: - db 0 - db '1234567890-=', bspace - db tab,'QWERTYUIOP[]',enter_key - db ctrl_key,'ASDFGHJKL;',39,'`',lshift - db '\','ZXCVBNM,./',rshift,prnscr,alt_key,' ' - db caps,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,numlock - db scroll,home,arrowup,pgup,num_sub,arrowleft,center5,arrowright - db num_plus,_end,arrowdown,pgdn,_ins,del + db 0 + db '1234567890-=', bspace + db tab,'QWERTYUIOP[]',enter_key + db ctrl_key,'ASDFGHJKL;',39,'`',lshift + db '\','ZXCVBNM,./',rshift,prnscr,alt_key,' ' + db caps,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,numlock + db scroll,home,arrowup,pgup,num_sub,arrowleft,center5,arrowright + db num_plus,_end,arrowdown,pgdn,_ins,del keymap_caps_shift: - db 0 - db '!@#$%^&*()_+', bspace - db tab,'qwertyuiop{}',enter_key - db ctrl_key,'asdfghjkl:"~',lshift - db '|zxcvbnm<>?',rshift,prnscr,alt_key,' ' - db caps,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,numlock - db scroll,home,arrowup,pgup,num_sub,arrowleft,center5,arrowright - db num_plus,_end,arrowdown,pgdn,_ins,del + db 0 + db '!@#$%^&*()_+', bspace + db tab,'qwertyuiop{}',enter_key + db ctrl_key,'asdfghjkl:"~',lshift + db '|zxcvbnm<>?',rshift,prnscr,alt_key,' ' + db caps,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,numlock + db scroll,home,arrowup,pgup,num_sub,arrowleft,center5,arrowright + db num_plus,_end,arrowdown,pgdn,_ins,del keymap_shift: - db 0 - db '!@#$%^&*()_+', bspace - db tab,'QWERTYUIOP{}',enter_key - db ctrl_key,'ASDFGHJKL:"~',lshift - db '|ZXCVBNM<>?',rshift,prnscr,alt_key,' ' - db caps,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,numlock - db scroll,home,arrowup,pgup,num_sub,arrowleft,center5,arrowright - db num_plus,_end,arrowdown,pgdn,_ins,del + db 0 + db '!@#$%^&*()_+', bspace + db tab,'QWERTYUIOP{}',enter_key + db ctrl_key,'ASDFGHJKL:"~',lshift + db '|ZXCVBNM<>?',rshift,prnscr,alt_key,' ' + db caps,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,numlock + db scroll,home,arrowup,pgup,num_sub,arrowleft,center5,arrowright + db num_plus,_end,arrowdown,pgdn,_ins,del -enter_key = 0 -bspace = 0 -tab = 0 -ctrl_key = 0 -lshift = 0 -rshift = 0 -prnscr = 0 -alt_key = 0 -caps = 0 -f1 = 0 -f2 = 0 -f3 = 0 -f4 = 0 -f5 = 0 -f6 = 0 -f7 = 0 -f8 = 0 -f9 = 0 -f10 = 0 -f11 = 0 -f12 = 0 -numlock = 0 -scroll = 0 -home = 0 -arrowup = 0 -pgup = 0 -num_sub = 0 -arrowleft = 0 -center5 = 0 -arrowright = 0 -num_plus = 0 -_end = 0 -arrowdown = 0 -pgdn = 0 -_ins = 0 -del = 0 \ No newline at end of file +enter_key = 0 +bspace = 0 +tab = 0 +ctrl_key = 0 +lshift = 0 +rshift = 0 +prnscr = 0 +alt_key = 0 +caps = 0 +f1 = 0 +f2 = 0 +f3 = 0 +f4 = 0 +f5 = 0 +f6 = 0 +f7 = 0 +f8 = 0 +f9 = 0 +f10 = 0 +f11 = 0 +f12 = 0 +numlock = 0 +scroll = 0 +home = 0 +arrowup = 0 +pgup = 0 +num_sub = 0 +arrowleft = 0 +center5 = 0 +arrowright = 0 +num_plus = 0 +_end = 0 +arrowdown = 0 +pgdn = 0 +_ins = 0 +del = 0 \ No newline at end of file diff --git a/kernel/kernel.sys b/kernel/kernel.sys index eaa01f50c5327cb0da08fcded5e6975e25089bcc..170d21db2294776f7b93ddbb9df99d295b4a6415 100755 GIT binary patch delta 86 zcmeB}z}PW?af7u8qv_;&5v9#>B1?sNO%-$%T!VuAgRB%7c1;%4P~2>&!6c_Dkk)AD n;ZmZxIRVIUb}3QV+yG>Rxs-@+o&aP7xs>p2-mp2sZ380!aUL8i delta 84 zcmeB}z}PW?af7wUt-Hm~0t;kJPh09pVW^Z)<= diff --git a/kernel/shell/clock.asm b/kernel/shell/clock.asm index ba211ac..53685d3 100755 --- a/kernel/shell/clock.asm +++ b/kernel/shell/clock.asm @@ -9,8 +9,8 @@ ;------------------; ; variables ; ;------------------; - msg_time db 13,10,' Time: ',0 - msg_date db 13,10,' Date: ',0 + msg_time db 13,10,' Time: ',0 + msg_date db 13,10,' Date: ',0 ;------------------------------------------------------; @@ -18,62 +18,62 @@ ; prompt. swedish i.e. normal :) format ; ;------------------------------------------------------; print_date: - push eax - push ebx - push esi - - mov esi, msg_date - mov bl, 0x07 - call print ; text.inc - call get_cmos_data ; cmos.inc - - mov al, [century] ; cmos.inc - call BCD2ascii - push eax - mov bh, 0x07 - mov bl, al - call print_char - pop eax - mov bl, ah - call print_char - - mov al, [year] - call BCD2ascii - push eax - mov bl, al - call print_char - pop eax - mov bl, ah - call print_char - - mov bl, ':' - call print_char - - mov al, [month] - call BCD2ascii - push eax - mov bl, al - call print_char - pop eax - mov bl, ah - call print_char - - mov bl, ':' - call print_char - - mov al, [day] - call BCD2ascii - push eax - mov bl, al - call print_char - pop eax - mov bl, ah - call print_char - - pop esi - pop ebx - pop eax - ret + push eax + push ebx + push esi + + mov esi, msg_date + mov bl, 0x07 + call print ; text.inc + call get_cmos_data ; cmos.inc + + mov al, [century] ; cmos.inc + call BCD2ascii + push eax + mov bh, 0x07 + mov bl, al + call print_char + pop eax + mov bl, ah + call print_char + + mov al, [year] + call BCD2ascii + push eax + mov bl, al + call print_char + pop eax + mov bl, ah + call print_char + + mov bl, ':' + call print_char + + mov al, [month] + call BCD2ascii + push eax + mov bl, al + call print_char + pop eax + mov bl, ah + call print_char + + mov bl, ':' + call print_char + + mov al, [day] + call BCD2ascii + push eax + mov bl, al + call print_char + pop eax + mov bl, ah + call print_char + + pop esi + pop ebx + pop eax + ret ;------------------------------------------------------; @@ -81,49 +81,49 @@ print_date: ; prompt. ; ;------------------------------------------------------; print_time: - push eax - push ebx - push esi - - mov esi, msg_time - mov bl, 0x07 - call print ; text.inc - call get_cmos_data ; cmos.inc - mov al, [hour] ; cmos.inc - call BCD2ascii - push eax - mov bh, 0x07 - mov bl, al - call print_char - pop eax - mov bl, ah - call print_char - - mov bl, ':' - call print_char - - mov al, [minute] - call BCD2ascii - push eax - mov bl, al - call print_char - pop eax - mov bl, ah - call print_char - - mov bl, ':' - call print_char - - mov al, [second] - call BCD2ascii - push eax - mov bl, al - call print_char - pop eax - mov bl, ah - call print_char - - pop esi - pop ebx - pop eax - ret \ No newline at end of file + push eax + push ebx + push esi + + mov esi, msg_time + mov bl, 0x07 + call print ; text.inc + call get_cmos_data ; cmos.inc + mov al, [hour] ; cmos.inc + call BCD2ascii + push eax + mov bh, 0x07 + mov bl, al + call print_char + pop eax + mov bl, ah + call print_char + + mov bl, ':' + call print_char + + mov al, [minute] + call BCD2ascii + push eax + mov bl, al + call print_char + pop eax + mov bl, ah + call print_char + + mov bl, ':' + call print_char + + mov al, [second] + call BCD2ascii + push eax + mov bl, al + call print_char + pop eax + mov bl, ah + call print_char + + pop esi + pop ebx + pop eax + ret \ No newline at end of file diff --git a/kernel/shell/commands.asm b/kernel/shell/commands.asm index e681862..3fe7b4a 100755 --- a/kernel/shell/commands.asm +++ b/kernel/shell/commands.asm @@ -10,543 +10,545 @@ ; smaller ones or something. I'm just too lazy. Next version.. - commands: db 'ver', 0 - db 'help', 0 - db '?', 0 - db 'about', 0 - db 'cls', 0 - db 'clrscr', 0 - db 'reboot', 0 - db 'regdump', 0 - db 'time', 0 - db 'date', 0 - db 'delay', 0 - db 'vgatest', 0 - db 'memtest', 0 - db 'fddtest', 0 - db 0xFF ; end of command table - - - call_table: dd show_ver ; commands.inc - dd show_help ; commands.inc - dd show_help ; commands.inc - dd show_about ; commands.inc - dd clrscr ; commands.inc - dd clrscr ; comamnds.inc - dd reboot ; commands.inc - dd dump_regs ; debug.inc - dd print_time ; time_date.inc - dd print_date ; time_date.inc - dd delay_test ; commands.inc - dd vga_test ; commands.inc - dd mem_test ; commands.inc - dd fdd_test ; commands.inc - - - - ;--------------------------; - ; not a valid command ; - ;--------------------------; - not_a_valid_cmd db 13,10,'No such command or program exists.', 0 - - no_such_cmd: - push esi - push bx - - mov esi, not_a_valid_cmd - mov bl, 0x04 - call print - - pop bx - pop esi - ret - - - ;-------------------; - ; show version ; - ;-------------------; - bos_ver_str db 13,10,'BOS version 0.05 by Christoffer Bubach, 2003-2005.', 0 - show_ver: - push esi - push bx - - mov esi, bos_ver_str - mov bl, 0x07 - call print - - pop bx - pop esi - ret - - - ;--------------------; - ; show BOS help ; - ;--------------------; - bos_help_str db 13,10,13,10,' BOS 0.04 by Christoffer Bubach, 2003-2005.',13,10,\ - '--------------------------------------------',13,10,\ - 'Type a command and press ENTER to execute it.',13,10,13,10,\ - '"help" or "?" - Displays this text.',13,10,\ - '"ver" - Shows version information.',13,10,\ - '"about" - Shows information about the OS.',13,10,\ - '"cls" or "clrscr" - Clears the screen.',13,10,\ - '"memtest" - Shows memory info (and allocates/frees some, to test).',13,10,\ - '"vgatest" - Test some VGA stuff.',13,10,\ - '"fddtest" - Read and print bootsector from A:',13,10,\ - '"delay" - Tests the delay function for 5 s.',13,10,\ - '"time" - Prints current time.',13,10,\ - '"date" - Prints current date.',13,10,\ - '"regdump" - Dump some standard registers.',13,10,\ - '"reboot" - Restarts the computer.',0 - show_help: - push esi - push bx - - mov esi, bos_help_str - mov bl, 0x07 - call print - - pop bx - pop esi - ret - - - ;-----------------; - ; show about ; - ;-----------------; - bos_about_str db 13,10,'About BOS',13,10,\ - 'Hmm.. I started with OS-dev in late 2003.. Anyway..',13,10,13,10,\ - 'Thanks for helping me get this far goes to:',13,10,\ - 'all people at mega-tokyo.com, osdever.net and flatassembler.net',13,10,\ - 'Robert ',153,'stling for Primula, http://ostling.no-ip.com/',13,10,\ - 'J.Thim for EelOS, http://www.ludd.luth.se/~ivileel/',13,10,\ - 'Tomasz Grysztar for fasm and fasmw, http://flatassembler.net/',13,10,\ - 'ASHLEY4, Candy, John S. Fine and Petroff Heroj.',0 + commands: + db 'ver', 0 + db 'help', 0 + db '?', 0 + db 'about', 0 + db 'cls', 0 + db 'clrscr', 0 + db 'reboot', 0 + db 'regdump', 0 + db 'time', 0 + db 'date', 0 + db 'delay', 0 + db 'vgatest', 0 + db 'memtest', 0 + db 'fddtest', 0 + db 0xFF ; end of command table + + + call_table: + dd show_ver ; commands.inc + dd show_help ; commands.inc + dd show_help ; commands.inc + dd show_about ; commands.inc + dd clrscr ; commands.inc + dd clrscr ; comamnds.inc + dd reboot ; commands.inc + dd dump_regs ; debug.inc + dd print_time ; time_date.inc + dd print_date ; time_date.inc + dd delay_test ; commands.inc + dd vga_test ; commands.inc + dd mem_test ; commands.inc + dd fdd_test ; commands.inc + + + + ;--------------------------; + ; not a valid command ; + ;--------------------------; + not_a_valid_cmd db 13,10,'No such command or program exists.', 0 + + no_such_cmd: + push esi + push bx + + mov esi, not_a_valid_cmd + mov bl, 0x04 + call print + + pop bx + pop esi + ret + + + ;-------------------; + ; show version ; + ;-------------------; + bos_ver_str db 13,10,'BOS version 0.05 by Christoffer Bubach, 2003-2005.', 0 + show_ver: + push esi + push bx + + mov esi, bos_ver_str + mov bl, 0x07 + call print + + pop bx + pop esi + ret + + + ;--------------------; + ; show BOS help ; + ;--------------------; + bos_help_str db 13,10,13,10,' BOS 0.04 by Christoffer Bubach, 2003-2005.',13,10,\ + '--------------------------------------------',13,10,\ + 'Type a command and press ENTER to execute it.',13,10,13,10,\ + '"help" or "?" - Displays this text.',13,10,\ + '"ver" - Shows version information.',13,10,\ + '"about" - Shows information about the OS.',13,10,\ + '"cls" or "clrscr" - Clears the screen.',13,10,\ + '"memtest" - Shows memory info (and allocates/frees some, to test).',13,10,\ + '"vgatest" - Test some VGA stuff.',13,10,\ + '"fddtest" - Read and print bootsector from A:',13,10,\ + '"delay" - Tests the delay function for 5 s.',13,10,\ + '"time" - Prints current time.',13,10,\ + '"date" - Prints current date.',13,10,\ + '"regdump" - Dump some standard registers.',13,10,\ + '"reboot" - Restarts the computer.',0 + show_help: + push esi + push bx + + mov esi, bos_help_str + mov bl, 0x07 + call print + + pop bx + pop esi + ret + + + ;-----------------; + ; show about ; + ;-----------------; + bos_about_str db 13,10,'About BOS',13,10,\ + 'Hmm.. I started with OS-dev in late 2003.. Anyway..',13,10,13,10,\ + 'Thanks for helping me get this far goes to:',13,10,\ + 'all people at mega-tokyo.com, osdever.net and flatassembler.net',13,10,\ + 'Robert ',153,'stling for Primula, http://ostling.no-ip.com/',13,10,\ + 'J.Thim for EelOS, http://www.ludd.luth.se/~ivileel/',13,10,\ + 'Tomasz Grysztar for fasm and fasmw, http://flatassembler.net/',13,10,\ + 'ASHLEY4, Candy, John S. Fine and Petroff Heroj.',0 show_about: - push esi - push bx - - mov esi, bos_about_str - mov bl, 0x07 - call print - - pop bx - pop esi - ret - - - ;-----------------------; - ; clear the screen ; - ;-----------------------; - clrscr: - call cls ; text.inc - mov esi, prompt - mov bl, 0x0E - call print - mov edi, cmd_buffer - jmp shell ; no normal return, as it gives an extra line feed - - - - ;-------------; - ; reboot ; - ;-------------; - reboot: - call kbd_wait - mov al, 0xFE - out 0x64, al - jmp $ - ret - - - ;-----------------; - ; delay test ; - ;-----------------; - bos_delay_str db 13,10,'~1 second has passed.', 0 - delay_test: - mov ecx, 5 + push esi + push bx + + mov esi, bos_about_str + mov bl, 0x07 + call print + + pop bx + pop esi + ret + + + ;-----------------------; + ; clear the screen ; + ;-----------------------; + clrscr: + call cls ; text.inc + mov esi, prompt + mov bl, 0x0E + call print + mov edi, cmd_buffer + jmp shell ; no normal return, as it gives an extra line feed + + + + ;-------------; + ; reboot ; + ;-------------; + reboot: + call kbd_wait + mov al, 0xFE + out 0x64, al + jmp $ + ret + + + ;-----------------; + ; delay test ; + ;-----------------; + bos_delay_str db 13,10,'~1 second has passed.', 0 + delay_test: + mov ecx, 5 .loop: - push ecx - mov ecx, 100 - call delay - pop ecx - mov esi, bos_delay_str - mov bl, 0x07 - call print - loop .loop - ret - - - ;----------------; - ; VGA test ; - ;----------------; - bos_vga_str db 13,10,'It works..! :-D', 0 - vga_test: - - mov ax, 1 ; clear the screen - call set_mode_0x13 ; set mode 0x13 - - mov cx, 256 ; loop out some pixels - .l1: - mov bx, cx ; x value - mov al, cl - push cx - mov cx, 50 ; y value - call put_0x13_pixel - pop cx - loop .l1 - - ; draw mario and some ground - mov esi, mario - mov ax, 260 ; x - mov bx, 168 ; y - mov cx, 20 ; height - mov dx, 18 ; width - call put_0x13_sprite ; in vga.inc - mov esi, grass_l - mov ax, 250 - mov bx, 186 - mov cx, 20 - mov dx, 14 - call put_0x13_sprite - mov esi, grass_f - mov ax, 265 - mov bx, 186 - mov cx, 20 - mov dx, 14 - call put_0x13_sprite - mov esi, grass_ul - mov ax, 280 - mov bx, 186 - mov cx, 20 - mov dx, 14 - call put_0x13_sprite - mov esi, g_lefts - mov ax, 280 - mov bx, 172 - mov cx, 20 - mov dx, 14 - call put_0x13_sprite - mov esi, grass_l - mov ax, 280 - mov bx, 158 - mov cx, 20 - mov dx, 14 - call put_0x13_sprite - mov esi, g_earth - mov ax, 300 - mov bx, 186 - mov cx, 20 - mov dx, 14 - call put_0x13_sprite - mov esi, g_earth - mov ax, 300 - mov bx, 172 - mov cx, 20 - mov dx, 14 - call put_0x13_sprite - mov esi, grass_f - mov ax, 300 - mov bx, 158 - mov cx, 20 - mov dx, 14 - call put_0x13_sprite - - call wait_key - - mov ax, 1 ; clear the screen - call set_mode_0x03 ; set mode 0x03 - - mov esi, bos_vga_str ; print that it worked! - mov bl, 1 - call print - ret - - - - - ;--------------------------; - ; fdd test ; - ;--------------------------; - fdd_test: - mov bl, 13 - mov bh, 7 ; make newline - call print_char - - mov ecx, 512 - mov edi, 0x80000 - .loop511: - mov dword [edi], 'shit' ; set DMA buffer to shit, as a test - add edi, 4 - sub ecx, 4 - cmp ecx, 0 - jne .loop511 - - mov dh, 0x00 ; side - mov dl, 0x00 ; drive - mov ch, 0x00 ; track - mov cl, 0x01 ; sector - mov bl, 0x00 ; 1 = write - call fdd_read_write - jc .error - - mov esi, 0x80000 ; dma buffer - mov ecx, 512 - .print: - lodsb - mov bl, al - mov bh, 7 - call print_char ; print it. is it still - dec ecx ; "shit" ? - cmp ecx, 0 - jne .print - jmp .end - - .error: - mov bl, 13 - call print_char - mov bl, 10 - call print_char - mov bh, 0x40 - mov bl, 'E' ; error sign... :'( - call print_char - - call fdd_reset - mov al, 1 - call fdd_recal_seek ; do somthing about the error.. :P - - .end: - ret - - - - - - ;------------------------------; - ; memory test ; - ;------------------------------; - - bos_mem_str1 db 13,10,'Performing memory test. (debugging allocs assume 32mb RAM)', 0 - bos_mem_str2 db 13,10,'Total installed memory (in bytes): ',0 - bos_mem_str3 db 13,10,13,10,'Memory chunks:',0 - bos_mem_str4 db 13,10,'Address Size Type Previous Next',0 - bos_mem_str5 db 13,10,'-------------------------------------------------------',0 - bos_mem_str6 db '0x',0 - bos_mem_str7 db 'Free ',0 - bos_mem_str8 db 'Used ',0 - bos_mem_str9 db 'None ',0 - bos_mem_str0 db ' ',0 - bos_mem_crlf db 13,10,0 - current_mem_pos dd 0 - next_free dd 0 - - ;---------DEBUG--------- - test1_or_2 db 1 - test_address dd 0 - test_size dd 0 - test_address2 dd 0 - test_size2 dd 0 - ;---------END DEBUG--------- - - mem_test: - push eax - push ebx - push ecx - push edx - - ;---------DEBUG--------- - cmp [test1_or_2],0 - je .free_the_test_block - - mov ebx, 0x1000000 ;first test - mov [test_size2], ebx - call allocate_mem - mov [test_address2], ebx - - mov ebx, 0xE00000 ; second test - mov ecx, ebx - call allocate_mem - push ebx - push ecx - - mov ebx, 0x10000 ; third test - mov [test_size], ebx - call allocate_mem - mov [test_address], ebx ; test allocation - - pop ecx - pop ebx - call free_mem - - mov [test1_or_2], 0 - jmp .end_test - .free_the_test_block: - mov ebx, [test_address] - mov ecx, [test_size] ; and freeing - call free_mem - mov ebx, [test_address2] - mov ecx, [test_size2] ; and freeing - call free_mem - mov [test1_or_2], 1 - .end_test: - ;---------END DEBUG--------- - - mov esi, bos_mem_str1 - mov bl, 0x07 - call print - mov esi, bos_mem_str2 - mov bl, 0x07 - call print - mov esi, bos_mem_str6 - mov bl, 0x04 - call print - mov ebx, [ram_amount] - mov cl, 0x04 - call print_hex32 - - mov esi, bos_mem_str3 - mov bl, 0x07 - call print - mov esi, bos_mem_str4 - mov bl, 0x07 - call print - mov esi, bos_mem_str5 - mov bl, 0x07 - call print - - mov [current_mem_pos], 0 - mov eax, [first_free] - mov [next_free], eax - - ;-------------------------; - ; this is a used block ; - ;-------------------------; - .used: - mov eax, [current_mem_pos] - mov ebx, [next_free] - cmp eax, [ram_amount] ; .free will always let us - jae .end ; decide if we are to quit or not. - - cmp [next_free], 0 - jne .more_blocks - mov ebx, [ram_amount] ; no next block, use ram size - sub ebx, eax ; get size in ebx - mov edi, 1 - call .print_mem_info - jmp .end - - .more_blocks: - sub ebx, eax - mov edi, 1 - call .print_mem_info - - mov eax, [next_free] - cmp eax, 0 - je .end - mov ebx, [eax+8] - mov [current_mem_pos], eax - mov [next_free], ebx - - ;-------------------------; - ; this is a free block ; - ;-------------------------; - .free: - mov eax, [current_mem_pos] ; current pos. in eax - mov ebx, [eax+4] ; current size in ebx - mov ecx, [eax] ; prev pointer in ecx - mov edx, [eax+8] ; next pointer in edx - xor edi, edi - call .print_mem_info - - add eax, ebx - mov [current_mem_pos], eax - jmp .used - - .end: - pop eax - pop ebx - pop ecx - pop edx - ret - - ;-------------------------; - ; print mem block info ; - ;-------------------------; - .print_mem_info: - push eax ; current pos - push ebx ; current size - push ecx ; prev pointer - push edx ; next pointer - push edi ; 1 = used - - push ebx ; push size - mov esi, bos_mem_crlf - mov bl, 0x07 - call print - mov esi, bos_mem_str6 - mov bl, 0x04 - call print - - push ecx ; push prev - mov ebx, eax - mov cl, 0x04 - call print_hex32 - - mov esi, bos_mem_str0 - mov bl, 0x07 - call print - mov esi, bos_mem_str6 - mov bl, 0x04 - call print - - pop ecx ; pop prev - pop ebx ; pop size - push ecx ; push prev - mov cl, 0x04 - call print_hex32 - mov esi, bos_mem_str0 - mov bl, 0x07 - call print - - cmp edi, 1 - jne .print_free - pop ecx ; pop prev - - mov esi, bos_mem_str8 ; it's used - mov bl, 0x07 - call print - mov esi, bos_mem_str9 - mov bl, 0x07 - call print - mov esi, bos_mem_str9 - mov bl, 0x07 - call print - jmp .print_end - - .print_free: - mov esi, bos_mem_str7 ; it's free - mov bl, 0x07 - call print - mov esi, bos_mem_str6 - mov bl, 0x04 - call print - - pop ebx ; pop the pushed ecx - mov cl, 0x04 ; into ebx instead.. ;) - call print_hex32 - mov esi, bos_mem_str0 - mov bl, 0x07 - call print - mov esi, bos_mem_str6 - mov bl, 0x04 - call print - mov ebx, edx - mov cl, 0x04 - call print_hex32 - - .print_end: - pop edi - pop edx - pop ecx - pop ebx - pop eax - ret \ No newline at end of file + push ecx + mov ecx, 100 + call delay + pop ecx + mov esi, bos_delay_str + mov bl, 0x07 + call print + loop .loop + ret + + + ;----------------; + ; VGA test ; + ;----------------; + bos_vga_str db 13,10,'It works..! :-D', 0 + vga_test: + + mov ax, 1 ; clear the screen + call set_mode_0x13 ; set mode 0x13 + + mov cx, 256 ; loop out some pixels + .l1: + mov bx, cx ; x value + mov al, cl + push cx + mov cx, 50 ; y value + call put_0x13_pixel + pop cx + loop .l1 + + ; draw mario and some ground + mov esi, mario + mov ax, 260 ; x + mov bx, 168 ; y + mov cx, 20 ; height + mov dx, 18 ; width + call put_0x13_sprite ; in vga.inc + mov esi, grass_l + mov ax, 250 + mov bx, 186 + mov cx, 20 + mov dx, 14 + call put_0x13_sprite + mov esi, grass_f + mov ax, 265 + mov bx, 186 + mov cx, 20 + mov dx, 14 + call put_0x13_sprite + mov esi, grass_ul + mov ax, 280 + mov bx, 186 + mov cx, 20 + mov dx, 14 + call put_0x13_sprite + mov esi, g_lefts + mov ax, 280 + mov bx, 172 + mov cx, 20 + mov dx, 14 + call put_0x13_sprite + mov esi, grass_l + mov ax, 280 + mov bx, 158 + mov cx, 20 + mov dx, 14 + call put_0x13_sprite + mov esi, g_earth + mov ax, 300 + mov bx, 186 + mov cx, 20 + mov dx, 14 + call put_0x13_sprite + mov esi, g_earth + mov ax, 300 + mov bx, 172 + mov cx, 20 + mov dx, 14 + call put_0x13_sprite + mov esi, grass_f + mov ax, 300 + mov bx, 158 + mov cx, 20 + mov dx, 14 + call put_0x13_sprite + + call wait_key + + mov ax, 1 ; clear the screen + call set_mode_0x03 ; set mode 0x03 + + mov esi, bos_vga_str ; print that it worked! + mov bl, 1 + call print + ret + + + + + ;--------------------------; + ; fdd test ; + ;--------------------------; + fdd_test: + mov bl, 13 + mov bh, 7 ; make newline + call print_char + + mov ecx, 512 + mov edi, 0x80000 + .loop511: + mov dword [edi], 'shit' ; set DMA buffer to shit, as a test + add edi, 4 + sub ecx, 4 + cmp ecx, 0 + jne .loop511 + + mov dh, 0x00 ; side + mov dl, 0x00 ; drive + mov ch, 0x00 ; track + mov cl, 0x01 ; sector + mov bl, 0x00 ; 1 = write + call fdd_read_write + jc .error + + mov esi, 0x80000 ; dma buffer + mov ecx, 512 + .print: + lodsb + mov bl, al + mov bh, 7 + call print_char ; print it. is it still + dec ecx ; "shit" ? + cmp ecx, 0 + jne .print + jmp .end + + .error: + mov bl, 13 + call print_char + mov bl, 10 + call print_char + mov bh, 0x40 + mov bl, 'E' ; error sign... :'( + call print_char + + call fdd_reset + mov al, 1 + call fdd_recal_seek ; do somthing about the error.. :P + + .end: + ret + + + + + + ;------------------------------; + ; memory test ; + ;------------------------------; + + bos_mem_str1 db 13,10,'Performing memory test. (debugging allocs assume 32mb RAM)', 0 + bos_mem_str2 db 13,10,'Total installed memory (in bytes): ',0 + bos_mem_str3 db 13,10,13,10,'Memory chunks:',0 + bos_mem_str4 db 13,10,'Address Size Type Previous Next',0 + bos_mem_str5 db 13,10,'-------------------------------------------------------',0 + bos_mem_str6 db '0x',0 + bos_mem_str7 db 'Free ',0 + bos_mem_str8 db 'Used ',0 + bos_mem_str9 db 'None ',0 + bos_mem_str0 db ' ',0 + bos_mem_crlf db 13,10,0 + current_mem_pos dd 0 + next_free dd 0 + + ;---------DEBUG--------- + test1_or_2 db 1 + test_address dd 0 + test_size dd 0 + test_address2 dd 0 + test_size2 dd 0 + ;---------END DEBUG--------- + + mem_test: + push eax + push ebx + push ecx + push edx + + ;---------DEBUG--------- + cmp [test1_or_2],0 + je .free_the_test_block + + mov ebx, 0x1000000 ;first test + mov [test_size2], ebx + call allocate_mem + mov [test_address2], ebx + + mov ebx, 0xE00000 ; second test + mov ecx, ebx + call allocate_mem + push ebx + push ecx + + mov ebx, 0x10000 ; third test + mov [test_size], ebx + call allocate_mem + mov [test_address], ebx ; test allocation + + pop ecx + pop ebx + call free_mem + + mov [test1_or_2], 0 + jmp .end_test + .free_the_test_block: + mov ebx, [test_address] + mov ecx, [test_size] ; and freeing + call free_mem + mov ebx, [test_address2] + mov ecx, [test_size2] ; and freeing + call free_mem + mov [test1_or_2], 1 + .end_test: + ;---------END DEBUG--------- + + mov esi, bos_mem_str1 + mov bl, 0x07 + call print + mov esi, bos_mem_str2 + mov bl, 0x07 + call print + mov esi, bos_mem_str6 + mov bl, 0x04 + call print + mov ebx, [ram_amount] + mov cl, 0x04 + call print_hex32 + + mov esi, bos_mem_str3 + mov bl, 0x07 + call print + mov esi, bos_mem_str4 + mov bl, 0x07 + call print + mov esi, bos_mem_str5 + mov bl, 0x07 + call print + + mov [current_mem_pos], 0 + mov eax, [first_free] + mov [next_free], eax + + ;-------------------------; + ; this is a used block ; + ;-------------------------; + .used: + mov eax, [current_mem_pos] + mov ebx, [next_free] + cmp eax, [ram_amount] ; .free will always let us + jae .end ; decide if we are to quit or not. + + cmp [next_free], 0 + jne .more_blocks + mov ebx, [ram_amount] ; no next block, use ram size + sub ebx, eax ; get size in ebx + mov edi, 1 + call .print_mem_info + jmp .end + + .more_blocks: + sub ebx, eax + mov edi, 1 + call .print_mem_info + + mov eax, [next_free] + cmp eax, 0 + je .end + mov ebx, [eax+8] + mov [current_mem_pos], eax + mov [next_free], ebx + + ;-------------------------; + ; this is a free block ; + ;-------------------------; + .free: + mov eax, [current_mem_pos] ; current pos. in eax + mov ebx, [eax+4] ; current size in ebx + mov ecx, [eax] ; prev pointer in ecx + mov edx, [eax+8] ; next pointer in edx + xor edi, edi + call .print_mem_info + + add eax, ebx + mov [current_mem_pos], eax + jmp .used + + .end: + pop eax + pop ebx + pop ecx + pop edx + ret + + ;-------------------------; + ; print mem block info ; + ;-------------------------; + .print_mem_info: + push eax ; current pos + push ebx ; current size + push ecx ; prev pointer + push edx ; next pointer + push edi ; 1 = used + + push ebx ; push size + mov esi, bos_mem_crlf + mov bl, 0x07 + call print + mov esi, bos_mem_str6 + mov bl, 0x04 + call print + + push ecx ; push prev + mov ebx, eax + mov cl, 0x04 + call print_hex32 + + mov esi, bos_mem_str0 + mov bl, 0x07 + call print + mov esi, bos_mem_str6 + mov bl, 0x04 + call print + + pop ecx ; pop prev + pop ebx ; pop size + push ecx ; push prev + mov cl, 0x04 + call print_hex32 + mov esi, bos_mem_str0 + mov bl, 0x07 + call print + + cmp edi, 1 + jne .print_free + pop ecx ; pop prev + + mov esi, bos_mem_str8 ; it's used + mov bl, 0x07 + call print + mov esi, bos_mem_str9 + mov bl, 0x07 + call print + mov esi, bos_mem_str9 + mov bl, 0x07 + call print + jmp .print_end + + .print_free: + mov esi, bos_mem_str7 ; it's free + mov bl, 0x07 + call print + mov esi, bos_mem_str6 + mov bl, 0x04 + call print + + pop ebx ; pop the pushed ecx + mov cl, 0x04 ; into ebx instead.. ;) + call print_hex32 + mov esi, bos_mem_str0 + mov bl, 0x07 + call print + mov esi, bos_mem_str6 + mov bl, 0x04 + call print + mov ebx, edx + mov cl, 0x04 + call print_hex32 + + .print_end: + pop edi + pop edx + pop ecx + pop ebx + pop eax + ret \ No newline at end of file diff --git a/kernel/shell/shell.asm b/kernel/shell/shell.asm index 25e7686..ea157ae 100755 --- a/kernel/shell/shell.asm +++ b/kernel/shell/shell.asm @@ -11,8 +11,8 @@ ; Variabels ; ;--------------; -prompt db 'BOS kernel>', 0 -cmd_buffer: times 255 db 0 ; 255 char command buffer + prompt db 'BOS kernel>', 0 + cmd_buffer: times 255 db 0 ; 255 char command buffer @@ -20,16 +20,15 @@ cmd_buffer: times 255 db 0 ; 255 char command buffer ; print the prompt for the first time.. :-) ; ;----------------------------------------------; init_cmd: - mov byte [kbd_status], 0 ; reset LEDs to 0.. - call update_leds + mov byte [kbd_status], 0 ; reset LEDs to 0.. + call update_leds - mov esi, prompt - mov bl, 0x0E - call print + mov esi, prompt + mov bl, 0x0E + call print - mov edi, cmd_buffer - - ret + mov edi, cmd_buffer + ret @@ -37,52 +36,52 @@ init_cmd: ; Main shell function & loop ; ;-------------------------------; shell: - mov cx, 0 ; max 254 chars in command - .loop: ; no. 255 is always a 0 + mov cx, 0 ; max 254 chars in command + .loop: ; no. 255 is always a 0 - push cx ; better be sure it´s safe.. - push edi + push cx ; better be sure it´s safe.. + push edi - call getc ; keyboard.inc + call getc ; keyboard.inc - pop edi - pop cx + pop edi + pop cx - cmp ah, 28 ; enter - je .enter + cmp ah, 28 ; enter + je .enter - cmp ah, 14 ; backspace - je .backspace + cmp ah, 14 ; backspace + je .backspace - cmp al, 0 ; no normal key - je .loop ; exceptions above.. + cmp al, 0 ; no normal key + je .loop ; exceptions above.. - cmp cx, 254 - jae .loop + cmp cx, 254 + jae .loop - stosb ; store char in buffer - inc cx + stosb ; store char in buffer + inc cx - mov bl, al ; print it.. - mov bh, 0x07 - call print_char + mov bl, al ; print it.. + mov bh, 0x07 + call print_char - jmp .loop + jmp .loop .enter: - mov al, 0 ; the command buffer is - stosb ; in ASCIIZ format.. - jmp chk_cmd + mov al, 0 ; the command buffer is + stosb ; in ASCIIZ format.. + jmp chk_cmd .backspace: - cmp cx, 0 ; can´t delete the prompt.. ;-) - je .loop - dec edi ; "remove" one char from buffer - call backspace ; do backspace on screen - dec cx ; decrease buffer counter - jmp .loop - jmp $ - ret + cmp cx, 0 ; can´t delete the prompt.. ;-) + je .loop + dec edi ; "remove" one char from buffer + call backspace ; do backspace on screen + dec cx ; decrease buffer counter + jmp .loop + jmp $ + ret @@ -91,100 +90,100 @@ shell: ;---------------------------------; chk_cmd: - mov esi, commands - mov edi, cmd_buffer - mov ebp, 0 ; command-table counter - - ;------------------------------------------; - ; big loop, for each command in table ; - ;------------------------------------------; - .l1: - mov ecx, 0 ; char counter - - cmp byte [esi], 0xFF - je .no_valid_cmd - - ;------------------------------------------; - ; smaller loop for each char in command ; - ;------------------------------------------; - .l2: - cmp byte [edi], ' ' ; space or zero - je .l_chk ; both indicate - cmp byte [edi], 0 ; "end of command" - je .l_chk - jmp .l_cont + mov esi, commands + mov edi, cmd_buffer + mov ebp, 0 ; command-table counter + + ;------------------------------------------; + ; big loop, for each command in table ; + ;------------------------------------------; + .l1: + mov ecx, 0 ; char counter + + cmp byte [esi], 0xFF + je .no_valid_cmd + + ;------------------------------------------; + ; smaller loop for each char in command ; + ;------------------------------------------; + .l2: + cmp byte [edi], ' ' ; space or zero + je .l_chk ; both indicate + cmp byte [edi], 0 ; "end of command" + je .l_chk + jmp .l_cont .l_chk: - cmp byte [esi], 0 ; commands are equal, but - jne .new_cmd ; do not match in size.. - jmp .done + cmp byte [esi], 0 ; commands are equal, but + jne .new_cmd ; do not match in size.. + jmp .done .l_cont: - cmp byte [esi], 0 ; commands are equal, but - je .new_cmd ; do not match in size.. - - mov al, [esi] - cmp al, [edi] - jne .new_cmd - - inc esi - inc edi - inc ecx ; inc char counter - jmp .l2 - ;----------------------; - ; end of small loop ; - ;----------------------; - - .new_cmd: - inc ebp ; inc command counter - mov edi, cmd_buffer ; remember to point to the right place.. ;-) - .l3: - inc esi - cmp byte [esi], 0 ; loop until end of command - jne .l3 - - inc esi - jmp .l1 - ;----------------------; - ; end of big loop ; - ;----------------------; - - - - ;--------------------------; - ; done. command found ; - ;--------------------------; - .done: - cmp ecx, 0 ; make sure it´s more - je .d_quit ; then 0 chars.. - - shl ebp, 2 - call dword [ebp+call_table] - - .d_quit: - jmp .cont ; then go back to the shell - - - ;--------------------------; - ; command not found ; - ;--------------------------; - .no_valid_cmd: - - ; call search_current_directory_for_file.... :-) - - call no_such_cmd ; print error.. - jmp .cont ; then go back to the shell - - ;---------------------------------; - ; make the prompt appear again ; - ;---------------------------------; - .cont: - call new_line - call new_line - mov esi, prompt - mov bl, 0x0E - call print - mov edi, cmd_buffer - jmp shell - - ret + cmp byte [esi], 0 ; commands are equal, but + je .new_cmd ; do not match in size.. + + mov al, [esi] + cmp al, [edi] + jne .new_cmd + + inc esi + inc edi + inc ecx ; inc char counter + jmp .l2 + ;----------------------; + ; end of small loop ; + ;----------------------; + + .new_cmd: + inc ebp ; inc command counter + mov edi, cmd_buffer ; remember to point to the right place.. ;-) + .l3: + inc esi + cmp byte [esi], 0 ; loop until end of command + jne .l3 + + inc esi + jmp .l1 + ;----------------------; + ; end of big loop ; + ;----------------------; + + + + ;--------------------------; + ; done. command found ; + ;--------------------------; + .done: + cmp ecx, 0 ; make sure it´s more + je .d_quit ; then 0 chars.. + + shl ebp, 2 + call dword [ebp+call_table] + + .d_quit: + jmp .cont ; then go back to the shell + + + ;--------------------------; + ; command not found ; + ;--------------------------; + .no_valid_cmd: + + ; call search_current_directory_for_file.... :-) + + call no_such_cmd ; print error.. + jmp .cont ; then go back to the shell + + ;---------------------------------; + ; make the prompt appear again ; + ;---------------------------------; + .cont: + call new_line + call new_line + mov esi, prompt + mov bl, 0x0E + call print + mov edi, cmd_buffer + jmp shell + + ret \ No newline at end of file diff --git a/kernel/sound/speaker.asm b/kernel/sound/speaker.asm index 97eba80..4852a2a 100755 --- a/kernel/sound/speaker.asm +++ b/kernel/sound/speaker.asm @@ -11,46 +11,46 @@ ; bx = frequency ; ;-----------------------; speaker_on: - mov dx, 0x12 - mov ax, 0x34DC - div bx - mov bl, al - mov al, 0xB6 - out 0x43, al - mov al, bl - out 0x42, al - mov al, ah - out 0x42, al - in al, 0x61 - or al, 3 - out 0x61, al - ret + mov dx, 0x12 + mov ax, 0x34DC + div bx + mov bl, al + mov al, 0xB6 + out 0x43, al + mov al, bl + out 0x42, al + mov al, ah + out 0x42, al + in al, 0x61 + or al, 3 + out 0x61, al + ret ;----------------------; ; turn speaker off ; ;----------------------; speaker_off: - push ax - in al, 0x61 - and al, 0xFC ; some do 0xFD, some 0xFC... :/ - out 0x61, al - pop ax - ret + push ax + in al, 0x61 + and al, 0xFC ; some do 0xFD, some 0xFC... :/ + out 0x61, al + pop ax + ret ;----------------------------------; ; PC-speaker; beep ; ;----------------------------------; beep: - push eax - push ecx - in al, 0x61 ; turn the speaker on. - or al, 3 - out 0x61, al - mov ecx, 50 - call delay ; timer.inc - call speaker_off - pop ecx - pop eax - ret \ No newline at end of file + push eax + push ecx + in al, 0x61 ; turn the speaker on. + or al, 3 + out 0x61, al + mov ecx, 50 + call delay ; timer.inc + call speaker_off + pop ecx + pop eax + ret \ No newline at end of file diff --git a/kernel/system/services.asm b/kernel/system/services.asm index 3bd5b98..f275e0a 100755 --- a/kernel/system/services.asm +++ b/kernel/system/services.asm @@ -14,99 +14,99 @@ ; System interrupt 0x32 ; ;--------------------------; - isr32_str_1 db "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»", 0 - isr32_str_2 db "º  INT 32 CALLED!! º", 0 - isr32_str_3 db "º   º", 0 - isr32_str_4 db "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ", 0 + isr32_str_1 db "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»", 0 + isr32_str_2 db "º  INT 32 CALLED!! º", 0 + isr32_str_3 db "º   º", 0 + isr32_str_4 db "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ", 0 - isr32_str_5 db "CTRL+ALT+DEL was pressed!", 0 + isr32_str_5 db "CTRL+ALT+DEL was pressed!", 0 interrupt_32: ;-----------------; ; get char ; ;-----------------; - cmp ax, 0x0001 ; get character int.. - jne .cade + cmp ax, 0x0001 ; get character int.. + jne .cade - call getc + call getc - jmp .end + jmp .end ;-----------------------------; ; ctrl+alt+delete function ; ;-----------------------------; .cade: - cmp ax, 0xCADE ; CTRL+ALT+DEL was pressed - jne .ordinary + cmp ax, 0xCADE ; CTRL+ALT+DEL was pressed + jne .ordinary - push bx - push cx - push dx + push bx + push cx + push dx - call getcursor - mov cx, bx + call getcursor + mov cx, bx - mov dl, 0x0C - mov dh, 0x1B - call setcursorxy + mov dl, 0x0C + mov dh, 0x1B + call setcursorxy - mov esi, isr32_str_5 - mov al, 0x40 - call print + mov esi, isr32_str_5 + mov al, 0x40 + call print - mov bx, cx - call setcursor + mov bx, cx + call setcursor - pop dx - pop cx - pop bx + pop dx + pop cx + pop bx - jmp .end + jmp .end ;-----------------------------; ; no selected function.. ; ;-----------------------------; - .ordinary: ; print that int 0x32 was called... - push bx - push cx - push dx + .ordinary: ; print that int 0x32 was called... + push bx + push cx + push dx - mov dl, 0x0B - mov dh, 0x1A - call setcursorxy + mov dl, 0x0B + mov dh, 0x1A + call setcursorxy - mov esi, isr32_str_1 - mov bl, 0x40 - call print + mov esi, isr32_str_1 + mov bl, 0x40 + call print - mov dl, 0x0C - mov dh, 0x1A - call setcursorxy + mov dl, 0x0C + mov dh, 0x1A + call setcursorxy - mov esi, isr32_str_2 - mov bl, 0x40 - call print + mov esi, isr32_str_2 + mov bl, 0x40 + call print - mov dl, 0x0D - mov dh, 0x1A - call setcursorxy + mov dl, 0x0D + mov dh, 0x1A + call setcursorxy - mov esi, isr32_str_3 - mov bl, 0x40 - call print + mov esi, isr32_str_3 + mov bl, 0x40 + call print - mov dl, 0x0E - mov dh, 0x1A - call setcursorxy + mov dl, 0x0E + mov dh, 0x1A + call setcursorxy - mov esi, isr32_str_4 - mov bl, 0x40 - call print + mov esi, isr32_str_4 + mov bl, 0x40 + call print - pop dx - pop cx - pop bx + pop dx + pop cx + pop bx - .end: - ret + .end: + ret diff --git a/kernel/vars/strings.asm b/kernel/vars/strings.asm index 386015d..57e0717 100755 --- a/kernel/vars/strings.asm +++ b/kernel/vars/strings.asm @@ -17,13 +17,13 @@ kernel_load db 'Loading kernel...', 0 kernel_load_ok db '[ OK ]', 0 - pic_irq db 'Fixing PIC and IRQs...', 0 + pic_irq db 'Fixing PIC and IRQs...', 0 pic_irq_ok db '[ Done ]', 0 - idt_mess db 'Setting up IDT...', 0 - idt_ok db '[ IDT OK ]', 0 + idt_mess db 'Setting up IDT...', 0 + idt_ok db '[ IDT OK ]', 0 - kbd_load db 'Enables IRQ1...', 0 - kbd_ok db '[ Keyboard OK ]', 0 + kbd_load db 'Enables IRQ1...', 0 + kbd_ok db '[ Keyboard OK ]', 0 - bos_shell db 'BOS shell. Type "help" for more info.', 13, 10, 0 + bos_shell db 'BOS shell. Type "help" for more info.', 13, 10, 0 diff --git a/kernel/vga/font8x16.asm b/kernel/vga/font8x16.asm index b26f778..f03852a 100755 --- a/kernel/vga/font8x16.asm +++ b/kernel/vga/font8x16.asm @@ -5,260 +5,260 @@ ; System 8x16 font.. ; ; ; ;----------------------------------------------------------; - font_8x16: - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x7E, 0x81, 0xA5, 0x81, 0x81, 0xA5, 0x99, 0x81, 0x81, 0x7E, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x7E, 0xFF, 0xDB, 0xFF, 0xFF, 0xDB, 0xE7, 0xFF, 0xFF, 0x7E, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x6C, 0xFE, 0xFE, 0xFE, 0xFE, 0x7C, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7C, 0xFE, 0x7C, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x18, 0x3C, 0x3C, 0xE7, 0xE7, 0xE7, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x7E, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3C, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xC3, 0xC3, 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x66, 0x42, 0x42, 0x66, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x99, 0xBD, 0xBD, 0x99, 0xC3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF - db 0x00, 0x00, 0x1E, 0x06, 0x0E, 0x1A, 0x78, 0xCC, 0xCC, 0xCC, 0xCC, 0x78, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x3F, 0x33, 0x3F, 0x30, 0x30, 0x30, 0x30, 0x70, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x7F, 0x63, 0x7F, 0x63, 0x63, 0x63, 0x63, 0x67, 0xE7, 0xE6, 0xC0, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x18, 0x18, 0xDB, 0x3C, 0xE7, 0x3C, 0xDB, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFE, 0xF8, 0xF0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x02, 0x06, 0x0E, 0x1E, 0x3E, 0xFE, 0x3E, 0x1E, 0x0E, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x7F, 0xDB, 0xDB, 0xDB, 0x7B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x7C, 0xC6, 0x60, 0x38, 0x6C, 0xC6, 0xC6, 0x6C, 0x38, 0x0C, 0xC6, 0x7C, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x7E, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0C, 0xFE, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xFE, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x6C, 0xFE, 0x6C, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7C, 0x7C, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x7C, 0x7C, 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x18, 0x3C, 0x3C, 0x3C, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x66, 0x66, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x6C, 0x6C, 0xFE, 0x6C, 0x6C, 0x6C, 0xFE, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00 - db 0x18, 0x18, 0x7C, 0xC6, 0xC2, 0xC0, 0x7C, 0x06, 0x06, 0x86, 0xC6, 0x7C, 0x18, 0x18, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0xC2, 0xC6, 0x0C, 0x18, 0x30, 0x60, 0xC6, 0x86, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x38, 0x6C, 0x6C, 0x38, 0x76, 0xDC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x0C, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x38, 0x6C, 0xC6, 0xC6, 0xD6, 0xD6, 0xC6, 0xC6, 0x6C, 0x38, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x7C, 0xC6, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0xC6, 0xFE, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x7C, 0xC6, 0x06, 0x06, 0x3C, 0x06, 0x06, 0x06, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x0C, 0x1C, 0x3C, 0x6C, 0xCC, 0xFE, 0x0C, 0x0C, 0x0C, 0x1E, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xFE, 0xC0, 0xC0, 0xC0, 0xFC, 0x06, 0x06, 0x06, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x38, 0x60, 0xC0, 0xC0, 0xFC, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xFE, 0xC6, 0x06, 0x06, 0x0C, 0x18, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0x7E, 0x06, 0x06, 0x06, 0x0C, 0x78, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0x0C, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xDE, 0xDE, 0xDE, 0xDC, 0xC0, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x10, 0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xFC, 0x66, 0x66, 0x66, 0x7C, 0x66, 0x66, 0x66, 0x66, 0xFC, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x3C, 0x66, 0xC2, 0xC0, 0xC0, 0xC0, 0xC0, 0xC2, 0x66, 0x3C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xF8, 0x6C, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6C, 0xF8, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xFE, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xFE, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xFE, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x60, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x3C, 0x66, 0xC2, 0xC0, 0xC0, 0xDE, 0xC6, 0xC6, 0x66, 0x3A, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x3C, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x1E, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0xCC, 0xCC, 0xCC, 0x78, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xE6, 0x66, 0x66, 0x6C, 0x78, 0x78, 0x6C, 0x66, 0x66, 0xE6, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xF0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xFE, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xC6, 0xEE, 0xFE, 0xFE, 0xD6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xC6, 0xE6, 0xF6, 0xFE, 0xDE, 0xCE, 0xC6, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xFC, 0x66, 0x66, 0x66, 0x7C, 0x60, 0x60, 0x60, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xD6, 0xDE, 0x7C, 0x0C, 0x0E, 0x00, 0x00 - db 0x00, 0x00, 0xFC, 0x66, 0x66, 0x66, 0x7C, 0x6C, 0x66, 0x66, 0x66, 0xE6, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0x60, 0x38, 0x0C, 0x06, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x7E, 0x7E, 0x5A, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x6C, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xD6, 0xD6, 0xD6, 0xFE, 0xEE, 0x6C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xC6, 0xC6, 0x6C, 0x7C, 0x38, 0x38, 0x7C, 0x6C, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xFE, 0xC6, 0x86, 0x0C, 0x18, 0x30, 0x60, 0xC2, 0xC6, 0xFE, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x3C, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0x70, 0x38, 0x1C, 0x0E, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x3C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x3C, 0x00, 0x00, 0x00, 0x00 - db 0x10, 0x38, 0x6C, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00 - db 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xE0, 0x60, 0x60, 0x78, 0x6C, 0x66, 0x66, 0x66, 0x66, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6, 0xC0, 0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x1C, 0x0C, 0x0C, 0x3C, 0x6C, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6, 0xFE, 0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x38, 0x6C, 0x64, 0x60, 0xF0, 0x60, 0x60, 0x60, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x7C, 0x0C, 0xCC, 0x78, 0x00 - db 0x00, 0x00, 0xE0, 0x60, 0x60, 0x6C, 0x76, 0x66, 0x66, 0x66, 0x66, 0xE6, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x06, 0x06, 0x00, 0x0E, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3C, 0x00 - db 0x00, 0x00, 0xE0, 0x60, 0x60, 0x66, 0x6C, 0x78, 0x78, 0x6C, 0x66, 0xE6, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0xEC, 0xFE, 0xD6, 0xD6, 0xD6, 0xD6, 0xC6, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7C, 0x60, 0x60, 0xF0, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x7C, 0x0C, 0x0C, 0x1E, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x76, 0x66, 0x60, 0x60, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6, 0x60, 0x38, 0x0C, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x10, 0x30, 0x30, 0xFC, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0xD6, 0xD6, 0xD6, 0xFE, 0x6C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0x6C, 0x38, 0x38, 0x38, 0x6C, 0xC6, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7E, 0x06, 0x0C, 0xF8, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xCC, 0x18, 0x30, 0x60, 0xC6, 0xFE, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x0E, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x18, 0x0E, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x0E, 0x18, 0x18, 0x18, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6C, 0xC6, 0xC6, 0xC6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x3C, 0x66, 0xC2, 0xC0, 0xC0, 0xC0, 0xC2, 0x66, 0x3C, 0x0C, 0x06, 0x7C, 0x00, 0x00 - db 0x00, 0x00, 0xCC, 0x00, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x0C, 0x18, 0x30, 0x00, 0x7C, 0xC6, 0xFE, 0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x10, 0x38, 0x6C, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xCC, 0x00, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x60, 0x30, 0x18, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x38, 0x6C, 0x38, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x3C, 0x66, 0x60, 0x60, 0x66, 0x3C, 0x0C, 0x06, 0x3C, 0x00, 0x00, 0x00 - db 0x00, 0x10, 0x38, 0x6C, 0x00, 0x7C, 0xC6, 0xFE, 0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xC6, 0x00, 0x00, 0x7C, 0xC6, 0xFE, 0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x60, 0x30, 0x18, 0x00, 0x7C, 0xC6, 0xFE, 0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x66, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x18, 0x3C, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x60, 0x30, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0xC6, 0x00, 0x10, 0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 - db 0x38, 0x6C, 0x38, 0x00, 0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 - db 0x18, 0x30, 0x60, 0x00, 0xFE, 0x66, 0x60, 0x7C, 0x60, 0x60, 0x66, 0xFE, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x76, 0x36, 0x7E, 0xD8, 0xD8, 0x6E, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x3E, 0x6C, 0xCC, 0xCC, 0xFE, 0xCC, 0xCC, 0xCC, 0xCC, 0xCE, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x10, 0x38, 0x6C, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xC6, 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x60, 0x30, 0x18, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x30, 0x78, 0xCC, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x60, 0x30, 0x18, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xC6, 0x00, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7E, 0x06, 0x0C, 0x78, 0x00 - db 0x00, 0xC6, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0xC6, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x18, 0x18, 0x3C, 0x66, 0x60, 0x60, 0x60, 0x66, 0x3C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x38, 0x6C, 0x64, 0x60, 0xF0, 0x60, 0x60, 0x60, 0x60, 0xE6, 0xFC, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18, 0x7E, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0xF8, 0xCC, 0xCC, 0xF8, 0xC4, 0xCC, 0xDE, 0xCC, 0xCC, 0xCC, 0xC6, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x0E, 0x1B, 0x18, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0xD8, 0x70, 0x00, 0x00 - db 0x00, 0x18, 0x30, 0x60, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x0C, 0x18, 0x30, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x18, 0x30, 0x60, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x18, 0x30, 0x60, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x76, 0xDC, 0x00, 0xDC, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00 - db 0x76, 0xDC, 0x00, 0xC6, 0xE6, 0xF6, 0xFE, 0xDE, 0xCE, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x3C, 0x6C, 0x6C, 0x3E, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x38, 0x6C, 0x6C, 0x38, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x30, 0x30, 0x00, 0x30, 0x30, 0x60, 0xC0, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0xC0, 0xC0, 0xC2, 0xC6, 0xCC, 0x18, 0x30, 0x60, 0xDC, 0x86, 0x0C, 0x18, 0x3E, 0x00, 0x00 - db 0x00, 0xC0, 0xC0, 0xC2, 0xC6, 0xCC, 0x18, 0x30, 0x66, 0xCE, 0x9E, 0x3E, 0x06, 0x06, 0x00, 0x00 - db 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x3C, 0x3C, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6C, 0xD8, 0x6C, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0xD8, 0x6C, 0x36, 0x6C, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44 - db 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA - db 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77 - db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 - db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 - db 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 - db 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xF6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x18, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 - db 0x36, 0x36, 0x36, 0x36, 0x36, 0xF6, 0x06, 0xF6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 - db 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x06, 0xF6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 - db 0x36, 0x36, 0x36, 0x36, 0x36, 0xF6, 0x06, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 - db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 - db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 - db 0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 - db 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 - db 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 - db 0x36, 0x36, 0x36, 0x36, 0x36, 0xF7, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xF7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 - db 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x36, 0x36, 0x36, 0x36, 0x36, 0xF7, 0x00, 0xF7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 - db 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 - db 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x18, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 - db 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xFF, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 - db 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 - db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 - db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF - db 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0 - db 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F - db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDC, 0xD8, 0xD8, 0xD8, 0xDC, 0x76, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0xD8, 0xCC, 0xC6, 0xC6, 0xC6, 0xCC, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0xFE, 0xC6, 0xC6, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0xFE, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0xFE, 0xC6, 0x60, 0x30, 0x18, 0x30, 0x60, 0xC6, 0xFE, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0x70, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7C, 0x60, 0x60, 0xC0, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x76, 0xDC, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x7E, 0x18, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0x6C, 0x38, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x38, 0x6C, 0xC6, 0xC6, 0xC6, 0x6C, 0x6C, 0x6C, 0x6C, 0xEE, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x1E, 0x30, 0x18, 0x0C, 0x3E, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0xDB, 0xDB, 0xDB, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x03, 0x06, 0x7E, 0xDB, 0xDB, 0xF3, 0x7E, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x1C, 0x30, 0x60, 0x60, 0x7C, 0x60, 0x60, 0x60, 0x30, 0x1C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0xFE, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x30, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x0C, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0C, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x0E, 0x1B, 0x1B, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 - db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xD8, 0xD8, 0xD8, 0x70, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x7E, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDC, 0x00, 0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x38, 0x6C, 0x6C, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x0F, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0xEC, 0x6C, 0x6C, 0x3C, 0x1C, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0xD8, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x70, 0xD8, 0x30, 0x60, 0xC8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 \ No newline at end of file + font_8x16: + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x7E, 0x81, 0xA5, 0x81, 0x81, 0xA5, 0x99, 0x81, 0x81, 0x7E, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x7E, 0xFF, 0xDB, 0xFF, 0xFF, 0xDB, 0xE7, 0xFF, 0xFF, 0x7E, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x6C, 0xFE, 0xFE, 0xFE, 0xFE, 0x7C, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7C, 0xFE, 0x7C, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x18, 0x3C, 0x3C, 0xE7, 0xE7, 0xE7, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x7E, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3C, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xC3, 0xC3, 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x66, 0x42, 0x42, 0x66, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x99, 0xBD, 0xBD, 0x99, 0xC3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + db 0x00, 0x00, 0x1E, 0x06, 0x0E, 0x1A, 0x78, 0xCC, 0xCC, 0xCC, 0xCC, 0x78, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x3F, 0x33, 0x3F, 0x30, 0x30, 0x30, 0x30, 0x70, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x7F, 0x63, 0x7F, 0x63, 0x63, 0x63, 0x63, 0x67, 0xE7, 0xE6, 0xC0, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x18, 0x18, 0xDB, 0x3C, 0xE7, 0x3C, 0xDB, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFE, 0xF8, 0xF0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x02, 0x06, 0x0E, 0x1E, 0x3E, 0xFE, 0x3E, 0x1E, 0x0E, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x7F, 0xDB, 0xDB, 0xDB, 0x7B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x7C, 0xC6, 0x60, 0x38, 0x6C, 0xC6, 0xC6, 0x6C, 0x38, 0x0C, 0xC6, 0x7C, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x7E, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0C, 0xFE, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xFE, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x6C, 0xFE, 0x6C, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7C, 0x7C, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x7C, 0x7C, 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x18, 0x3C, 0x3C, 0x3C, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x66, 0x66, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x6C, 0x6C, 0xFE, 0x6C, 0x6C, 0x6C, 0xFE, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00 + db 0x18, 0x18, 0x7C, 0xC6, 0xC2, 0xC0, 0x7C, 0x06, 0x06, 0x86, 0xC6, 0x7C, 0x18, 0x18, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0xC2, 0xC6, 0x0C, 0x18, 0x30, 0x60, 0xC6, 0x86, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x38, 0x6C, 0x6C, 0x38, 0x76, 0xDC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x0C, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x38, 0x6C, 0xC6, 0xC6, 0xD6, 0xD6, 0xC6, 0xC6, 0x6C, 0x38, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x7C, 0xC6, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0xC6, 0xFE, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x7C, 0xC6, 0x06, 0x06, 0x3C, 0x06, 0x06, 0x06, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x0C, 0x1C, 0x3C, 0x6C, 0xCC, 0xFE, 0x0C, 0x0C, 0x0C, 0x1E, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xFE, 0xC0, 0xC0, 0xC0, 0xFC, 0x06, 0x06, 0x06, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x38, 0x60, 0xC0, 0xC0, 0xFC, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xFE, 0xC6, 0x06, 0x06, 0x0C, 0x18, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0x7E, 0x06, 0x06, 0x06, 0x0C, 0x78, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0x0C, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xDE, 0xDE, 0xDE, 0xDC, 0xC0, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x10, 0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xFC, 0x66, 0x66, 0x66, 0x7C, 0x66, 0x66, 0x66, 0x66, 0xFC, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x3C, 0x66, 0xC2, 0xC0, 0xC0, 0xC0, 0xC0, 0xC2, 0x66, 0x3C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xF8, 0x6C, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6C, 0xF8, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xFE, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xFE, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xFE, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x60, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x3C, 0x66, 0xC2, 0xC0, 0xC0, 0xDE, 0xC6, 0xC6, 0x66, 0x3A, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x3C, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x1E, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0xCC, 0xCC, 0xCC, 0x78, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xE6, 0x66, 0x66, 0x6C, 0x78, 0x78, 0x6C, 0x66, 0x66, 0xE6, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xF0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xFE, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xC6, 0xEE, 0xFE, 0xFE, 0xD6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xC6, 0xE6, 0xF6, 0xFE, 0xDE, 0xCE, 0xC6, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xFC, 0x66, 0x66, 0x66, 0x7C, 0x60, 0x60, 0x60, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xD6, 0xDE, 0x7C, 0x0C, 0x0E, 0x00, 0x00 + db 0x00, 0x00, 0xFC, 0x66, 0x66, 0x66, 0x7C, 0x6C, 0x66, 0x66, 0x66, 0xE6, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0x60, 0x38, 0x0C, 0x06, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x7E, 0x7E, 0x5A, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x6C, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xD6, 0xD6, 0xD6, 0xFE, 0xEE, 0x6C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xC6, 0xC6, 0x6C, 0x7C, 0x38, 0x38, 0x7C, 0x6C, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xFE, 0xC6, 0x86, 0x0C, 0x18, 0x30, 0x60, 0xC2, 0xC6, 0xFE, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x3C, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0x70, 0x38, 0x1C, 0x0E, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x3C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x3C, 0x00, 0x00, 0x00, 0x00 + db 0x10, 0x38, 0x6C, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00 + db 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xE0, 0x60, 0x60, 0x78, 0x6C, 0x66, 0x66, 0x66, 0x66, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6, 0xC0, 0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x1C, 0x0C, 0x0C, 0x3C, 0x6C, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6, 0xFE, 0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x38, 0x6C, 0x64, 0x60, 0xF0, 0x60, 0x60, 0x60, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x7C, 0x0C, 0xCC, 0x78, 0x00 + db 0x00, 0x00, 0xE0, 0x60, 0x60, 0x6C, 0x76, 0x66, 0x66, 0x66, 0x66, 0xE6, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x06, 0x06, 0x00, 0x0E, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3C, 0x00 + db 0x00, 0x00, 0xE0, 0x60, 0x60, 0x66, 0x6C, 0x78, 0x78, 0x6C, 0x66, 0xE6, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0xEC, 0xFE, 0xD6, 0xD6, 0xD6, 0xD6, 0xC6, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7C, 0x60, 0x60, 0xF0, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x7C, 0x0C, 0x0C, 0x1E, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x76, 0x66, 0x60, 0x60, 0x60, 0xF0, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xC6, 0x60, 0x38, 0x0C, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x10, 0x30, 0x30, 0xFC, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0xD6, 0xD6, 0xD6, 0xFE, 0x6C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0x6C, 0x38, 0x38, 0x38, 0x6C, 0xC6, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7E, 0x06, 0x0C, 0xF8, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xCC, 0x18, 0x30, 0x60, 0xC6, 0xFE, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x0E, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x18, 0x0E, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x0E, 0x18, 0x18, 0x18, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6C, 0xC6, 0xC6, 0xC6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x3C, 0x66, 0xC2, 0xC0, 0xC0, 0xC0, 0xC2, 0x66, 0x3C, 0x0C, 0x06, 0x7C, 0x00, 0x00 + db 0x00, 0x00, 0xCC, 0x00, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x0C, 0x18, 0x30, 0x00, 0x7C, 0xC6, 0xFE, 0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x10, 0x38, 0x6C, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xCC, 0x00, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x60, 0x30, 0x18, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x38, 0x6C, 0x38, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x3C, 0x66, 0x60, 0x60, 0x66, 0x3C, 0x0C, 0x06, 0x3C, 0x00, 0x00, 0x00 + db 0x00, 0x10, 0x38, 0x6C, 0x00, 0x7C, 0xC6, 0xFE, 0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xC6, 0x00, 0x00, 0x7C, 0xC6, 0xFE, 0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x60, 0x30, 0x18, 0x00, 0x7C, 0xC6, 0xFE, 0xC0, 0xC0, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x66, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x18, 0x3C, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x60, 0x30, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0xC6, 0x00, 0x10, 0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 + db 0x38, 0x6C, 0x38, 0x00, 0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 + db 0x18, 0x30, 0x60, 0x00, 0xFE, 0x66, 0x60, 0x7C, 0x60, 0x60, 0x66, 0xFE, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x76, 0x36, 0x7E, 0xD8, 0xD8, 0x6E, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x3E, 0x6C, 0xCC, 0xCC, 0xFE, 0xCC, 0xCC, 0xCC, 0xCC, 0xCE, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x10, 0x38, 0x6C, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xC6, 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x60, 0x30, 0x18, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x30, 0x78, 0xCC, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x60, 0x30, 0x18, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xC6, 0x00, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7E, 0x06, 0x0C, 0x78, 0x00 + db 0x00, 0xC6, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0xC6, 0x00, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x18, 0x18, 0x3C, 0x66, 0x60, 0x60, 0x60, 0x66, 0x3C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x38, 0x6C, 0x64, 0x60, 0xF0, 0x60, 0x60, 0x60, 0x60, 0xE6, 0xFC, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18, 0x7E, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0xF8, 0xCC, 0xCC, 0xF8, 0xC4, 0xCC, 0xDE, 0xCC, 0xCC, 0xCC, 0xC6, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x0E, 0x1B, 0x18, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0xD8, 0x70, 0x00, 0x00 + db 0x00, 0x18, 0x30, 0x60, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x0C, 0x18, 0x30, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x18, 0x30, 0x60, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x18, 0x30, 0x60, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x76, 0xDC, 0x00, 0xDC, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00 + db 0x76, 0xDC, 0x00, 0xC6, 0xE6, 0xF6, 0xFE, 0xDE, 0xCE, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x3C, 0x6C, 0x6C, 0x3E, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x38, 0x6C, 0x6C, 0x38, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x30, 0x30, 0x00, 0x30, 0x30, 0x60, 0xC0, 0xC6, 0xC6, 0x7C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0xC0, 0xC0, 0xC2, 0xC6, 0xCC, 0x18, 0x30, 0x60, 0xDC, 0x86, 0x0C, 0x18, 0x3E, 0x00, 0x00 + db 0x00, 0xC0, 0xC0, 0xC2, 0xC6, 0xCC, 0x18, 0x30, 0x66, 0xCE, 0x9E, 0x3E, 0x06, 0x06, 0x00, 0x00 + db 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x3C, 0x3C, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6C, 0xD8, 0x6C, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0xD8, 0x6C, 0x36, 0x6C, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44 + db 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA + db 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77 + db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 + db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 + db 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 + db 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xF6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x18, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 + db 0x36, 0x36, 0x36, 0x36, 0x36, 0xF6, 0x06, 0xF6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 + db 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x06, 0xF6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 + db 0x36, 0x36, 0x36, 0x36, 0x36, 0xF6, 0x06, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 + db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 + db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 + db 0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 + db 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 + db 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 + db 0x36, 0x36, 0x36, 0x36, 0x36, 0xF7, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xF7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 + db 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x36, 0x36, 0x36, 0x36, 0x36, 0xF7, 0x00, 0xF7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 + db 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 + db 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x18, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 + db 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xFF, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 + db 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 + db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 + db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + db 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0 + db 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F + db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDC, 0xD8, 0xD8, 0xD8, 0xDC, 0x76, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0xD8, 0xCC, 0xC6, 0xC6, 0xC6, 0xCC, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0xFE, 0xC6, 0xC6, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0xFE, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0xFE, 0xC6, 0x60, 0x30, 0x18, 0x30, 0x60, 0xC6, 0xFE, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0x70, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7C, 0x60, 0x60, 0xC0, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x76, 0xDC, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x7E, 0x18, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0x6C, 0x38, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x38, 0x6C, 0xC6, 0xC6, 0xC6, 0x6C, 0x6C, 0x6C, 0x6C, 0xEE, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x1E, 0x30, 0x18, 0x0C, 0x3E, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0xDB, 0xDB, 0xDB, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x03, 0x06, 0x7E, 0xDB, 0xDB, 0xF3, 0x7E, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x1C, 0x30, 0x60, 0x60, 0x7C, 0x60, 0x60, 0x60, 0x30, 0x1C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0xFE, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x30, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x0C, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0C, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x0E, 0x1B, 0x1B, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 + db 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xD8, 0xD8, 0xD8, 0x70, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x7E, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDC, 0x00, 0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x38, 0x6C, 0x6C, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x0F, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0xEC, 0x6C, 0x6C, 0x3C, 0x1C, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0xD8, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x70, 0xD8, 0x30, 0x60, 0xC8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 \ No newline at end of file diff --git a/kernel/vga/mario.asm b/kernel/vga/mario.asm index e9a48b8..5d0b045 100755 --- a/kernel/vga/mario.asm +++ b/kernel/vga/mario.asm @@ -1,119 +1,125 @@ -mario: db 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x32, 0x05, 0x36, 0x36, 0x05, 0x05, 0x05, 0x10 - db 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x05, 0x36, 0x1F, 0x37 - db 0x36, 0x05, 0x05, 0x05, 0x05, 0x05, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10 - db 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x32, 0x05, 0x05, 0x05, 0x05, 0x05, 0x10, 0x00, 0x00, 0x00 - db 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x32, 0x05, 0x05 - db 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x10, 0x33, 0x10, 0x33, 0x32, 0x10 - db 0x10, 0x10, 0x10, 0x32, 0x34, 0x05, 0x00, 0x00, 0x00, 0x00, 0x34, 0x34, 0x34, 0x36, 0x10, 0x35 - db 0x10, 0x35, 0x35, 0x34, 0x32, 0x10, 0x32, 0x34, 0x37, 0x34, 0x32, 0x00, 0x00, 0x34, 0x37, 0x37 - db 0x37, 0x37, 0x37, 0x36, 0x36, 0x36, 0x35, 0x32, 0x10, 0x10, 0x34, 0x36, 0x36, 0x34, 0x32, 0x00 - db 0x00, 0x32, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x10, 0x36, 0x36, 0x32, 0x10, 0x36, 0x34 - db 0x34, 0x32, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x36 - db 0x36, 0x36, 0x36, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10 - db 0x10, 0x32, 0x34, 0x34, 0x34, 0x34, 0x32, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x6B, 0x8B, 0x8B, 0x8B, 0x8B, 0x6B, 0x32, 0x05, 0x05, 0x32, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0x8C, 0x8D, 0x8D, 0x8C, 0x8B, 0x8B, 0x6B, 0x05, 0x05, 0x05 - db 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x8C, 0x8E, 0x8E, 0x8D, 0x8C, 0x8C, 0x8B - db 0x6E, 0x1F, 0x1F, 0x6E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x8C, 0x8D, 0x8E - db 0x8C, 0x8B, 0x8B, 0x8B, 0x10, 0x6E, 0x1F, 0x6E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - db 0x00, 0x10, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x10, 0x6D, 0x6E, 0x6D, 0x6B, 0x00, 0x00, 0x00 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x32, 0x4B, 0x4B, 0x32 - db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x4E, 0x4C, 0x32, 0x4E, 0x4E, 0x4C - db 0x4C, 0x4C, 0x4B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x32, 0x32 - db 0x10, 0x4B, 0x4B, 0x32, 0x32, 0x32, 0x32, 0x10, 0x00, 0x00, 0x00, 0x00 +mario: + db 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x32, 0x05, 0x36, 0x36, 0x05, 0x05, 0x05, 0x10 + db 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x05, 0x36, 0x1F, 0x37 + db 0x36, 0x05, 0x05, 0x05, 0x05, 0x05, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10 + db 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x32, 0x05, 0x05, 0x05, 0x05, 0x05, 0x10, 0x00, 0x00, 0x00 + db 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x32, 0x05, 0x05 + db 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x10, 0x33, 0x10, 0x33, 0x32, 0x10 + db 0x10, 0x10, 0x10, 0x32, 0x34, 0x05, 0x00, 0x00, 0x00, 0x00, 0x34, 0x34, 0x34, 0x36, 0x10, 0x35 + db 0x10, 0x35, 0x35, 0x34, 0x32, 0x10, 0x32, 0x34, 0x37, 0x34, 0x32, 0x00, 0x00, 0x34, 0x37, 0x37 + db 0x37, 0x37, 0x37, 0x36, 0x36, 0x36, 0x35, 0x32, 0x10, 0x10, 0x34, 0x36, 0x36, 0x34, 0x32, 0x00 + db 0x00, 0x32, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x10, 0x36, 0x36, 0x32, 0x10, 0x36, 0x34 + db 0x34, 0x32, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x36 + db 0x36, 0x36, 0x36, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10 + db 0x10, 0x32, 0x34, 0x34, 0x34, 0x34, 0x32, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x6B, 0x8B, 0x8B, 0x8B, 0x8B, 0x6B, 0x32, 0x05, 0x05, 0x32, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0x8C, 0x8D, 0x8D, 0x8C, 0x8B, 0x8B, 0x6B, 0x05, 0x05, 0x05 + db 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x8C, 0x8E, 0x8E, 0x8D, 0x8C, 0x8C, 0x8B + db 0x6E, 0x1F, 0x1F, 0x6E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x8C, 0x8D, 0x8E + db 0x8C, 0x8B, 0x8B, 0x8B, 0x10, 0x6E, 0x1F, 0x6E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + db 0x00, 0x10, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x10, 0x6D, 0x6E, 0x6D, 0x6B, 0x00, 0x00, 0x00 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x32, 0x4B, 0x4B, 0x32 + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x4E, 0x4C, 0x32, 0x4E, 0x4E, 0x4C + db 0x4C, 0x4C, 0x4B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x32, 0x32 + db 0x10, 0x4B, 0x4B, 0x32, 0x32, 0x32, 0x32, 0x10, 0x00, 0x00, 0x00, 0x00 -grass_l: db 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 - db 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x10, 0x29, 0x2C, 0x2B, 0x2C, 0x2C - db 0x2B, 0x2B, 0x2D, 0x2D, 0x2C, 0x2C, 0x2B, 0x2C, 0x2C, 0x2C, 0x00, 0x10, 0x29, 0x2A, 0x2A, 0x2C - db 0x2D, 0x2A, 0x2C, 0x2B, 0x2C, 0x2D, 0x2B, 0x2C, 0x2C, 0x2D, 0x2D, 0x2C, 0x2C, 0x2B, 0x10, 0x29 - db 0x2B, 0x2A, 0x2B, 0x2B, 0x2B, 0x2C, 0x2B, 0x2B, 0x2A, 0x2A, 0x2B, 0x2A, 0x2B, 0x2B, 0x2A, 0x2C - db 0x2B, 0x2A, 0x10, 0x29, 0x2A, 0x2A, 0x2A, 0x2B, 0x2A, 0x2B, 0x2A, 0x2B, 0x2A, 0x2A, 0x2A, 0x2B - db 0x2A, 0x2A, 0x2A, 0x2B, 0x2A, 0x2B, 0x10, 0x28, 0x29, 0x2A, 0x2C, 0x29, 0x2B, 0x2A, 0x29, 0x2A - db 0x2B, 0x2C, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x28, 0x10, 0x29, 0x2A, 0x2A, 0x2D, 0x29 - db 0x2A, 0x29, 0x2A, 0x29, 0x2A, 0x2A, 0x29, 0x2A, 0x2A, 0x2C, 0x2A, 0x28, 0x29, 0x2A, 0x10, 0x28 - db 0x29, 0x2A, 0x2B, 0x2A, 0x2A, 0x28, 0x2A, 0x10, 0x29, 0x2A, 0x2A, 0x29, 0x10, 0x2B, 0x2A, 0x10 - db 0x29, 0x28, 0x10, 0x29, 0x29, 0x2B, 0x2A, 0x29, 0x2B, 0x29, 0x2B, 0x10, 0x28, 0x29, 0x10, 0x2B - db 0x10, 0x29, 0x28, 0x2A, 0x28, 0x2B, 0x00, 0x28, 0x2A, 0x29, 0x10, 0x10, 0x2A, 0x10, 0x10, 0x41 - db 0x10, 0x10, 0x41, 0x10, 0x28, 0x10, 0x29, 0x2B, 0x29, 0x28, 0x00, 0x10, 0x28, 0x10, 0x10, 0x41 - db 0x10, 0x41, 0x50, 0x50, 0x41, 0x50, 0x50, 0x41, 0x10, 0x41, 0x10, 0x29, 0x28, 0x41, 0x00, 0x00 - db 0x10, 0x10, 0x41, 0x10, 0x50, 0x50, 0x51, 0x51, 0x51, 0x52, 0x50, 0x50, 0x51, 0x51, 0x41, 0x41 - db 0x10, 0x50, 0x00, 0x00, 0x10, 0x41, 0x50, 0x41, 0x51, 0x52, 0x52, 0x52, 0x52, 0x53, 0x53, 0x53 - db 0x54, 0x53, 0x52, 0x50, 0x50, 0x51, 0x00, 0x00, 0x10, 0x41, 0x41, 0x51, 0x52, 0x53, 0x54, 0x53 - db 0x53, 0x54, 0x55, 0x55, 0x55, 0x54, 0x54, 0x52, 0x52, 0x54 +grass_l: + db 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 + db 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x10, 0x29, 0x2C, 0x2B, 0x2C, 0x2C + db 0x2B, 0x2B, 0x2D, 0x2D, 0x2C, 0x2C, 0x2B, 0x2C, 0x2C, 0x2C, 0x00, 0x10, 0x29, 0x2A, 0x2A, 0x2C + db 0x2D, 0x2A, 0x2C, 0x2B, 0x2C, 0x2D, 0x2B, 0x2C, 0x2C, 0x2D, 0x2D, 0x2C, 0x2C, 0x2B, 0x10, 0x29 + db 0x2B, 0x2A, 0x2B, 0x2B, 0x2B, 0x2C, 0x2B, 0x2B, 0x2A, 0x2A, 0x2B, 0x2A, 0x2B, 0x2B, 0x2A, 0x2C + db 0x2B, 0x2A, 0x10, 0x29, 0x2A, 0x2A, 0x2A, 0x2B, 0x2A, 0x2B, 0x2A, 0x2B, 0x2A, 0x2A, 0x2A, 0x2B + db 0x2A, 0x2A, 0x2A, 0x2B, 0x2A, 0x2B, 0x10, 0x28, 0x29, 0x2A, 0x2C, 0x29, 0x2B, 0x2A, 0x29, 0x2A + db 0x2B, 0x2C, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x28, 0x10, 0x29, 0x2A, 0x2A, 0x2D, 0x29 + db 0x2A, 0x29, 0x2A, 0x29, 0x2A, 0x2A, 0x29, 0x2A, 0x2A, 0x2C, 0x2A, 0x28, 0x29, 0x2A, 0x10, 0x28 + db 0x29, 0x2A, 0x2B, 0x2A, 0x2A, 0x28, 0x2A, 0x10, 0x29, 0x2A, 0x2A, 0x29, 0x10, 0x2B, 0x2A, 0x10 + db 0x29, 0x28, 0x10, 0x29, 0x29, 0x2B, 0x2A, 0x29, 0x2B, 0x29, 0x2B, 0x10, 0x28, 0x29, 0x10, 0x2B + db 0x10, 0x29, 0x28, 0x2A, 0x28, 0x2B, 0x00, 0x28, 0x2A, 0x29, 0x10, 0x10, 0x2A, 0x10, 0x10, 0x41 + db 0x10, 0x10, 0x41, 0x10, 0x28, 0x10, 0x29, 0x2B, 0x29, 0x28, 0x00, 0x10, 0x28, 0x10, 0x10, 0x41 + db 0x10, 0x41, 0x50, 0x50, 0x41, 0x50, 0x50, 0x41, 0x10, 0x41, 0x10, 0x29, 0x28, 0x41, 0x00, 0x00 + db 0x10, 0x10, 0x41, 0x10, 0x50, 0x50, 0x51, 0x51, 0x51, 0x52, 0x50, 0x50, 0x51, 0x51, 0x41, 0x41 + db 0x10, 0x50, 0x00, 0x00, 0x10, 0x41, 0x50, 0x41, 0x51, 0x52, 0x52, 0x52, 0x52, 0x53, 0x53, 0x53 + db 0x54, 0x53, 0x52, 0x50, 0x50, 0x51, 0x00, 0x00, 0x10, 0x41, 0x41, 0x51, 0x52, 0x53, 0x54, 0x53 + db 0x53, 0x54, 0x55, 0x55, 0x55, 0x54, 0x54, 0x52, 0x52, 0x54 -grass_f: db 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 - db 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x2C, 0x2B, 0x2C, 0x2C, 0x2D, 0x2D, 0x2D, 0x2C, 0x2D, 0x2B - db 0x2B, 0x2C, 0x2D, 0x2C, 0x2D, 0x2B, 0x2C, 0x2B, 0x2C, 0x2D, 0x2B, 0x2D, 0x2C, 0x2C, 0x2B, 0x2A - db 0x2C, 0x2A, 0x2C, 0x2D, 0x2C, 0x2C, 0x2B, 0x2C, 0x2A, 0x2C, 0x2D, 0x2D, 0x2B, 0x2B, 0x2A, 0x2B - db 0x2C, 0x2B, 0x2A, 0x2C, 0x2A, 0x2B, 0x2B, 0x2B, 0x2A, 0x2A, 0x2B, 0x2A, 0x2B, 0x2B, 0x2A, 0x2C - db 0x2B, 0x2A, 0x2A, 0x2A, 0x2A, 0x2B, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2B, 0x2A, 0x2A, 0x2A, 0x2B - db 0x2A, 0x2A, 0x2A, 0x2B, 0x2A, 0x2B, 0x2A, 0x2B, 0x2A, 0x2A, 0x2A, 0x29, 0x2B, 0x2A, 0x29, 0x2A - db 0x2A, 0x2B, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x28, 0x2A, 0x29, 0x28, 0x29, 0x2A, 0x29 - db 0x2A, 0x29, 0x2A, 0x29, 0x2A, 0x2A, 0x29, 0x2A, 0x2A, 0x2B, 0x2A, 0x28, 0x29, 0x2A, 0x29, 0x29 - db 0x28, 0x2A, 0x29, 0x29, 0x2A, 0x28, 0x2A, 0x10, 0x29, 0x2A, 0x2A, 0x29, 0x10, 0x2B, 0x2A, 0x10 - db 0x29, 0x28, 0x2A, 0x28, 0x2A, 0x2B, 0x10, 0x29, 0x2B, 0x29, 0x2B, 0x10, 0x28, 0x29, 0x10, 0x2B - db 0x10, 0x29, 0x28, 0x2A, 0x28, 0x2B, 0x28, 0x29, 0x2A, 0x2B, 0x10, 0x10, 0x2A, 0x10, 0x10, 0x41 - db 0x10, 0x10, 0x41, 0x10, 0x28, 0x10, 0x29, 0x2B, 0x29, 0x28, 0x41, 0x10, 0x28, 0x10, 0x10, 0x41 - db 0x10, 0x41, 0x50, 0x50, 0x41, 0x50, 0x50, 0x41, 0x10, 0x41, 0x10, 0x29, 0x28, 0x41, 0x50, 0x41 - db 0x10, 0x41, 0x41, 0x50, 0x51, 0x50, 0x51, 0x51, 0x51, 0x52, 0x50, 0x50, 0x51, 0x51, 0x41, 0x41 - db 0x10, 0x50, 0x51, 0x51, 0x50, 0x50, 0x51, 0x51, 0x52, 0x51, 0x52, 0x52, 0x52, 0x53, 0x53, 0x53 - db 0x54, 0x53, 0x52, 0x50, 0x50, 0x51, 0x53, 0x52, 0x51, 0x51, 0x53, 0x53, 0x52, 0x53, 0x54, 0x53 - db 0x53, 0x54, 0x55, 0x55, 0x55, 0x54, 0x54, 0x52, 0x52, 0x54 +grass_f: + db 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 + db 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x2C, 0x2B, 0x2C, 0x2C, 0x2D, 0x2D, 0x2D, 0x2C, 0x2D, 0x2B + db 0x2B, 0x2C, 0x2D, 0x2C, 0x2D, 0x2B, 0x2C, 0x2B, 0x2C, 0x2D, 0x2B, 0x2D, 0x2C, 0x2C, 0x2B, 0x2A + db 0x2C, 0x2A, 0x2C, 0x2D, 0x2C, 0x2C, 0x2B, 0x2C, 0x2A, 0x2C, 0x2D, 0x2D, 0x2B, 0x2B, 0x2A, 0x2B + db 0x2C, 0x2B, 0x2A, 0x2C, 0x2A, 0x2B, 0x2B, 0x2B, 0x2A, 0x2A, 0x2B, 0x2A, 0x2B, 0x2B, 0x2A, 0x2C + db 0x2B, 0x2A, 0x2A, 0x2A, 0x2A, 0x2B, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2B, 0x2A, 0x2A, 0x2A, 0x2B + db 0x2A, 0x2A, 0x2A, 0x2B, 0x2A, 0x2B, 0x2A, 0x2B, 0x2A, 0x2A, 0x2A, 0x29, 0x2B, 0x2A, 0x29, 0x2A + db 0x2A, 0x2B, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x28, 0x2A, 0x29, 0x28, 0x29, 0x2A, 0x29 + db 0x2A, 0x29, 0x2A, 0x29, 0x2A, 0x2A, 0x29, 0x2A, 0x2A, 0x2B, 0x2A, 0x28, 0x29, 0x2A, 0x29, 0x29 + db 0x28, 0x2A, 0x29, 0x29, 0x2A, 0x28, 0x2A, 0x10, 0x29, 0x2A, 0x2A, 0x29, 0x10, 0x2B, 0x2A, 0x10 + db 0x29, 0x28, 0x2A, 0x28, 0x2A, 0x2B, 0x10, 0x29, 0x2B, 0x29, 0x2B, 0x10, 0x28, 0x29, 0x10, 0x2B + db 0x10, 0x29, 0x28, 0x2A, 0x28, 0x2B, 0x28, 0x29, 0x2A, 0x2B, 0x10, 0x10, 0x2A, 0x10, 0x10, 0x41 + db 0x10, 0x10, 0x41, 0x10, 0x28, 0x10, 0x29, 0x2B, 0x29, 0x28, 0x41, 0x10, 0x28, 0x10, 0x10, 0x41 + db 0x10, 0x41, 0x50, 0x50, 0x41, 0x50, 0x50, 0x41, 0x10, 0x41, 0x10, 0x29, 0x28, 0x41, 0x50, 0x41 + db 0x10, 0x41, 0x41, 0x50, 0x51, 0x50, 0x51, 0x51, 0x51, 0x52, 0x50, 0x50, 0x51, 0x51, 0x41, 0x41 + db 0x10, 0x50, 0x51, 0x51, 0x50, 0x50, 0x51, 0x51, 0x52, 0x51, 0x52, 0x52, 0x52, 0x53, 0x53, 0x53 + db 0x54, 0x53, 0x52, 0x50, 0x50, 0x51, 0x53, 0x52, 0x51, 0x51, 0x53, 0x53, 0x52, 0x53, 0x54, 0x53 + db 0x53, 0x54, 0x55, 0x55, 0x55, 0x54, 0x54, 0x52, 0x52, 0x54 -grass_ul: db 0x10, 0x10, 0x10, 0x31, 0x51, 0x51, 0x52, 0x52, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54 - db 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x2C, 0x2C, 0x29, 0x2A, 0x31, 0x10, 0x51, 0x52, 0x52, 0x55 - db 0x53, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x2B, 0x2D, 0x2D, 0x29, 0x2B, 0x2A - db 0x31, 0x28, 0x53, 0x52, 0x52, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x2A, 0x2B - db 0x2B, 0x2A, 0x2D, 0x2C, 0x2B, 0x2A, 0x42, 0x52, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54 - db 0x54, 0x54, 0x2A, 0x2B, 0x2C, 0x2B, 0x2B, 0x2B, 0x2A, 0x2B, 0x28, 0x28, 0x52, 0x52, 0x54, 0x54 - db 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x2A, 0x2A, 0x2B, 0x2B, 0x2A, 0x2D, 0x2B, 0x2A, 0x2B, 0x28 - db 0x28, 0x53, 0x53, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x2B, 0x2A, 0x2B, 0x2A, 0x2A, 0x2B - db 0x2A, 0x28, 0x29, 0x2A, 0x10, 0x41, 0x53, 0x53, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x2C, 0x28 - db 0x29, 0x2A, 0x2A, 0x2A, 0x2B, 0x29, 0x28, 0x10, 0x42, 0x53, 0x53, 0x54, 0x55, 0x54, 0x55, 0x55 - db 0x55, 0x55, 0x28, 0x29, 0x28, 0x28, 0x10, 0x28, 0x2A, 0x28, 0x51, 0x42, 0x53, 0x52, 0x54, 0x54 - db 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x28, 0x29, 0x41, 0x41, 0x51, 0x10, 0x28, 0x41, 0x42, 0x52 - db 0x51, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x41, 0x10, 0x41, 0x51, 0x41, 0x51 - db 0x42, 0x53, 0x53, 0x54, 0x53, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x51, 0x41 - db 0x53, 0x41, 0x52, 0x52, 0x53, 0x54, 0x53, 0x53, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54 - db 0x54, 0x54, 0x52, 0x52, 0x52, 0x53, 0x55, 0x53, 0x53, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55 - db 0x55, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x53, 0x55, 0x54, 0x53, 0x53, 0x54, 0x54, 0x55, 0x54 - db 0x54, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x54, 0x54, 0x55 +grass_ul: + db 0x10, 0x10, 0x10, 0x31, 0x51, 0x51, 0x52, 0x52, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54 + db 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x2C, 0x2C, 0x29, 0x2A, 0x31, 0x10, 0x51, 0x52, 0x52, 0x55 + db 0x53, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x2B, 0x2D, 0x2D, 0x29, 0x2B, 0x2A + db 0x31, 0x28, 0x53, 0x52, 0x52, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x2A, 0x2B + db 0x2B, 0x2A, 0x2D, 0x2C, 0x2B, 0x2A, 0x42, 0x52, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54 + db 0x54, 0x54, 0x2A, 0x2B, 0x2C, 0x2B, 0x2B, 0x2B, 0x2A, 0x2B, 0x28, 0x28, 0x52, 0x52, 0x54, 0x54 + db 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x2A, 0x2A, 0x2B, 0x2B, 0x2A, 0x2D, 0x2B, 0x2A, 0x2B, 0x28 + db 0x28, 0x53, 0x53, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x2B, 0x2A, 0x2B, 0x2A, 0x2A, 0x2B + db 0x2A, 0x28, 0x29, 0x2A, 0x10, 0x41, 0x53, 0x53, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x2C, 0x28 + db 0x29, 0x2A, 0x2A, 0x2A, 0x2B, 0x29, 0x28, 0x10, 0x42, 0x53, 0x53, 0x54, 0x55, 0x54, 0x55, 0x55 + db 0x55, 0x55, 0x28, 0x29, 0x28, 0x28, 0x10, 0x28, 0x2A, 0x28, 0x51, 0x42, 0x53, 0x52, 0x54, 0x54 + db 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x28, 0x29, 0x41, 0x41, 0x51, 0x10, 0x28, 0x41, 0x42, 0x52 + db 0x51, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x41, 0x10, 0x41, 0x51, 0x41, 0x51 + db 0x42, 0x53, 0x53, 0x54, 0x53, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x51, 0x41 + db 0x53, 0x41, 0x52, 0x52, 0x53, 0x54, 0x53, 0x53, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54 + db 0x54, 0x54, 0x52, 0x52, 0x52, 0x53, 0x55, 0x53, 0x53, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55 + db 0x55, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x53, 0x55, 0x54, 0x53, 0x53, 0x54, 0x54, 0x55, 0x54 + db 0x54, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x54, 0x54, 0x55 -g_lefts: db 0x00, 0x00, 0x10, 0x41, 0x51, 0x52, 0x52, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54 - db 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x10, 0x50, 0x51, 0x53, 0x54, 0x55, 0x54, 0x53 - db 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x00, 0x00, 0x10, 0x50, 0x41, 0x52 - db 0x54, 0x54, 0x55, 0x54, 0x53, 0x54, 0x55, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00 - db 0x10, 0x41, 0x52, 0x52, 0x54, 0x53, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x55, 0x54 - db 0x54, 0x54, 0x00, 0x00, 0x10, 0x50, 0x51, 0x52, 0x52, 0x54, 0x53, 0x53, 0x54, 0x54, 0x54, 0x54 - db 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x10, 0x41, 0x51, 0x41, 0x54, 0x53, 0x54, 0x54 - db 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54, 0x00, 0x00, 0x10, 0x41, 0x51, 0x52 - db 0x52, 0x53, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x54, 0x00, 0x00 - db 0x10, 0x41, 0x50, 0x51, 0x53, 0x54, 0x54, 0x55, 0x55, 0x54, 0x55, 0x54, 0x54, 0x55, 0x55, 0x55 - db 0x55, 0x54, 0x00, 0x00, 0x10, 0x41, 0x50, 0x51, 0x53, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54 - db 0x54, 0x54, 0x55, 0x55, 0x54, 0x54, 0x00, 0x00, 0x10, 0x41, 0x50, 0x52, 0x52, 0x53, 0x54, 0x55 - db 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x10, 0x50, 0x51, 0x52 - db 0x50, 0x52, 0x53, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x00, 0x00 - db 0x10, 0x41, 0x52, 0x52, 0x52, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54 - db 0x54, 0x54, 0x00, 0x00, 0x10, 0x41, 0x50, 0x52, 0x52, 0x53, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55 - db 0x55, 0x55, 0x55, 0x54, 0x54, 0x54, 0x00, 0x00, 0x10, 0x50, 0x52, 0x52, 0x54, 0x53, 0x54, 0x54 - db 0x55, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x54, 0x54, 0x55 +g_lefts: + db 0x00, 0x00, 0x10, 0x41, 0x51, 0x52, 0x52, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54 + db 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x10, 0x50, 0x51, 0x53, 0x54, 0x55, 0x54, 0x53 + db 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x00, 0x00, 0x10, 0x50, 0x41, 0x52 + db 0x54, 0x54, 0x55, 0x54, 0x53, 0x54, 0x55, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00 + db 0x10, 0x41, 0x52, 0x52, 0x54, 0x53, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x55, 0x54 + db 0x54, 0x54, 0x00, 0x00, 0x10, 0x50, 0x51, 0x52, 0x52, 0x54, 0x53, 0x53, 0x54, 0x54, 0x54, 0x54 + db 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x10, 0x41, 0x51, 0x41, 0x54, 0x53, 0x54, 0x54 + db 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54, 0x00, 0x00, 0x10, 0x41, 0x51, 0x52 + db 0x52, 0x53, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x54, 0x00, 0x00 + db 0x10, 0x41, 0x50, 0x51, 0x53, 0x54, 0x54, 0x55, 0x55, 0x54, 0x55, 0x54, 0x54, 0x55, 0x55, 0x55 + db 0x55, 0x54, 0x00, 0x00, 0x10, 0x41, 0x50, 0x51, 0x53, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54 + db 0x54, 0x54, 0x55, 0x55, 0x54, 0x54, 0x00, 0x00, 0x10, 0x41, 0x50, 0x52, 0x52, 0x53, 0x54, 0x55 + db 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x00, 0x00, 0x10, 0x50, 0x51, 0x52 + db 0x50, 0x52, 0x53, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x00, 0x00 + db 0x10, 0x41, 0x52, 0x52, 0x52, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54 + db 0x54, 0x54, 0x00, 0x00, 0x10, 0x41, 0x50, 0x52, 0x52, 0x53, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55 + db 0x55, 0x55, 0x55, 0x54, 0x54, 0x54, 0x00, 0x00, 0x10, 0x50, 0x52, 0x52, 0x54, 0x53, 0x54, 0x54 + db 0x55, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x54, 0x54, 0x55 -g_earth: db 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54 - db 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55 - db 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x55, 0x55, 0x55, 0x55, 0x54 - db 0x55, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55 - db 0x55, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54 - db 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54 - db 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55 - db 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54 - db 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x54, 0x54, 0x54 - db 0x54, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x55 - db 0x55, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54 - db 0x54, 0x54, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54 - db 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54 - db 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x55 - db 0x55, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54 - db 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55 - db 0x55, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54 - db 0x54, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x54, 0x54, 0x55 \ No newline at end of file +g_earth: + db 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54 + db 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55 + db 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x55, 0x55, 0x55, 0x55, 0x54 + db 0x55, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55 + db 0x55, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54 + db 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54 + db 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55 + db 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54 + db 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x54, 0x54, 0x54 + db 0x54, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x55 + db 0x55, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54 + db 0x54, 0x54, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54 + db 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54 + db 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x55 + db 0x55, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x55, 0x54, 0x54 + db 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55 + db 0x55, 0x55, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54, 0x54, 0x54, 0x54, 0x54, 0x55, 0x54 + db 0x54, 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x54, 0x54, 0x55 \ No newline at end of file diff --git a/kernel/vga/text.asm b/kernel/vga/text.asm index 847acfc..5be11a9 100755 --- a/kernel/vga/text.asm +++ b/kernel/vga/text.asm @@ -9,9 +9,9 @@ ;-----------------; ; variables ; ;-----------------; - screen_rows db 25 ; all comments assume - screen_cols db 80 ; that this is 25 & 80 - cursor_pos dw 0 + screen_rows db 25 ; all comments assume + screen_cols db 80 ; that this is 25 & 80 + cursor_pos dw 0 ;--------------------------------------; @@ -19,40 +19,40 @@ ; in: bx = cursor attribs ; ;--------------------------------------; changecursor: - push ax - push dx + push ax + push dx - mov dx, 0x3D4 - mov al, 0x0A - mov ah, bh - out dx, ax - inc ax - mov ah, bl - out dx, ax + mov dx, 0x3D4 + mov al, 0x0A + mov ah, bh + out dx, ax + inc ax + mov ah, bl + out dx, ax - pop dx - pop ax - ret + pop dx + pop ax + ret ;----------------------; ; clear the screen ; ;----------------------; cls: - push bx - push cx + push bx + push cx - movzx cx, [screen_rows] + movzx cx, [screen_rows] .loop: - call _scroll_up - loop .loop + call _scroll_up + loop .loop - mov bx, 0 - call setcursor + mov bx, 0 + call setcursor - pop cx - pop bx - ret + pop cx + pop bx + ret ;-----------------------------------; @@ -60,17 +60,17 @@ cls: ; out: bh = x bl = y ; ;-----------------------------------; getcursorxy: - push ax + push ax - call getcursor - mov ax, bx - mov bl, [screen_cols] - div bl - mov bl, al - mov bh, ah + call getcursor + mov ax, bx + mov bl, [screen_cols] + div bl + mov bl, al + mov bh, ah - pop ax - ret + pop ax + ret ;-------------------------------; @@ -78,25 +78,25 @@ getcursorxy: ; out: bx = offset ; ;-------------------------------; getcursor: - push ax - push dx - - mov dx, 0x3D4 - mov al, 0x0E - out dx, al - inc dx - in al, dx - mov bh, al - mov al, 0x0F - dec dx - out dx, al - inc dx - in al, dx - mov bl, al - - pop dx - pop ax - ret + push ax + push dx + + mov dx, 0x3D4 + mov al, 0x0E + out dx, al + inc dx + in al, dx + mov bh, al + mov al, 0x0F + dec dx + out dx, al + inc dx + in al, dx + mov bl, al + + pop dx + pop ax + ret ;------------------------------; @@ -104,19 +104,19 @@ getcursor: ; bh = x bl = y ; ;------------------------------; setcursorxy: - push ax - push bx + push ax + push bx - xor ax, ax - mov al, [screen_cols] - mul bl ; bl * al = ax - movzx bx, bh - add bx, ax - call setcursor + xor ax, ax + mov al, [screen_cols] + mul bl ; bl * al = ax + movzx bx, bh + add bx, ax + call setcursor - pop bx - pop ax - ret + pop bx + pop ax + ret ;--------------------------; @@ -124,68 +124,68 @@ setcursorxy: ; bx = offset ; ;--------------------------; setcursor: - push ax - push bx - push dx + push ax + push bx + push dx - mov al, 0x0E - mov ah, bh - mov dx, 0x3D4 - out dx, ax - inc ax - mov ah, bl - out dx, ax + mov al, 0x0E + mov ah, bh + mov dx, 0x3D4 + out dx, ax + inc ax + mov ah, bl + out dx, ax - pop dx - pop bx - pop ax - ret + pop dx + pop bx + pop ax + ret ;-----------------------; ; cursor position +1 ; ;-----------------------; inccursor: - push ax - push bx + push ax + push bx - mov al, [screen_cols] - mov bl, [screen_rows] - mul bl - dec ax + mov al, [screen_cols] + mov bl, [screen_rows] + mul bl + dec ax - call getcursor - cmp bx, ax ; 0x7CF = (80*25)-1 - jne .cont - call scroll_up - jmp .end + call getcursor + cmp bx, ax ; 0x7CF = (80*25)-1 + jne .cont + call scroll_up + jmp .end - .cont: - inc bx - call setcursor + .cont: + inc bx + call setcursor - .end: - pop bx - pop ax - ret + .end: + pop bx + pop ax + ret ;-----------------------; ; cursor position -1 ; ;-----------------------; deccursor: - push bx + push bx - call getcursor - cmp bx, 0 - je .end + call getcursor + cmp bx, 0 + je .end - dec bx - call setcursor + dec bx + call setcursor - .end: - pop bx - ret + .end: + pop bx + ret @@ -193,23 +193,23 @@ deccursor: ; backspace - delete last typed char ; ;---------------------------------------; backspace: - push bx + push bx - call getcursor - cmp bx, 0 - je .end + call getcursor + cmp bx, 0 + je .end - call deccursor + call deccursor - mov bh, 0x07 - mov bl, 0 - call print_char + mov bh, 0x07 + mov bl, 0 + call print_char - call deccursor + call deccursor - .end: - pop bx - ret + .end: + pop bx + ret @@ -218,30 +218,30 @@ backspace: ; in: bl = char, bh = attrib ; ;-----------------------------------------; print_char: - push eax - push bx + push eax + push bx - cmp bl, 13 - jne .cont - call new_line - jmp .done + cmp bl, 13 + jne .cont + call new_line + jmp .done - .cont: - cmp bl, 10 ; ignore - je .done + .cont: + cmp bl, 10 ; ignore + je .done - push bx - call getcursor - movzx eax, bx - pop bx + push bx + call getcursor + movzx eax, bx + pop bx - mov [es:(eax*2 + 0xB8000)], bx + mov [es:(eax*2 + 0xB8000)], bx - call inccursor - .done: - pop bx - pop eax - ret + call inccursor + .done: + pop bx + pop eax + ret @@ -250,33 +250,33 @@ print_char: ; in: ebx = value, cl = color ; ;------------------------------------------; print_hex32: - push eax - push ebx - push ecx - push edx - - mov eax, ebx ; quick & dirty fix so - mov bh, cl ; input reg != eax - mov ecx, 8 - - .print_it: - rol eax, 4 - movzx edx, al - and edx, 0x0F - or edx, 0x30 - cmp edx, 0x39 - jna .cont - add edx, 7 - .cont: - mov bl, dl - call print_char - loop .print_it - - pop edx - pop ecx - pop ebx - pop eax - ret + push eax + push ebx + push ecx + push edx + + mov eax, ebx ; quick & dirty fix so + mov bh, cl ; input reg != eax + mov ecx, 8 + + .print_it: + rol eax, 4 + movzx edx, al + and edx, 0x0F + or edx, 0x30 + cmp edx, 0x39 + jna .cont + add edx, 7 + .cont: + mov bl, dl + call print_char + loop .print_it + + pop edx + pop ecx + pop ebx + pop eax + ret @@ -285,42 +285,42 @@ print_hex32: ; in: esi = message, bl = color ; ;-------------------------------------------------; print: - push eax - push bx + push eax + push bx - mov ah, bl - call getcursor - mov [cursor_pos], bx + mov ah, bl + call getcursor + mov [cursor_pos], bx - .displaychar: - lodsb - or al, al - jz .done + .displaychar: + lodsb + or al, al + jz .done - cmp al, 13 - jne .cont - mov bx, [cursor_pos] - call setcursor - call new_line - call getcursor - mov [cursor_pos], bx - jmp .displaychar + cmp al, 13 + jne .cont + mov bx, [cursor_pos] + call setcursor + call new_line + call getcursor + mov [cursor_pos], bx + jmp .displaychar - .cont: - cmp al, 10 ; ignore - je .displaychar - movzx ebx, [cursor_pos] - mov [es:(ebx*2 + 0xB8000)], ax - inc [cursor_pos] - jmp .displaychar + .cont: + cmp al, 10 ; ignore + je .displaychar + movzx ebx, [cursor_pos] + mov [es:(ebx*2 + 0xB8000)], ax + inc [cursor_pos] + jmp .displaychar - .done: - mov bx, [cursor_pos] - call setcursor ; update cursor on screen + .done: + mov bx, [cursor_pos] + call setcursor ; update cursor on screen - pop bx - pop eax - ret + pop bx + pop eax + ret @@ -328,26 +328,26 @@ print: ; make a new line (CR, LF) ; ;-----------------------------; new_line: - push bx + push bx - call getcursorxy - mov bh, [screen_rows] - dec bh - cmp bl, bh ; 24 - jb .newline + call getcursorxy + mov bh, [screen_rows] + dec bh + cmp bl, bh ; 24 + jb .newline - call scroll_up - jmp .done + call scroll_up + jmp .done - .newline: - call getcursorxy - mov bh, 0 - inc bl - call setcursorxy + .newline: + call getcursorxy + mov bh, 0 + inc bl + call setcursorxy - .done: - pop bx - ret + .done: + pop bx + ret @@ -355,57 +355,57 @@ new_line: ; scrolling.. ; ;----------------; scroll_up: - call _scroll_up - - .mv_curs: - push ax - push bx - - xor ax, ax - mov al, [screen_rows] ; mov bx, 80*24 - mov bl, [screen_cols] - dec al - mul bl - mov bx, ax - call setcursor - - pop bx - pop ax - ret - - _scroll_up: - push eax - push ecx - push edi - push esi - - mov edi, 0xB8000 - movzx esi, [screen_cols] - shl esi, 1 ; 80*2 = 160 - mov cl, [screen_rows] - dec cl - mov eax, esi - mul cl - shr ax, 2 ; ax = (160*24)/4 - movzx ecx, ax ; ecx = - || - - add esi, 0xB8000 ; esi = 0xB8000+160 - - rep movsd - - mov cl, [screen_cols] - shl cl, 1 ; 80*2 = 160 - mov al, [screen_rows] - dec al ; al = 24 - mul cl - movzx edi, ax - add edi, 0xB8000 ; edi = 0xB8000+160*24 - movzx ecx, [screen_cols] - shr ecx, 1 ; 80/2 - mov eax, 0x07000700 ; fill with zeros - rep stosd - - pop esi - pop edi - pop ecx - pop eax - ret \ No newline at end of file + call _scroll_up + + .mv_curs: + push ax + push bx + + xor ax, ax + mov al, [screen_rows] ; mov bx, 80*24 + mov bl, [screen_cols] + dec al + mul bl + mov bx, ax + call setcursor + + pop bx + pop ax + ret + + _scroll_up: + push eax + push ecx + push edi + push esi + + mov edi, 0xB8000 + movzx esi, [screen_cols] + shl esi, 1 ; 80*2 = 160 + mov cl, [screen_rows] + dec cl + mov eax, esi + mul cl + shr ax, 2 ; ax = (160*24)/4 + movzx ecx, ax ; ecx = - || - + add esi, 0xB8000 ; esi = 0xB8000+160 + + rep movsd + + mov cl, [screen_cols] + shl cl, 1 ; 80*2 = 160 + mov al, [screen_rows] + dec al ; al = 24 + mul cl + movzx edi, ax + add edi, 0xB8000 ; edi = 0xB8000+160*24 + movzx ecx, [screen_cols] + shr ecx, 1 ; 80/2 + mov eax, 0x07000700 ; fill with zeros + rep stosd + + pop esi + pop edi + pop ecx + pop eax + ret \ No newline at end of file diff --git a/kernel/vga/vga.asm b/kernel/vga/vga.asm index c27c62a..460dc32 100755 --- a/kernel/vga/vga.asm +++ b/kernel/vga/vga.asm @@ -11,106 +11,107 @@ ; VGA palettes ; ;-------------------; - palette256 db 00, 00, 00, 00, 10, 41, 12, 28, 18, 02, 43, 22, 35 - db 19, 09, 58, 00, 00, 57, 35, 12, 43, 43, 47, 24, 24 - db 28, 20, 24, 60, 10, 60, 15, 31, 47, 63, 62, 56, 20 - db 60, 56, 22, 63, 61, 36, 63, 63, 63, 00, 00, 00, 05 - db 05, 05, 08, 08, 08, 11, 11, 11, 14, 14, 14, 17, 17 - db 17, 20, 20, 20, 24, 24, 24, 28, 28, 28, 32, 32, 32 - db 36, 36, 36, 40, 40, 40, 45, 45, 45, 50, 50, 50, 56 - db 56, 56, 63, 63, 63, 13, 12, 15, 15, 16, 22, 17, 20 - db 29, 19, 24, 36, 21, 28, 43, 23, 31, 50, 25, 34, 57 - db 26, 42, 63, 00, 15, 02, 01, 22, 04, 02, 29, 06, 03 - db 36, 08, 04, 43, 10, 05, 50, 12, 06, 57, 14, 20, 63 - db 40, 18, 06, 07, 25, 12, 11, 33, 17, 14, 40, 23, 18 - db 48, 28, 21, 55, 34, 25, 62, 39, 27, 63, 48, 36, 15 - db 03, 02, 22, 06, 04, 29, 09, 06, 36, 12, 08, 43, 15 - db 10, 50, 18, 12, 57, 21, 14, 63, 28, 20, 15, 00, 00 - db 22, 07, 00, 29, 15, 00, 36, 23, 00, 43, 31, 00, 50 - db 39, 00, 57, 47, 00, 63, 55, 00, 15, 05, 03, 22, 11 - db 07, 29, 17, 11, 36, 23, 15, 43, 29, 19, 50, 35, 23 - db 57, 41, 27, 63, 53, 34, 28, 14, 12, 33, 20, 14, 38 - db 26, 16, 43, 32, 18, 48, 38, 20, 53, 44, 22, 58, 50 - db 24, 63, 56, 30, 05, 05, 06, 10, 10, 13, 15, 15, 20 - db 20, 20, 27, 25, 25, 34, 30, 30, 41, 35, 35, 48, 44 - db 44, 63, 03, 06, 05, 05, 11, 09, 07, 16, 13, 09, 21 - db 17, 11, 26, 21, 13, 31, 25, 15, 36, 29, 20, 48, 38 - db 06, 06, 07, 13, 13, 15, 20, 20, 23, 27, 27, 31, 34 - db 34, 39, 41, 41, 47, 48, 48, 55, 57, 57, 63, 06, 15 - db 04, 12, 22, 08, 18, 29, 12, 24, 36, 16, 30, 43, 20 - db 36, 50, 24, 42, 57, 28, 54, 63, 35, 15, 10, 10, 22 - db 16, 16, 29, 21, 21, 36, 27, 27, 43, 32, 32, 50, 38 - db 38, 57, 43, 43, 63, 54, 54, 15, 15, 06, 22, 22, 12 - db 29, 29, 18, 36, 36, 24, 43, 43, 30, 50, 50, 36, 57 - db 57, 42, 63, 63, 54, 02, 04, 14, 06, 12, 21, 10, 20 - db 28, 14, 28, 35, 18, 36, 42, 22, 44, 49, 26, 52, 56 - db 36, 63, 63, 18, 04, 14, 24, 08, 21, 31, 12, 28, 37 - db 16, 35, 44, 20, 42, 50, 24, 49, 57, 28, 56, 63, 38 - db 63, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 - db 00, 00, 00, 00, 00, 00, 00, 00, 00, 53, 44, 22, 09 - db 08, 12, 16, 14, 16, 22, 21, 20, 29, 27, 24, 35, 34 - db 28, 42, 40, 32, 48, 47, 36, 57, 56, 43, 08, 12, 16 - db 14, 16, 22, 21, 20, 29, 27, 24, 35, 34, 28, 42, 40 - db 32, 48, 47, 36, 57, 56, 43, 63, 13, 09, 11, 21, 16 - db 15, 27, 22, 18, 36, 29, 22, 42, 35, 25, 51, 42, 29 - db 57, 48, 32, 63, 56, 39, 06, 14, 09, 12, 21, 14, 18 - db 27, 22, 24, 33, 28, 30, 39, 36, 36, 46, 42, 42, 52 - db 47, 50, 59, 53, 00, 00, 00, 00, 00, 00, 00, 00, 00 - db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 - db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 - db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 - db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 - db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 - db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 - db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 - db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 - db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 - db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 - db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 - db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 - db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 - db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 - db 00 + palette256: + db 00, 00, 00, 00, 10, 41, 12, 28, 18, 02, 43, 22, 35 + db 19, 09, 58, 00, 00, 57, 35, 12, 43, 43, 47, 24, 24 + db 28, 20, 24, 60, 10, 60, 15, 31, 47, 63, 62, 56, 20 + db 60, 56, 22, 63, 61, 36, 63, 63, 63, 00, 00, 00, 05 + db 05, 05, 08, 08, 08, 11, 11, 11, 14, 14, 14, 17, 17 + db 17, 20, 20, 20, 24, 24, 24, 28, 28, 28, 32, 32, 32 + db 36, 36, 36, 40, 40, 40, 45, 45, 45, 50, 50, 50, 56 + db 56, 56, 63, 63, 63, 13, 12, 15, 15, 16, 22, 17, 20 + db 29, 19, 24, 36, 21, 28, 43, 23, 31, 50, 25, 34, 57 + db 26, 42, 63, 00, 15, 02, 01, 22, 04, 02, 29, 06, 03 + db 36, 08, 04, 43, 10, 05, 50, 12, 06, 57, 14, 20, 63 + db 40, 18, 06, 07, 25, 12, 11, 33, 17, 14, 40, 23, 18 + db 48, 28, 21, 55, 34, 25, 62, 39, 27, 63, 48, 36, 15 + db 03, 02, 22, 06, 04, 29, 09, 06, 36, 12, 08, 43, 15 + db 10, 50, 18, 12, 57, 21, 14, 63, 28, 20, 15, 00, 00 + db 22, 07, 00, 29, 15, 00, 36, 23, 00, 43, 31, 00, 50 + db 39, 00, 57, 47, 00, 63, 55, 00, 15, 05, 03, 22, 11 + db 07, 29, 17, 11, 36, 23, 15, 43, 29, 19, 50, 35, 23 + db 57, 41, 27, 63, 53, 34, 28, 14, 12, 33, 20, 14, 38 + db 26, 16, 43, 32, 18, 48, 38, 20, 53, 44, 22, 58, 50 + db 24, 63, 56, 30, 05, 05, 06, 10, 10, 13, 15, 15, 20 + db 20, 20, 27, 25, 25, 34, 30, 30, 41, 35, 35, 48, 44 + db 44, 63, 03, 06, 05, 05, 11, 09, 07, 16, 13, 09, 21 + db 17, 11, 26, 21, 13, 31, 25, 15, 36, 29, 20, 48, 38 + db 06, 06, 07, 13, 13, 15, 20, 20, 23, 27, 27, 31, 34 + db 34, 39, 41, 41, 47, 48, 48, 55, 57, 57, 63, 06, 15 + db 04, 12, 22, 08, 18, 29, 12, 24, 36, 16, 30, 43, 20 + db 36, 50, 24, 42, 57, 28, 54, 63, 35, 15, 10, 10, 22 + db 16, 16, 29, 21, 21, 36, 27, 27, 43, 32, 32, 50, 38 + db 38, 57, 43, 43, 63, 54, 54, 15, 15, 06, 22, 22, 12 + db 29, 29, 18, 36, 36, 24, 43, 43, 30, 50, 50, 36, 57 + db 57, 42, 63, 63, 54, 02, 04, 14, 06, 12, 21, 10, 20 + db 28, 14, 28, 35, 18, 36, 42, 22, 44, 49, 26, 52, 56 + db 36, 63, 63, 18, 04, 14, 24, 08, 21, 31, 12, 28, 37 + db 16, 35, 44, 20, 42, 50, 24, 49, 57, 28, 56, 63, 38 + db 63, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 + db 00, 00, 00, 00, 00, 00, 00, 00, 00, 53, 44, 22, 09 + db 08, 12, 16, 14, 16, 22, 21, 20, 29, 27, 24, 35, 34 + db 28, 42, 40, 32, 48, 47, 36, 57, 56, 43, 08, 12, 16 + db 14, 16, 22, 21, 20, 29, 27, 24, 35, 34, 28, 42, 40 + db 32, 48, 47, 36, 57, 56, 43, 63, 13, 09, 11, 21, 16 + db 15, 27, 22, 18, 36, 29, 22, 42, 35, 25, 51, 42, 29 + db 57, 48, 32, 63, 56, 39, 06, 14, 09, 12, 21, 14, 18 + db 27, 22, 24, 33, 28, 30, 39, 36, 36, 46, 42, 42, 52 + db 47, 50, 59, 53, 00, 00, 00, 00, 00, 00, 00, 00, 00 + db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 + db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 + db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 + db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 + db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 + db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 + db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 + db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 + db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 + db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 + db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 + db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 + db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 + db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 + db 00 ;---------------------------------; ; sets the screen to mode 0x03 ; ;---------------------------------; set_mode_0x03: - push eax + push eax - ;mov ax, 0x0003 ; "realmode ax", move to - ;shl eax, 16 ; the high part of eax - ;mov ax, 0x77 ; os function number for ints - ;int 0x32 + ;mov ax, 0x0003 ; "realmode ax", move to + ;shl eax, 16 ; the high part of eax + ;mov ax, 0x77 ; os function number for ints + ;int 0x32 - ;mov eax, 0x00030077 ; or it could look like this. + ;mov eax, 0x00030077 ; or it could look like this. - mov eax, 0x00030000 - mov ebx, 0x00100000 ; int no. in high part and - call rmode_int ; realmode bx in low part + mov eax, 0x00030000 + mov ebx, 0x00100000 ; int no. in high part and + call rmode_int ; realmode bx in low part - pop eax - ret + pop eax + ret ;---------------------------------; ; sets the screen to mode 0x13 ; ;---------------------------------; set_mode_0x13: - push eax - push ebx + push eax + push ebx - mov eax, 0x00130000 ; realmode ax in high part - mov ebx, 0x00100000 ; int no. in high part and - call rmode_int ; realmode bx in low part + mov eax, 0x00130000 ; realmode ax in high part + mov ebx, 0x00100000 ; int no. in high part and + call rmode_int ; realmode bx in low part - mov esi, palette256 - call set_palette256 + mov esi, palette256 + call set_palette256 - pop ebx - pop eax - ret + pop ebx + pop eax + ret ;------------------------------------; @@ -124,25 +125,25 @@ set_mode_0x13: ; output: none. ; ;------------------------------------; put_0x13_pixel: - push ax - push bx - push cx - push edi - - mov edi, 0xa0000 ; directly to mem - add di, bx - mov bx, cx - shl cx, 8 - shl bx, 6 - add cx, bx - add di, cx - stosb - - pop edi - pop cx - pop bx - pop ax - ret + push ax + push bx + push cx + push edi + + mov edi, 0xa0000 ; directly to mem + add di, bx + mov bx, cx + shl cx, 8 + shl bx, 6 + add cx, bx + add di, cx + stosb + + pop edi + pop cx + pop bx + pop ax + ret ;-----------------------------------------------------; @@ -154,33 +155,33 @@ put_0x13_pixel: ; output: none. ; ;-----------------------------------------------------; put_0x13_sprite: - pushad ; this was a - .row_loop: ; nightmare to write. - dec dx ; guess how many times - push cx ; i got lost in the push - push ax ; and pops here.. ;) - .col_loop: ; not to mention what - dec cx ; time it was when i wrote - push ax ; it.. :P - push bx - push cx - mov cx, bx - mov bx, ax - lodsb - call put_0x13_pixel - pop cx - pop bx - pop ax - inc ax - cmp cx, 0 - jne .col_loop - pop ax - pop cx - inc bx - cmp dx, 0 - jne .row_loop - popad - ret + pushad ; this was a + .row_loop: ; nightmare to write. + dec dx ; guess how many times + push cx ; i got lost in the push + push ax ; and pops here.. ;) + .col_loop: ; not to mention what + dec cx ; time it was when i wrote + push ax ; it.. :P + push bx + push cx + mov cx, bx + mov bx, ax + lodsb + call put_0x13_pixel + pop cx + pop bx + pop ax + inc ax + cmp cx, 0 + jne .col_loop + pop ax + pop cx + inc bx + cmp dx, 0 + jne .row_loop + popad + ret ;---------------------------------------------; @@ -190,32 +191,32 @@ put_0x13_sprite: ; output: none. ; ;---------------------------------------------; set_palette256: - push ax - push cx - push dx - - xor cx, cx - .l1: - mov dx, 0x03C8 - mov al, cl ; color no. = loop no. - out dx, al - inc dx ; port 0x3C9 - mov al, byte [esi] ; red - out dx, al - inc esi - mov al, byte [esi] ; green - out dx, al - inc esi - mov al, byte [esi] ; blue - out dx, al - inc esi - - inc cx - cmp cx, 256 - jl .l1 - - pop dx - pop cx - pop ax - ret + push ax + push cx + push dx + + xor cx, cx + .l1: + mov dx, 0x03C8 + mov al, cl ; color no. = loop no. + out dx, al + inc dx ; port 0x3C9 + mov al, byte [esi] ; red + out dx, al + inc esi + mov al, byte [esi] ; green + out dx, al + inc esi + mov al, byte [esi] ; blue + out dx, al + inc esi + + inc cx + cmp cx, 256 + jl .l1 + + pop dx + pop cx + pop ax + ret -- 2.52.0