*Font functions have been rewritten. Now kernel use bit-compressed fonts.

You must use char.mt and char2.mt from MeOsEmul or MeOsDebug program 
or download them at http://shade.msu.ru/~msu-se/temp/char.7z
*Small fix in memmap.inc for memory manager.

git-svn-id: svn://kolibrios.org@12 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Andrey Halyavin (halyavin) 2005-10-25 11:01:36 +00:00
parent 2a96dafd9f
commit 94f0f6c818
4 changed files with 90 additions and 154 deletions

View File

@ -127,9 +127,9 @@ start_of_code:
mov es,ax mov es,ax
mov ds,ax mov ds,ax
mov ax,0x2000 mov ax,0x3000
mov ss,ax mov ss,ax
mov sp,0xffff mov sp,0xec00
xor ax,ax xor ax,ax
xor bx,bx xor bx,bx
@ -224,9 +224,9 @@ start_of_code:
mov es,ax mov es,ax
mov ds,ax mov ds,ax
mov ax,0x2000 mov ax,0x3000
mov ss,ax mov ss,ax
mov esp,0xffff mov esp,0xec00
xor eax,eax xor eax,eax
xor ebx,ebx xor ebx,ebx

View File

@ -40,57 +40,36 @@ dtext:
align 4 align 4
drawletter: drawletter:
;eax - x
;ebx - y
;ecx - color
;edx - ascii code
pushad
call [disable_mouse]
mov esi,9
lea ebp,[0x3F600+8*edx+edx]
.symloop:
push esi
mov dl,byte [ebp]
mov esi,8
.pixloop:
test dl,1
jz .nopix
call [putpixel]
.nopix:
shr dl,1
inc eax
dec esi
jnz .pixloop
sub eax,8
inc ebx
inc ebp
pop esi
dec esi
jnz .symloop
popad
ret
; eax x
; ebx y
; ecx color
; edx letter
; esi shl size
; edi force
pushad
call [disable_mouse]
xor eax, eax
xor ebx, ebx ; 0x37000+eax+ebx*8
inc esi
align 4
chc:
push eax
push ebx
mov edx,ebx
shl edx,3
add edx,eax
add edx,0x37000+8
mov ecx,[esp+32-12+8]
imul ecx,8*10
add edx,ecx
cmp [edx],byte 'o'
jnz .nopix
mov eax,[esp+4]
mov ebx,[esp+0]
add eax,[esp+32+2*4-4]
add ebx,[esp+32+2*4-16]
mov ecx,[esp+32+2*4-8]
;;;call [disable_mouse]
call [putpixel]
.nopix:
pop ebx
pop eax
inc eax
cmp eax,5 ; ebp
jne chc
xor eax, eax
inc ebx
cmp ebx,9 ; ebp
jne chc
popad
ret
dtext2: dtext2:
@ -114,33 +93,17 @@ dtext2:
align 4 align 4
letnew2: letnew2:
push eax
push ecx push ecx
push edx push edx
movzx ebx,ax movzx ebx,ax
shr eax,16 shr eax,16
movzx edx,byte [ecx] movzx edx,byte [ecx]
mov ecx,[esp+3*4+32-16] mov ecx,[esp+2*4+32-16]
call drawletter2 call drawletter2
shl eax,16
add eax,ebx
pop edx pop edx
pop ecx pop ecx
pop eax
push edx
movzx edx,byte [ecx]
imul edx,10*10
add edx,0x30000
cmp [edx+6],byte ' '
jne nocharadd8
add eax,8*65536
jmp charaddok
nocharadd8:
movzx edx,byte [edx+6]
sub edx,47
shl edx,16
add eax,edx
charaddok:
pop edx
inc ecx inc ecx
dec edx dec edx
@ -151,75 +114,47 @@ dtext2:
align 4 align 4
drawletter2: drawletter2:
;eax - x
; eax x ;ebx - y
; ebx y ;ecx - color
; ecx color ;edx - symbol
; edx letter ;edi - force?
; esi shl size ;result - eax=eax+sym_size
; edi force pushad
call [disable_mouse]
pushad mov esi,9
call [disable_mouse] lea ebp,[0x3EC00+8*edx+edx]
xor eax, eax push dword -1 ;size
xor ebx, ebx ; +eax+ebx*8 .symloop:
inc esi push esi
mov dl,byte [ebp]
align 4 xor esi,esi
chc2: .pixloop:
test dl,1
push eax jz .nopix
push ebx cmp [esp+4],esi
jge .no_inc
; cmp esi,1 mov [esp+4],esi
; je noldiv .no_inc:
; xor edx,edx call [putpixel]
; div esi .nopix:
; push eax shr dl,1
; xor edx,edx inc esi
; mov eax,ebx inc eax
; div esi cmp esi,8
; mov ebx,eax jl .pixloop
; pop eax sub eax,8
; noldiv: inc ebx
pop esi
mov edx,ebx inc ebp
;shl edx,3 dec esi
imul edx,10 jnz .symloop
add edx,eax pop edx
add edx,0x30000+8+2 test edx,edx
mov ecx,[esp+32-12+8] jge .nospace
;shl ecx,6 mov edx,4
imul ecx,10*10 .nospace:
add edx,ecx add edx,2
cmp [edx],byte 'o' add [esp+32-4],edx
jnz nopix2 popad
mov eax,[esp+4] ret
mov ebx,[esp+0]
add eax,[esp+32+2*4-4]
add ebx,[esp+32+2*4-16]
mov ecx,[esp+32+2*4-8]
;;;call [disable_mouse]
call [putpixel]
nopix2:
pop ebx
pop eax
;mov ebp,7
;imul ebp,esi
inc eax
cmp eax,7 ;ebp
jnz chc2
xor eax, eax
;mov ebp,9
;imul ebp,esi
inc ebx
cmp ebx,9 ; ebp
jnz chc2
popad
ret

View File

@ -169,7 +169,7 @@ app_data equ 3+app_data_l-gdts
mov fs,ax mov fs,ax
mov gs,ax mov gs,ax
mov ss,ax mov ss,ax
mov esp,0x30000 ; Set stack mov esp,0x3ec00 ; Set stack
jmp pword os_code:B32 ; jmp to enable 32 bit mode jmp pword os_code:B32 ; jmp to enable 32 bit mode
use32 use32
@ -449,15 +449,15 @@ include 'vmodeld.inc'
mov eax,char mov eax,char
mov esi,12 mov esi,12
xor ebx,ebx xor ebx,ebx
mov ecx,26000 mov ecx,2560;26000
mov edx,0x37000 mov edx,0x3F600;0x37000
call fileread call fileread
mov eax,char2 mov eax,char2
mov esi,12 mov esi,12
xor ebx,ebx xor ebx,ebx
mov ecx,26000 mov ecx,2560;26000
mov edx,0x30000 mov edx,0x3EC00;0x30000
call fileread call fileread
mov esi,boot_fonts mov esi,boot_fonts

View File

@ -127,9 +127,9 @@
; FFFF byte do not change task for 1/100 sec. ; FFFF byte do not change task for 1/100 sec.
; ;
; 10000 -> 1FFFF 32 bit os ; 10000 -> 1FFFF 32 bit os
; 20000 -> 2FFFF 32 bit stack ; 20000 -> 3EBFF 32 bit stack
; 30000 -> 36FFF basic text font II ; 3EC00 -> 3F5FF basic text font II
; 37000 -> 3BFFF basic text font I ; 3F600 -> 3FFFF basic text font I
; 40000 -> 4FFFF data of retrieved disks and partitions (Mario79) ; 40000 -> 4FFFF data of retrieved disks and partitions (Mario79)
; 50000 -> 5FFFF free ; 50000 -> 5FFFF free
; 60000 -> 7FFFF paging tables ; 60000 -> 7FFFF paging tables
@ -152,6 +152,7 @@
; ;
; B0 dword int40 handler in use ; 0 if not in use ; B0 dword int40 handler in use ; 0 if not in use
; B4 byte keyboard mode: 0 = keymap, 1 = scancodes ; B4 byte keyboard mode: 0 = keymap, 1 = scancodes
; B8 dword physical address of directory table
; ;
; 90000 -> 9FFFF tmp ; 90000 -> 9FFFF tmp
; A0000 -> AFFFF screen access area ; A0000 -> AFFFF screen access area