6502 Cross Assembly using MacOS and Atom

From GlassTTY
Jump to: navigation, search

Cross Assembly Using Atom

Some time back 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 equivelent 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
     }
     ]
   }