mirror of
https://github.com/OlivierGuinart/Merlin32ForVSCode.git
synced 2024-11-29 13:49:29 +00:00
Running merlin32.exe from the Terminal
This commit is contained in:
parent
0c47b6e549
commit
6e27f75403
11
Test/HelloWorld.s
Normal file
11
Test/HelloWorld.s
Normal 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
|
11
Test/test.s
11
Test/test.s
@ -1,11 +0,0 @@
|
||||
; This is a comment
|
||||
ADC X
|
||||
DA Y
|
||||
A EQU "STRING"
|
||||
bne
|
||||
BRA
|
||||
* THat is a comment too.
|
||||
""
|
||||
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user