Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hanzhi713/vscode-ibcm
Basic syntax highlight and snippet for the Itty-Bitty Computing Machine (IBCM)
https://github.com/hanzhi713/vscode-ibcm
Last synced: about 1 month ago
JSON representation
Basic syntax highlight and snippet for the Itty-Bitty Computing Machine (IBCM)
- Host: GitHub
- URL: https://github.com/hanzhi713/vscode-ibcm
- Owner: hanzhi713
- License: mit
- Created: 2019-03-16T04:55:20.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T17:33:54.000Z (about 2 years ago)
- Last Synced: 2023-03-02T00:15:49.723Z (almost 2 years ago)
- Language: TypeScript
- Size: 1.83 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# VS Code - IBCM
This extension provides basic syntax highlight and snippet for the [Itty-Bitty Computing Machine (IBCM)](https://aaronbloomfield.github.io/pdr/book/ibcm-chapter.pdf)
## How to use
Type `ibcm` to generate a heading for your ibcm file
Type `dw` to define variables. Your labels can be used to generate future instructions.
You can use the menu to format your code. Your code will be aligned to the heading or the first line of non-empty code
If your line labels are incorrect, you can use `Ctrl + Shift + P` to open the command palette and type `fixLocn` to fix you line labels.
### Code Format Requirements
For the extension to work properly, each line of your IBCM code must have 6 columns, corresponding to IBCM opcode, 3-digit hex line number, label, opcode, address label, and comments. If one column is empty, please use `-` as the placeholder. Note that the first two columns must be present! The following regex is used to match each IBCM line.
```regex
^([0-9a-fA-F]{4})[ ]+([0-9a-fA-F]{1,3})[ ]+(-|[a-zA-Z0-9_]+)[ ]+(-|[a-zA-Z]{1,7})[ ]+(-|[a-zA-Z0-9_]+)[ ]+(.*)$
```The label and address are essential for autocompletion and diagnostics. When you type `load.a`, the extension will find a label called a, if it exists, and get its line number to fill in the address for you. The linter checks whether the line number of the label referred by your address column match the address specified by your opcode.
For example, in the following code snippet, the first jump command is `C005`, which refers to memory location `005`. However, the line at `005` does not have a label. The linter will detect this kind of mistake ahd throw a warning.
## Features
- Syntax highlight
- Generate code and comments based on ibcm-flavored assembly
- Code snippets (working in progress)
- Label mismatch checking
- Code formatting
## Requirements
None
## Extension Settings
Working in progress
## Known Issues
None