Subversion Repositories Kolibri OS

Rev

Rev 3520 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3520 Rev 3598
Line 17... Line 17...
17
 
17
 
18
; to be defined:
18
; to be defined:
19
;   __DEBUG__ equ 1
19
;   __DEBUG__ equ 1
Line -... Line 20...
-
 
20
;   __DEBUG_LEVEL__ equ 5
-
 
21
 
-
 
22
; MOV Immediate.
-
 
23
; Useful for things like movi eax,10:
-
 
24
; shorter than regular mov, but slightly slower,
-
 
25
; do not use it in performance-critical places.
-
 
26
macro movi dst, imm
-
 
27
{
-
 
28
if imm >= -0x80 & imm <= 0x7F
-
 
29
        push    imm
-
 
30
        pop     dst
-
 
31
else
-
 
32
        mov     dst, imm
-
 
33
end if
20
;   __DEBUG_LEVEL__ equ 5
34
}
21
 
35
 
22
macro debug_func name {
36
macro debug_func name {
23
 if used name
37
 if used name
Line 271... Line 285...
271
        push    eax
285
        push    eax
272
        mov     al, '-'
286
        mov     al, '-'
273
        call    fdo_debug_outchar
287
        call    fdo_debug_outchar
274
        pop     eax
288
        pop     eax
275
    @@:
289
    @@:
276
        push    10
-
 
277
        pop     ecx
290
        movi    ecx, 10
278
        push    -'0'
291
        push    -'0'
279
  .l1:
292
  .l1:
280
        xor     edx, edx
293
        xor     edx, edx
281
        div     ecx
294
        div     ecx
282
        push    edx
295
        push    edx