Hello out there,

here my problem:

I have a long string with bytes between 00 and 0FFh... so every possible byte!

Now: Reading it (through whatever function), it will stop after finding the first 00h byte. But thats not what I want! What can I do that it will read the whole string, with all 00h bytes. I thought about converting it from HexToAscii, but this wont work, cause of 16/32 Bit incompatibilty. Is there any encryption or something?


DKT
Posted on 2004-07-13 11:11:18 by Kreatief
Not sure what you're doing, but here is one example:



teststr db 00h,00h,23h,65h,33h,00h,43h
; obviously you will need to go for string length instead of 0 terminated

.code
mov eax, [teststr] ;mov teststr pointer to eax register
xor edx,edx ;clear edx
mov dl, BYTE PTR [eax] ;your byte is in the dl register

Posted on 2004-07-13 13:30:09 by drarem
Hi,

or more easy...

teststr db 00h,00h,23h,65h,33h,00h,43h

; obviously you will need to go for string length instead of 0 terminated

.code

lea edx,teststr
mov al,[edx+4] ;+ 0,1,2,3,4,...


Greetings,
Nordwind64
Posted on 2004-07-13 14:04:16 by Nordwind64
Kreatief you will need to store the length of your data somewhere, since you cannot depend on zero-termination. While processing data, you'll need to keep track of your index, and stop processing when you reach the end of your data.
Posted on 2004-07-14 11:57:08 by f0dder
Thanks for your replies! It wasnt exactly what I wanted, but I found a way around. Just simple encryption...

Have a nice evening

DKT
Posted on 2004-07-14 15:32:11 by Kreatief