flat assembler
Message board for the users of flat assembler.

Index > Windows > The gap in Win32 extended headers

Author
Thread Post new topic Reply to topic
white_wight



Joined: 03 Feb 2006
Posts: 24
white_wight
When utilizing the win32 extended headers and trying to use dword sized structure, that is like:
Code:
struct COORD
  X dw ?
  Y dw ?
ends
    

which is passed to the function SetConsoleCursorPosition with itself not the pointer, it gives an error so that i have to specify the size for it to work correctly:
Code:
invoke  SetConsoleCursorPosition,[houtput],dword[coord]    

Would appreciate if Tomasz changes the headers to handle such a case.


P.S. Also, can you, please, Tomasz, add the directive to specify the output filename directly from the source. That would be good, too. Very Happy

Thanks.
Post 03 Jun 2006, 16:44
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
how do you declare "coord"? (after that i can explain you why it can't ho this way) Wink

also altering output file name from source was already discussed. well... it was output file extension...
Post 03 Jun 2006, 21:58
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
white_wight



Joined: 03 Feb 2006
Posts: 24
white_wight
Quote:
how do you declare "coord"? (after that i can explain you why it can't ho this way)
Very Happy
Of course its:
Code:
coord COORD    
Wink

All i'm saying is that when utilizing standart win32 headers it treats this structure normally, just as any 32bit value (that is takes value of 32 bits at the address specified by label - here the name of a structure variable), without any concern about how this value is treated; and when using extended headers it sees not 32 bits at some address, instead, it sees no size at all, for it says that the size is not specified when:
Code:
invoke  SetConsoleCursorPosition,[houtput],[coord]    



Quote:
also altering output file name from source was already discussed. well... it was output file extension...
What exactly do you mean? Confused
Post 03 Jun 2006, 23:58
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
so then after preprocessing this becomes something like:

coord:
.X dw ?
.Y dw ?
sizeof.coord = 4

so "coord" itslef is label without any size assigned. it is like C pointer to void, you have to say what size address you want to address.

http://board.flatassembler.net/topic.php?t=1820
Post 04 Jun 2006, 12:11
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
white_wight



Joined: 03 Feb 2006
Posts: 24
white_wight
Why, when i say
Code:
[coord] (or [whatever])    
as a function parameter it already handles it as a dword value at the given address, no matter what size is the data under that address it pushes 32 bits. But when using extended headers it checks for the raw 32/64 bits of data and it won't let me too use structured one, even if it is of size of 32/64 bits.

Quote:
http://board.flatassembler.net/topic.php?t=1820

All I was suggesting is something like
Code:
filename 'filename.extension'    
just to have the output of a given file name without using console.
Post 04 Jun 2006, 14:20
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.