A Kick Assembler language plugin for IntelliJ IDEA.
This plugin is still at an early stage of development. Not all features are fully implemented or work as expected at this point. Feedback, help or any other contributions are very welcome.
In addition to the IntelliJ's wide range of built-in functionality (like version control, the excellent editor, etc.), this plugin provides the following Kick Assembler specific features:
- Syntax Highlighting 🔧
- Run Configurations ✔️
- SDK Management ✔️
- Project Generation ✔️
- "New File" Template ✔️
- Refactoring Functionality 🚧
- Java Runtime Environment
- IntelliJ IDEA - Community Edition or Ultimate Edition
- Kick Assembler ... obviously 😏
Use the IDE's built-in plugin system:
File
-->Settings...
-->Plugins
-->Marketplace
- search for "Kick Assembler"
- click the
Install
-button
Or go to the plugin page on the JetBrains-website, download the archive-file and install manually.
Here's how to use/setup the plugin ...
Simply create a new Kick Assembler project
and complete all following steps to finish the project initialization.
The Java Runtime Environment (JRE) - used to run Kick Assembler - must be configured via File
--> Settings...
--> Languages & Frameworks
--> Kick Assembler
.
This step is mandatory, since the following SDK-setup relies on an existing/configured JRE.
In the project's setup-page create a new Kick Assembler Software Development Kit (SDK):
(Navigate to your Kick Assembler installation directory and click OK
.)
New Kick Assembler files can be created via File
--> New
--> Kick Assembler file
.
(Which provides a BasicUpstart2
stub.)
Run Configurations can be used to invoke Kick Assembler with a selected source-file:
IntelliJ's built-in macros can be combined with for your individual Program parameters
:
e.g.
$ProjectName$
$Projectpath$
$ProjectFileDir$
$FileDir$
$FileDirName$
$FileDirPathFromParent$
$FileExt$
$FileName$
$FileNameWithoutAllExtensions$
$FileNameWithoutExtension$
$FileParentDir$
$FilePath$
- etc.
NOTE: It is also possible to automatically create and run a Run Configuration by right-clicking on a *.asm
-file.
How can I integrate VICE?
IntelliJ has a neat feature called External Tools. It can be used to run third-party tools on (selected) files.
NOTE: The Arguments:
-field not only contains the $FileName$
-macro, but can also include any additional VICE arguments as needed.
VICE then easily can be run via the context-menu by right-clicking on a *.prg
file.
You even can assign a keyboard shortcut for VICE!
Just go to File
--> Settings...
--> Keymap
; search for External Tools
; and set a shortcut of your liking. (This will allow you to simply mark a *.prg
-file and press Alt+V
to run VICE.)
Is it possible to compile/build the prg-file and run VICE with just one click?
The short answer: Yes.
Here's the detailed guide (for *nix-like systems at least 😉) ...
To achieve this we need two Run Configurations.
- the Kick Assembler Run Configuration (that compiles the code and generates the prg-file)
- a separate Run Configuration which invokes the emulator (VICE)
You can chain multiple Run Configurations together and have them executed in sequence.
However, IntelliJ only lets you choose other configs to be run before launch (not after) the actual Run Configuration. So the second Run Configuration will have to be the main config we're working with.
Step-by-step example:
-
Create your Kick Assembler Run Configuration as desired.
-
Then create a tiny helper shell-script which will ...
- find and kill any currently running x64-emulator instances
- determine the latest prg-file in your working directory
- and run it with x64.
e.g.
#!/bin/bash killall x64 &> /dev/null; x64 +confirmonexit $(ls -1t *.prg | head -n1)
(You can save this script wherever you like; for reuse in other projects.)
-
Now create another Run Configuration. This time a Shell Script Run Configuration.
Here you'll run the above script and add the Kick Assembler Run Configuration to the "before launch"-section.
(Make sure your working-directory is identical to to prg-file's location!)
That's about it; a one-click "build n' run".
- Kick Assembler created by Mads Nielsen
- Sunglasses icon made by Yannick Lung
Please read the license file.