Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7657 → Rev 7656

/programs/debug-fdo.inc
12,12 → 12,6
; __DEBUG__ equ 1
; __DEBUG_LEVEL__ equ 5
 
_esp equ esp
 
macro put_board {
mcall 63
}
 
macro debug_func name {
if used name
name@of@func equ name
58,11 → 52,11
jmp ..label
..str db _str,0
..label:
add esp,4*8+4
mov edx, ..str
sub esp,4*8+4
else
esp equ esp+4*8+4
mov edx, _str
esp equ _esp
end if
if ~_num eq
if _num eqtype eax
144,8 → 138,7
else if _dec eqtype 0
mov eax, _dec
else
; add esp,4*8+4
esp equ esp+4*8+4
add esp,4*8+4
if _num eq
mov eax, dword _dec
else if _num = 1
163,8 → 156,7
else
mov eax, dword _dec
end if
esp equ _esp
; sub esp,4*8+4
sub esp,4*8+4
end if
mov cl, _sign
call fdo_debug_outdec
195,11 → 187,11
if ~_hex eq eax
mov eax, _hex
end if
mov edx, 8
else if _hex in <ax,bx,cx,dx,si,di,bp,sp>
if ~_hex eq ax
movzx eax, _hex
end if
shl eax,16
if (_num eq)
mov edx, 4
end if
207,6 → 199,7
if ~_hex eq al
movzx eax, _hex
end if
shl eax,24
if (_num eq)
mov edx, 2
end if
214,19 → 207,15
else if _hex eqtype 0
mov eax, _hex
else
; add esp,4*8+4
esp equ esp+4*8+4
add esp,4*8+4
mov eax, dword _hex
esp equ _esp
; sub esp,4*8+4
sub esp,4*8+4
end if
if ~_num eq
mov edx, _num
else
if ~_hex eqtype eax
mov edx, 8
end if
end if
call fdo_debug_outhex
popad
popf
237,9 → 226,10
debug_func fdo_debug_outchar
debug_beginf
pushad
movzx ecx, al
mov cl,al
mov ebx, 1
put_board
mov eax,63
mcall
popad
ret
debug_endf
246,18 → 236,17
 
debug_func fdo_debug_outstr
debug_beginf
mov eax,63
mov ebx, 1
.l1:
dec esi
.l1: dec esi
js .l2
movzx ecx, byte[edx]
mov cl,[edx]
or cl, cl
jz .l2
put_board
mcall
inc edx
jmp .l1
.l2:
ret
.l2: ret
debug_endf
 
debug_func fdo_debug_outdec
271,23 → 260,20
mov al, '-'
call fdo_debug_outchar
pop eax
@@:
movi ecx, 10
@@: push 10
pop ecx
push -'0'
.l1:
xor edx, edx
.l1: xor edx,edx
div ecx
push edx
test eax, eax
jnz .l1
.l2:
pop eax
.l2: pop eax
add al, '0'
jz .l3
call fdo_debug_outchar
jmp .l2
.l3:
ret
.l3: ret
debug_endf
 
debug_func fdo_debug_outhex
298,8 → 284,7
add cl, 8
shl cl, 2
rol eax, cl
.l1:
rol eax, 4
.l1: rol eax,4
push eax
and eax, 0x0000000F
mov al, [__fdo_hexdigits+eax]