flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
MCD 11 Jan 2005, 10:23
Take a look at Fasm documentation. both the dd and dp instructions in Fasm allow defining data values with a colon, but the data will be stored in a different order as with other assemblers. This is also true for short strings used as numerical constants, like
Code: mov eax, 'ABCD' Code: mov eax, 44434241h |
|||
![]() |
|
FlashBurn 11 Jan 2005, 13:38
The problem is that I have to use the dp instruction when I want to declare a variable which I then want to load with lidt and lgdt. But I have to use mov instructions to give the variable the right values, but this is overhead I don´t want. Also what other values use the dp instruction? I think this are the only and then there comes first the word and then the dword and not the orher way around! It would be a shame if I have to change the assembler because of this!
|
|||
![]() |
|
beppe85 11 Jan 2005, 14:16
To quote "Programmer's Manual":
Quote: The dp directive and its synonym df accept the values consisting of two numerical expressions separated with colon, the first value will become the high word and the second value will become the low double word of the far pointer value. There's nothing wrong with this directive, it follows the little-endiam rule. You can define a macro: Code: macro descriptor adword, aword { dd adword dw aword } |
|||
![]() |
|
FlashBurn 11 Jan 2005, 14:26
OK, I solved the problem. I´ve written this:
Code: GDTR dw limit dd base And this code doesn´t work with fasm. But If I write it like this: Code:
GDTR:
dw limit
dd base
It will work. @beppe85 Your macro is also wrong for me, because I need the word before the doubleword! |
|||
![]() |
|
beppe85 11 Jan 2005, 14:31
Yup, I missed that. Just invert the dd/dw.
|
|||
![]() |
|
vid 12 Jan 2005, 00:10
Code: label GDTR pword ;maybe it's other size operator, i am not sure dw limit dd base |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.