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:
@@ -197,16 +197,21 @@
|
||||
<EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
* eax = 4 - <20><><EFBFBD><EFBFBD><EFBFBD> <20>㭪樨
|
||||
* ebx = [<5B><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> x]*65536 + [<5B><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> y]
|
||||
* ecx = 0xX0RRGGBB, <20><><EFBFBD>
|
||||
* ecx = 0xXYRRGGBB, <20><><EFBFBD>
|
||||
* RR, GG, BB <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 梥<> ⥪<><E2A5AA><EFBFBD>
|
||||
* X=ABnn (<28><><EFBFBD><EFBFBD>):
|
||||
* nn <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ᯮ<EFBFBD><E1AFAE><EFBFBD>㥬<EFBFBD><E3A5AC> <20><><EFBFBD><EFBFBD><EFBFBD>: 0=<3D><><EFBFBD>⥬<EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ਭ<EFBFBD><E0A8AD><EFBFBD>,
|
||||
1=<3D><><EFBFBD>⥬<EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><>६<EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD> <20><>ਭ<EFBFBD>
|
||||
* A=0 - <20>뢮<EFBFBD><EBA2AE><EFBFBD><EFBFBD> esi ᨬ<><E1A8AC><EFBFBD><EFBFBD><EFBFBD>, A=1 - <20>뢮<EFBFBD><EBA2AE><EFBFBD><EFBFBD> ASCIIZ-<2D><>ப<EFBFBD>
|
||||
* B=1 - <20><><EFBFBD><EFBFBD><EFBFBD>訢<EFBFBD><E8A8A2><EFBFBD> 䮭 梥⮬ edi
|
||||
* Y=Cnnn (<28><><EFBFBD><EFBFBD>):
|
||||
* C=1 <20><>७<EFBFBD><E0A5AD>ࠢ<EFBFBD><E0A0A2><EFBFBD> <20>뢮<EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>짮<EFBFBD><ECA7AE>⥫<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> edi
|
||||
* nnn - <20><> <20>ᯮ<EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> ⥪<>饬 <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> 0 (zero)
|
||||
* edx = 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><>砫<EFBFBD> <20><>ப<EFBFBD>
|
||||
* esi = <20><><EFBFBD> A=0 <20><><EFBFBD><EFBFBD><EFBFBD> <20><>ப<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 255;
|
||||
<20><><EFBFBD> A=1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* edi = 梥<> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>᪨ 䮭<>, <20> B=1
|
||||
* edi = 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>짮<EFBFBD><ECA7AE>⥫<EFBFBD>, <20> C=1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>祭<EFBFBD><E7A5AD>:
|
||||
* <20>㭪<EFBFBD><E3ADAA><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><><EFBFBD>祭<EFBFBD><E7A5AD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>砭<EFBFBD><EFBFBD>:
|
||||
@@ -214,7 +219,12 @@
|
||||
<20><><EFBFBD>ன - <20><> char2.mt.
|
||||
* <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 9 <20><><EFBFBD>ᥫ<EFBFBD><E1A5AB>, <20><>ਭ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ਭ<EFBFBD><E0A8AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ࠢ<><E0A0A2> 6 <20><><EFBFBD>ᥫ<EFBFBD><E1A5AB>.
|
||||
|
||||
* C=1, <20><>㡨<EFBFBD><E3A1A8> <20><>窨 = 32 <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>짮<EFBFBD><ECA7AE>⥫<EFBFBD> <20>룫廊<EBA3AB> ⠪:
|
||||
dword Xsize
|
||||
dword Ysize
|
||||
<20><><EFBFBD><EFBFBD>⮪ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = Xsize * Y size * 4
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>६<EFBFBD><E0A5AC><EFBFBD><EFBFBD> <20>ᯮ<EFBFBD>짮<EFBFBD><ECA7AE><EFBFBD><EFBFBD> B=1 <20> C=1, <20><><EFBFBD><E1AAAE><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ᯮ<EFBFBD>짮<EFBFBD><ECA7AE><EFBFBD> ॣ<><E0A5A3><EFBFBD><EFBFBD> edi <20><><EFBFBD> ࠧ<><E0A0A7><EFBFBD> 楫<><E6A5AB>.
|
||||
======================================================================
|
||||
========================= <20>㭪<EFBFBD><E3ADAA><EFBFBD> 5 - <20><>㧠. =========================
|
||||
======================================================================
|
||||
|
@@ -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
|
||||
* 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,7 +16,7 @@ dtext_asciiz_esi: ; for skins title out
|
||||
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 @@ dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org])
|
||||
; 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,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
|
||||
|
||||
|
Reference in New Issue
Block a user