Put debug code behind DEBUG define
This commit is contained in:
parent
b000857bb4
commit
0661eb0f06
14
dosdl.asm
14
dosdl.asm
|
@ -19,7 +19,7 @@ select_target:
|
||||||
mov bp, rng_output
|
mov bp, rng_output
|
||||||
call store32
|
call store32
|
||||||
|
|
||||||
; Multiply rng output by number of targer words
|
; Multiply rng output by number of target words
|
||||||
xor si, si
|
xor si, si
|
||||||
xor dx, dx
|
xor dx, dx
|
||||||
xor ax, ax
|
xor ax, ax
|
||||||
|
@ -31,8 +31,10 @@ select_target:
|
||||||
loop .multiply_loop
|
loop .multiply_loop
|
||||||
|
|
||||||
mov ax, si
|
mov ax, si
|
||||||
|
%ifdef DEBUG
|
||||||
call hexprint16
|
call hexprint16
|
||||||
call newline
|
call newline
|
||||||
|
%endif
|
||||||
|
|
||||||
load_target:
|
load_target:
|
||||||
shl si, 1
|
shl si, 1
|
||||||
|
@ -657,15 +659,16 @@ add32:
|
||||||
adc dx, [addr32 + 2]
|
adc dx, [addr32 + 2]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
hexprint32:
|
%ifdef DEBUG
|
||||||
|
hexprint32:
|
||||||
xchg ax, dx
|
xchg ax, dx
|
||||||
call hexprint16
|
call hexprint16
|
||||||
xchg ax, dx
|
xchg ax, dx
|
||||||
hexprint16:
|
hexprint16:
|
||||||
xchg ah, al
|
xchg ah, al
|
||||||
call hexprint8
|
call hexprint8
|
||||||
xchg ah, al
|
xchg ah, al
|
||||||
hexprint8:
|
hexprint8:
|
||||||
%rep 4
|
%rep 4
|
||||||
rol al, 1
|
rol al, 1
|
||||||
%endrep
|
%endrep
|
||||||
|
@ -673,7 +676,7 @@ hexprint8:
|
||||||
%rep 4
|
%rep 4
|
||||||
rol al, 1
|
rol al, 1
|
||||||
%endrep
|
%endrep
|
||||||
hexprint4:
|
hexprint4:
|
||||||
push ax
|
push ax
|
||||||
and al, 0xf
|
and al, 0xf
|
||||||
cmp al, 10
|
cmp al, 10
|
||||||
|
@ -688,6 +691,7 @@ hexprint4:
|
||||||
|
|
||||||
pop ax
|
pop ax
|
||||||
ret
|
ret
|
||||||
|
%endif
|
||||||
|
|
||||||
section .data
|
section .data
|
||||||
target times 5 db 0
|
target times 5 db 0
|
||||||
|
|
Loading…
Reference in New Issue