Skip to content

Diving into Retro Computing with the Amstrad PCW 8256#409

Merged
csalt-scottlogic merged 1 commit intoScottLogic:gh-pagesfrom
lhancock-scottlogic:gh-pages
Feb 19, 2026
Merged

Diving into Retro Computing with the Amstrad PCW 8256#409
csalt-scottlogic merged 1 commit intoScottLogic:gh-pagesfrom
lhancock-scottlogic:gh-pages

Conversation

@lhancock-scottlogic
Copy link
Contributor

@lhancock-scottlogic lhancock-scottlogic commented Feb 18, 2026

Please add a direct link to your post here:

https://lhancock-scottlogic.github.io/blog/2026/02/19/diving-into-retro-computing.html

Have you (please tick each box to show completion):

  • Added your blog post to a single category?
  • Added a brief summary for your post? Summaries should be roughly two sentences in length and give potential readers a good idea of the contents of your post.
  • Checked that the build passes?
  • Checked your spelling (you can use npm install followed by npx mdspell "**/{FILE_NAME}.md" --en-gb -a -n -x -t if that's your thing)
  • Ensured that your author profile contains a profile image, and a brief description of yourself? (make it more interesting than just your job title!)
  • Optimised any images in your post? They should be less than 100KBytes as a general guide.

Posts are reviewed / approved by your Regional Tech Lead.

Copy link
Contributor

@csalt-scottlogic csalt-scottlogic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's really interesting! One general thing that might be worth considering is to put all of the BASIC keywords in code font when they occur in normal text, instead of just in capitals.

@@ -0,0 +1,405 @@
---
title: Diving into Retro Computing with the Amstrad PCW 8256
date: 2026-02-16 10:00:00 Z
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need changing to the publication date

~~~
...
130 DIM words$(10)
140 DATA “ONTO”,”PLOT”,”THAT”,”WILL”,”WITH”,”SENT”,”ABLE”,”INTO”,”WHEN”,”LIFE”
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your quotes have been changed to "fancy quotes" when they should be the " quotes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I've changed them all now

### GOSUB
Instructs BASIC to jump to a particular line and execute the code thereon until it finds the RETURN statement. Cannot be parameterised.

### GOTO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locomotive BASIC also had a "computed GOSUB/GOTO" where you could type ON [expression] GOSUB 100,200,300... and at runtime it would compute the value of the expression, which had to have a 1-byte integer result, and then go to the nth entry in the list of line numbers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that in the manual, not sure if it fits into the list of function-like instructions though as to me, it seems like an extension of GOSUB where it just gets called in a different way. Do you think it's worth adding it to this list, or just including some info about ON under the GOSUB title?

Copy link
Contributor

@csalt-scottlogic csalt-scottlogic Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, it kind of falls between two stools because it's effectively a switch statement as well as a way to define a function entry point. Maybe just add that there's a "computed" version that's a bit like a switch


I haven't mentioned it yet, but even though we are using the RND function to grab random numbers, the game is actually the same every single time so far. The answer, the placement of the words, and the characters in between each word which are determined by BASIC's RND function are always the same. This is because BASIC's pseudo-random number generator calculates the next number based on the previously generated one, and the seed is the same every time, as well as the order in which we generate the numbers for different purposes. We can alter the seed by calling RANDOMIZE with our own number - but how do we come up with *that* number while keeping every game unique?

I included an initial screen to my game as a solution, where a counter counts up until the user presses a key. The counter's value is then passed to RANDOMIZE so that each game can be different:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "traditional Locomotive BASIC" answer was to use RANDOMIZE TIME - the TIME keyword returns the length of time since boot. I don't know if this works in Mallard though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the manual but don't see anything built-in that lets you grab the time :(

@lhancock-scottlogic lhancock-scottlogic force-pushed the gh-pages branch 3 times, most recently from 149ff73 to 1a1deff Compare February 18, 2026 17:10
@csalt-scottlogic csalt-scottlogic merged commit f5027c2 into ScottLogic:gh-pages Feb 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments