Page 1 of 1

FASM coders: what setup do you use

Posted: Tue Oct 05, 2004 9:26 am
by GedB
I've been dabbling with FASM and I'd like to get a little more serious.

I know there are a few of the Gurus who do a lot of mixed FASM / PB coding, so I'd like to know what set up you have.

What editor do you use? Have you automated your builds? Any tips?

Posted: Tue Oct 05, 2004 10:36 am
by wilbert
No Guru here but just to inform you,
I use wordpad for creating my .asm files and a few lines of PB code to scan my directory for asm files and create the batch file I need to build a lib.

Posted: Tue Oct 05, 2004 12:22 pm
by freak
NotePad is the way to go :D
I create batch files to compile the stuff.


edit: hum, big deja vue here.. wasn't i at 1024 posts 2 weeks ago??

Posted: Tue Oct 05, 2004 12:40 pm
by dontmailme
freak wrote:NotePad is the way to go :D
I create batch files to compile the stuff.


edit: hum, big deja vue here.. wasn't i at 1024 posts 2 weeks ago??
I can vouch for that as it was after one of my posts!?

Did you (somebody) delete some of your posts ? Does that count ?

8O

Posted: Tue Oct 05, 2004 12:46 pm
by freak
The reason is quite simple. I post too much in the Bug-Reposts section.
Fred deletes fixed stuff there from time to time :wink:
I loose up to 50 posts each time that happens...

Posted: Tue Oct 05, 2004 2:57 pm
by GedB
Thanks everyone. I'll stick with Scite for now.

wilbert,

Any chance you could share that code of yours?

Posted: Tue Oct 05, 2004 3:25 pm
by wilbert
GedB wrote:Any chance you could share that code of yours?
Sure, it's not much.

Code: Select all

LibName.s = "MyLib"

; create the new batch file

CreateFile(0, "buildlib.bat")

; examine subdirectory ASM for all .asm files
; and build the batch file

ExamineDirectory(0,"ASM","*.ASM")
Repeat 
 Result = NextDirectoryEntry()
 If Result
   FSource.s = DirectoryEntryName()
   FDest.s = StringField(FSource, 1, ".") + ".obj"
   WriteStringN("fasm ASM/" + FSource + " " + FDest)
 EndIf
Until Result=0

; add commands to batch file to call lcclib and delete
; the created obj files 

WriteStringN("lcclib/out:" + LibName + ".lib *.obj")
WriteStringN("del *.obj")

; add a pause so we need to press a key after all asm files
; are compiled. That way we can check for errors

WriteStringN("pause")

CloseFile(0)

; call the batch file and wait until it has finished

RunProgram("buildlib.bat","","",1)

; after that call LibraryMaker

RunProgram("../LibraryMaker.exe")
You may have to modify the directory names etc. but it's just to give you the general idea. When creating a lib with a lot of asm files it saves some time. :)

Additional information...
My directory structure is like this.

Program Files/PureBasic/LibrarySDK
- contains LibraryMaker.exe

Program Files/PureBasic/LibrarySDK/MyLib
- contains FAsm.exe , lcclib.exe , MyLib.desc
and the compiled version of this PB code

Program Files/PureBasic/LibrarySDK/MyLib/ASM
- contains all .asm files

Posted: Wed Oct 06, 2004 9:54 am
by GedB
Nice and simple, just how I like it.

Thanks.