Just Learning 650x ML & VICMON

Basic and Machine Language

Moderator: Moderators

Post Reply
Gooster
Vic 20 Newbie
Posts: 8
Joined: Sun Nov 15, 2020 3:16 am

Just Learning 650x ML & VICMON

Post by Gooster »

It's been nearly 30 years since I bought Jim Butterfield's ML book as a boy, and I've decided to give it another try. This time I'm trying on the VIC-20 for a change of scenery, and I'm wondering if someone can clue me in as to why basic memory seems trashed after running any tiny program (in my case stored in the cassette buffer per the first few chapters of Jim's book) using the VICMON (G)o command? Reading through the VICMON manual I see mention of using the E command to preserve the zero page, but even if I use E 1000 (or E 1800) prior to running my program (then restore with E 0000), upon exiting VICMON and trying to enter a Basic program statement, the machine is trashed and needs to be reset. Can anyone explain to this neophyte why this happens?
Vic20-Ian
Vic 20 Scientist
Posts: 1214
Joined: Sun Aug 24, 2008 1:58 pm

Re: Just Learning 650x ML & VICMON

Post by Vic20-Ian »

Welcome,

This should help

viewtopic.php?f=2&t=7481&p=80550&hilit= ... upt#p80550

If you search the forum there are a few other recent monitor threads.
Vic20-Ian

The best things in life are Vic-20

Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
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: Just Learning 650x ML & VICMON

Post by chysn »

VICmon does not respect the start-of-BASIC pointer at $2b, and uses it for its own purposes. So when you exit VICmon, BASIC starts at a different location, making it seem like your BASIC program is trashed. It's not really trashed, it's just somewhere else.

You'll need to set the pointer at $2b/$2c back to its proper location every time you exit VICmon. For example, on an unexpanded VIC-20, you'll want to do:

Code: Select all

:002B 01 10
X
VICmon is terrible in several other ways. I always felt like I was fighting against it. But, this is its most egregious malfunction if you're trying to use it in conjunction with BASIC.
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
wimoos
Vic 20 Afficionado
Posts: 348
Joined: Tue Apr 14, 2009 8:15 am
Website: http://wimbasic.webs.com
Location: Netherlands
Occupation: farmer

Re: Just Learning 650x ML & VICMON

Post by wimoos »

I used to have an EPROM with Vicmon at $6000, Progaid at $7000 and an EPROM with my own utilities at $A000 (with UNNEW amongst others).

To cleanly switch from Vicmon to Basic I did a G FD22, and at the READY., I did a SYS40960 to recover my Basic program.

Regards,
VICE; selfwritten 65asmgen; tasm; maintainer of WimBasic
Gooster
Vic 20 Newbie
Posts: 8
Joined: Sun Nov 15, 2020 3:16 am

Re: Just Learning 650x ML & VICMON

Post by Gooster »

Thanks for the replies, that explains things for me and is very helpful!
Post Reply