Basic BASIC programming - help!

Helpful tips and guides, also new users can ask for help here.
fateyes
ROM Dongle
Posts: 3
Joined: Tue Mar 24, 2015 5:20 am

Basic BASIC programming - help!

Postby fateyes » Tue Mar 24, 2015 9:14 am

Hi,

Possibly a strange request for help, but here goes:

1984, and then 1987 sees two publications by a dedicated grandfather for his grandchildren. Being a Sinclair fan he included some homemade QL programs written in text at the back, that would no doubt render images,etc to accompany the stories. Brilliant, hey?! So here I am, 30 years later, trying to decipher them, with no programming experience whatsoever. This is what I would like to achieve:

Type out the code
Run the code
View the image/animation/result
Record the image/animation/result in a meaningful way - e.g fullscreen screenshot, or animated gif, or youtube video or whatever makes sense.

As I want to republish the book to give as gifts to family members what would be even better would be if I could somehow provide them with a USB stick with the book that would have very simple step by step instructions on how to 'run' the program so that they can see the results for themselves.

I have tried installing QEmulator, and have managed to get as far as typing out a bit of code, but don't understand how I might be able to save it in someway. Also, can I cut and paste from a windows text file in some way?

As you can guess, I really have no idea what I'm doing, but I would like to get this done so that I can send it to Grandpa, him being 94 and all...

Thanks for any help,

Regards,

Laurie


User avatar
Sparrowhawk
Trump Card
Posts: 158
Joined: Wed Dec 15, 2010 12:33 pm
Location: @131072
Contact:

Re: Basic BASIC programming - help!

Postby Sparrowhawk » Tue Mar 24, 2015 9:29 am

First, make sure that you have mapped one of the microdrive slots to a folder on your PC or Mac. these are the little black boxes in teh secondary window that floats below the main one usually

You can save a program using the SuperBASIC SAVE command. For example:

Code: Select all

SAVE mdv1_mybook


The mdv1_ part means save this to the PC/Mac location that I specified in the first step above (mdv is shorthand for Microdrive)

the mybook part is simply a filename of your choice. Note that there cannot be a space between the mdv1_ and the file name

To load up the code later use:

Code: Select all

LOAD mdv1_mybook


You can list a program with the LIST command.

Note that you can also use the ED command to invoke the enhanced editor which is easier to use when editing lines than the standard line editor the QL came with. When you are done, hit ESC to exit

I don't believe that you can cut and paste, however Q-emuLator can load text files form the PC/Mac so you can write your programs there and load them in the QL. You should not use a .bas extension as the QL cannot understand dots in filenames. If you want to use an extension, use _bas for example. This is optional. Also, make sure you use a plain text editor, not something like Word as this inserts loads of invisible characters that the QL cannot make sense of.

Edit: fixed a few typos
Last edited by Sparrowhawk on Tue Mar 24, 2015 9:31 am, edited 1 time in total.


a.k.a. Jean-Yves !
User avatar
Sparrowhawk
Trump Card
Posts: 158
Joined: Wed Dec 15, 2010 12:33 pm
Location: @131072
Contact:

Re: Basic BASIC programming - help!

Postby Sparrowhawk » Tue Mar 24, 2015 9:30 am

Oh, and great project by the way - a lovely thing to do :)


a.k.a. Jean-Yves !
User avatar
vanpeebles
Commissario Pebbli
Posts: 1808
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: Basic BASIC programming - help!

Postby vanpeebles » Tue Mar 24, 2015 9:35 am

Hello and welcome :) To save, type out your code line by line in qemulator, so you have a the code on the white box on the left. then click on the 1st box on the bottom, attach a directory folder on your pc. then on the QL type save flp1_filename you want.

To record it running you could use some kind of screen recording software?

You can also edit it in a text file, then mount the directory with it in and load it that way :)

Do you have a scan or photo of the code in the book?

EDIT Sparrowhawk beat me :)


fateyes
ROM Dongle
Posts: 3
Joined: Tue Mar 24, 2015 5:20 am

Re: Basic BASIC programming - help!

Postby fateyes » Tue Mar 24, 2015 10:23 am

Thanks for this - amazingly fast replies - should get me off to a good start!

Haven't scanned it all in yet, but it truely is genius - Ramtop and Stackbot set Forth, and the sequel, Ramtop and Stackbot on the Null cruise. The characters are loosely based on his grandchildren (e.g me!), who find themselves in bizarre worlds populated by computer characters such as the dog Cur-Sor, Lord Ba-Sic, Hex, Rando the Miser, Count Doloop the Stochastic Iterator, etc. All richly illustrated, even going to the extent of creating a written language similar to egyptian hieroglyphics, and illustrating on real papyrus that he brought back from Egypt.

I've published the first book through Booko - http://www.blurb.com/books/4885123-ramt ... -set-forth

Will post the scans of the very simple programs soon...

Thanks again,

Laurie


User avatar
vanpeebles
Commissario Pebbli
Posts: 1808
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: Basic BASIC programming - help!

Postby vanpeebles » Tue Mar 24, 2015 10:37 am

Did your Granpa do any other QL related things back in the day? I'm wondering if he might be mentioned in old QUANTA magazines etc.


fateyes
ROM Dongle
Posts: 3
Joined: Tue Mar 24, 2015 5:20 am

Re: Basic BASIC programming - help!

Postby fateyes » Tue Mar 24, 2015 10:59 am

Ha! Well, he probably asked questions/contributed in one way or another - his son knew Tony Tebby and Jochen Merz very well, as they tried to create an alternate operating system called BBox...Frank Gutteridge


User avatar
vanpeebles
Commissario Pebbli
Posts: 1808
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: Basic BASIC programming - help!

Postby vanpeebles » Tue Mar 24, 2015 11:04 am

It's always nice to hear about the QL old timers. With a QL family history like that, you will have to take it up properly! :ugeek:


RWAP
RWAP Master
Posts: 2253
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: Basic BASIC programming - help!

Postby RWAP » Tue Mar 24, 2015 8:39 pm

A great project - welcome to the forums - I think I still have your Grandpa in my customer database - certainly the name rings a bell!!


User avatar
vanpeebles
Commissario Pebbli
Posts: 1808
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: Basic BASIC programming - help!

Postby vanpeebles » Mon Apr 13, 2015 10:29 am

Any updates on this? :)



Return to “Help for New Users”

Who is online

Users browsing this forum: No registered users and 2 guests