forked from KolibriOS/kolibrios
Function 4 - added redirect the output to the user area.
git-svn-id: svn://kolibrios.org@2536 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
3a63ebbff2
commit
7d5ed0a7fd
@ -197,16 +197,21 @@
|
||||
<EFBFBD> à ¬¥âàë:
|
||||
* eax = 4 - ®¬¥à äãªæ¨¨
|
||||
* ebx = [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y]
|
||||
* ecx = 0xX0RRGGBB, £¤¥
|
||||
* ecx = 0xXYRRGGBB, ЃЄЅ
|
||||
* RR, GG, BB § ¤ îâ 梥â ⥪áâ
|
||||
* X=ABnn (¡¨âë):
|
||||
* nn § ¤ ¥â ¨á¯®«ì§ã¥¬ë© èà¨äâ: 0=á¨áâ¥¬ë© ¬®®è¨à¨ë©,
|
||||
1=á¨áâ¥¬ë© èà¨äâ ¯¥à¥¬¥®© è¨à¨ë
|
||||
* A=0 - ¢ë¢®¤¨âì esi ᨬ¢®«®¢, A=1 - ¢ë¢®¤¨âì ASCIIZ-áâபã
|
||||
* B=1 - § ªà 訢 âì ä® æ¢¥â®¬ edi
|
||||
* nn Ї Є Ѕт ЈсЏЎЋьЇуЅЌыЉ шрЈфт: 0=сЈстЅЌыЉ ЌЎЎшЈрЈыЉ,
|
||||
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
|
||||
* <20>ЅЋьЇя ЎЄЎЂрЅЌЅЎ ЈсЏЎЋьЇЎЂ ть B=1 Ј C=1, ЏЎсЊЎЋьЊу Ђ ЎЁЎЈх
|
||||
сЋуч ях ЈсЏЎЋьЇЎЂ рЅЃЈстр edi ЄЋя р Їых цЅЋЅЉ.
|
||||
======================================================================
|
||||
========================= ”ãªæ¨ï 5 - ¯ 㧠. =========================
|
||||
======================================================================
|
||||
|
@ -194,16 +194,22 @@ Remarks:
|
||||
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,
|
||||
1=system font of variable width
|
||||
* A=0 - output esi characters, A=1 - output ASCIIZ-string
|
||||
* B=1 - fill background with the color edi
|
||||
* 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
|
||||
* 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 @@ Remarks:
|
||||
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. ========================
|
||||
|
@ -16,15 +16,15 @@ dtext_asciiz_esi: ; for skins title out
|
||||
jmp dtext.1
|
||||
;------------------------------------------------------------------------------
|
||||
align 4
|
||||
dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org])
|
||||
; ebx x & y
|
||||
; ecx style ( 0xX0000000 ) & color ( 0x00RRGGBB )
|
||||
; X = ABnnb:
|
||||
; nn = font
|
||||
; A = 0 <=> output esi characters; otherwise output ASCIIZ string
|
||||
; B = 1 <=> fill background with color eax
|
||||
; edx start of text
|
||||
; edi 1 force
|
||||
dtext:
|
||||
; ebx x & y
|
||||
; ecx style ( 0xX0000000 ) & color ( 0x00RRGGBB )
|
||||
; X = ABnnb:
|
||||
; nn = font
|
||||
; A = 0 <=> output esi characters; otherwise output ASCIIZ string
|
||||
; B = 1 <=> fill background with color eax
|
||||
; edx start of text
|
||||
; edi 1 force or user area for redirect
|
||||
push eax
|
||||
xor eax, eax
|
||||
;--------------------------------------
|
||||
@ -36,14 +36,17 @@ align 4
|
||||
xchg eax, ebx ; eax=x, ebx=y
|
||||
cmp esi, 255
|
||||
jb .loop
|
||||
|
||||
mov esi, 255
|
||||
;--------------------------------------
|
||||
align 4
|
||||
.loop:
|
||||
test ecx, ecx
|
||||
js .test_asciiz
|
||||
|
||||
dec esi
|
||||
js .end
|
||||
|
||||
jmp @f
|
||||
;--------------------------------------
|
||||
align 4
|
||||
@ -53,6 +56,7 @@ align 4
|
||||
|
||||
cmp byte [esp+28], 1
|
||||
jne @f
|
||||
|
||||
dec esi
|
||||
js .end
|
||||
;--------------------------------------
|
||||
@ -63,6 +67,7 @@ align 4
|
||||
movzx edx, byte [edx-1]
|
||||
test ecx, 0x10000000
|
||||
jnz .font2
|
||||
|
||||
mov esi, 9
|
||||
lea ebp, [FONT_I+8*edx+edx]
|
||||
;--------------------------------------
|
||||
@ -75,7 +80,17 @@ align 4
|
||||
.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 @@ align 4
|
||||
.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 @@ align 4
|
||||
inc ebp
|
||||
dec esi
|
||||
jnz .symloop1
|
||||
|
||||
popad
|
||||
add eax, 6
|
||||
jmp .loop
|
||||
@ -124,6 +151,15 @@ align 4
|
||||
.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 @@ align 4
|
||||
.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,12 +192,14 @@ align 4
|
||||
inc eax
|
||||
dec esi
|
||||
jnz .pixloop2
|
||||
|
||||
pop esi
|
||||
sub eax, esi
|
||||
inc ebx
|
||||
inc ebp
|
||||
dec dword [esp]
|
||||
jnz .symloop2
|
||||
|
||||
pop eax
|
||||
add dword [esp+28], esi
|
||||
popad
|
||||
@ -162,3 +211,21 @@ align 4
|
||||
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
|
||||
;------------------------------------------------------------------------------
|
@ -4661,6 +4661,8 @@ syscall_writetext: ; WriteText
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user