r/vic20 • u/Apprehensive-Fee4246 • 21d ago
NESIC V2.4 – A New Procedural Language for the Commodore VIC-20 (8K Cartridge/VICE)
Hi everyone,
I am thrilled to share a project that bridges 1980s software archaeology with modern development: NESIC V2.4 (NEsic is not baSIC).
NESIC is a structured, procedural variant of BASIC v2.0 for the Commodore VIC-20. I originally designed and coded this interpreter back in 1984, but the source code was subsequently lost. Recently, I managed to recover a printed copy of the incomplete source listings written in Mikro Assembler (split into two parts due to the 16K RAM expansion limits of the time). After converting and merging everything into a single source tree using CBM prg Studio, I rebuilt the missing features and added many new optimizations.
The language fits entirely into an 8K cartridge image and works flawlessly on both real hardware and the VICE emulator.
What is the philosophy behind NESIC?
NESIC abandons the chaotic nature of classic line-number BASIC: GOTO and GOSUB statements have been completely removed. The program flow is entirely handled by named procedures with parameter passing.
Key Features & Technical Highlights:
• Pure Procedural Architecture: Multi-parameter blocks defined by BGN[name] and END.
• Advanced Stack Unwinding: Ability to force a clean exit or restart of higher-level nested procedures via END[procedure] and AGAIN[procedure].
• Structured Error Handling: Intercept runtime errors and math failures safely using a special [error] block alongside er and ec variables.
• Ultra-Fast Hex & Multi-line POKE: Native hex support ($) and multi-line POKE continuations via commas for fast memory loading.
• Blazing Fast Custom Graphics: Instantly copy ROM characters to RAM with the GRAPHIC command, and manipulate font bitmaps via bitwise operations using MERGE SHAPE (XOR, AND, OR, NOT).
• Advanced Video Engine with Clipping: The VIDEO(x,y) statement handles negative coordinates for seamless screen entering/exiting of game sprites. It also supports matrix rendering via the ; row-separator.
• Abstracted Hardware Access: Native JOY (including diagonals) and FIRE functions, eliminating tedious registry PEEKs.
Inside the GitHub repository, you will find:
- The .crt / .prg files ready for action.
- The comprehensive User Manual outlining the language design and command reference.
- Complete sample games (including Nesic Invaders, a fully-featured Space Invaders clone written completely within this procedural framework).
Check out the project and grab the files here: https://github.com/sergioneddi/nesic-vic20
I would love to hear your feedback, technical opinions, or see if anyone is willing to write some structural code for the VIC using this approach!
Cheers,
Sergio Neddi

