Subversion Repositories Kolibri OS

Rev

Rev 8714 | Rev 8858 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8714 Rev 8715
Line 69... Line 69...
69
format binary as "mnt"
69
format binary as "mnt"
Line 70... Line 70...
70
 
70
 
71
include 'macros.inc'
71
include 'macros.inc'
Line 72... Line 72...
72
include 'struct.inc'
72
include 'struct.inc'
Line 73... Line 73...
73
 
73
 
74
$Revision: 8714 $
74
$Revision: 8715 $
Line 4439... Line 4439...
4439
; ecx = [xsize]*65536 + [ysize]
4439
; ecx = [xsize]*65536 + [ysize]
4440
; edx = [xstart]*65536 + [ystart]
4440
; edx = [xstart]*65536 + [ystart]
4441
; esi = number of bits per pixel, must be 8, 24 or 32
4441
; esi = number of bits per pixel, must be 8, 24 or 32
4442
; edi = pointer to palette
4442
; edi = pointer to palette
4443
; ebp = row delta
4443
; ebp = row delta
-
 
4444
; check pointer
-
 
4445
        push    ecx
-
 
4446
        mov     ax, cx
-
 
4447
        shr     ecx, 16
-
 
4448
        imul    eax, ecx
-
 
4449
        stdcall is_region_userspace, ebx, eax
-
 
4450
        pop     ecx
-
 
4451
        jz      sys_putimage.exit
-
 
4452
 
4444
        mov     eax, [CURRENT_TASK]
4453
        mov     eax, [CURRENT_TASK]
4445
        shl     eax, 8
4454
        shl     eax, 8
4446
        add     dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.top]
4455
        add     dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.top]
4447
        rol     edx, 16
4456
        rol     edx, 16
4448
        add     dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.left]
4457
        add     dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.left]
Line 5191... Line 5200...
5191
 
5200
 
Line 5192... Line 5201...
5192
align 4
5201
align 4
Line -... Line 5202...
-
 
5202
 
-
 
5203
syscall_writetext:                      ; WriteText
-
 
5204
 
5193
 
5205
        stdcall is_region_userspace, edx, esi
5194
syscall_writetext:                      ; WriteText
5206
        jz      .err
5195
 
5207
 
5196
        mov     eax, [TASK_BASE]
5208
        mov     eax, [TASK_BASE]
5197
        mov     ebp, [eax-twdw+WDATA.box.left]
5209
        mov     ebp, [eax-twdw+WDATA.box.left]
Line 5207... Line 5219...
5207
        add     ebx, ebp
5219
        add     ebx, ebp
5208
align 4
5220
align 4
5209
@@:
5221
@@:
5210
        mov     eax, edi
5222
        mov     eax, edi
5211
        test    ecx, 0x08000000  ; redirect the output to the user area
5223
        test    ecx, 0x08000000  ; redirect the output to the user area
5212
        jnz     dtext
5224
        jnz     @f
5213
        xor     edi, edi
5225
        xor     edi, edi
5214
        jmp     dtext
5226
        jmp     dtext
Line -... Line 5227...
-
 
5227
 
-
 
5228
@@:     ;  check pointer
-
 
5229
        stdcall is_region_userspace, edi, 0
-
 
5230
        jz      .err
-
 
5231
        jmp     dtext
-
 
5232
.err:
-
 
5233
        ret
5215
 
5234
 
Line 5216... Line 5235...
5216
align 4
5235
align 4
Line 5217... Line 5236...
5217
 
5236