Hi, I'm using fasm ver 1.62 (windows version).
With the following code I allways get compile error and the error message isn't that descriptive as I would like it to be since I can't understand it in whole.
Someone PLEASE help me get this right.
; Module: fasmide.asm
; Project: Flat Assembler IDE
; Version: 0.0.1
; Author: Krister Alm kra Krister.Alm@Home.se
;
; This is to be a fullblown IDe for working with fasm development. When done
; there should be a working solution that runs on both Windows and Linux.
;
format PE GUI 4.0
entry start
include '%fasminc%/win32a.inc'
macro AddAPI param { match (name),param \{ macro name [params] \\{ \\common match (args),params \\\{ invoke name,args \\\} match =dd any,params \\\{ name dd any \\\} \\} \} }
section '.idata' import data readable writeable
library kernel, 'KERNEL32.DLL',\
user, 'USER32.DLL'
import kernel,\
GetModuleHandle, 'GetModuleHandleA',\
GetCommandLine, 'GetCommandLineA',\
ExitProcess, 'ExitProcess'
AddAPI(GetModuleHandle);
AddAPI(GetCommandLine);
AddAPI(ExitProcess);
import user,\
MessageBox,'MessageBoxA'
AddAPI(MessageBox);
section '.data' data readable writeable
_szWelcome db "Welcome to the Flat Assembler IDE",0
_szTitle db "Flat Assembler IDE",0
section '.udata' readable writeable
hInstance dd ?
cmdln dd ?
section '.code' code readable executable
; method: WinMain
; purpose: Performs program initializations and starts up the program.
; returns: programs exitcode in 'eax'
proc WinMain hInst, hPrevInst, CmdLine, CmdShow
MessageBox( HWND_DESKTOP, _szWelcome, _szTitle, MB_OK );
xor eax,eax
ret
endp
AddAPI(WinMain);
start:
GetModuleHandle(NULL);
push eax
GetCommandLine();
pop ebx
WinMain( ebx, NULL, eax, SW_SHOWDEFAULT );
ExitProcess( 0 );