Masm:
mov , -1
when I do the equavilant of this in hla like this:
mov (-1, );
I get an "unspecified memory size" error.
How can I do a const to mem32 mov instruction?
I tried this and it seems to work (no error message)
mov (-1, ebx);
mov (ebx, );
but it seems like an extra step to make.
mov , -1
when I do the equavilant of this in hla like this:
mov (-1, );
I get an "unspecified memory size" error.
How can I do a const to mem32 mov instruction?
I tried this and it seems to work (no error message)
mov (-1, ebx);
mov (ebx, );
but it seems like an extra step to make.
Are you sure you can assemble the following in masm?
you need something like
mov [eax+12], -1
you need something like
mov dword ptr[eax+12],-1
In HLA that would be
mov( -1, (type dword [eax + 12 ] ));
Are you sure you can assemble the following in masm?
mov [eax+12], -1
you need something like
mov dword ptr[eax+12],-1
Yup, your right, that won't assemble. I was trying to figure out different ways to translate and got my code mixed up. I'll have to rework it and present the problem again later.
Originally posted by Odyssey
In HLA that would be...
In HLA that would be...
Thanks, that works out.
I don't know how much of AOA you have read so far but the chapter on memory access and organisation discusses type coercion. Thats in the ebook version.
I don't know how much of AOA you have read so far but the chapter on memory access and organisation discusses type coercion. Thats in the ebook version.
Also in the published edition :-)
Cheers,
Randy Hyde
I don't know how much of AOA you have read so far but the chapter on memory access and organisation discusses type coercion. Thats in the ebook version.
I read it but I was trying to type coerce the wrong element (duh!)
Anyway, with the help above I traced the root of my error. I was staring right at the the solution in the hla docs but I couldn't see it.
Originally, I was trying to translate
Masm: mov [_sections+12], -1
to
hla: mov (-1, _sections[+12]);
Couldn't figure out why the parser was complaining, so I went the long way around using lea and registers (and type coercions).
I finally learned the proper hla syntax for this:
mov (-1, _sections[12]);
and it worked out dandy. That '+' in the syntax difference made me lose an hour. Oh well, code and learn (hopefully).