Hi Mike, great to see you on the Q&A side of the world for a change :)... I am not at all familiar with ZMAC at all and took the "easy but stupid" way out, sometimes it helps, sometimes it is a waste of time, your choice to try it - I have asked GPT (Yeah we know) and it came up with this -
Trying this might point you in the right direction - I HOPE :) -
Plain copied and pasted as is -
Quote:
Setting up compilation for ZMAC assembly code in Visual Studio Code involves configuring tasks in the tasks.json file and specifying the launch configuration in the launch.json file. Here's a step-by-step guide to help you get started:
Quote:
Install ZMAC Assembler:
Make sure you have ZMAC installed on your system. You can usually find installation instructions on the official ZMAC GitHub repository or the project's website.
Create a tasks.json file:
In your Visual Studio Code workspace, create a tasks.json file if you don't have one already. This file is used to define tasks such as building and compiling.
{
"version": "2.0.0",
"tasks": [
{
"label": "assemble",
"type": "shell",
"command": "zmac",
"args": ["${file}"],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Quote:
This example assumes that the zmac command is available in your system's PATH. Adjust the "command" and "args" values if necessary.
Create a launch.json file:
Now, create a launch.json file in your workspace. This file is used to configure how your program should be launched.
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug ZMAC",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/your_executable_name",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "assemble",
"miDebuggerPath": "/path/to/your/gdb"
}
]
}
Quote:
Adjust the "program" and "miDebuggerPath" values based on your setup. If you're not debugging or using GDB, you can modify the configuration accordingly.
Compile and Run:
Open your ZMAC assembly file in Visual Studio Code, press Ctrl + Shift + B to build using the defined task, and then use the appropriate configuration to run or debug your program.
Remember to replace placeholders like ${file}, ${workspaceFolder}, and others with your actual file paths and configurations. This setup assumes a simple scenario, and you might need to adjust it based on your specific project structure and requirements.