11,6 → 11,7 |
VSPACE equ 12 |
IPC_BUF equ 160 |
DR_GRID equ 0;1 |
WRITE_LOG equ 1 |
|
FL_KRNL equ 1 |
|
64,6 → 65,10 |
mov ecx,sc |
mov edx,sizeof.system_colors |
mcall |
if WRITE_LOG |
mov esi, filename |
call CreateFile |
end if |
|
red: |
call draw_window |
91,6 → 96,25 |
jne still |
|
new_data: |
if WRITE_LOG |
pusha |
mov [tmp], al |
mov edx, tmp |
mov ecx, 1 |
mov esi, filename |
.write_to_logfile: |
call WriteToFile |
cmp eax, 5 |
jne @f |
mov esi, filename |
mov [filepos], 0 |
call CreateFile |
jmp .write_to_logfile |
@@: |
inc [filepos] |
popa |
end if |
|
mov ebp,[targ] |
.no4: |
cmp al,13 |
503,6 → 527,73 |
.ex: |
ret |
|
|
if WRITE_LOG |
;******************************************** |
;* input: esi = pointer to the file name * |
;******************************************** |
|
CreateFile: |
pusha |
mov dword [InfoStructure], 2 ; create file |
mov dword [InfoStructure+4], 0 ; reserved |
mov dword [InfoStructure+8], 0 ; reserved |
mov dword [InfoStructure+12], 0 ; 0 bytes to write (just create) |
mov dword [InfoStructure+16], 0 ; NULL data pointer (no data) |
mov dword [InfoStructure+20], 0 ; reserved |
mov dword [InfoStructure+21], esi ; pointer to the file name |
mcall 70, InfoStructure |
clc |
test eax, eax |
jz .out |
stc |
.out: |
popa |
ret |
|
;******************************************** |
;* input: esi = pointer to the file name * |
;* edx = pointer to data buffer * |
;* ecx = data length * |
;******************************************** |
|
WriteToFile: |
push ebx |
mov dword [InfoStructure], 3 ; write to file |
mov eax, [filepos] |
mov dword [InfoStructure+4], eax ; lower position addr |
mov dword [InfoStructure+8], 0 ; upper position addr (0 for FAT) |
mov dword [InfoStructure+12], ecx ; number of bytes to write |
mov dword [InfoStructure+16], edx ; pointer to data buffer |
mov dword [InfoStructure+20], 0 ; reserved |
mov dword [InfoStructure+21], esi ; pointer to the file name |
mcall 70, InfoStructure |
clc |
test eax, eax |
jz .out |
stc |
.out: |
pop ebx |
ret |
|
|
InfoStructure: |
dd 0x0 ; subfunction number |
dd 0x0 ; position in the file in bytes |
dd 0x0 ; upper part of the position address |
dd 0x0 ; number of bytes to read |
dd 0x0 ; pointer to the buffer to write data |
db 0 |
dd 0 ; pointer to the filename |
|
filepos dd 0 |
filename db '/sys/boardlog.txt',0 |
tmp db 0 |
end if |
|
|
|
|
krnl_msg db 'K : ' |
duk db 'KernUserDump' |
numb db 'Byte: Word: Dword: Hex:' |
524,7 → 615,7 |
title db 'Allgemeines debug- & nachrichtenboard',0 |
end if |
krnl_cnt dd 0 |
vmode dd 0 |
vmode dd 1 |
targ dd text2 |
I_END: |
offs dd ? |