flat assembler
Message board for the users of flat assembler.

Index > Main > the examples are broke

Author
Thread Post new topic Reply to topic
kaiplak



Joined: 09 May 2006
Posts: 5
kaiplak
hey I'm newbie and I dled one of the examples the command line one. how do I run it, and how do I run assembly files in general. I dled the thing and i can open them. When I try to compile the asm files with the windows fasm it says cannot invoke the inc file include with the example. Can one one help and tell me how the fasm really works. Aslo are the application files the finished product of compiled asm code, is there ever a .exe file created?

_________________
Som3t!m3s it is better to do or die! there my sig is smaller happy ya bunch of fascists!
Post 09 May 2006, 21:05
View user's profile Send private message AIM Address Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
problem are lines like: include "%FASMINC%\..." (... can be anything)

you must set environment variable FASMINC.
right click My Computer -> Properties -> Advanced -> Environment Variables -> New

and name = FASMINC, value = path to your INCLUDE directory inside FASM directory.
Post 09 May 2006, 21:38
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
PS: in my opinion, you should change your signature font size, drawing too much attention to yourself, if you don't have anything useful to say, isn't very helpful to community. And that's why we are here, to help to each other....
Post 09 May 2006, 21:43
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
kaiplak



Joined: 09 May 2006
Posts: 5
kaiplak
didn't work bra!!!! nice try though, that dumb cmd line is a bunch of crap, the include examples with the fasm work fine but the dumb cmd line that someone did sucks why show incorrect examples. Don't be hatin against my immense importance in the communty bra!

_________________
Som3t!m3s it is better to do or die! there my sig is smaller happy ya bunch of fascists!
Post 09 May 2006, 22:04
View user's profile Send private message AIM Address Reply with quote
MichaelH



Joined: 03 May 2005
Posts: 402
MichaelH
In cmd.asm you'll find two lines

include 'win32a.inc'
include 'cmd.inc'


'cmd.inc' is in the same folder as cmd.asm so will be found however 'win32a.inc' is in the include folder in the fasm folder you installed. If you follow Vid's suggestion and add "FASMINC" to the environment variables, you'll have to change

include 'win32a.inc'

to

include '%FASMINC%\win32a.inc'

and all will work.

However another way is to add "include" to the environment variables -

right click My Computer -> Properties -> Advanced -> Environment Variables -> New

and name = Include, value = path to your INCLUDE directory inside FASM directory.

cmd.asm should then work unmodified.

Also add the path to fasm.exe to the path environment variable -

right click My Computer -> Properties -> Advanced -> Environment Variables

and name = Path, value = path to your FASM directory. Make sure you separate each directory in the valuse field with a ;

This way your can open a cmd window, cd to the folder with the cmd.asm in it, type: fasm cmd.asm cmd.exe ..... why would you do this? Because then you can use your favourite Editor that can run external tools (like EditPlus or Crimson Editor .... do a google search).

Fasm is the simplest thing ever to build programs with ..... it's the writing of assembler code that's a bit difficult Wink
Post 10 May 2006, 02:21
View user's profile Send private message Reply with quote
kaiplak



Joined: 09 May 2006
Posts: 5
kaiplak
MichaelH wrote:
In cmd.asm you'll find two lines

include 'win32a.inc'
include 'cmd.inc'


'cmd.inc' is in the same folder as cmd.asm so will be found however 'win32a.inc' is in the include folder in the fasm folder you installed. If you follow Vid's suggestion and add "FASMINC" to the environment variables, you'll have to change

include 'win32a.inc'

to

include '%FASMINC%\win32a.inc'

and all will work.

However another way is to add "include" to the environment variables -

right click My Computer -> Properties -> Advanced -> Environment Variables -> New

and name = Include, value = path to your INCLUDE directory inside FASM directory.

cmd.asm should then work unmodified.

Also add the path to fasm.exe to the path environment variable -

right click My Computer -> Properties -> Advanced -> Environment Variables

and name = Path, value = path to your FASM directory. Make sure you separate each directory in the valuse field with a ;

This way your can open a cmd window, cd to the folder with the cmd.asm in it, type: fasm cmd.asm cmd.exe ..... why would you do this? Because then you can use your favourite Editor that can run external tools (like EditPlus or Crimson Editor .... do a google search).

Fasm is the simplest thing ever to build programs with ..... it's the writing of assembler code that's a bit difficult :wink:


so your advice didn't work. I put in those paths on my system ot just my profile. I have a laptop and windows xp so yeah. C:\Program Files\shit\fasmw166\INCLUDE is one of the pathways is this a correct way of putting in the value?

_________________
Som3t!m3s it is better to do or die! there my sig is smaller happy ya bunch of fascists!
Post 10 May 2006, 07:26
View user's profile Send private message AIM Address Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1606
Location: Ukraine
shoorick
at first tell us what you did exactly and what you got. "does not work" is not enough to understand your problem and to give you practical advise.
at second I agree with vid about your signature - we are not hating anyone - just it looks like text of signature is more valuable then body of your post.
Post 10 May 2006, 08:30
View user's profile Send private message Visit poster's website Reply with quote
okasvi



Joined: 18 Aug 2005
Posts: 382
Location: Finland
okasvi
how about making tutorial video about how to set %fasminc% Razz


anyone got Camstasia installed? Razz
Post 10 May 2006, 15:17
View user's profile Send private message MSN Messenger Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7734
Location: Kraków, Poland
Tomasz Grysztar
Since many versions the FASMINC variable is deprecated, and the standard examples require INCLUDE variable to be set up. The section "System requirements" of FASM.PDF does note it, BTW.
Post 10 May 2006, 15:42
View user's profile Send private message Visit poster's website Reply with quote
kaiplak



Joined: 09 May 2006
Posts: 5
kaiplak
ok I got to run the cmd example by pressing the cmd app, it gives me ths window saying command parameters and then it list the pathway to the cmd.exe. The FASM works fine and other examples I've tried work fine, just this dumb cmd one. I'm a total nhub at asm so I don't really understand the program. it definitely isn't functioning though. you guys contiually refer to a cmd.exe however the cmd line comes with the asm file, the inc file, a cmd application file, and a readme. No where is there a cmd.exe file. these pathways do nothing by the way they don't have anything to do with the program that I know of.

_________________
Som3t!m3s it is better to do or die! there my sig is smaller happy ya bunch of fascists!
Post 10 May 2006, 16:08
View user's profile Send private message AIM Address Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
tomasz:
Please keep the fasminc variable feature in future versions of the fasmw package. I like this better than the INCLUDE variable. Smile This way I don't have to worry about it and neither does anybody else. Cool
Post 10 May 2006, 17:09
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7734
Location: Kraków, Poland
Tomasz Grysztar
The INCLUDE variable is more capable (as you can specify multiple paths), more standard (among many compilers), and allows including by just specifying file name. If you still prefer fasminc, you can set it up yourself, but the decision that it's no longer official has been established for quite a long time already.

kaiplak: what do you mean by "cmd example"?
Post 10 May 2006, 17:17
View user's profile Send private message Visit poster's website Reply with quote
kaiplak



Joined: 09 May 2006
Posts: 5
kaiplak
http://flatassembler.net/examples/cmd.zip

I think this topic has gotten way off track, what do these system variables have to do with anything anway. They have no affect on the code it is apparent the code in the cmd zip is wrong or the fact that it is intended for win 95 may be a problem. The other possiblity might simply be how i'm running it i simply open the application. Am I suppose to even compile it , because it is already compiled into the app it appears. I don't see what the FASM compiler has to do with this at all?

_________________
Som3t!m3s it is better to do or die! there my sig is smaller happy ya bunch of fascists!
Post 10 May 2006, 17:24
View user's profile Send private message AIM Address Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7734
Location: Kraków, Poland
Tomasz Grysztar
Oh, I see....
kaiplak wrote:
ok I got to run the cmd example by pressing the cmd app, it gives me ths window saying command parameters and then it list the pathway to the cmd.exe.

Well this is exactly what this example is supposed to do - it just displays all the command line parameters provided (and the first parameter in command line is always just a path to program). To specify more parameters you'd have to run it from a command line.
Post 10 May 2006, 17:27
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. Also on YouTube, Twitter.

Website powered by rwasa.