Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2535 → Rev 2536

/kernel/trunk/docs/sysfuncr.txt
197,7 → 197,7
 à ¬¥âàë:
* eax = 4 - ­®¬¥à ä㭪樨
* ebx = [ª®®à¤¨­ â  ¯® ®á¨ x]*65536 + [ª®®à¤¨­ â  ¯® ®á¨ y]
* ecx = 0xX0RRGGBB, £¤¥
* ecx = 0xXYRRGGBB, £¤¥
* RR, GG, BB § ¤ îâ 梥â ⥪áâ 
* X=ABnn (¡¨âë):
* nn § ¤ ¥â ¨á¯®«ì§ã¥¬ë© èà¨äâ: 0=á¨á⥬­ë© ¬®­®è¨à¨­­ë©,
204,9 → 204,14
1=á¨á⥬­ë© èà¨äâ ¯¥à¥¬¥­­®© è¨à¨­ë
* A=0 - ¢ë¢®¤¨âì esi ᨬ¢®«®¢, A=1 - ¢ë¢®¤¨âì ASCIIZ-áâபã
* B=1 - § ªà è¨¢ âì ä®­ 梥⮬ edi
* Y=Cnnn (¡¨âë):
* C=1 ¯¥à¥­ ¯à ¢¨âì ¢ë¢®¤ ¢ ®¡« áâì ¯®«ì§®¢ â¥«ï, § ¤ ­® ¢ edi
* nnn - ­¥ ¨á¯®«ì§ã¥âáï ¢ ⥪ã饬 ¢¨¤¥, ¤®«¦­® ¡ëâì 0 (zero)
* edx = 㪠§ â¥«ì ­  ­ ç «® áâப¨
* esi = ¤«ï A=0 ¤«¨­  áâப¨, ¤®«¦­  ¡ëâì ­¥ ¡®«ìè¥ 255;
¤«ï A=1 ¨£­®à¨àã¥âáï
* edi = 梥⠤«ï § ªà áª¨ ä®­ , ¥á«¨ B=1
* edi = 㪠§ â¥«ì ­  ®¡« áâì ¯®«ì§®¢ â¥«ï, ¥á«¨ C=1
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* äã­ªæ¨ï ­¥ ¢®§¢à é ¥â §­ ç¥­¨ï
‡ ¬¥ç ­¨ï:
214,7 → 219,12
¢â®à®© - ¨§ char2.mt.
* Ž¡  èà¨äâ  ¨¬¥îâ ¢ëá®âã 9 ¯¨ªá¥«¥©, è¨à¨­  ¬®­®è¨à¨­­®£® èà¨äâ 
à ¢­  6 ¯¨ªá¥«¥©.
 
* C=1, £«ã¡¨­  â®çª¨ = 32 ¡¨â , ®¡« áâì ¯®«ì§®¢ â¥«ï ¢ë£«ï¤¨â â ª:
dword Xsize
dword Ysize
®áâ â®ª ®¡« á⨠= Xsize * Y size * 4
* ¥«ì§ï ®¤­®¢à¥¬¥­­® ¨á¯®«ì§®¢ âì B=1 ¨ C=1, ¯®áª®«ìªã ¢ ®¡®¨å
á«ãç ïå ¨á¯®«ì§®¢ ­ ॣ¨áâà edi ¤«ï à §­ëå 楫¥©.
======================================================================
========================= ”ã­ªæ¨ï 5 - ¯ ã§ . =========================
======================================================================
/kernel/trunk/docs/sysfuncs.txt
194,7 → 194,7
Parameters:
* eax = 4 - function number
* ebx = [coordinate on axis x]*65536 + [coordinate on axis y]
* ecx = 0xX0RRGGBB, where
* ecx = 0xXYRRGGBB, where
* RR, GG, BB specify text color
* X=ABnn (bits):
* nn specifies the used font: 0=system monospaced,
201,9 → 201,15
1=system font of variable width
* A=0 - output esi characters, A=1 - output ASCIIZ-string
* B=1 - fill background with the color edi
* Y = Cnnn
* C=1 redirect the output to the user area, specified in edi
* nnn - not used in the current, must be 0 (zero)
* edx = pointer to the beginning of the string
* esi = for A=0 length of the string, must not exceed 255;
for A=1 is ignored
* edi = color to fill background, if B=1
* edi = pointer to user area, for redirect, if C=1
Returned value:
* function does not return value
Remarks:
211,6 → 217,12
second - from char2.mt.
* Both fonts have height 9 pixels, width of the monospaced font
is equal to 6 pixels.
* C=1, pixel depth = 32 bits, user area is as follows:
dword Xsize
dword Ysize
rest of the area = Xsize * Y size * 4
* You can not use B = 1 and C = 1, at the same time. Since in both
cases, the register edi is used for different purposes.
 
======================================================================
========================= Function 5 - delay. ========================
/kernel/trunk/gui/font.inc
16,7 → 16,7
jmp dtext.1
;------------------------------------------------------------------------------
align 4
dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org])
dtext:
; ebx x & y
; ecx style ( 0xX0000000 ) & color ( 0x00RRGGBB )
; X = ABnnb:
24,7 → 24,7
; A = 0 <=> output esi characters; otherwise output ASCIIZ string
; B = 1 <=> fill background with color eax
; edx start of text
; edi 1 force
; edi 1 force or user area for redirect
push eax
xor eax, eax
;--------------------------------------
36,6 → 36,7
xchg eax, ebx ; eax=x, ebx=y
cmp esi, 255
jb .loop
 
mov esi, 255
;--------------------------------------
align 4
42,8 → 43,10
.loop:
test ecx, ecx
js .test_asciiz
 
dec esi
js .end
 
jmp @f
;--------------------------------------
align 4
53,6 → 56,7
 
cmp byte [esp+28], 1
jne @f
 
dec esi
js .end
;--------------------------------------
63,6 → 67,7
movzx edx, byte [edx-1]
test ecx, 0x10000000
jnz .font2
 
mov esi, 9
lea ebp, [FONT_I+8*edx+edx]
;--------------------------------------
75,7 → 80,17
.pixloop1:
shr dl, 1
jz .pixloop1end
 
jnc .nopix
 
test ecx, 0x08000000 ; redirect the output to the user area
jz @f
 
call draw_text_to_user_area
jmp .pixloop1cont
;--------------------------------------
align 4
@@:
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
; call [putpixel]
call __sys_putpixel
85,8 → 100,19
.nopix:
test ecx, 0x40000000
jz .pixloop1cont
 
push ecx
mov ecx, [esp+4+20h+20h]
 
test ecx, 0x08000000 ; redirect the output to the user area
jz @f
 
call draw_text_to_user_area
pop ecx
jmp .pixloop1cont
;--------------------------------------
align 4
@@:
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
; call [putpixel]
call __sys_putpixel
104,6 → 130,7
inc ebp
dec esi
jnz .symloop1
 
popad
add eax, 6
jmp .loop
124,6 → 151,15
.pixloop2:
shr dl, 1
jnc .nopix2
 
test ecx, 0x08000000 ; redirect the output to the user area
jz @f
 
call draw_text_to_user_area
jmp .pixloop2cont
;--------------------------------------
align 4
@@:
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
; call [putpixel]
call __sys_putpixel
133,8 → 169,19
.nopix2:
test ecx, 0x40000000
jz .pixloop2cont
 
push ecx
mov ecx, [esp+12+20h+20h]
 
test ecx, 0x08000000 ; redirect the output to the user area
jz @f
 
call draw_text_to_user_area
pop ecx
jmp .pixloop2cont
;--------------------------------------
align 4
@@:
and ecx, 0xFBFFFFFF ;negate 0x04000000 save to mouseunder area
; call [putpixel]
call __sys_putpixel
145,6 → 192,7
inc eax
dec esi
jnz .pixloop2
 
pop esi
sub eax, esi
inc ebx
151,6 → 199,7
inc ebp
dec dword [esp]
jnz .symloop2
 
pop eax
add dword [esp+28], esi
popad
162,3 → 211,21
pop eax
ret
;------------------------------------------------------------------------------
; eax = x coordinate
; ebx = y coordinate
; ecx = ?? RR GG BB
; edi = user area
align 4
draw_text_to_user_area:
pushad
imul ebx, [edi+0]
add eax, ebx
shl eax, 2
add eax, edi
add eax, 8
and ecx, 0xffffff
or ecx, 0xff000000 ; not transparent
mov [eax], ecx ; store pixel
popad
ret
;------------------------------------------------------------------------------
/kernel/trunk/kernel.asm
4661,6 → 4661,8
pop esi
add ebx, ebp
mov eax, edi
test ecx, 0x08000000 ; redirect the output to the user area
jnz dtext
xor edi, edi
jmp dtext