Subversion Repositories Kolibri OS

Rev

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

Rev 205 Rev 447
Line 34... Line 34...
34
START:                          ; start of execution
34
START:                          ; start of execution
Line 35... Line 35...
35
 
35
 
36
     mcall 60,1,ipcbuff,IPC_BUF+20
36
     mcall 60,1,ipcbuff,IPC_BUF+20
37
     mcall 40,1000111b
37
     mcall 40,1000111b
38
     mov  [ipcbuff+4],8
38
     mov  [ipcbuff+4],8
39
     mov  ecx,1024
39
     mov  ecx,4096
40
    flush:
40
    flush:
41
     mov  eax,63
41
     mov  eax,63
42
     mov  ebx,2
42
     mov  ebx,2
43
     int  0x40
43
     mcall
Line 44... Line 44...
44
     loop flush
44
     loop flush
45
 
45
 
46
     mov  ecx, TMP
46
     mov  ecx, TMP
Line 50... Line 50...
50
 
50
 
51
     mov  [tmp1],'x'
51
     mov  [tmp1],'x'
Line 52... Line 52...
52
     mov  [tmp2],'x'
52
     mov  [tmp2],'x'
53
 
53
 
54
     mov  eax,14
54
     mov  eax,14
55
     int  0x40
55
     mcall
56
     and  eax,0xffff0000
56
     and  eax,0xffff0000
57
     sub  eax,399 shl 16
57
     sub  eax,399 shl 16
-
 
58
     add  eax,399
-
 
59
     mov  [xstart],eax
-
 
60
 
-
 
61
     mov  eax,48
-
 
62
     mov  ebx,3
-
 
63
     mov  ecx,sc
-
 
64
     mov  edx,sizeof.system_colors
58
     add  eax,399
65
     mcall
59
     mov  [xstart],eax
66
 
Line 60... Line 67...
60
  red:
67
  red:
Line 61... Line 68...
61
     call draw_window
68
     call draw_window
62
 
69
 
63
still:
70
still:
Line 64... Line 71...
64
 
71
 
65
    mov  eax,23                 ; wait here for event
72
    mov  eax,23                 ; wait here for event
66
    mov  ebx,1
73
    mov  ebx,1
67
    int  0x40
74
    mcall
68
 
75
 
69
    cmp  eax,1                  ; redraw request ?
76
    cmp  eax,1                  ; redraw request ?
70
    je   red
77
    je   red
71
    cmp  eax,2                  ; key in buffer ?
78
    cmp  eax,2                  ; key in buffer ?
-
 
79
    je   key
72
    je   key
80
    cmp  eax,3                  ; button in buffer ?
73
    cmp  eax,3                  ; button in buffer ?
81
    je   button
74
    je   button
82
    cmp  eax,7
Line 75... Line 83...
75
    cmp  eax,7
83
    je   ipc
76
    je   ipc
84
 
Line 77... Line 85...
77
    mov  eax,63
85
    mov  eax,63
Line 139... Line 147...
139
 
147
 
Line 140... Line 148...
140
  new_check:
148
  new_check:
141
 
149
 
142
    mov  eax,63
150
    mov  eax,63
Line 143... Line 151...
143
    mov  ebx,2
151
    mov  ebx,2
144
    int  0x40
152
    mcall
Line 145... Line 153...
145
 
153
 
Line 174... Line 182...
174
    mov  edi,dump_title+10
182
    mov  edi,dump_title+10
175
    mov  ecx,12
183
    mov  ecx,12
176
    rep  movsb
184
    rep  movsb
177
    jmp  red
185
    jmp  red
178
  key:                          ; key
186
  key:                          ; key
179
    mov  eax,2                  ; just read it and ignore
187
    mov  al,2                  ; just read it and ignore
180
    int  0x40
188
    mcall
181
    cmp  ah,' '
189
    cmp  ah,' '
182
    je   button.no_krnl_flt
190
    je   button.no_krnl_flt
183
    cmp  [vmode],2
191
    cmp  [vmode],2
184
    jne  still
192
    jne  still
185
    cmp  ah,176 ;left
193
    cmp  ah,176 ;left
Line 197... Line 205...
197
    jmp  still
205
    jmp  still
Line 198... Line 206...
198
 
206
 
Line 199... Line 207...
199
arrows dd -1,16,-16,1
207
arrows dd -1,16,-16,1
200
 
208
 
201
  button:                       ; button
209
  button:                       ; button
Line 202... Line 210...
202
    mov  eax,17                 ; get id
210
    mov  al,17                 ; get id
203
    int  0x40
211
    mcall
Line 204... Line 212...
204
 
212
 
205
    cmp  ah,1                   ; button id=1 ?
213
    cmp  ah,1                   ; button id=1 ?
206
    jne  .noclose
214
    jne  .noclose
207
 
215
 
208
    mov  eax,-1                 ; close this program
216
    or   eax,-1                 ; close this program
209
    int  0x40
217
    mcall
210
  .noclose:
218
  .noclose:
Line 272... Line 280...
272
;   *********************************************
280
;   *********************************************
Line 273... Line 281...
273
 
281
 
Line 274... Line -...
274
 
-
 
275
draw_window:
-
 
276
 
-
 
277
    mov  eax,48
-
 
278
    mov  ebx,3
-
 
279
    mov  ecx,sc
-
 
280
    mov  edx,sizeof.system_colors
282
 
281
    int  0x40
283
draw_window:
282
 
284
 
Line 283... Line 285...
283
    mov  eax,12                    ; function 12:tell os about windowdraw
285
    mov  eax,12                    ; function 12:tell os about windowdraw
284
    mov  ebx,1                     ; 1, start of draw
286
    mov  ebx,1                     ; 1, start of draw
285
    int  0x40
287
    mcall
286
 
288
 
287
                                   ; DRAW WINDOW
289
                                   ; DRAW WINDOW
288
    mov  eax,0                     ; function 0 : define and draw window
290
    xor  eax,eax                     ; function 0 : define and draw window
289
;   mov  ebx,50*65536+400          ; [x start] *65536 + [x size]
291
;   mov  ebx,50*65536+400          ; [x start] *65536 + [x size]
290
    mov  ebx,[xstart]
292
    mov  ebx,[xstart]
291
    mov  ecx,MAXSTRINGS*10+45      ; [y start] *65536 + [y size]
293
    mov  ecx,MAXSTRINGS*10+45      ; [y start] *65536 + [y size]
Line 292... Line 294...
292
    mov  edx,[sc.work]             ; color of work area RRGGBB,8->color gl
294
    mov  edx,[sc.work]             ; color of work area RRGGBB,8->color gl
293
    or   edx,0x13000000
295
    or   edx,0x13000000
294
    mov  edi,header                ; WINDOW LABEL
296
    mov  edi,header                ; WINDOW LABEL
295
    int  0x40
297
    mcall
296
    
298
    
297
    mov  ecx,4
299
    mov  ecx,4
298
    mov  esi,[sc.work]
300
    mov  esi,[sc.work]
299
    mov  ebx,316 shl 16+5*6
301
    mov  ebx,296 shl 16+5*6
Line 300... Line 302...
300
    mov  edx,3;+1 shl 30
302
    mov  edx,3;+1 shl 30
301
    mcall 8,,<5,12>
303
    mcall 8,,<5,12>
302
    mov  edx,[vmode]
304
    mov  edx,[vmode]
303
    lea  edx,[edx*4+duk]
305
    lea  edx,[edx*4+duk]
Line 311... Line 313...
311
    cmp  [vmode],0
313
    cmp  [vmode],0
312
    je   .kern
314
    je   .kern
313
    mov  edx,text2
315
    mov  edx,text2
314
  .kern:
316
  .kern:
315
    mov  esi,80
317
    mov  esi,80
316
  newline:
-
 
317
    mov  eax,4
318
    mov  eax,4
-
 
319
  newline:
318
    int  0x40
320
    mcall
319
    add  ebx,10
321
    add  ebx,10
320
    add  edx,80
322
    add  edx,80
321
    cmp  [edx],byte 'x'
323
    cmp  [edx],byte 'x'
322
    jne  newline
324
    jne  newline
323
    jmp  enddraw
325
    jmp  enddraw
Line 332... Line 334...
332
    call dump_btn
334
    call dump_btn
333
  		call draw_dump
335
  		call draw_dump
334
		enddraw:
336
		enddraw:
335
    mov  eax,12                    ; function 12:tell os about windowdraw
337
    mov  eax,12                    ; function 12:tell os about windowdraw
336
    mov  ebx,2                     ; 2, end of draw
338
    mov  ebx,2                     ; 2, end of draw
337
    int  0x40
339
    mcall
Line 338... Line 340...
338
 
340
 
Line 339... Line 341...
339
    ret
341
    ret
340
 
342
 
Line 512... Line 514...
512
dump_cell_marg dd LMARGIN shl 16,(LMARGIN+16*HSPACE+15)shl 16
514
dump_cell_marg dd LMARGIN shl 16,(LMARGIN+16*HSPACE+15)shl 16
513
dump_cell_size dw HSPACE,VSPACE,6,VSPACE
515
dump_cell_size dw HSPACE,VSPACE,6,VSPACE
514
; 11,11 > 0,-1
516
; 11,11 > 0,-1
515
; 5,11  > 0,-1
517
; 5,11  > 0,-1
516
if lang eq ru
518
if lang eq ru
517
   header    db   '„Ž‘Š€ Ž’‹€„Šˆ ˆ ‘ŽŽ™…ˆ‰',0
519
   header    db   '„®áª  ®â« ¤ª¨ ¨ á®®¡é¥­¨©',0
518
else if lang eq en
520
else if lang eq en
519
   header    db   'GENERAL DEBUG & MESSAGE BOARD',0
521
   header    db   'General debug & message board',0
520
else
522
else
521
   header    db   'ALLGEMEINES DEBUG- & NACHRICHTENBOARD',0
523
   header    db   'Allgemeines debug- & nachrichtenboard',0
522
end if
524
end if
523
   krnl_cnt dd 0
525
   krnl_cnt dd 0
524
   vmode dd 0
526
   vmode dd 0
525
   targ  dd text2
527
   targ  dd text2
526
I_END:
528
I_END: