Hi folks,
Not a great programmer, but I want to make a program that will allow me to easily mount a disk image on my uIEC.
The normal immediate mode command to mount a disk image (assuming device 10) is:
OPEN15,10,15,"CD:DISKIMAGENAME.D64":CLOSE15
I am getting a syntax error in line 40. I just don't know enough about how to program device commands in BASIC properly.
10 PRINT 'MOUNT DISK IMAGE"
20 INPUT "WHAT DEVICE NUMBER';A
30 INPUT "DISK IMAGE NAME';B$
40 OPEN 15,A,15,"CD:";B$
50 CLOSE 15
60 PRINT "DISK ";B$;"MOUNTED."
what's wrong with this program?
Moderator: Moderators
what's wrong with this program?
Music I've made with 1980s electronics, synths and other retro-instruments: http://theovoids.bandcamp.com
-
- Vic 20 Enthusiast
- Posts: 152
- Joined: Thu Feb 25, 2016 9:46 am
- Location: Skegness UK
- Occupation: Writer
Re: what's wrong with this program?
I *think* the problem is the way you are sending the command.
Try
35 CD$=CHR$(34)+"CD:"+B$+CHR$(34)
40 OPEN 15,A,15,CD$
Note this is presented without checking on real hardware.
Try
35 CD$=CHR$(34)+"CD:"+B$+CHR$(34)
40 OPEN 15,A,15,CD$
Note this is presented without checking on real hardware.
Re: what's wrong with this program?
just use +B$ instead of ;B$
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.