Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3013 → Rev 3012

/programs/other/rtfread/trunk/rtfread.asm
69,7 → 69,7
 
@use_library
 
;include '../../../debug.inc'
;include '../../debug.inc'
 
if ~ RENDER eq PIX
TOP=TOP+4
/programs/other/fft/FHT4A.asm
24,7 → 24,7
dd 0x0 , 0x0 ; I_Param , I_Icon
 
include '../../macros.inc'
include '../../debug.inc'
include '../debug.inc'
include 'fht4code.asm'
 
 
/programs/other/archer/trunk/@RCHER.ASM
79,7 → 79,7
;{
include "..\..\..\macros.inc"
; purge mov
include "..\..\..\debug.inc"
include "..\..\debug.inc"
include 'dump.inc'
;}
end if
158,7 → 158,7
Newline
xor eax,eax
; and [Flags],STAY_MODE
and [_CRC32_],eax
and [CRC32],eax
and [IDATsize],eax
mov [Adler32],1
call OpenFile
282,7 → 282,7
push esi ecx
call UCRC
Msg 11
mov eax,[_CRC32_]
mov eax,[CRC32]
mov edx,36
cmp eax,[CRC_check]
je .crcok
/programs/other/archer/trunk/parser.inc
469,9 → 469,9
mov byte[esi],al
mov ecx,1
push dword[ebx]
pop [_CRC32_]
pop [CRC32]
call UCRC
push [_CRC32_]
push [CRC32]
pop dword[ebx]
mov eax,[ebx]
and eax,0xff
482,9 → 482,9
shr eax,24
mov byte[esi],al
push dword[ebx+8]
pop [_CRC32_]
pop [CRC32]
call UCRC
push [_CRC32_]
push [CRC32]
pop dword[ebx+8]
popa
ret
/programs/other/archer/trunk/data.inc
121,7 → 121,7
outp dd ?
unp_size dd ?
CRC_check dd ?
_CRC32_ dd ?
CRC32 dd ?
CRC32table rd 256
Adler32 dd ?
child dd ?
/programs/other/archer/trunk/deflate.inc
562,14 → 562,14
UCRC:
; in: esi - data to calculate CRC
; ecx - its length
; [_CRC32_] - previous CRC32
; out: [_CRC32_]- partial CRC32 (no pre- & post-conditioning!)
; [CRC32] - previous CRC32
; out: [CRC32]- partial CRC32 (no pre- & post-conditioning!)
pusha
cmp dword[CRC32table+4],0x77073096
je .tbl_rdy
call makeCRC
.tbl_rdy:
mov eax,[_CRC32_]
mov eax,[CRC32]
not eax
.m1:
movzx ebx,al
579,7 → 579,7
inc esi
loop .m1
not eax
mov [_CRC32_],eax
mov [CRC32],eax
popa
ret
 
/programs/other/debug.inc
0,0 → 1,137
macro debug_print str
{
local ..string, ..label
 
jmp ..label
..string db str,0
..label:
 
pushf
pushad
mov edx,..string
call debug_outstr
popad
popf
}
 
dps fix debug_print
 
macro debug_print_dec arg
{
pushf
pushad
if ~arg eq eax
mov eax,arg
end if
call debug_outdec
popad
popf
}
 
dpd fix debug_print_dec
 
;---------------------------------
debug_outdec: ;(eax - num, edi-str)
push 10 ;2
pop ecx ;1
push -'0' ;2
.l0:
xor edx,edx ;2
div ecx ;2
push edx ;1
test eax,eax ;2
jnz .l0 ;2
.l1:
pop eax ;1
add al,'0' ;2
call debug_outchar ; stosb
jnz .l1 ;2
ret ;1
;---------------------------------
 
debug_outchar: ; al - char
pushf
pushad
mov cl,al
mov eax,63
mov ebx,1
mcall
popad
popf
ret
 
debug_outstr:
mov eax,63
mov ebx,1
@@:
mov cl,[edx]
test cl,cl
jz @f
mcall
inc edx
jmp @b
@@:
ret
 
_debug_crlf db 13, 10, 0
 
macro newline
{
pushf
pushad
mov edx, _debug_crlf
call debug_outstr
popad
popf
}
 
macro print message
{
dps message
newline
}
 
macro pregs
{
dps "EAX: "
dpd eax
dps " EBX: "
dpd ebx
newline
dps "ECX: "
dpd ecx
dps " EDX: "
dpd edx
newline
}
 
macro debug_print_hex arg
{
pushf
pushad
if ~arg eq eax
mov eax, arg
end if
call debug_outhex
popad
popf
}
dph fix debug_print_hex
 
debug_outhex:
; eax - number
mov edx, 8
.new_char:
rol eax, 4
movzx ecx, al
and cl, 0x0f
mov cl, [__hexdigits + ecx]
pushad
mcall 63, 1
popad
dec edx
jnz .new_char
ret
 
__hexdigits:
db '0123456789ABCDEF'