/programs/system/board/trunk/board.asm |
---|
290,18 → 290,10 |
mov ebx,[xstart] |
mov ecx,MAXSTRINGS*10+45 ; [y start] *65536 + [y size] |
mov edx,[sc.work] ; color of work area RRGGBB,8->color gl |
or edx,0x03000000 |
or edx,0x13000000 |
mov edi,header ; WINDOW LABEL |
int 0x40 |
; WINDOW LABEL |
mov eax,4 ; function 4 : write text to window |
mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
mov ecx,[sc.grab_text] ; color of text RRGGBB |
or ecx,0x10000000 |
mov edx,header ; pointer to text beginning |
mov esi,header.len ; text length |
int 0x40 |
mov ecx,4 |
mov esi,[sc.work] |
mov ebx,316 shl 16+5*6 |
522,17 → 514,11 |
; 11,11 > 0,-1 |
; 5,11 > 0,-1 |
if lang eq ru |
header: |
db ' ' |
.len = $ - header |
header db ' ',0 |
else if lang eq en |
header: |
db 'GENERAL DEBUG & MESSAGE BOARD' |
.len = $ - header |
header db 'GENERAL DEBUG & MESSAGE BOARD',0 |
else |
header: |
db 'ALLGEMEINES DEBUG- & NACHRICHTENBOARD' |
.len = $ - header |
header db 'ALLGEMEINES DEBUG- & NACHRICHTENBOARD',0 |
end if |
krnl_cnt dd 0 |
vmode dd 0 |
/programs/system/board/trunk/build_en.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm board.asm board |
@erase lang.inc |
@pause |
/programs/system/board/trunk/build_ge.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix ge >lang.inc |
@fasm board.asm board |
@erase lang.inc |
@pause |
/programs/system/board/trunk/build_ru.bat |
---|
1,4 → 1,5 |
@erase lang.inc |
@echo lang fix ru >lang.inc |
@fasm board.asm board |
@erase lang.inc |
@pause |
/programs/system/board/trunk/debug.inc |
---|
0,0 → 1,131 |
macro debug_print str |
{ |
local ..string, ..label |
jmp ..label |
..string db str,0 |
..label: |
pushf |
pushad |
mov edx,..string |
call debug_outstr |
popad |
popf |
} |
dps fix debug_print |
macro debug_print_dec arg |
{ |
pushf |
pushad |
if ~arg eq eax |
mov eax,arg |
end if |
call debug_outdec |
popad |
popf |
} |
dpd fix debug_print_dec |
;--------------------------------- |
debug_outdec: ;(eax - num, edi-str) |
push 10 ;2 |
pop ecx ;1 |
push -'0' ;2 |
.l0: |
xor edx,edx ;2 |
div ecx ;2 |
push edx ;1 |
test eax,eax ;2 |
jnz .l0 ;2 |
.l1: |
pop eax ;1 |
add al,'0' ;2 |
call debug_outchar ; stosb |
jnz .l1 ;2 |
ret ;1 |
;--------------------------------- |
debug_outchar: ; al - char |
pushf |
pushad |
mov cl,al |
mov eax,63 |
mov ebx,1 |
int 0x40 |
popad |
popf |
ret |
debug_outstr: |
mov eax,63 |
mov ebx,1 |
@@: |
mov cl,[edx] |
test cl,cl |
jz @f |
int 40h |
inc edx |
jmp @b |
@@: |
ret |
macro newline |
{ |
dps <13,10> |
} |
macro print message |
{ |
dps message |
newline |
} |
macro pregs |
{ |
dps "EAX: " |
dpd eax |
dps " EBX: " |
dpd ebx |
newline |
dps "ECX: " |
dpd ecx |
dps " EDX: " |
dpd edx |
newline |
} |
macro debug_print_hex arg |
{ |
pushf |
pushad |
if ~arg eq eax |
mov eax, arg |
end if |
call debug_outhex |
popad |
popf |
} |
dph fix debug_print_hex |
debug_outhex: |
; eax - number |
mov edx, 8 |
.new_char: |
rol eax, 4 |
movzx ecx, al |
and cl, 0x0f |
mov cl, [__hexdigits + ecx] |
pushad |
mcall 63, 1 |
popad |
dec edx |
jnz .new_char |
ret |
__hexdigits: |
db '0123456789ABCDEF' |
/programs/system/board/trunk/macros.inc |
---|
143,10 → 143,6 |
; optimize the code for size |
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp> |
178,7 → 174,7 |
macro mov arg1,arg2 |
{ |
if (arg1 in __regs) & (arg2 eqtype 0) |
if (arg1 in __regs) & ((arg2 eqtype 0) | (arg2 eqtype '0')) |
if (arg2) = 0 |
xor arg1,arg1 |
else if (arg2) = 1 |
222,7 → 218,13 |
.x_size dd ? ; +42 |
.y_size dd ? ; +46 |
.slot_state dw ? ; +50 |
rb (1024-52) |
dw ? ; +52 - reserved |
.client_left dd ? ; +54 |
.client_top dd ? ; +58 |
.client_width dd ? ; +62 |
.client_height dd ? ; +66 |
.wnd_state db ? ; +70 |
rb (1024-71) |
} |
struct process_information |