Beeb VSCVisual Studio Code Extension to support code development primarily for BBC Micro, but it might be useful for other 6502 based machines. Visual Studio Code is free and really good for general retro/6502 development, so this extension was created to enhance the experience by providing syntax colouring for 6502 opcodes, labels, and BBC BASIC commands & functions supported by BeebAsm. FeaturesSyntax Highlighting:
Supported Filetypes:
Build tools
Quick Setup1. Install the extensionPress CTRL+Shift+X in VSCode, search for 'beeb vsc' or 'beebasm', click install. 2. Install Assembler and EmulatorBy default, BeebVSC configures 3. Load your projectOpen your project folder in VSC. Syntax colouring will automatically activate when 4. Create a new build targetPress Select the one that you wish to assemble with A 5. Build the targetPress Any errors output by the assembler will be captured in Visual Studio Code's 6. Run the targetPress That's it! Have fun! Advanced UsageChanging Assembler and/or Emulator configurationIf you wish to change your Assembler or Emulator configuration, go to Managing multiple build targetsYou can run the add build target command multiple times to add additional source files to the list of build targets in the Switching between build targetsIt is possible to switch between build targets as follows: Press The selection you make will become the new default 'build' and 'test' target, which can then be built as normal by pressing NOTE: It is not possible to add duplicate targets, also note that only one target can be built at once. Listing commandsPress Running specific tasksBeebVSC takes advantage of standard Visual Studio Code 'tasks', which are just a list of named shell commands stored in the Adding custom tasksThe BeebVSC extension is careful to preserve the contents of the
The only properties that are managed by the extension are the Command Line formatDue to constraints in the way that Visual Studio Code handles tasks, BeebVSC tasks must be executed as single arguments to a shell such as Linux/Mac supportThere is none, but its probably quite feasible to get it working. Release notes
Possible further features to add
FootnotesSource codeI opted to just use the plain old node.js JavaScript for this extension rather than TypeScript, as the latter seemed like a faff to setup and I'm not really using any fancy stuff. Contributions, suggestions or bug reports to this extension are welcome, via the Beeb-VSC GitHub repository Syntax parsingThe language syntax system VSC uses is based on TextMate, which basically a bunch of regular expressions. For your sanity when messing with these, I highly recommend this site to help make sense of those regexes! Building this VSC extensionIf you are looking at this repo to help you write your own VSC extension, great!, that's exactly how I figured it out too, so here's some tips for you, (as well as a future reference for me!) To build VSC extensions, you'll need to install node.js (I used chocolatey on Windows for this) If you are building/testing the extension, you'll need to clone the repo, then type Finally, use the vsce tool to publish (you'll need to setup an account on Microsoft team services site so you can publish the extension to their marketplace). KudosThe official Microsoft documentation for Visual Studio Code extensions is still a bit light on detail, so I figured out a lot by simply looking at how other folks had implemented bits and pieces in their extensions. So here's a list of useful references:
BBC Micro/6502 Resources: |