Rev 7286 | Rev 7771 | 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); |
6058 | leency | 43 | } |
44 | |||
7746 | leency | 45 | :void debugval(dword text,number) |
6058 | leency | 46 | { |
47 | char tmpch[12]; |
||
6278 | leency | 48 | debug(text); |
49 | debug(": "); |
||
7746 | leency | 50 | itoa_(#tmpch, number); |
51 | debugln(#tmpch); |
||
6278 | leency | 52 | } |
53 | |||
6058 | leency | 54 | #endif |