Standalone VICMON for 6kB machines

Basic and Machine Language

Moderator: Moderators

Post Reply
Gaia
Vic 20 Newbie
Posts: 18
Joined: Sat Jan 22, 2005 1:34 pm

Standalone VICMON for 6kB machines

Post by Gaia »

Alas, I possess a VIC20 with only a 3 kB RAM Expansion. I have been looking at options how to use an assembler for this machine with so little RAM but found that 1) Tinymon has no assembler 2) Minimon would be great but is cart-only and was not released as a standalone PRG AFAIK 3) VICMON kinda worked as a standalone PRG but the version I found required at least 24 kB RAM expansion... :( so I went ahead and created a fork of VICMON that works on a 6kB machine as well ;) Of course it's extremely limited, as VICMON itself is 4 kB leaving only 2 kB to play around but that was fine for me :roll: Perhaps others find it also useful, so I decided to share it. Source code is included - it compiles with 64TASS.

It loads to $0E00 and hence sits at the top of the 6 kB RAM but can be relocated to any address easily. It starts with SYS3584.
Attachments
vicmon_lowram.zip
(10.12 KiB) Downloaded 31 times
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: Standalone VICMON for 6kB machines

Post by chysn »

If you do want to go smaller, there's a 2K version of wAx. I've assembled it at $1600 (5632) and attached it here.

Code: Select all

LOAD "WAX-1600",8,1
SYS 5632
This version implements the following commands:

Assemble (https://github.com/Chysn/wAx/wiki/6502-Assembler) (Documented 6502 instructions only in this version; code, text, and hex only; only immediate operand type is hex byte; no persistent counter syntax in this version)
Disassemble (https://github.com/Chysn/wAx/wiki/6502-Disassembler)
Memory Dump (https://github.com/Chysn/wAx/wiki/Memory-Dump) (Hex only in this version)
Assertion Test (https://github.com/Chysn/wAx/wiki/Assertion-Tester)
Breakpoint Manager (https://github.com/Chysn/wAx/wiki/Breakpoint-Manager)
Register Editor (https://github.com/Chysn/wAx/wiki/Register-Editor)
Execute (https://github.com/Chysn/wAx/wiki/Subroutine-Execution)
Memory Save and Load (https://github.com/Chysn/VIC20-wAx/wiki ... e-and-Load) (Disk only in this version; do not enclose filenames in quotes in this version)

Here's a video introduction to the whole thing: https://www.youtube.com/watch?v=3jd9iyUHqZY

And here's the table of contents, which has other info: https://github.com/Chysn/VIC20-wAx/wiki

At some point, I decided that I wanted wAx to be lavish instead of minimalist, so the newest version takes all of Block 5. But this is the O.G. right here. It was originally intended to be added to 3K RAM cartridges, but I could never find a reliable source of 2716s.
Attachments
wax-1600.zip
(1.89 KiB) Downloaded 34 times
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5

WIP: MIDIcast BASIC extension

he/him/his
Gaia
Vic 20 Newbie
Posts: 18
Joined: Sat Jan 22, 2005 1:34 pm

Re: Standalone VICMON for 6kB machines

Post by Gaia »

Thanks, I managed to load it up on my VIC. I'm sure it's my fault but the commands shown in the video do not appear to work, I am getting a ?SYNTAX ERROR.
TV2023052522432400.jpg
aeb
Vic 20 Amateur
Posts: 68
Joined: Sat Jun 19, 2004 2:06 pm

Re: Standalone VICMON for 6kB machines

Post by aeb »

There's also my Ass Assembler from 2021, a 2-pass symbolic assembler that compiles from disk to disk: http://sleepingelephant.com/ipw-web/bul ... 95#p112995

Full release at the dropbox link also includes my old C'mon monitor (from early 2000's) - for various memory configurations. C'mon has been ported to Apple-1 and KIM too :)
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: Standalone VICMON for 6kB machines

Post by chysn »

Gaia wrote: Thu May 25, 2023 2:49 pm Thanks, I managed to load it up on my VIC. I'm sure it's my fault but the commands shown in the video do not appear to work, I am getting a ?SYNTAX ERROR.
Oh! Sorry, I forgot about this. I changed things around after the video. It's @ for assembly and . for disassembly. The rest are the same. The wiki documentation is up to date.
Screen Shot 2023-05-26 at 7.53.59 AM.png
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5

WIP: MIDIcast BASIC extension

he/him/his
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Standalone VICMON for 6kB machines

Post by Mike »

Gaia wrote:Alas, I possess a VIC20 with only a 3 kB RAM Expansion. [...]
You should seriously consider working on that premise, i.e. obtaining a bigger RAM expansion (+35K RAM, ideally).

Not only will this enable you to soft-load VICMON and other (game) cartridges with no hassles, it will also open up lots of other programs, games and tools you will sorely be missing out with your current configuration.

In the case of machine language monitors, there will always be a competitive situation about memory space with any other programs they might be used with to debug or build them. Of course this situation is aggravated when that monitor is loaded into the memory range normally destined for BASIC programs - i.e. around $0400..$7FFF, which in principle also applies to the original VICMON - ...
2) Minimon would be great but is cart-only and was not released as a standalone PRG AFAIK
... I put MINIMON specifically into the I/O range ($9800..$9FFF) as that position largely eliminates aforementioned issue. However, for the reason that the I/O range is a cartridge resource, I will not release a software-only version of MINIMON: I have no heightened interest getting complaints from people who would try to load MINIMON into the I/O registers (i.e. strictly non-RAM!) of unsuspecting utility cartridges, 'shooting' their setup or producing any other ill effects. The cartridge provides the necessary hardware to operate MINIMON successfully, with the cartridge extender, I/O multiplexer and advanced reset circuitry included.

For sure I could assemble MINIMON for other address ranges but then the 2 KB limit would be moot, and like chysn, I would rather have opted for a slightly bigger feature set. And then, there is already a plenty of alternatives around for you to choose from.
I went ahead and created a fork of VICMON that works on a 6kB machine as well ;) Of course it's extremely limited, as VICMON itself is 4 kB leaving only 2 kB to play around but that was fine for me :roll: Perhaps others find it also useful, so I decided to share it. Source code is included - it compiles with 64TASS.
It is actually rather easy to relocate VICMON without going the route of reconstructing (relocatable) source code: once transferred to another address range, the N (new locator) command can be used to adjust all absolute addresses within instructions and tables. The versions of VICMON at $A000 and other addresses floating around all had been constructed this way.

That still does not help with the other issues VICMON brings along: it is a straight port from the PET series monitors, alas without any adaptions for the different layout of the BASIC zero page -> (link).


P.S. a VIC-20 with +3 KB RAM expansion actually has 8 KB RAM in total, of which 6.5 KB are available for BASIC programs
Gaia
Vic 20 Newbie
Posts: 18
Joined: Sat Jan 22, 2005 1:34 pm

Re: Standalone VICMON for 6kB machines

Post by Gaia »

Thanks for the elaborate reply and the suggestions! I must admit I haven't really delved myself into the inner workings of VICMON prior, just fired up a disassembler and recompiled for a new base address. I'm primarily a TED person myself, so that functionality would have been just proper for me, I even found VICMON's features somewhat overwhelming for my purposes as for now I'm only about to knock up a few simple test routines (TBH, anything more serious than that would be done with a cross assembler) as I'm adding a VIC20 mode to my yapeSDL emulator [https://github.com/calmopyrin/yapesdl]. I'm very impressed by the sophisticated technological "archeology" work the members of this forum have made.
Post Reply