Re: RosAsm injects extra bytes into your data
- From: Betov <betov@xxxxxxx>
- Date: 28 Apr 2005 08:09:15 GMT
"Alex McDonald" <alex_mcd@xxxxxxxxxxxxxxx> écrivait
news:1114637202.496310.136620@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
> 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.
You are an ass-hole in the Randall Hyde manner,
aren't you?
:)
> In no particular order;
In the order you'd like... :)
> . 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.
Maybe, with a fresh new brain, you could understand that
MyLastData is a Dummy Pointer, in the example, and that
there are several different ways for doing this.
Also, there is no 'Structure', here... :)
> . The while end_while depends on a less-than test. The last four bytes
> will not be cleared.
Same as above.
> . OK, so fix the two problems above (and I'm not sure that you can in
> RosAsm because of a lack of equate support).
RosAsm support 4 Types of Equates, ass-hole.
> Now the structure must be
> a multiple of dwords in length if you use stosd, otherwise you'll
> overrun the structure.
This is why there is a dummy Data, in the example.
> Unless I'm missing something,
Oh! I am afraid you miss everything... :)
> your structure is
> a byte short of dword alignment; there are 7 bytes prior to MyLastData.
> MyLastData is not dword aligned.
There is no Structure.
> . As this isn't properly a structure (it has no enforced coherence;
> it's a collection of structures), moving anything out from between the
> MyFirstData and MyLastData won't get cleared and the programmer will
> not get a warning. Why would anyone do that? Because it's not clear
> this is a single structure.
There is no Structure.
> [... BlaBla... and so on... ]
Therefore my initial answer, That was rally the most
appropriated one:
Yep!
:))
Betov.
http://rosasm.org >
.
- Follow-Ups:
- 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: Optimizing Static Variable Layout
- Next by Date: Re: Optimizing Static Variable Layout
- Previous by thread: Re: RosAsm injects extra bytes into your data
- Next by thread: Re: RosAsm injects extra bytes into your data
- Index(es):