Running merlin32.exe from the Terminal

This commit is contained in:
Olivier Guinart 2017-09-11 21:33:12 -07:00
parent 0c47b6e549
commit 6e27f75403
3 changed files with 18 additions and 17 deletions

11
Test/HelloWorld.s Normal file
View File

@ -0,0 +1,11 @@
; Uses S-C Assembler variant.
* This is also a valid comment...
org $800
main ldy #$00
start_loop lda HelloWorld,y
beq end_loop
jsr $fded ; ROM routine, COUT, y is preserved
iny
bne start_loop
end_loop rts
HelloWorld ASC "HELLO WORLD!"00

View File

@ -1,11 +0,0 @@
; This is a comment
ADC X
DA Y
A EQU "STRING"
bne
BRA
* THat is a comment too.
""

View File

@ -86,8 +86,6 @@ function activateHoverTooltips(context: vscode.ExtensionContext) {
//**************************************************************
function buildCommand() {
console.log("In buildCommand...");
var buildCommand = "";
// Getting path to Merlin32 toolset
buildCommand += vscode.workspace.getConfiguration("Merlin32").get("path", "Name");
@ -97,9 +95,12 @@ function buildCommand() {
buildCommand += "Merlin32";
// Adding the libraries argument
buildCommand += " -V " + vscode.workspace.getConfiguration("Merlin32").get("libs", "Name");
buildCommand += " HelloWorld.s";
buildCommand += " " + vscode.window.activeTextEditor.document.fileName;
console.log("buildCommand = " + buildCommand);
// TODO: checkout if the integrated terminal can then be used: https://code.visualstudio.com/docs/editor/integrated-terminal
// TODO: using the integrated terminal right now but tasks are probably better so the output of the build process is there
// and maybe even actionable (parse it for error, get line # and double-click can navigate to say line #
let terminal: vscode.Terminal;
terminal = vscode.window.createTerminal();
terminal.show();
terminal.sendText(buildCommand);
}