Ich habe unter Win7 64bit folgenden Fehler beim compilieren:
https://drive.google.com/file/d/0B6T0p7 ... VMTFE/view
... allerdings habe ich das Problem weder unter Linux x64, noch unter Win x32???
Es sieht für mich so aus, als würden Sprungziele, die noch nicht initialisiert sind, nicht erkannt. (Vorwärtssprung)
Ist das nun ein Bug, oder mache ich etwas falsch? Hier der Code, den ich aus dem Forum habe:
Code: Alles auswählen
EnableExplicit
EnableASM
Procedure.l FastCRC32(lBuffer.l, lBufLen.l)
Protected lResult.l = 0
MOV esi, lBuffer ;esi = ptr to buffer
MOV edi, lBufLen ;edi = length of buffer
MOV ecx, -1 ;ecx = -1
MOV edx, ecx ;edx = -1
nextbyte: ;next byte from buffer
XOr eax, eax ;eax = 0
XOr ebx, ebx ;ebx = 0
DB 0xAC ;"lodsb" instruction to get next byte
XOr al, cl ;xor al with cl
MOV cl, ch ;cl = ch
MOV ch, dl ;ch = dl
MOV dl, dh ;dl = dh
MOV dh, 8 ;dh = 8
nextbit: ;next bit in the byte
SHR bx, 1 ;shift bits in bx right by 1
RCR ax, 1 ;(rotate through carry) bits in ax by 1
JNC l_nocarry_ ;jump to nocarry if carry flag not set ; <-- hier tritt der Fehler auf
XOr ax, 0x08320 ;xor ax with 33568
XOr bx, 0x0EDB8 ;xor bx with 60856
nocarry: ;if carry flag wasn't set
DEC dh ;dh = dh - 1
JNZ l_nextbit_ ;if dh isnt zero, jump to nextbit
XOr ecx, eax ;xor ecx with eax
XOr edx, ebx ;xor edx with ebx
DEC edi ;finished with that byte, decrement counter
JNZ l_nextbyte_ ;if edi counter isnt at 0, jump to nextbyte
Not edx ;invert edx bits - 1s complement
Not ecx ;invert ecx bits - 1s complement
MOV eax, edx ;mov edx into eax
ROL eax, 16 ;rotate bits in eax left by 16 places
MOV ax, cx ;mov cx into ax
MOV lResult, eax ;crc32 result is in eax
ProcedureReturn lResult
EndProcedure
DisableASM
; Checksum.l = 0
; Buffer.s = "Wayne Diamond"
; Checksum = FastCRC32(@Buffer, Len(Buffer))
pcfreak