The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: vozzie on August 08, 2009, 04:35:01 PM

Title: New to this forum
Post by: vozzie on August 08, 2009, 04:35:01 PM
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,

Title: Re: New to this forum
Post by: dedndave on August 08, 2009, 04:56:17 PM
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
Title: Re: New to this forum
Post by: Vortex on August 08, 2009, 05:01:05 PM
Hi vozzie,

Welcome to the forum.
Title: Re: New to this forum
Post by: vozzie on August 08, 2009, 05:21:07 PM
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
Title: Re: New to this forum
Post by: Slugsnack on August 08, 2009, 10:07:39 PM
if you want to swap it back around for any reason then you can use bswap