You've built your board and got it connected, so it's time to run some of the pre-built example programs!
In this section we'll download and unpack the examples and use Minicom and Kermit which you installed in the previous section to upload them to your board.
We'll take a quick look at Enhanced BASIC, a very capable BASIC interpreter that's available for numerous retro computers, as well as taking a break to play a game of Jeff Tranter's Abandoned Farmhouse Adventure.
Let's get started!
Before you can run the examples, you'll need to download them and unpack them somewhere convenient.
You can get the latest version of the example programs here (in Zip format, or here if you prefer a Unix tarball). Download them to your computer, and then unpack them somewhere that you'll easily be able navigate to in Minicom (we recommend something like rosco_m68k/examples under your home directory).
Before you proceed, you might want to have a look at the README.txt file that's included - it lists all the examples and has a bit of information about each one.
For the first example, we'll run ehbasic.bin, which is an Enhanced BASIC, an old-school BASIC interpreter written by Lee Davison that supports almost all the features you'd find in any good BASIC.
Firstly, you'll need to launch Minicom (which we installed in the previous section - if you didn't follow that section, you'll need to go back and install it now, along with ckermit).
In a terminal, type the following to launch Minicom:
minicom -D /dev/cu.usbserial-XXXX -c on -R utf-8
Replace the /dev/cu.usbserial-XXXX with the path to the device you determined in the previous section. On Linux, this will probably start with /dev/tty... rather than /dev/cu... Assuming you successfully ran Minicom previously, the device name should still be the same.
Once Minicom is up and running, hit Esc+S (Ctrl-A, S on Linux) and use the arrow keys to select "Kermit" to initiate a Kermit file transfer. Next you'll need to navigate to the location where you unzipped the examples.
Tip: Navigating the file system in Minicom is a bit counter-intuitive if you're not used to it.
Generally speaking, you'll need to use the cursor keys to move the yellow bar to the directory you want to
enter (or the
.. entry to go up a level) and hit space twice to enter.
Once you're in the directory where the example binaries are, select the one you want to run and
hit space once, followed by
enter to select and begin the transfer.
This can take a bit of getting used to at first, but it'll become second nature in no time.
Use the arrow keys and space-bar to navigate to the directory you unpacked the examples to earlier (Minicom starts in your home directory, which is why we recommended unzipping somewhere there) and once you're in the examples directory, move the cursor to the ehbasic.bin file and press the space bar once to highlight it. You screen should look like the image on the right.
Hit enter to confirm that you want to upload the file. It will take a little while to upload (You should see the Kermit progress screen in the meantime, don't worry if there is an error or two reported, Kermit will recover from these).
After a short while, the progress screen should disappear and you'll be back in Minicom, with the screen showing the Enhanced BASIC banner, followed by the Ready prompt.
This prompt means that EhBASIC is now loaded and running, waiting for you to type in a BASIC program!
Now that Enhanced BASIC is up and running, let's try it out. In case you've BASIC is as rusty as ours (or maybe you've never seen BASIC before), try the following snippet:
10 FOR x = 1 TO 10 20 PRINT "Hello Again" 30 NEXT x
A few things to note:
If you make a mistake while typing any of the lines, you can correct with backspace if you notice before hitting enter. If you've already hit enter, simply type the whole line in again (including the line number) - this will replace whatever was previously at that line number.
As well as correcting mistakes, this can also be used to change programs you've already typed in.
All done? Let's try it out! Type:
If all went well, you should see something like the following:
If, on the other hand, you see an error message, it's likely you have a typo. If you want to see what you typed in again, type:
And Enhanced BASIC will print out your program - check it against the listing above to make sure that everything matches (remember, case is important!).
Have a play around with EhBASIC - you can write some surprisingly powerful programs quite easily but be warned - there's currently no way to save your programs on the rosco_m68k (because there's no writeable long-term storage attached to the system yet) so anything you type in will be lost when you reset the computer!
(Speaking of which, if you want to start a new program without resetting the computer, try the NEW command).
If you want to carry on playing with EhBASIC, Wikipedia has a good page about the BASIC language with some examples, most of which should work with EhBASIC - Click here to take a look. For example, you might try:
10 INPUT "Who are you "; N$ 20 PRINT "Hello "; N$
Once you're all done with BASIC, reboot your rosco_m68k and follow the same process as before to load another example program. After all the hard work with BASIC, we'd suggest you relax and take a break long enough for a game of adventure.bin , which is a rosco_m68k port of Jeff Tranter's Abandoned Farmhouse Adventure, an old-school text adventure that is a lot of fun to play.
Play around with examples for as long as you like. In the next section we'll be getting into more advanced topics, and looking at installing a cross-compiling toolchain and support software that will enable you to compile the examples yourself from source, as well as developing your own software. Click here if you want to get started with that.