Basic BASIC commands

Welcome back to our Commodore Discussion forum. If you have a question, comment, problem, or just want to chat about Commodore, post it here for free.

Have some fun and talk to others interested in the Old and New Commodore world.

Moderators: wiskow, Trazan

Post Reply
kakarot
Posts: 22
Joined: Tue Aug 07, 2007 5:25 am

Basic BASIC commands

Post by kakarot »

I was typing in a program last night, and after like 20 minuets of careful keying, I tried to run it and found I made a simple typo in the last line. So, what's the command to replace a line in BASIC 2.0?
sjgray
Posts: 40
Joined: Sat Nov 04, 2006 10:54 pm
Location: Markham, Ontario, Canada
Contact:

Post by sjgray »

If you know the line number of the line where the error is, lets say it's 500, then type LIST 500 to view the line. Use the cursor keys to move up to the line and over to the mistake and just fix it. When done, press the RETURN key and the line will be corrected.

If you don't know the line number use the LIST command to view your entire program. When you see the line to fix press the RUN/STOP key to stop the listing then cursor up and fix as above.

There are programs you can run that will add some extra editing features like scrolling backwards, renumbering lines, deleting ranges of lines etc to make editing a little easier.

Steve
kakarot
Posts: 22
Joined: Tue Aug 07, 2007 5:25 am

Post by kakarot »

Oh, ok! I had thought about something like that, but I didn't think it worked that way, thanks!
wiskow
Posts: 205
Joined: Thu Nov 02, 2006 9:14 pm
Are you a real person?: No... I am a spambot, delete my account!
Location: San Diego, California, USA
Contact:

Post by wiskow »

kakarot wrote:Oh, ok! I had thought about something like that, but I didn't think it worked that way, thanks!
Alternatively, you can just re-type the line, and it'll overwrite the line with the same number that's already in the computer's memory.

-Andrew
kakarot
Posts: 22
Joined: Tue Aug 07, 2007 5:25 am

Post by kakarot »

How do you delete files off a 1541? And how do you rename files? I'm really into my C= now, I just have no idea what I'm doing! :D
wiskow
Posts: 205
Joined: Thu Nov 02, 2006 9:14 pm
Are you a real person?: No... I am a spambot, delete my account!
Location: San Diego, California, USA
Contact:

Post by wiskow »

kakarot wrote:How do you delete files off a 1541? And how do you rename files? I'm really into my C= now, I just have no idea what I'm doing! :D
To delete a file without JiffyDOS:
OPEN15,8,15,"S0:filename":CLOSE15

To delete a file with JiffyDOS:
@S0:filename

To rename a file without JiffyDOS:
OPEN15,8,15,"R0:newfilename=oldfilename":CLOSE15

To rename a file with JiffyDOS:
@R0:newfilename=oldfilename

To format a disk without JiffyDOS:
OPEN15,8,15,"N0:diskname,id":CLOSE15

To format a disk with JiffyDOS:
@N0:diskname,id

You'll notice that things are quite a bit easier with JiffyDOS than without. :)

Just a note... Filenames, as well as disk names, are limited to 16 charachters. The disk ID is 2 charachters and can be any two charachters you choose.

For more info on the 1541 disk drive, you may want to read the manual... If you don't have an original manual, you can get a text version of it here:
http://project64.c64.org/hw/1541d10a.zip

-Andrew
kakarot
Posts: 22
Joined: Tue Aug 07, 2007 5:25 am

Post by kakarot »

Thanks alot. Actually, I had been looking for that site for a while now. I had all the manuals I needed downloaded, then my PC crashed :oops: So, Thanks alot! Now that I think about it, I have been having some trouble lately with the x cables, and I decided to just xfer with the tape drive, wasn't there like a SAVE ALL command or something?
kakarot
Posts: 22
Joined: Tue Aug 07, 2007 5:25 am

Post by kakarot »

OK, guess not. I thought I had read something to that effect on the board. I'm sure I read that you can hook up old IBM compatible printers to the C64 thru the user port. I have an HP 82 CE
By the way, I have been having problems with loading on the forum, It returns 'Could not display the page' every other time I try to move to a different page. Anyone els have that problem?
Post Reply