Subversion Repositories Kolibri OS

Rev

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

Rev 547 Rev 606
Line 27... Line 27...
27
;                   3) use COL0 - COL9 boot parameter
27
;                   3) use COL0 - COL9 boot parameter
28
;                   0=black,1=white,2=green,3=lilas,4=grey
28
;                   0=black,1=white,2=green,3=lilas,4=grey
29
;                   5=light-blue,6=blue,7=salad,8=pink,9=yellow
29
;                   5=light-blue,6=blue,7=salad,8=pink,9=yellow
30
;    version 0.17   17th June 2007
30
;    version 0.17   17th June 2007
31
;                   diamond (background definition now uses shared memory)
31
;                   diamond (background definition now uses shared memory)
-
 
32
;    version 0.18   9th August 2007
-
 
33
;                   Mario79
-
 
34
;                   Open file with parameter in patch:
-
 
35
;                   Size of parameter - 4 bytes. Parameter starts with the character "\",
-
 
36
;                   the unused characters are filled by a blank (ASCII 20h).
-
 
37
;                   '\T  /hd0/1/1.jpg' - set background, mode: tile
-
 
38
;                   '\S  /hd0/1/1.jpg' - set background, mode: stretch
Line 32... Line 39...
32
                  
39
                  
33
               memsize=20000h
40
               memsize=20000h
34
               org 0
41
               org 0
Line 35... Line 42...
35
 PARAMS     =    memsize - 1024
42
 PARAMS     =    memsize - 1024
36
 
43
 
Line 37... Line 44...
37
appname equ 'Jpegview '
44
appname equ 'Jpegview '
Line 38... Line 45...
38
version equ '0.17'
45
version equ '0.18'
39
 
46
 
Line 133... Line 140...
133
    cmp     [PARAMS], word "CO"
140
    cmp     [PARAMS], word "CO"
134
    jne     @f
141
    jne     @f
135
    cmp     [PARAMS+2], byte "L"
142
    cmp     [PARAMS+2], byte "L"
136
    je      boot_set_background    
143
    je      boot_set_background    
137
@@:
144
@@:
-
 
145
    cmp     byte [PARAMS], "\"
-
 
146
    jne     @f
-
 
147
    cmp     [PARAMS+1], byte "S"
-
 
148
    jne     .tile
-
 
149
    mov     [drawing_mode],2
-
 
150
    jmp     @f
-
 
151
.tile:
-
 
152
    cmp     [PARAMS+1], byte "T"
-
 
153
    jne     @f
-
 
154
    mov     [drawing_mode],1
-
 
155
@@:
138
        cmp     byte [PARAMS], 1
156
    cmp     byte [PARAMS], 1
139
        jz      ipc_service
157
    jz      ipc_service
140
    mov     edi, name_string       ; clear string with file name
158
    mov     edi, name_string       ; clear string with file name
141
    mov     al,  0
159
    mov     al,  0
142
    mov     ecx, 100
160
    mov     ecx, 100
143
    rep     stosb
161
    rep     stosb
Line 144... Line 162...
144
 
162
 
145
    mov     ecx, 100               ; calculate length of parameter string
163
    mov     ecx, 100               ; calculate length of parameter string
146
    mov     edi, PARAMS
164
    mov     edi, PARAMS
-
 
165
    repne   scasb
147
    repne   scasb
166
    
148
    sub     edi, PARAMS
167
    sub     edi, PARAMS
149
    mov     ecx, edi
-
 
150
 
168
    mov     ecx, edi
151
    mov     esi, PARAMS            ; copy parameters to file name
169
    mov     esi, PARAMS            ; copy parameters to file name
-
 
170
    mov     edi, name_string
-
 
171
    cmp     byte [PARAMS], "\"
-
 
172
    jne     @f
-
 
173
    add     esi,4
-
 
174
    sub     ecx,4
152
    mov     edi, name_string
175
@@:
153
    cld
176
    cld
Line -... Line 177...
-
 
177
    rep     movsb
154
    rep     movsb
178
 
Line -... Line 179...
-
 
179
    cmp     byte [PARAMS], "\"
155
 
180
    je      boot_set_background.1      
156
    jmp     START.l1       ; return to beggining of the progra
181
    
-
 
182
    jmp     START.l1       ; return to beggining of the progra
-
 
183
;******************************************************************************
157
 
184
boot_set_background:
158
;******************************************************************************
185
    mov     [drawing_mode],2
159
boot_set_background:
186
.1:
160
    mcall 18,16
187
    mcall 18,16
161
    cmp   eax,1024*2
188
    cmp   eax,1024*2
Line 251... Line 278...
251
        mcall
278
        mcall
Line 252... Line 279...
252
 
279
 
253
    ; Stretch the image to fit
280
    ; Stretch the image to fit
254
    mov     eax, 15
281
    mov     eax, 15
255
    mov     ebx, 4
282
    mov     ebx, 4
256
    mov     ecx, 2
283
    mov     ecx, [drawing_mode]  ;2
Line 257... Line 284...
257
    mcall
284
    mcall
258
 
285
 
259
    mov     eax, 15
286
    mov     eax, 15
Line 670... Line 697...
670
 
697
 
Line 671... Line 698...
671
 
698
 
-
 
699
; DATA AREA
672
; DATA AREA
700
 
673
 
701
wcolor          dd  0x000000
674
wcolor          dd  0x000000
702
drawing_mode    dd  2
Line 675... Line 703...
675
title          db  appname,version,0
703
title          db  appname,version,0