/kernel/branches/gfx_kernel/core/newproce.inc |
---|
468,6 → 468,7 |
;calculate parameter length |
mov esi,eax |
xor ecx,ecx |
inc ecx ; include terminating null |
.command_line_len: |
cmp byte [esi],0 |
jz .command_line_len_end |
/kernel/branches/gfx_kernel/gui/font.inc |
---|
1,119 → 1,107 |
align 4 |
dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org]) |
; eax x & y |
; ebx font ( 0xX0000000 ) & color ( 0x00RRGGBB ) |
; ebx style ( 0xX0000000 ) & color ( 0x00RRGGBB ) |
; X = ABnnb: |
; nn = font |
; A = 0 <=> output edx characters; otherwise output ASCIIZ string |
; B = 1 <=> fill background with color esi |
; ecx start of text |
; edx length |
; edi 1 force |
pushad |
call [disable_mouse] |
mov esi,edx ;esi=length |
mov ebp,ecx ;ebp=ptr to text |
mov ebp, ecx ; ebp=pointer to text |
mov ecx,ebx ;ecx=color |
movsx ebx,ax ;ebx=y |
sar eax,16 ;eax=x |
and esi, 0xFF ;limit of text = 255 symbols |
dtext.lnew: |
test esi, esi ; zero length ? |
jnz @f |
jmp dtext.output_end |
cmp edx, 255 |
jb .loop |
mov edx, 255 |
.loop: |
test ecx, ecx |
js .test_asciiz |
dec edx |
js .end |
jmp @f |
.test_asciiz: |
cmp byte [ebp], 0 |
jz .end |
@@: |
movzx edx,byte [ebp] ;edx=ascii code |
test edx,edx |
jz dtext.output_end |
push edx |
movzx edx, byte [ebp] |
inc ebp |
test ecx,0x10000000 |
jnz dtext.letnew2 |
align 4 |
.letnew: |
drawletter: ;output char of type 1(monotype) |
;eax - x |
;ebx - y |
;ecx - color |
;edx - ascii code |
jnz .font2 |
pushad |
call [disable_mouse] |
mov esi,9 |
lea ebp,[0x3F600+8*edx+edx] |
.symloop: |
push esi |
.symloop1: |
mov dl,byte [ebp] |
mov esi,8 |
.pixloop: |
test dl,1 |
jz .nopix |
or dl, 1 shl 6 |
.pixloop1: |
shr dl, 1 |
jz .pixloop1end |
jnc .nopix |
call [putpixel] |
jmp .pixloop1cont |
.nopix: |
shr dl,1 |
test ecx, 0x40000000 |
jz .pixloop1cont |
push ecx |
mov ecx, [esp+4+4] |
call [putpixel] |
pop ecx |
.pixloop1cont: |
inc eax |
dec esi |
jnz .pixloop |
sub eax,8 |
jmp .pixloop1 |
.pixloop1end: |
sub eax, 6 |
inc ebx |
inc ebp |
pop esi |
dec esi |
jnz .symloop |
jnz .symloop1 |
popad |
add eax,6 |
inc ebp ;ptr to text |
dec esi ;length |
jnz dtext.lnew |
jmp dtext.output_end |
dtext.letnew2: |
align 4 |
drawletter2: ;output char of type 2(proportional) |
;eax - x |
;ebx - y |
;ecx - color |
;edx - symbol |
;edi - force? |
;result - eax=eax+sym_size |
pop edx |
jmp .loop |
.font2: |
pushad |
call [disable_mouse] |
shl edx,1 |
mov esi,9 |
add edx, edx |
lea ebp,[0x3EC00+4*edx+edx+1] |
.symloop: |
push 9 |
movzx esi, byte [ebp-1] |
.symloop2: |
mov dl, byte [ebp] |
push esi |
mov dl,byte [ebp] |
xor esi,esi |
.pixloop: |
test dl,1 |
jz .nopix |
.pixloop2: |
shr dl, 1 |
jnc .nopix2 |
call [putpixel] |
.nopix: |
shr dl,1 |
inc esi |
jmp .pixloop2cont |
.nopix2: |
test ecx, 0x40000000 |
jz .pixloop2cont |
push ecx |
mov ecx, [esp+12+4] |
call [putpixel] |
pop ecx |
.pixloop2cont: |
inc eax |
cmp esi,8 |
jl .pixloop |
sub eax,8 |
dec esi |
jnz .pixloop2 |
pop esi |
sub eax, esi |
inc ebx |
pop esi |
inc ebp |
dec esi |
jnz .symloop |
movzx edx,byte [ebp-10] |
add [esp+32-4],edx |
dec dword [esp] |
jnz .symloop2 |
pop eax |
add dword [esp+28], esi |
popad |
inc ebp ;ptr to text |
dec esi ;length |
jnz dtext.lnew |
dtext.output_end: |
pop edx |
jmp .loop |
.end: |
popad |
ret |
ret |
/kernel/branches/gfx_kernel/kernel.asm |
---|
196,15 → 196,10 |
boot_log: |
pushad |
mov edx,esi |
.bll3: inc edx |
cmp [edx],byte 0 |
jne .bll3 |
sub edx,esi |
mov eax,10*65536 |
mov ax,word [boot_y] |
add [boot_y],dword 10 |
mov ebx,0xffffff |
mov ebx,0x80ffffff ; ASCIIZ string with white color |
mov ecx,esi |
mov edi,1 |
call dtext |
1358,9 → 1353,7 |
cmp al,1 ; ecx is a pointer ? |
jne displnl1 |
mov edi,[0x3010] |
mov edi,[edi+TASKDATA.mem_start] |
mov ebx,[edi+ebx] |
mov ebx,[ebx+std_application_base_address] |
displnl1: |
sub esp,64 |
1458,22 → 1451,19 |
add ecx,esp |
add ecx,4 |
mov eax,[esp+64+32-8+4] |
mov ebx,[esp+64+32-12+4] |
push edx ; add window start x & y |
push ebx |
mov edx,[0x3010] |
mov ebx,[edx-twdw+WDATA.box.left] |
shl ebx,16 |
add ebx,[edx-twdw+WDATA.box.top] |
add eax,ebx |
pop ebx |
pop edx |
mov edi,0 |
call dtext |
mov ebx,[esp+64+32-12+4] |
and ebx, not 0x80000000 ; force counted string |
mov esi, [esp+64+4+4] |
xor edi,edi |
jmp dtext |
ret |
read_string: |
; eax read_area |
2914,10 → 2904,7 |
add ax,[_skinmargins.top] |
add ax,-3 |
add eax,ebp |
mov ebx,[common_colours+16];0x00FFFFFF |
xor edi,edi |
call dtext |
jmp @f |
jmp .dodraw |
.not_skinned: |
cmp al,1 |
2936,10 → 2923,11 |
mov edx,eax |
mov eax,0x00080007 |
add eax,ebp |
.dodraw: |
mov ebx,[common_colours+16];0x00FFFFFF |
or ebx, 0x80000000 |
xor edi,edi |
call dtext |
jmp @f |
@@: |
;-------------------------------------------------------------- |
4825,6 → 4813,7 |
mov edi,[0x3010] |
mov ebp,[edi-twdw+WDATA.box.left] |
push esi |
mov esi,[0x3000] |
shl esi,8 |
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.left] |
4831,6 → 4820,7 |
shl ebp,16 |
add ebp,[edi-twdw+WDATA.box.top] |
add bp,word[esi+0x80000+APPDATA.wnd_clientbox.top] |
pop esi |
add ecx,[edi+TASKDATA.mem_start] |
add eax,ebp |
xor edi,edi |
/kernel/trunk/boot/shutdown.inc |
---|
507,7 → 507,7 |
db '2) APM - POWEROFF ' |
db '3) REBOOT ' |
db '4) RESTART KERNEL ' |
else |
else if lang eq ru |
shutdowntext: |
db "¥§®¯ ᮥ ¢ëª«î票¥ ª®¬¯ìîâ¥à ¨«¨ " |
db ' ' |
515,6 → 515,14 |
db '2) APM - ¢ëª«î票¥ ¯¨â ¨ï ' |
db '3) ¥à¥§ £à㧪 á¨á⥬ë ' |
db '4) ¥áâ àâ ï¤à ¨§ ' |
else |
shutdowntext: |
db "SIE KOENNEN DEN COMPUTER NUN AUSSCHALTEN" |
db ' ' |
db '1) RAMDISK AUF DISK SPEICHERN ' |
db '2) APM - AUSSCHALTEN ' |
db '3) NEUSTARTEN ' |
db '4) KERNEL NEU STARTEN ' |
end if |
rosef: |
db 'ROSE TXT' |
/kernel/trunk/core/newproce.inc |
---|
468,6 → 468,7 |
;calculate parameter length |
mov esi,eax |
xor ecx,ecx |
inc ecx ; include terminating null |
.command_line_len: |
cmp byte [esi],0 |
jz .command_line_len_end |
/kernel/trunk/docs/sysfuncs.txt |
---|
188,16 → 188,17 |
* ebx = [coordinate on axis x]*65536 + [coordinate on axis y] |
* ecx = 0xX0RRGGBB, where |
* RR, GG, BB specify text color |
* X specifies the used font: 0=system monospaced, |
* X=ABnn (bits): |
* nn specifies the used font: 0=system monospaced, |
1=system font of variable width |
* A=0 - output esi characters, A=1 - output ASCIIZ-string |
* B=1 - fill background with the color edi |
* edx = pointer to the beginning of the string |
* esi = length of the string, must not exceed 255 |
* esi = for A=0 length of the string, must not exceed 255; |
for A=1 is ignored |
Returned value: |
* function does not return value |
Remarks: |
* Function outputs either first (esi and 0xFF) characters or |
all characters before (but not including) terminating zero |
(for ASCIIZ-strings) depending on what occurs first. |
* First system font is read out at loading from the file char.mt, |
second - from char2.mt. |
* Both fonts have height 9 pixels, width of the monospaced font |
424,7 → 425,7 |
=============== Function 12 - begin/end window redraw. =============== |
====================================================================== |
------------ Subfunction 1 - begin redraw of the window. ------------- |
---------------- Subfunction 1 - begin window redraw. ---------------- |
Parameters: |
* eax = 12 - function number |
* ebx = 1 - subfunction number |
431,7 → 432,7 |
Returned value: |
* function does not return value |
------------- Subfunction 2 - end redraw of the window. -------------- |
----------------- Subfunction 2 - end window redraw. ----------------- |
Parameters: |
* eax = 12 - function number |
* ebx = 2 - subfunction number |
2054,7 → 2055,12 |
* áèòû 22-31 reserved and must be set to 0 |
* ecx = number (if bl=0) or pointer (if bl=1) |
* edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
* esi = 0xN0RRGGBB, RRGGBB=color, N=font (0/1) |
* esi = 0xX0RRGGBB: |
* RR, GG, BB specify the color |
* X = ABnn (bits) |
* nn = font (0/1) |
* A is ignored |
* B=1 - fill background with the color edi |
Returned value: |
* function does not return value |
Remarks: |
/kernel/trunk/fs/fat32.inc |
---|
7,6 → 7,7 |
;; Copyright 2002 Paolo Minazzi, paolo.minazzi@inwind.it ;; |
;; ;; |
;; See file COPYING for details ;; |
;; 20.08.2006 LFN set file size (truncate/extend) - diamond ;; |
;; 17.08.2006 LFN write/append to file - diamond ;; |
;; 23.06.2006 LFN start application - diamond ;; |
;; 15.06.2006 LFN get/set file/folder info - diamond ;; |
/kernel/trunk/gui/font.inc |
---|
1,119 → 1,107 |
align 4 |
dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org]) |
; eax x & y |
; ebx font ( 0xX0000000 ) & color ( 0x00RRGGBB ) |
; ebx style ( 0xX0000000 ) & color ( 0x00RRGGBB ) |
; X = ABnnb: |
; nn = font |
; A = 0 <=> output edx characters; otherwise output ASCIIZ string |
; B = 1 <=> fill background with color esi |
; ecx start of text |
; edx length |
; edi 1 force |
pushad |
call [disable_mouse] |
mov esi,edx ;esi=length |
mov ebp,ecx ;ebp=ptr to text |
mov ebp, ecx ; ebp=pointer to text |
mov ecx,ebx ;ecx=color |
movzx ebx,ax ;ebx=y |
shr eax,16 ;eax=x |
and esi, 0xFF ;limit of text = 255 symbols |
dtext.lnew: |
test esi, esi ; zero length ? |
jnz @f |
jmp dtext.output_end |
movsx ebx, ax ; ebx=y |
sar eax, 16 ; eax=x |
cmp edx, 255 |
jb .loop |
mov edx, 255 |
.loop: |
test ecx, ecx |
js .test_asciiz |
dec edx |
js .end |
jmp @f |
.test_asciiz: |
cmp byte [ebp], 0 |
jz .end |
@@: |
movzx edx,byte [ebp] ;edx=ascii code |
test edx,edx |
jz dtext.output_end |
push edx |
movzx edx, byte [ebp] |
inc ebp |
test ecx,0x10000000 |
jnz dtext.letnew2 |
align 4 |
.letnew: |
drawletter: ;output char of type 1(monotype) |
;eax - x |
;ebx - y |
;ecx - color |
;edx - ascii code |
jnz .font2 |
pushad |
call [disable_mouse] |
mov esi,9 |
lea ebp,[0x3F600+8*edx+edx] |
.symloop: |
push esi |
.symloop1: |
mov dl,byte [ebp] |
mov esi,8 |
.pixloop: |
test dl,1 |
jz .nopix |
or dl, 1 shl 6 |
.pixloop1: |
shr dl, 1 |
jz .pixloop1end |
jnc .nopix |
call [putpixel] |
jmp .pixloop1cont |
.nopix: |
shr dl,1 |
test ecx, 0x40000000 |
jz .pixloop1cont |
push ecx |
mov ecx, [esp+4+4] |
call [putpixel] |
pop ecx |
.pixloop1cont: |
inc eax |
dec esi |
jnz .pixloop |
sub eax,8 |
jmp .pixloop1 |
.pixloop1end: |
sub eax, 6 |
inc ebx |
inc ebp |
pop esi |
dec esi |
jnz .symloop |
jnz .symloop1 |
popad |
add eax,6 |
inc ebp ;ptr to text |
dec esi ;length |
jnz dtext.lnew |
jmp dtext.output_end |
dtext.letnew2: |
align 4 |
drawletter2: ;output char of type 2(proportional) |
;eax - x |
;ebx - y |
;ecx - color |
;edx - symbol |
;edi - force? |
;result - eax=eax+sym_size |
pop edx |
jmp .loop |
.font2: |
pushad |
call [disable_mouse] |
shl edx,1 |
mov esi,9 |
add edx, edx |
lea ebp,[0x3EC00+4*edx+edx+1] |
.symloop: |
push 9 |
movzx esi, byte [ebp-1] |
.symloop2: |
mov dl, byte [ebp] |
push esi |
mov dl,byte [ebp] |
xor esi,esi |
.pixloop: |
test dl,1 |
jz .nopix |
.pixloop2: |
shr dl, 1 |
jnc .nopix2 |
call [putpixel] |
.nopix: |
shr dl,1 |
inc esi |
jmp .pixloop2cont |
.nopix2: |
test ecx, 0x40000000 |
jz .pixloop2cont |
push ecx |
mov ecx, [esp+12+4] |
call [putpixel] |
pop ecx |
.pixloop2cont: |
inc eax |
cmp esi,8 |
jl .pixloop |
sub eax,8 |
dec esi |
jnz .pixloop2 |
pop esi |
sub eax, esi |
inc ebx |
pop esi |
inc ebp |
dec esi |
jnz .symloop |
movzx edx,byte [ebp-10] |
add [esp+32-4],edx |
dec dword [esp] |
jnz .symloop2 |
pop eax |
add dword [esp+28], esi |
popad |
inc ebp ;ptr to text |
dec esi ;length |
jnz dtext.lnew |
dtext.output_end: |
pop edx |
jmp .loop |
.end: |
popad |
ret |
ret |
/kernel/trunk/kernel.asm |
---|
194,15 → 194,10 |
boot_log: |
pushad |
mov edx,esi |
.bll3: inc edx |
cmp [edx],byte 0 |
jne .bll3 |
sub edx,esi |
mov eax,10*65536 |
mov ax,word [boot_y] |
add [boot_y],dword 10 |
mov ebx,0xffffff |
mov ebx,0x80ffffff ; ASCIIZ string with white color |
mov ecx,esi |
mov edi,1 |
call dtext |
1313,9 → 1308,7 |
cmp al,1 ; ecx is a pointer ? |
jne displnl1 |
mov edi,[0x3010] |
mov edi,[edi+TASKDATA.mem_start] |
mov ebx,[edi+ebx] |
mov ebx,[ebx+std_application_base_address] |
displnl1: |
sub esp,64 |
1420,22 → 1413,19 |
add ecx,esp |
add ecx,4 |
mov eax,[esp+64+32-8+4] |
mov ebx,[esp+64+32-12+4] |
push edx ; add window start x & y |
push ebx |
mov edx,[0x3010] |
mov ebx,[edx-twdw+WDATA.box.left] |
shl ebx,16 |
add ebx,[edx-twdw+WDATA.box.top] |
add eax,ebx |
pop ebx |
pop edx |
mov edi,0 |
call dtext |
mov ebx,[esp+64+32-12+4] |
and ebx, not 0x80000000 ; force counted string |
mov esi, [esp+64+4+4] |
xor edi,edi |
jmp dtext |
ret |
read_string: |
; eax read_area |
2900,10 → 2890,7 |
add ax,[_skinmargins.top] |
add ax,-3 |
add eax,ebp |
mov ebx,[common_colours+16];0x00FFFFFF |
xor edi,edi |
call dtext |
jmp @f |
jmp .dodraw |
.not_skinned: |
cmp al,1 |
2922,10 → 2909,11 |
mov edx,eax |
mov eax,0x00080007 |
add eax,ebp |
.dodraw: |
mov ebx,[common_colours+16];0x00FFFFFF |
or ebx, 0x80000000 |
xor edi,edi |
call dtext |
jmp @f |
@@: |
;-------------------------------------------------------------- |
4809,6 → 4797,7 |
mov edi,[0x3010] |
mov ebp,[edi-twdw+WDATA.box.left] |
push esi |
mov esi,[0x3000] |
shl esi,8 |
add ebp,[esi+0x80000+APPDATA.wnd_clientbox.left] |
4815,6 → 4804,7 |
shl ebp,16 |
add ebp,[edi-twdw+WDATA.box.top] |
add bp,word[esi+0x80000+APPDATA.wnd_clientbox.top] |
pop esi |
add ecx,[edi+TASKDATA.mem_start] |
add eax,ebp |
xor edi,edi |