var curfile = command() if curfile = "" then print "FreeBASIC Macro Expander Deluxe Version 1" print "Usage: fme [module]" print "[module] is the name of your file without extension." print "fme will automatically compile your file with -g and -r" print "then print the contents with macros expanded." print "fbc must be in your path or the local dir for this to work." print "Look for:" print " [Macro Expansion: your macro expanded here ]" print end 42 end if var basfile = curfile & ".bas" var asmfile = curfile & ".asm" var outstr = "" shell "fbc -g -r " & basfile open asmfile for input as #1 var curline = "" do while not eof(1) line input #1, curline curline = trim(curline) if left(curline,2) = "##" then outstr = outstr & curline & !"\n" loop close #1 print outstr