16091ddd9e
@panel: to match K0581 distro: SYSMETER -> GMON @numcalc: moved to the appropriate place in repository HeEd: added english variant NetSendC, NetSendS: added english variant + optimization pic4: changes in set background + optimization tetris, @rcher, board, sysxtree, vrr: new versions from K0581 distro bgitest: fixed small error + ability to set language via lang.inc c4: small correction in label height to match K0581 distro git-svn-id: svn://kolibrios.org@131 a494cfbc-eb01-0410-851d-a64ba20cac60
137 lines
1.8 KiB
PHP
137 lines
1.8 KiB
PHP
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
|
|
|
|
_debug_crlf db 13, 10, 0
|
|
|
|
macro newline
|
|
{
|
|
pushf
|
|
pushad
|
|
mov edx, _debug_crlf
|
|
call debug_outstr
|
|
popad
|
|
popf
|
|
}
|
|
|
|
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' |