Rev 1355 | Rev 1725 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1355 | Rev 1571 | ||
---|---|---|---|
Line 9... | Line 9... | ||
9 | TMARGIN equ (35+5) |
9 | TMARGIN equ (35+5) |
10 | HSPACE equ 16 |
10 | HSPACE equ 16 |
11 | VSPACE equ 12 |
11 | VSPACE equ 12 |
12 | IPC_BUF equ 160 |
12 | IPC_BUF equ 160 |
13 | DR_GRID equ 0;1 |
13 | DR_GRID equ 0;1 |
- | 14 | WRITE_LOG equ 1 |
|
Line 14... | Line 15... | ||
14 | 15 | ||
Line 15... | Line 16... | ||
15 | FL_KRNL equ 1 |
16 | FL_KRNL equ 1 |
Line 62... | Line 63... | ||
62 | mov eax,48 |
63 | mov eax,48 |
63 | mov ebx,3 |
64 | mov ebx,3 |
64 | mov ecx,sc |
65 | mov ecx,sc |
65 | mov edx,sizeof.system_colors |
66 | mov edx,sizeof.system_colors |
66 | mcall |
67 | mcall |
- | 68 | if WRITE_LOG |
|
- | 69 | mov esi, filename |
|
- | 70 | call CreateFile |
|
- | 71 | end if |
|
Line 67... | Line 72... | ||
67 | 72 | ||
68 | red: |
73 | red: |
Line 69... | Line 74... | ||
69 | call draw_window |
74 | call draw_window |
Line 89... | Line 94... | ||
89 | 94 | ||
90 | cmp ebx,1 |
95 | cmp ebx,1 |
Line 91... | Line 96... | ||
91 | jne still |
96 | jne still |
- | 97 | ||
- | 98 | new_data: |
|
- | 99 | if WRITE_LOG |
|
- | 100 | pusha |
|
- | 101 | mov [tmp], al |
|
- | 102 | mov edx, tmp |
|
- | 103 | mov ecx, 1 |
|
- | 104 | mov esi, filename |
|
- | 105 | .write_to_logfile: |
|
- | 106 | call WriteToFile |
|
- | 107 | cmp eax, 5 |
|
- | 108 | jne @f |
|
- | 109 | mov esi, filename |
|
- | 110 | mov [filepos], 0 |
|
- | 111 | call CreateFile |
|
- | 112 | jmp .write_to_logfile |
|
- | 113 | @@: |
|
- | 114 | inc [filepos] |
|
- | 115 | popa |
|
92 | 116 | end if |
|
93 | new_data: |
117 | |
94 | mov ebp,[targ] |
118 | mov ebp,[targ] |
95 | .no4: |
119 | .no4: |
96 | cmp al,13 |
120 | cmp al,13 |
Line 501... | Line 525... | ||
501 | mcall 13 |
525 | mcall 13 |
502 | popa |
526 | popa |
503 | .ex: |
527 | .ex: |
504 | ret |
528 | ret |
Line -... | Line 529... | ||
- | 529 | ||
- | 530 | ||
- | 531 | if WRITE_LOG |
|
- | 532 | ;******************************************** |
|
- | 533 | ;* input: esi = pointer to the file name * |
|
- | 534 | ;******************************************** |
|
- | 535 | ||
- | 536 | CreateFile: |
|
- | 537 | pusha |
|
- | 538 | mov dword [InfoStructure], 2 ; create file |
|
- | 539 | mov dword [InfoStructure+4], 0 ; reserved |
|
- | 540 | mov dword [InfoStructure+8], 0 ; reserved |
|
- | 541 | mov dword [InfoStructure+12], 0 ; 0 bytes to write (just create) |
|
- | 542 | mov dword [InfoStructure+16], 0 ; NULL data pointer (no data) |
|
- | 543 | mov dword [InfoStructure+20], 0 ; reserved |
|
- | 544 | mov dword [InfoStructure+21], esi ; pointer to the file name |
|
- | 545 | mcall 70, InfoStructure |
|
- | 546 | clc |
|
- | 547 | test eax, eax |
|
- | 548 | jz .out |
|
- | 549 | stc |
|
- | 550 | .out: |
|
- | 551 | popa |
|
- | 552 | ret |
|
- | 553 | ||
- | 554 | ;******************************************** |
|
- | 555 | ;* input: esi = pointer to the file name * |
|
- | 556 | ;* edx = pointer to data buffer * |
|
- | 557 | ;* ecx = data length * |
|
- | 558 | ;******************************************** |
|
- | 559 | ||
- | 560 | WriteToFile: |
|
- | 561 | push ebx |
|
- | 562 | mov dword [InfoStructure], 3 ; write to file |
|
- | 563 | mov eax, [filepos] |
|
- | 564 | mov dword [InfoStructure+4], eax ; lower position addr |
|
- | 565 | mov dword [InfoStructure+8], 0 ; upper position addr (0 for FAT) |
|
- | 566 | mov dword [InfoStructure+12], ecx ; number of bytes to write |
|
- | 567 | mov dword [InfoStructure+16], edx ; pointer to data buffer |
|
- | 568 | mov dword [InfoStructure+20], 0 ; reserved |
|
- | 569 | mov dword [InfoStructure+21], esi ; pointer to the file name |
|
- | 570 | mcall 70, InfoStructure |
|
- | 571 | clc |
|
- | 572 | test eax, eax |
|
- | 573 | jz .out |
|
- | 574 | stc |
|
- | 575 | .out: |
|
- | 576 | pop ebx |
|
- | 577 | ret |
|
- | 578 | ||
- | 579 | ||
- | 580 | InfoStructure: |
|
- | 581 | dd 0x0 ; subfunction number |
|
- | 582 | dd 0x0 ; position in the file in bytes |
|
- | 583 | dd 0x0 ; upper part of the position address |
|
- | 584 | dd 0x0 ; number of bytes to read |
|
- | 585 | dd 0x0 ; pointer to the buffer to write data |
|
- | 586 | db 0 |
|
- | 587 | dd 0 ; pointer to the filename |
|
- | 588 | ||
- | 589 | filepos dd 0 |
|
- | 590 | filename db '/sys/boardlog.txt',0 |
|
- | 591 | tmp db 0 |
|
- | 592 | end if |
|
- | 593 | ||
- | 594 | ||
- | 595 | ||
505 | 596 | ||
506 | krnl_msg db 'K : ' |
597 | krnl_msg db 'K : ' |
507 | duk db 'KernUserDump' |
598 | duk db 'KernUserDump' |
508 | numb db 'Byte: Word: Dword: Hex:' |
599 | numb db 'Byte: Word: Dword: Hex:' |
509 | numb_len: |
600 | numb_len: |
Line 522... | Line 613... | ||
522 | title db 'General debug & message board',0 |
613 | title db 'General debug & message board',0 |
523 | else |
614 | else |
524 | title db 'Allgemeines debug- & nachrichtenboard',0 |
615 | title db 'Allgemeines debug- & nachrichtenboard',0 |
525 | end if |
616 | end if |
526 | krnl_cnt dd 0 |
617 | krnl_cnt dd 0 |
527 | vmode dd 0 |
618 | vmode dd 1 |
528 | targ dd text2 |
619 | targ dd text2 |
529 | I_END: |
620 | I_END: |
530 | offs dd ? |
621 | offs dd ? |
531 | flag rb 1 |
622 | flag rb 1 |
532 | ipcbuff rb IPC_BUF+20 |
623 | ipcbuff rb IPC_BUF+20 |