BASIC 2 Commented Disassembly

Discuss all aspects of programming here. From 8-bit through to modern architectures.
Post Reply
Coeus
Posts: 1378
Joined: Mon Jul 25, 2016 11:05 am
Contact:

BASIC 2 Commented Disassembly

Post by Coeus » Mon May 14, 2018 7:11 pm

Has anyone produced a commented disassembly of BASIC 2?

I am aware of the Addler book "The BASIC ROM User Guide" available on 8BS and I think I saw reference to another similar book but now can't find it but obviously it is easier to have the comments and code in a single place rather than having to refer between the two.

User avatar
jgharston
Posts: 3668
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: BASIC 2 Commented Disassembly

Post by jgharston » Mon May 14, 2018 9:43 pm

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
hoglet
Posts: 8529
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: BASIC 2 Commented Disassembly

Post by hoglet » Tue May 15, 2018 6:11 am

Coeus wrote: I am aware of the Addler book "The BASIC ROM User Guide" available on 8BS and I think I saw reference to another similar book but now can't find it but obviously it is easier to have the comments and code in a single place rather than having to refer between the two.
In terms of books, I know of two that delve into the innards of BBC Basic 2:

The Advanced Basic ROM User Guide (Colin Pharo):
viewtopic.php?t=13860

The BBC Micro Compendium (Jeremy Ruston):
viewtopic.php?f=2&t=15017

We don't currently have a scanned copy of the latter.

Dave

User avatar
lcww1
Posts: 296
Joined: Wed Mar 15, 2017 11:16 pm
Location: Cloud Cuckoo Land
Contact:

Re: BASIC 2 Commented Disassembly

Post by lcww1 » Tue May 15, 2018 6:38 am

May be of interest - I see that Jeremy Ruston posted a pic of a part of an annotated printout of his BASIC disassembly to twitter in 2014 here: https://mobile.twitter.com/jermolene/st ... lang=en-gb

User avatar
marcusjambler
Posts: 668
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: BASIC 2 Commented Disassembly

Post by marcusjambler » Tue May 15, 2018 12:38 pm

Looks like theres some work being done here:
https://acorn.huininga.nl/pub/docs/sour ... BASIC2.asm

User avatar
kieranhj
Posts: 812
Joined: Sat Sep 19, 2015 10:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: BASIC 2 Commented Disassembly

Post by kieranhj » Thu May 17, 2018 1:37 pm

Seems like this was a popular passtime in the 80's. Here's Kevin Edwards talking about it: https://twitter.com/KevEdwardsRetro/sta ... 09632?s=20
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/

Coeus
Posts: 1378
Joined: Mon Jul 25, 2016 11:05 am
Contact:

Re: BASIC 2 Commented Disassembly

Post by Coeus » Sat May 19, 2018 4:10 pm

Thanks, everyone.
kieranhj wrote:Seems like this was a popular passtime in the 80's. Here's Kevin Edwards talking about it: https://twitter.com/KevEdwardsRetro/sta ... 09632?s=20
We shouldn't be surprised. Compared to other BASICs at the time BBC BASIC had both the extras for structured program and was impressively fast and, I think having done some experiments with other languages, the credit for that speed is not completely down to a fast underlying machine but is in a large part due to an efficient interpreter so people should want to see how Sophie did it.

I didn't write notes at the time but I remember learning about the linked list from the way BASIC stored variable and the way the expression evaluator works and handles precedence by subroutine calls and the processor stack was very elegant.

User avatar
BigEd
Posts: 2607
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: BASIC 2 Commented Disassembly

Post by BigEd » Mon Jan 14, 2019 7:56 pm

hoglet wrote:
Tue May 15, 2018 6:11 am
In terms of books, I know of two that delve into the innards of BBC Basic 2:
...
The BBC Micro Compendium (Jeremy Ruston):
http://stardot.org.uk/forums/viewtopic.php?f=2&t=15017

We don't currently have a scanned copy of the latter.
It seems we do now. Somehow, a scanned version of this book has turned up online. PDF and OCR downloads too. This is the full version of the book with Jeremy's full dissassembly of Acorn's 6502 BBC Basic, 1982 version.

dominicbeesley
Posts: 853
Joined: Tue Apr 30, 2013 11:16 am
Contact:

Re: BASIC 2 Commented Disassembly

Post by dominicbeesley » Fri Jan 18, 2019 1:24 pm

https://github.com/dominicbeesley/beeb6 ... 809BAS.asm

This is my port of BASIC4 to the 6809 (not what the OP asked for) but if you ever get stuck then looking in here might turn up any comments I made when working out the nitty-gritty of how things actually work.

D

Post Reply