Re: RosAsm injects extra bytes into your data
- From: "\\\\o//annabee" <http://www.TheWannabee.Org>
- Date: Thu, 28 Apr 2005 00:15:13 +0200
På 27 Apr 2005 14:26:42 -0700, skrev Alex McDonald <alex_mcd@xxxxxxxxxxxxxxx>:
Betov wrote:padding"Alex McDonald" <alex_mcd@xxxxxxxxxxxxxxx> écrivait news:1114628472.109735.162400@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
> Thank you. You wrote; > >> > The point of my "idea" is rather than injecting all theserequests.> bytes >> > to align things, why not rearrange all the declarations to > *minimize* >> > the wasted space while maintaining the alignment the user> >> Because this would be unusable, for the Programmer. > >> (The ones who have already written a bit of Assembly >> will probably understand without explanations... :) > > I still don't understand this statement. Can you explain?
As the sense of humour might vary from culture to culture, and as, maybe, some beginner would also not understand, here is a trivial example:
[MyFirstData: DwordData: D§ ?] ;... ;... [WordData: W§ ? ?] ;... ;... [ByteData: B§ ? ? ? ? ? ? ? MyLastData: D§ ?] ;... ;...
; Clear My Data from 'MyFirstData' to 'MyLastData':
mov eax 0, edi MyFirstData While edi < MyLastData | stosd | End_While
:)
Betov.
< http://rosasm.org >
As a coding style, this is pretty ropey. There are several assumptions the novice programmer that wrote this has made in the above code. A sense of humour is required when reading it, that's for sure.
In no particular order;
. The label MyLastData points to the _start_ of 4 bytes at the end of the structure, not the end. MyLastData - MyFirstData is 4 bytes short of the length.
. The while end_while depends on a less-than test. The last four bytes will not be cleared.
The *3* last bytes, and they will be cleared :))))
.
- Follow-Ups:
- Re: RosAsm injects extra bytes into your data
- From: Alex McDonald
- Re: RosAsm injects extra bytes into your data
- From: Alex McDonald
- Re: RosAsm injects extra bytes into your data
- References:
- HLA v1.76 is now available
- From: randyhyde
- Re: HLA v1.76 is now available
- From: Betov
- Re: HLA v1.76 is now available
- From: randyhyde
- Re: HLA v1.76 is now available
- From: Betov
- RosAsm injects extra bytes into your data
- From: randyhyde
- Re: RosAsm injects extra bytes into your data
- From: Betov
- Re: RosAsm injects extra bytes into your data
- From: Alex McDonald
- Re: RosAsm injects extra bytes into your data
- From: Betov
- Re: RosAsm injects extra bytes into your data
- From: Alex McDonald
- Re: RosAsm injects extra bytes into your data
- From: Betov
- Re: RosAsm injects extra bytes into your data
- From: Alex McDonald
- Re: RosAsm injects extra bytes into your data
- From: Betov
- Re: RosAsm injects extra bytes into your data
- From: Alex McDonald
- HLA v1.76 is now available
- Prev by Date: Re: RosAsm injects extra bytes into your data
- Next by Date: Re: RosAsm injects extra bytes into your data
- Previous by thread: Re: RosAsm injects extra bytes into your data
- Next by thread: Re: RosAsm injects extra bytes into your data
- Index(es):
Relevant Pages
|