65.9K
CodeProject is changing. Read more.
Home

6502 Cross Assembly using MacOS and Atom

starIconstarIconstarIconstarIconstarIcon

5.00/5 (2 votes)

Aug 7, 2017

MIT
viewsIcon

4890

6502 Cross Assembly using MacOS and Atom

Cross Assembly Using Atom

Some time ago, I wrote a post that used Visual Studio Code running on MacOS to cross assemble 6502 assembly code for the Applie II. Since then, I have been asked about using the Atom editor. If you are not familiar with the original article, it may be appropriate to check it out before reading further.

To use Atom in the same manner as VS Code, i.e., with the same automated compile and test scripts, the standard install of Atom simply requires two packages adding. One for code highlighting and the other for running the tasks.

Code Highlighting

The following package can be added to Atom to provide code highlighting.

language-65asm

Running the Build and Test Scripts

The equivalent of the Visual Studio Tasks functionality can be obtained by adding the following package:

process-template

The configuration for this is stored in process-pallet.json. I have included an example configuration I have used to build and test project called “JTTY” using the Merlin 32 Assembler from Brutal Delux.

Hope this helps!

{
  "patterns": {
    "P1": {
      "expression": "(path):(line)"
    },
    "P2": {
      "expression": "(path)\\s+(line)",
      "path": "(?:\\/[\\w\\.\\-]+)+"
    }
  },
  "commands": [
    {
      "namespace": "process-palette",
      "action": "Build-Assemble",
      "command": "{projectPath}/build-assemble jtty",
      "arguments": [],
      "cwd": "{projectPath}",
      "inputDialogs": [],
      "env": {},
      "keystroke": "cmd-shift-b",
      "stream": true,
      "outputTarget": "panel",
      "outputBufferSize": 80000,
      "maxCompleted": 3,
      "autoShowOutput": true,
      "autoHideOutput": false,
      "scrollLockEnabled": false,
      "singular": false,
      "promptToSave": true,
      "saveOption": "all",
      "patterns": [
      "default"
      ],
      "successOutput": "{stdout}",
      "errorOutput": "{stdout}\n{stderr}",
      "fatalOutput": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}",
      "startMessage": null,
      "successMessage": "Executed : {fullCommand}",
      "errorMessage": "Executed : {fullCommand}\nReturned with code {exitStatus}\n{stderr}",
      "fatalMessage": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}",
      "menus": [
        "Processes",
        "Project"
      ],
      "notifyOnStart": false,
      "notifyOnSuccess": true,
      "notifyOnError": true,
      "input": null
    },
    {
      "namespace": "process-palette",
      "action": "Build-Test",
      "command": "{projectPath}/build-test jtty 0x8000",
      "arguments": [],
      "cwd": "{projectPath}",
      "inputDialogs": [],
      "env": {},
      "keystroke": "cmd-shift-t",
      "stream": true,
      "outputTarget": "panel",
      "outputBufferSize": 80000,
      "maxCompleted": 3,
      "autoShowOutput": true,
      "autoHideOutput": false,
      "scrollLockEnabled": false,
      "singular": false,
      "promptToSave": true,
      "saveOption": "all",
      "patterns": [
      "default"
      ],
      "successOutput": "{stdout}",
      "errorOutput": "{stdout}\n{stderr}",
      "fatalOutput": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}",
      "startMessage": null,
      "successMessage": "Executed : {fullCommand}",
      "errorMessage": "Executed : {fullCommand}\nReturned with code {exitStatus}\n{stderr}",
      "fatalMessage": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}",
      "menus": [
        "Processes",
        "Project"
      ],
      "notifyOnStart": false,
      "notifyOnSuccess": true,
      "notifyOnError": true,
      "input": null
    }
  ]
}