Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/themkat/mos-mode
Emacs support for working with MOS 6502 assembly files using https://github.com/datatrash/mos. Utilizes lsp-mode and dap-mode
https://github.com/themkat/mos-mode
6502 c64 emacs lsp mos retro retrocomputing
Last synced: 9 days ago
JSON representation
Emacs support for working with MOS 6502 assembly files using https://github.com/datatrash/mos. Utilizes lsp-mode and dap-mode
- Host: GitHub
- URL: https://github.com/themkat/mos-mode
- Owner: themkat
- License: gpl-3.0
- Created: 2022-05-10T12:12:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-09T13:53:58.000Z (about 2 years ago)
- Last Synced: 2024-12-13T04:50:15.593Z (23 days ago)
- Topics: 6502, c64, emacs, lsp, mos, retro, retrocomputing
- Language: Emacs Lisp
- Homepage: https://mos.datatra.sh/
- Size: 60.5 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![MELPA](https://melpa.org/packages/mos-mode-badge.svg)](https://melpa.org/#/mos-mode)
# mos-mode - Emacs mode for working with MOS 6502
Emacs support for [mos](https://github.com/datatrash/mos) using lsp-mode and dap-mode (as well as some utility functions).Created as a separate project to have both all config related to it in one place.
## Dependencies
You should have the follow programs installed:
- [mos](https://github.com/datatrash/mos)
- [Vice](https://vice-emu.sourceforge.io/) (needed if you want to debug your Commodore machine programs)## Installation
### Melpa
The easiest way is to install through [Melpa](https://melpa.org/#/getting-started). Using package-install, you can do it like this interactively:```
M-x package-install RET mos-mode
```Or in your config file:
```emacs-lisp
(package-install 'mos-mode)
```The package can also be installed and configured using use-package: `(use-package mos-mode)` (add the `:load-path` option to install it from local source).
### From source
Clone this repo locally, add the path to the load path and require mos-mode:
```emacs-lisp
(add-to-list 'load-path "/path/to/mos-mode")
(require 'mos-mode)
```## Usage
If mos is in your path, you should be able to use this package right out of the box. If not, you need to configure `mos-executable-path` to point to the location of the mos executable.If you want to debug Commodore programs using VICE, you also need to configure `mos-vice-executable-path` if x64sc is not in your path (you can also use x64).
To use the extension, you simply activate `mos-mode` in an assembly language buffer. Works like any other Emacs extension using lsp-mode and dap-mode (`dap-breakpoint-toggle` to toggle breakpoints etc.). So far only code lenses are used to run/debug the programs, but utility functions for doing it without those will also be available shortly.
Interactive functions available:
- `mos-build`: Build the program (based on mos.toml settings)
- `mos-run-all-tests`: Run all the unit tests in the project (depends on presense of mos.toml)
- `mos-run-program` / `mos-debug-program`: Run or debug the program.By default mos-mode will format the buffer when saving. You can toggle this behavior with `mos-format-on-save` (e.g, set it to nil to not format on save)
[The MOS documentation](https://mos.datatra.sh/guide/ide/vscode.html#building-and-launching) also have other useful information, like the format of expressions and variables in the set-variables operation during debugging.