flat assembler
Message board for the users of flat assembler.

Index > Windows > Unrecongnized Error

Author
Thread Post new topic Reply to topic
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
I'm converting a 32bit ddraw library to 64bit and everything was going fine, then half way through the conversion I started getting this error
Code:
'illegal instruction'
resource.inc - directory macro
ERROR: root@resource ..arg?6mT 0,%t,0,count?6ns shl 16     


so I though I would comment out all the resource code, then recompile. Now the same type of error is in the library directive.
Code:
'illegal instruction'
import64.inc - library macro
ERROR: ..arg?6mT 0,0,0,0,0    


does anybody have any ideas on what would be causing this specific error?

_________________
Gimme a sledge hammer! I'LL FIX IT!
Post 14 Feb 2012, 14:49
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17253
Location: In your JS exploiting you and your system
revolution
I couldn't find the code attachment in your post. How can we test it and fix it for you?
Post 14 Feb 2012, 14:56
View user's profile Send private message Visit poster's website Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
revolution wrote:
I couldn't find the code attachment in your post. How can we test it and fix it for you?


You should put a sticky note somewhere about that so you don't have to say it every time. Wink
Post 14 Feb 2012, 15:56
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
typedef wrote:
revolution wrote:
I couldn't find the code attachment in your post. How can we test it and fix it for you?


You should put a sticky note somewhere about that so you don't have to say it every time. Wink


Ha, Ha, I didn't post the code, I thought someone could tell me without the code! Very Happy
All right here it is:


Description:
Download
Filename: UTILITY64.zip
Filesize: 10.66 KB
Downloaded: 48 Time(s)


_________________
Gimme a sledge hammer! I'LL FIX IT!
Post 14 Feb 2012, 17:40
View user's profile Send private message Reply with quote
l_inc



Joined: 23 Oct 2009
Posts: 881
l_inc
madmatt
In the file OffScreenSurfaces there's a procedure DDFillPlain:
Code:
proc DDFillPlain  Surface, Color    

But Color is a structure, defined in gdiplus.inc.

Also you have other mistakes like comparing rax with too large values
Code:
.until  rax <> DDERR_WASSTILLDRAWING    

and using undefined structures (BltFillRectangle).
Post 14 Feb 2012, 22:13
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
l_inc wrote:
madmatt
In the file OffScreenSurfaces there's a procedure DDFillPlain:
Code:
proc DDFillPlain  Surface, Color    

But Color is a structure, defined in gdiplus.inc.

Also you have other mistakes like comparing rax with too large values
Code:
.until  rax <> DDERR_WASSTILLDRAWING    

and using undefined structures (BltFillRectangle).


Thanks! Smile , you're right, Renamed the 'Color' Variable to ColorRGB and that fixed the problem. Why resource gave me an error I don't know. Fixed the other problems you mentioned also.

_________________
Gimme a sledge hammer! I'LL FIX IT!
Post 14 Feb 2012, 23:08
View user's profile Send private message Reply with quote
l_inc



Joined: 23 Oct 2009
Posts: 881
l_inc
madmatt
Quote:
Why resource gave me an error I don't know.

Because instead of defining the argument named Color the proc macro (defargs@proc to be more precise) expanded Color macro as a structure definition with parameters equ ..arg. Therefore Color macro in turn tried to define it's structure field with the initializer equ ..arg by doing dd equ ..arg. This however redefined the dd directive instead of defining the structure field. And the first place, where the dd directive was used afterwards, is the definition of the resource data directory in resource.inc.
Post 15 Feb 2012, 00:28
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17253
Location: In your JS exploiting you and your system
revolution
l_inc wrote:
Because instead of defining the argument named Color the proc macro (defargs@proc to be more precise) expanded Color macro as a structure definition with parameters equ ..arg. Therefore Color macro in turn tried to define it's structure field with the initializer equ ..arg by doing dd equ ..arg. This however redefined the dd directive instead of defining the structure field. And the first place, where the dd directive was used afterwards, is the definition of the resource data directory in resource.inc.
That is a nice bit of detective work there. And it certainly shows why it is always important for everyone to post the code that is giving problems. We could have been suggesting reasons for days without success and the OP getting more and more frustrated at the problem.
Post 15 Feb 2012, 04:36
View user's profile Send private message Visit poster's website 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.

Powered by rwasa.