Re: RosAsm injects extra bytes into your data
- From: "\\\\o//annabee" <http://www.TheWannabee.Org>
- Date: Fri, 29 Apr 2005 03:07:06 +0200
På 28 Apr 2005 16:58:42 -0700, skrev Alex McDonald <alex_mcd@xxxxxxxxxxxxxxx>:
\o//annabee wrote:På 28 Apr 2005 15:18:11 -0700, skrev Alex McDonald <alex_mcd@xxxxxxxxxxxxxxx>:
We know you have no clue about assmebly,
Really? And you are...?
I am the guy who trusted Rene on his word, and created ~ 1.0 megs (in total) of assembly code since 10 januar 2004. And I never wrote assembly before. I used to be a Delphi programmer. Some inline stuff, maybe 3-10 routines, thats all.
A label is a symbolic representation of a ADDRESS. A memory adress. Not anything else.
Aha; a label in RosAsm is typeless,
Of course, but they can be followed by _size_ specifiers. D$ = DWORD So the D$ means a ? is of 4 bytes in size if it follows. B$ means the ? is byte. etc.
The label is there, to make things easy to rememeber.
And you can build _structur_e_ this way.....
and isn't attached to the object that follows... I see. Hence all the B$s W$s and D$s peppered all over the code. So this;
[ByteData: B§ ? ? ? MyLastData: ? ? ? ? ]
is legal syntax?
Absolutly. This is the very best syntax possible. Its extraorinary easy to grasp, very intuitive, short in form, etc. A real beauti, Rosy is.
What byte offset from ByteData does it have? 3? How
long is this uninitialised "data"? 7 bytes?
Yes. Because once the B$ goes on, it stays on until changed (inside a bracket)
If there is no sizespesifier the D$ is assumed
[ByteData: ? ? ? MyLastData: ? ? ? ? ]
now its a 4*7 bytes declaration.
How do you construct something like this in RosAsm? (pseudo-asm);
string dw end-start start db "A string of some length" end equ *
Is this the equivalent?
[string: w$ (end-start) start: "A string of some length" end: ]
No. This is equivalent:
[string: w$ len Start:B$ "A string of some length"]
the end lable are not really needed here, nor the B$
Reason for this spesial case, I do not know. I am not fully familiar with everything in RosAsm, as I only started programming it a litle more then a years ago, and I have seldom needed such calculation.
So lets wait for Betovs / wolfgang input on this. I am a person that does not really care about syntax, but about what this syntax does for me, and RosAsm is supurb for Application programming in assembly.
But anyway, I keep this in mind for my other pchar declarations :)))) So thank for the tip :)))
Now I have to put you in my credits.
(I am way to impatience, so I write much to much code sometimes, but I am counting on learning the art
more and more by actually doing something with it, and then I rewrite whats needed when needed).
Can I calculate on labels in different sections?
[ datalabel: ... ] codelabel: mov eax, codelabel-datalabel
I am not sure about this one. And I too like to know why it isnt possible.
It is possible by code. But yes, this is a bit strange.
But I assume enabling it would also disable a lot of the really superius other
feature of RosAsm. But I dont know. And anyway, doing something like this isnt really very useful,
as for instance, in +1 mega of code, I have never missed it.
In one case in my code, I needed to calculate the sizes of my data,
and here is the code for that :
mov eax WinMessagesJumpTable sub eax FirstVariableInSource mov ebx LastDynamicVariableInSource sub ebx FirstDynamicVariableInSource
Its redundant code. The memory is allready cleared.
Now it's suddenly redundant.
It was allways redundant. I said so in my last post. But the code would be useful if you needed to clear it at some later point.
Ah well. So when does this
[ByteData: B§ ? ? ? ? ? ? ? MyLastData: D§ ?]
get cleared?
The ? data, are "dynamic". This means they are allocated at runtime, by a single call to VirtualAlloc, if I am not mistaken.
initalized at runtime. The lables can be placed anywhere, and willthen beused by the code to access the data at diffrent addresses.
What's a dynamic datasegment? What's initalises it at runtime, as you've just said it's redundant to clear it at run time?
:)) Yep. This is RosAsm redtape? :)
We have [data:0] and [DataDyn:?]
Those are decleared diffrently. The "Data" takes space on Disk, the ? (DataDyn) doesnt.
All data decleared as ? is allocated as a runtime only segment, and automatically
zeroed out by the operating system.
> > RosAsm is a mighty strange assembler if that isn't a structure.
:))))) oh lolly...it never ends.
What specifically?
The critisisms, or fuzzy talk about RosAsm. Somebody seems to be in need of trashing it, when it is in fact nothing short of an _amazingly_ beautiful programming environment. The very very best.
When its is complete, it will become no less than AWSOME. It allready is awsome, but its still in production, with new releases every week, every day sometimes, so of course, completly 100% stable, it is not yet. But safe to use, that it is. And fast. theres nothing like this baby. Start crying your eyes out buddy.
>> There is no Structure.
> That's what the entire discussion in this thread has been about.
Nope. Its a thread about data.
Nonsense. It's a thread about optimally aligning structures; it's nothing to do with data at all. Betov's examples given for RosAsm don't contain any data, just uninitialised words and bytes.
:))) oki. .
- 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
- 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: \\\\o//annabee
- Re: RosAsm injects extra bytes into your data
- From: Alex McDonald
- HLA v1.76 is now available
- Prev by Date: Re: Gratitude in order !
- Next by Date: Several, bring coffie
- 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
|