News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

New to this forum

Started by vozzie, August 08, 2009, 04:35:01 PM

Previous topic - Next topic

vozzie

Hy,

I'm new to this forum and i think this is the place for beginners,...

I'm trying to learn some assembly and am writing a small data manipulation procedure.

Some more questions are,
- can one use lodsb on data that is not "zero" terminated?
- when working with data, is it ok to mov 4 bytes in a register(eax) from [esi]? what if i pass the length of the data like this...(up to 3 bytes), my guess is i don't need to worry about reading over a boundary like this,..

With regards,


dedndave

welcome to the forum
sure - you can use lodsb on any data type
and - if you lodsd, it grabs 4 bytes and puts them in eax
it does not modify the bytes in memory
just know that if you have the values 56h, 34h, 12h in memory, and they are followed by 0FFh
after lodsd, eax will be 0FF123456h

Vortex

Hi vozzie,

Welcome to the forum.

vozzie

Thank you allĀ  :U

Quote from: dedndave on August 08, 2009, 04:56:17 PM
just know that if you have the values 56h, 34h, 12h in memory, and they are followed by 0FFh
after lodsd, eax will be 0FF123456h

thank you, i just struggled thru this "byte order thing" with debugging :D i better asked first

Slugsnack

if you want to swap it back around for any reason then you can use bswap