flat assembler
Message board for the users of flat assembler.
Index
> Windows > can't get anything to work |
Author |
|
c0mputer-fr0d 02 Oct 2012, 21:03
the compiler has been fighting me every line of code and I can't get anything to work. I just want to open a console window on windows.Heres what I have so far
Code: format PE GUI 4.0 entry Main include "C:\Program Files (x86)\FASM\INCLUDE\win32ax.inc" ; include "C:\Program Files (x86)\FASM\INCLUDE\MACRO\PROC32.inc"; section '.data' data readable writeable inchar DB ? numread DD ? inhandle DD ? section '.code' code readable executable Main: invoke MessageBox, 0, "Enter 1:Push\n2:Pop\n3:PrintStack\n4:Peak", "l33t",0,; invoke AllocConsole; invoke ExitProcess, 0 ; ; oh yea and invoking messagebox doesn't work either they both say undefined symbol when I thought those macros were defined in win32ax and proc32 I'm trying to make a stack data structure example in fasm just to learn assembly a little bit. I need to be able to get single numbers as input for the menu but I can't do this without invoking console . I suppose I can try http://www.hackforums.net/archive/index.php/thread-341865.html because that seems to be the real deal stuff and not just calling macros. but to be easy on myself I want to try this Code: invoke AllocConsole; invoke GetStdHandle,STD_INPUT_HANDLE; mov [inhandle],eax; invoke ReadConsole,[inhandle],inchar,1,numread,0; invoke ExitProcess, 0; Please help. |
|||
02 Oct 2012, 21:03 |
|
c0mputer-fr0d 02 Oct 2012, 21:47
in the source code I posted it is being included
I also tried win32xp and win32w with no luck either they still whine about my invoke call to messagebox |
|||
02 Oct 2012, 21:47 |
|
c0mputer-fr0d 02 Oct 2012, 21:56
Got it to work by getting rid of white space before lines and commenting out a label I wasn't using , not really sure how that fixed it
|
|||
02 Oct 2012, 21:56 |
|
revolution 02 Oct 2012, 22:23
What I meant was that you need to set your environment variable so that you can include win32ax.inc as in the sample code I posted without specifying the entire path, then al the macros and equates will be properly found without generating errors.
Note that your inclusion of PROC.INC is redundant; and that white spacing is ignored. |
|||
02 Oct 2012, 22:23 |
|
c0mputer-fr0d 02 Oct 2012, 22:58
yea I had the environment variable set for the include folder and then even tried having 2 vars for includes and macro folder but it works now thanks anyway I think it was that label that was floating around I commented it out.
|
|||
02 Oct 2012, 22:58 |
|
typedef 07 Oct 2012, 17:31
wow, so "l33t"
|
|||
07 Oct 2012, 17:31 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.