Subversion Repositories Kolibri OS

Rev

Rev 6698 | Rev 7286 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6058 leency 1
#ifndef INCLUDE_DEBUG_H
2
#define INCLUDE_DEBUG_H
3
 
4
#ifndef INCLUDE_STRING_H
5
#include "../lib/strings.h"
6
#endif
7
 
8
inline fastcall void debugch( ECX)
9
{
10
	$push eax
11
	$push ebx
12
	$mov eax,63
13
	$mov ebx,1
14
	$int 0x40
15
	$pop ebx
16
	$pop eax
17
}
18
 
19
inline fastcall void debug( EDX)
20
{
21
	$push eax
22
	$push ebx
23
	$push ecx
24
	$mov eax, 63
25
	$mov ebx, 1
26
NEXT_CHAR:
27
	$mov ecx, DSDWORD[edx]
28
	$or	 cl, cl
29
	$jz  DONE
30
	$int 0x40
31
	$inc edx
32
	$jmp NEXT_CHAR
33
DONE:
34
	$pop ecx
35
	$pop ebx
36
	$pop eax
37
}
38
 
39
inline fastcall void debugln( EDX)
40
{
41
	debug( EDX);
6152 leency 42
	debugch(10);
43
	debugch(13);
6058 leency 44
}
45
 
46
inline void debugi(dword d_int)
47
{
48
	char tmpch[12];
49
	itoa_(#tmpch, d_int);
50
	debugln(#tmpch);
51
}
52
 
6278 leency 53
:void debugval(dword text,number)
54
{
55
	debug(text);
56
	debug(": ");
57
	debugi(number);
58
}
59
 
6058 leency 60
#endif