The Rainbow Book of BASIC programs : Roadrace

bbc/electron apps, languages, utils, educational progs, demos + more
Post Reply
User avatar
b_b_c_m_i_c_r_o_2
Posts: 272
Joined: Sun Jun 25, 2006 11:15 pm
Contact:

The Rainbow Book of BASIC programs : Roadrace

Post by b_b_c_m_i_c_r_o_2 » Mon Feb 17, 2020 8:00 pm

Going through some old listings I typed-in back in 1985 from this book. However looking at it today I can see a bug/error/oversight in the printed listing (not the subroutines) that I never realised before.

Can you see what it is yet?
Attachments
subroutines.jpg
BBC specific subroutines
IMG_20200208_0002.jpg
Page 2 - Listing
IMG_20200208_0001.jpg
Page 1

User avatar
b_b_c_m_i_c_r_o_2
Posts: 272
Joined: Sun Jun 25, 2006 11:15 pm
Contact:

Re: The Rainbow Book of BASIC programs : Roadrace

Post by b_b_c_m_i_c_r_o_2 » Tue Feb 18, 2020 9:11 am

here is the program per the listing.
Attachments
RoadRace_Original_Listing_000.uef
Roadrace listing
(161.2 KiB) Downloaded 18 times

User avatar
b_b_c_m_i_c_r_o_2
Posts: 272
Joined: Sun Jun 25, 2006 11:15 pm
Contact:

Re: The Rainbow Book of BASIC programs : Roadrace

Post by b_b_c_m_i_c_r_o_2 » Sun Feb 23, 2020 9:33 am

The oversight is that they should be using X1 for the value of the kerb position (they are using A which is the kerb in 4 rows time). The part of line 240 should be
IF B>X1 AND B <X1+5 THEN...
so that the game is checking the piece of kerb on the same row as the car.
Attachments
Roadrace.png
ROADRACE screenshot

User avatar
leenew
Posts: 4230
Joined: Wed Jul 04, 2012 4:27 pm
Location: Doncaster, Yorkshire
Contact:

Re: The Rainbow Book of BASIC programs : Roadrace

Post by leenew » Sun Feb 23, 2020 9:39 am

Good spot, but the most obvious error still in the program is........? 🤔

User avatar
leenew
Posts: 4230
Joined: Wed Jul 04, 2012 4:27 pm
Location: Doncaster, Yorkshire
Contact:

Re: The Rainbow Book of BASIC programs : Roadrace

Post by leenew » Sun Feb 23, 2020 10:19 am

I got this book a few days ago.
Here is what I have typed in so far if anyone wants to check 'em!
Disc999-RainbowBookOfBASICPrograms.ssd
(200 KiB) Downloaded 20 times
Lee.

Post Reply

Return to “8-bit acorn software: other”