Rev 3586 | Rev 4673 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3586 | Rev 4480 | ||
---|---|---|---|
Line 54... | Line 54... | ||
54 | and eax,0xffff0000 |
54 | and eax,0xffff0000 |
55 | sub eax,399 shl 16 |
55 | sub eax,399 shl 16 |
56 | add eax,399 |
56 | add eax,399 |
57 | mov [xstart],eax |
57 | mov [xstart],eax |
58 | mcall 48,3,sc,sizeof.system_colors |
58 | mcall 48,3,sc,sizeof.system_colors |
59 | if WRITE_LOG |
59 | |
60 | mov esi,filename |
60 | mov esi,filename |
61 | call CreateFile |
61 | call CreateFile |
62 | end if |
- | |
63 | ;------------------------------------------------------------------------------ |
62 | ;------------------------------------------------------------------------------ |
64 | red: |
63 | red: |
65 | call draw_window |
64 | call draw_window |
66 | ;------------------------------------------------------------------------------ |
65 | ;------------------------------------------------------------------------------ |
67 | still: |
66 | still: |
- | 67 | cmp [buffer_length],0 |
|
- | 68 | je @f |
|
- | 69 | call write_buffer |
|
- | 70 | @@: |
|
68 | mcall 23,1 ; wait here for event |
71 | mcall 23,50 ; wait here for event |
69 | cmp eax,1 ; redraw request ? |
72 | cmp eax,1 ; redraw request ? |
70 | je red |
73 | je red |
Line 71... | Line 74... | ||
71 | 74 | ||
72 | cmp eax,2 ; key in buffer ? |
75 | cmp eax,2 ; key in buffer ? |
Line 78... | Line 81... | ||
78 | mcall 63,2 |
81 | mcall 63,2 |
79 | cmp ebx,1 |
82 | cmp ebx,1 |
80 | jne still |
83 | jne still |
Line 81... | Line 84... | ||
81 | 84 | ||
- | 85 | new_data: |
|
- | 86 | cmp [buffer_length],255 |
|
- | 87 | jne @f |
|
- | 88 | call write_buffer |
|
- | 89 | @@: |
|
- | 90 | movzx ebx,byte[buffer_length] |
|
- | 91 | mov [ebx+tmp],al |
|
- | 92 | inc [buffer_length] |
|
- | 93 | ||
- | 94 | mov ebp,[targ] |
|
- | 95 | .no4: |
|
- | 96 | cmp al,13 |
|
- | 97 | jne no13 |
|
82 | new_data: |
98 | and [ebp-8],dword 0 |
- | 99 | jmp new_check |
|
- | 100 | ;------------------------------------------ |
|
83 | if WRITE_LOG |
101 | write_buffer: |
84 | pusha |
- | |
85 | mov [tmp],al |
102 | pusha |
86 | mov edx,tmp |
103 | mov edx,tmp |
87 | mov ecx,1 |
104 | movzx ecx,byte[buffer_length] ;1 |
88 | mov esi,filename |
105 | mov esi,filename |
89 | .write_to_logfile: |
106 | .write_to_logfile: |
90 | call WriteToFile |
107 | call WriteToFile |
91 | cmp eax,5 |
108 | cmp eax,5 |
92 | jne @f |
109 | jne @f |
93 | mov esi,filename |
110 | mov esi,filename |
94 | mov [filepos],0 |
111 | mov [filepos],0 |
95 | call CreateFile |
112 | call CreateFile |
96 | jnc .write_to_logfile |
113 | jnc .write_to_logfile |
- | 114 | @@: |
|
97 | @@: |
115 | movzx eax,byte[buffer_length] |
- | 116 | add [filepos],eax |
|
- | 117 | xor eax,eax |
|
98 | inc [filepos] |
118 | mov [buffer_length],al |
99 | popa |
- | |
100 | end if |
- | |
101 | mov ebp,[targ] |
119 | popa |
102 | .no4: |
- | |
103 | cmp al,13 |
- | |
104 | jne no13 |
- | |
105 | and [ebp-8],dword 0 |
- | |
106 | jmp new_check |
120 | ret |
107 | ;------------------------------------------ |
121 | ;------------------------------------------ |
108 | no13: |
122 | no13: |
109 | cmp al,10 |
123 | cmp al,10 |
110 | jne no10 |
124 | jne no10 |
Line 250... | Line 264... | ||
250 | add edx,80 |
264 | add edx,80 |
251 | cmp [edx],byte 'x' |
265 | cmp [edx],byte 'x' |
252 | jne newline |
266 | jne newline |
253 | ret |
267 | ret |
254 | ;------------------------------------------------------------------------------ |
268 | ;------------------------------------------------------------------------------ |
255 | if WRITE_LOG |
- | |
256 | ;******************************************** |
269 | ;******************************************** |
257 | ;* input: esi = pointer to the file name * |
270 | ;* input: esi = pointer to the file name * |
258 | ;******************************************** |
271 | ;******************************************** |
Line 259... | Line 272... | ||
259 | 272 | ||
Line 308... | Line 321... | ||
308 | db 0 |
321 | db 0 |
309 | dd 0 ; pointer to the filename |
322 | dd 0 ; pointer to the filename |
Line 310... | Line 323... | ||
310 | 323 | ||
311 | filepos dd 0 |
324 | filepos dd 0 |
312 | default_filename db '/sys/boardlog.txt',0 |
- | |
313 | tmp db 0 |
- | |
314 | end if |
325 | default_filename db '/sys/boardlog.txt',0 |
315 | ;------------------------------------------------------------------------------ |
326 | ;------------------------------------------------------------------------------ |
316 | krnl_msg db 'K : ' |
327 | krnl_msg db 'K : ' |
Line 317... | Line 328... | ||
317 | duk db 'KernUser' |
328 | duk db 'KernUser' |
Line 350... | Line 361... | ||
350 | xstart dd ? |
361 | xstart dd ? |
Line 351... | Line 362... | ||
351 | 362 | ||
Line 352... | Line 363... | ||
352 | sc system_colors |
363 | sc system_colors |
- | 364 | ||
- | 365 | i_end: |
|
353 | 366 | buffer_length rb 1 |
|
- | 367 | ;------------------------------------------------------------------------------ |
|
354 | i_end: |
368 | tmp rb 256 |
355 | 369 | ;------------------------------------------------------------------------------ |
|
356 | filename rb 256 |
370 | filename rb 256 |
357 | ;------------------------------------------------------------------------------ |
371 | ;------------------------------------------------------------------------------ |
358 | align 4 |
372 | align 4 |