Frank, sorry for mis-attributing the Linux build file to Matthew rather than you!
The FX-Core.sublime-build file I created does actually work as far as Assembling the code, running it from RAM and End run from RAM are concerned. So, it does basically the same as what the Notepad++ batch file approach does.
If I am reading the Linux version correctly, does it allow the user to jump to the line in the source code where the error occurred? It would be nice if that could be made to work in Sublime text for Windows too but for now, I will settle for being able to replicate what Notepad++ does.
Here's my build file. It should be saved as FX-Core.sublime-build in Sublime Text's User directory (Click Preferences > Browse packages ... to locate the User folder)
Code: Select all
{
// set working dir for relative paths
// change this to suit the location of FXCoreAsm.exe
"working_dir" : "C:/Program Files (x86)/Experimental Noize/FXCore Assembler",
"file_patterns": ["*.fxc","*.FXC"],
// REGEX for capturing errors
// file regex finds the name of the file for highlighting errors
"file_regex" : "Source File: (.+)$",
// line regex finds the errors in the output .LST
"line_regex" : "ERROR.* ([0-9]+):([0-9]+)?(.+)$",
// allow user to cancel "run from RAM" mode by pressing Ctrl+Pause/Break
"cancel":
{
"cmd" : "FXCoreCmdAsm.exe -ee",
},
// default build type is assemble only
"cmd": ["FXCoreCmdAsm.exe", "-a", "$file"],
"variants": [
{
"name": "Run from RAM",
"cmd" : "FXCoreCmdAsm.exe -re -i 0x30 \"$file\"",
},
{
"name": "End run from RAM",
"cmd" : "FXCoreCmdAsm.exe -ee -i 0x30",
},
]
}