BASIC to PRG Converter
Commodore 64 BASIC 2.0 Tokenizer — توکنایزر بیسیک کمودور ۶۴
About This Tool
This online tool is a complete BASIC 2.0 tokenizer for the Commodore 64. Write your BASIC code in the editor, then convert it to an executable PRG file ready to run on real hardware or emulators. All 71 BASIC 2.0 keywords and functions are tokenized with correct values. This tool was independently developed from scratch by C64Spark and is part of the AmigaStore.ir tools collection.
How to Use
Type your BASIC 2.0 code in the C64 screen editor above. Each line must start with a line number between 0 and 65535. The editor automatically tracks line count, character count, and cursor position as you type.
Use the template buttons — BORDER, COLOR FRAME, SPRITE, and SCROLL — to load ready-made program examples. These templates demonstrate common C64 programming techniques like screen manipulation, sprite handling, and color memory access.
The RENUMBER button renumbers all lines sequentially starting from 10 with increments of 10. This is useful when you need to insert new lines between existing ones.
When your code is ready, click Download .prg to generate the tokenized PRG file. The tokenizer converts all 71 BASIC 2.0 keywords and functions to their single-byte token codes. The PRG file includes the load address $0801 and is ready to run on real hardware or emulators.
Use Save .bas to save your source code as a text file, and Load .bas to load previously saved code. The Copy BASIC button copies the source code to the clipboard.
Technical Specs
- BASIC dialect: Commodore BASIC 2.0 — all 71 tokens with correct values
- Load address: $0801 (standard BASIC start)
- Line numbers: 0 to 65535
- Output: .prg file (tokenized BASIC), .bas file (source code)
- Templates: Border, Color Frame, Sprite, Scroll
- Tab key inserts 4 spaces
FAQ
Does the output run on real hardware?
Yes. Load the PRG file with LOAD"PROGRAM",8 and then RUN.
What is BASIC 2.0?
The built-in programming language of the Commodore 64. This tool tokenizes all 71 BASIC 2.0 keywords and functions.
Can I save and load my code?
Yes. Save as BAS file and load it later to continue editing.
What templates are available?
Border, Color Frame, Sprite, and Scroll templates.