|
||||||
Writing in Basic on a Sinclair ZX81 EmulatorEmulating and Programming a 1980's Computer with 2009 TechnologyThe Sinclair ZX81 Emulator was state of the art in the early 1980's but how does it stand up to the passage of time? The easy way to find out is to use an emulator
Anyone wishing to experience the joys of programming in the 1980's can, if they wish, got the Ebay web site and start bidding on a Sinclair ZX81 (if they are lucky enough to find one listed there). However, there is another way for them to achieve that taste of nostalgia. They can download a Sinclair ZX81 emulator. That way they don't have to wait for the auction to finish, they don't have to wait for the computer to be delivered through the post, and it won't cost them anything either. Downloading and Running a Sinclair ZX81 EmulatorEightyOne is an excellent Sinclair ZX81 emulator and can be downloaded in a zip file. Once the zip file has been unpacked then the emulator can be run without the need to install it (a shown in figure 1 at the bottom of this article). Then the user will find that, as well as the ZX81, it also emulates the:
It even allows the the user to run the ZX81 with or without its 16K RAM pack. And more than that, for the true ZX81 aficionado, it will emulate the infamous RAM pack wobble. Typing on the Sinclair ZX81Before starting programming it's worth remembering that the ZX81's keyboard was a QWERTY one but, apart from that, it was nothing like a modern pc's layout. However, the ZX81 keyboard can viewed by pressing the F1 key (as shown in figure 2). It's also worth remembering that most of the keys were actually short cuts and so, for example, pressing "p" causes "PRINT" to be output. Getting Started with Basic on the Sinclair ZX81Using ZX81 Basic is quite simple, for example variables can be defined: LET X=2
LET Y=3
And then mathematical operations can be carried out with them, for example X to the power of Y can now be calculated: PRINT X**Y
Here "**" is SHIFT-H and not two SHIFT-8's. Programming on the Sinclair ZX81Programs are written on the ZX81 by preceding each line with a number, for example: 10 LET PI=3.1415265358979
20 LET R=2
30 LET C=2*PI*R
40 PRINT C
It's run by typing "R" (which, of course, will display "RUN") and then pressing the return key. The result (12.566106) will be displayed on the screen, and then the code listing can be returned to by pressing the return key again (as shown in figure 3). Saving and Loading a ProgramThe Listing can be saved by pressing the S key and then typing a name, for example: SAVE "TEST"
It can then be reloaded at any time by pressing the "J" key (for the "LOAD" command) and entering the name again: LOAD "TEST"
At this point it is a good idea to make sure that the computer speakers are turned down because as well as coding in Basic the programmer will be taken back to the 1980's by the distinctive squeal of the data being loaded from a cassette recorder. They will also be reminded of just how far we've come in the time that it takes to load a program. After a minute or two of high pitched tones and a flashing screen those 4 lines will be on the screen again, and the programmer may think, just may be, that they are actually quite happy with modern technology.
The copyright of the article Writing in Basic on a Sinclair ZX81 Emulator in Computer Programming is owned by Mark Alexander Bain. Permission to republish Writing in Basic on a Sinclair ZX81 Emulator in print or online must be granted by the author in writing.
|
||||||
|
|
||||||
|
|
||||||