-
Most Popular
Learning to make sprites
I was looking through the contents of the cassette that came with the ... Read More!Amstrad 3.5" Floppy drive - DSK to Disc
So you've got the floppy drive all powered and plugged in, but got no Amstrad CPC software on 3.5" d... Read More!Amstrad Controller PCB's
It's been a while since I last posted, yet again. I've been paying a fair bit of attention to the we... Read More!Connecting a 3.5" floppy drive to an Amstrad 464 without modifying the drive or DDI-1
Quite some time ago I bought a DDI-1 interface to use with my amstrad 464's. Just the interface with... Read More!Amstrad 3.5" Floppy drive - Making a new ribbon cable, case and switches
So if you've followed the previous blog posts about making a PC 3.5" floppy drive work with your Ams... Read More!
First delves into locomotive BASICCreated on: 17-12-2018 By Gee |
I was doing a bit of reading on Sunday night and came across a scan from an amstrad magazine from February 1991.
In the scan was a "10 line" type in bit of BASIC coding. I say "10 line" because there was so many commands in each line separated by the use of ':'. This of course made things a bit more difficult when it came time to debug the program after having copied the lot out and it didn't run. If I remember correctly, they rarely did run 1st time due to some spelling mistake, missing a dot or using ';' instead of ':'. Another reason I hate using the ':' for different actions. Just use a new line! However, due to this program not working correctly I found a way of making debugging slightly easier. "How?" do I hear you ask? Well, the first line of any of my future BASIC programs shall start the same way from now on. 1 ON ERROR GOTO 500 This error printing allows the creator of the software to see what line the error is in and what type of error it is with a corresponding number which you can then look up in the manual that you all obviously have! I played with this code for a bit and didn't get it to work, I even asked my beloved wife to read out the scan for me to confirm I had the code correct (which she just loved doing!). I decided that there must've been something wrong with the code, I.E. it was written for the 6128 and not the 464 that I was using. Nothing to do with my newness to BASIC programming at all! So I started messing around making my own program in BASIC just to see what I could do with no help from any books, just trial and error. I ended up with a program that wrote this websites logo out in ascii over and over again, whilst changing the colour of the logo each time it was printed. After a while I got the borders changing colour and text going off like a strobe light, making me really glad I don't have epilepsy. I saved all my hard work onto a tape that I was sent from a kind member of the facebook spectrum group (Don't tell him i'm using them on an amstrad!). checked that they saved ok with the CAT command, then went onto my next task. I chose a book scan to copy from (sixty 464 programs) and started writing out what I thought was a space invaders clone. It took a good while to write out and after sorting out a few spelling mistakes, I was shocked to find that it actually worked. It's quite hard to play! I also saved this to tape as it took so long to write out that I didn't want to loose my hard work. After this, I decided I'd go back to my own program that I wrote out and loaded it back up from the tape. I discovered that the spacing was all off in my ascii logo. So, I'm going to have a go at writing out commands to draw it to the screen instead. get it looking a bit better than using ascii characters. Once i'm done I might even figure out how to add sound to it (I managed to figure out how to play a few notes so far). I'm not sure how to get sound to play at the same time as the screen is scrolling yet. I'll get there! |
|