News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

RadASM & GoASM

Started by TmX, October 19, 2009, 07:52:35 AM

Previous topic - Next topic

TmX

I'm trying to build this simple GoASM code:


#dynamiclinkfile kernel32.dll user32.dll

#include windows.h

data section
szTitle db "Test",0
szText db "Hello world from GoASM!",0
temp dd 0

code section
start:
invoke GetStdHandle, STD_OUTPUT_HANDLE
invoke WriteConsole, eax, addr szText, 13, addr temp, NULL
;invoke MessageBox, NULL, addr szText, addr szTitle, MB_OK
invoke ExitProcess, NULL


And this is my paths setup:


When I try to assemble it, an error occurs:
QuoteC:\GoAsm\GoAsm.EXE "hellogoasm.asm"

GoAsm.Exe Version 0.56.8 - Copyright Jeremy Gordon 2001/9 - JG@JGnet.co.uk

Warning .......................
Line 3 of assembler source file (hellogoasm.asm):-
Could not open file:-
#include windows.h

Error!
Line 12 of assembler source file (hellogoasm.asm):-
Inappropriate material in INVOKE parameter:-
STD_OUTPUT_HANDLE

OBJ file not made

Make error(s) occured.
Total compile time 1513 ms

What's wrong here?

Grant

TmX it looks like you either don't have the recquired *.inc or your path setup is incorrect.

Firstly I suggest you go to Donkey's Stable (http://www.quickersoft.com/donkey/index.html) and follow the link to "GoAsm Headers" and download the headers.zip.
In it you will find a collection of header files (surprise) :eek, copy the contents into a suitable folder and then make sure your "Include" path points to it

In your example STD_OUTPUT_HANDLE is defined in winbase.h which itself is included in windows.h so that hopefully means everything is good.
If not I dunno what. Mind you that doesn't really mean anything I'm still learning. :bg

TmX

Quote from: Grant on October 26, 2009, 01:40:40 AM
TmX it looks like you either don't have the recquired *.inc or your path setup is incorrect.

There's the "include" directory in C:\Goasm
In fact, I use 2 version of headers: the one by Donkey, and the other one supplied by Ramon Sala.

I have no problem when using EasyCode.
So I think maybe RadASM needs a different configuration.

KetilO

Hi TmX

You can setup the environment or give the full path to the inlude file.

To setup the environment:
Goto Option / Environment Variables

Name: include
Value: C:\GoAsm\Include

KetilO

TmX

That works Ketil.  :thumbu
The assembling part works fine. Now another error: the linking error

Quote
Accept:the command:

C:\GoAsm\GoLink.EX...\GFL.txt /console /entry Start "hellogoasm.obj"

Error!
Could not open command file
Output file not made

Make error(s) occured.

What is this GFL.txt ?

KetilO

Hi TmX

It is a response file that the linker needs to find the windows api's.

KetilO

TmX

Ah I see. So after GFL.zip extracted to C:\GoASM, the linking went fine.

Unfortunately, it won't run:
Quote
hellogoasm.exe has stopped working

Windows can check online for a solution to the problem.

But if I assemble it manually, it will run properly.  :red