Printing a program listing

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
Post Reply
User avatar
NickB
Posts: 7
Joined: Sun Dec 03, 2017 2:34 pm
Contact:

Printing a program listing

Post by NickB » Mon Dec 04, 2017 8:16 pm

Hi

At the time of writing, I'm the most recent new member.
As you can see from my intro post, I joined mainly to pursue an interest in the old politico-economic game Great Britain Ltd. I tinkered with it when it first came out and would like to do so again, starting by printing out the original listing.

Several kind folk have already helped, particularly lurkio who provided this link to load the program,

http://bbcmicro.co.uk/jsbeeb/play.php?l ... sd&autorun

That loads it up and scrolls through the program and the LIST command will scroll through it again.

Searching on previous posts, I think I need to *SPOOL it, but I don't appear to have an "*" key on my Mac.

I tried it on a Windows machine that allows a "*" but the *SPOOL command does nothing.

I tried the Windows emulator and can get the program to run but cannot get it to just load the source code.

LISTing the lines to 100 shows the attached. I still had hair when I last programmed a BBC Micro and I have forgotten most of what I knew, so I don't know whether there is anything stopping me SPOOLing.

danaielj noted, "Loading the game reveals a "CALL TOP" and little else... So a little disassembly is probably going to be required. TOP seems to be at &1935 on my emulated beeb and the first instruction is an LDX"

I'm afraid I'm entirely mystified by that.

So, to return to my quest, I just want to print out the BASIC source code for GBLTD and the above is to establish my credentials to ignorance and to demonstrate that I have tried.

Any advice will be gratefully received,
Attachments
Screen Shot 2017-12-04 at 20.01.07.png
Cheers, NickB

User avatar
flaxcottage
Posts: 3092
Joined: Thu Dec 13, 2012 8:46 pm
Location: Derbyshire
Contact:

Re: Printing a program listing

Post by flaxcottage » Mon Dec 04, 2017 8:35 pm

This advice assumes one is using BeebEm on a Windows Machine.

To get a listing of a BASIC program do the following;

1. In BeebEm click the Comms menu item and make sure the printer on/off is ticked.
2. Again in Comms choose printer destination Clipboard.
3. Assuming the program is already loaded type;
LIST [Ctrl-B] [Return]
When the listing has finished type [Ctrl-C]

You should now be able to paste the 'printed listing' into a text editor or word processor for printing.

Apple machines do not have an asterisk symbol?!! :!: :!: :!: :?: :?: Surely this cannot be right. I know Apple stuff is 'quirky' but not to have an asterisk ...

If you wish to print a disassembly of machine code from BeebEm, make sure you have Exmon 2 loaded as a ROM image (use the Master machine) and use that. H switches the printer on and H switches it off after the disassembly. The Exmon 2 manual is available easily from the web.
- John

Why do I keep collecting Acorn gear? I'm going to need a considerably bigger man-cave. :?

ThomasHarte
Posts: 459
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: Printing a program listing

Post by ThomasHarte » Mon Dec 04, 2017 8:45 pm

flaxcottage wrote:Apple machines do not have an asterisk symbol?!! :!: :!: :!: :?: :?: Surely this cannot be right. I know Apple stuff is 'quirky' but not to have an asterisk ...
It's shift+8, like every other computer. The Mac's keyboard mapping is an infinite improvement on the Windows mapping once you need to type most things: e.g. option+8 for a bullet point, option+ or shift+option + hyphen for en and em dash, option+e then any other compatible letter to type that letter with an acute, etc. Compare and contrast with memorisation Windows-specific alt codes. Ctrl+shift+u on X11 is at least an improvement, for using ordinary unicode numbers.

I would dare imagine though that the emulator he is using has simply performed a physical mapping rather than a logical one. On a BBC the asterisk is above the colon, so find whichever key produces a colon in the emulator and then press that with shift. It's probably the single-quote key since that's next to semicolon, where the colon key is on a BBC.

User avatar
danielj
Posts: 6287
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Printing a program listing

Post by danielj » Mon Dec 04, 2017 9:07 pm

Here you go, I've attached it to this post.

d.
Attachments
GBLTD.txt
(22.61 KiB) Downloaded 40 times

User avatar
NickB
Posts: 7
Joined: Sun Dec 03, 2017 2:34 pm
Contact:

Re: Printing a program listing

Post by NickB » Mon Dec 04, 2017 9:43 pm

Thanks again danielj - that’s a result and will allow progress, but I’ll still try to manage it myself.
To Thomas and flax, yes it does have an asterisk on the keyboard but it does not produce anything when used in that application.
Cheers, NickB

User avatar
tricky
Posts: 2560
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Printing a program listing

Post by tricky » Mon Dec 04, 2017 11:46 pm

I've never used a Mac, but often beeb emulators have an option for "logical" or "physical" keyboard mapping; so shift+8 should give an asterisk in one, while shift+: should give one in the other, assuming that : is near the bottom right of the keyboard's main section.

User avatar
lurkio
Posts: 1613
Joined: Tue Apr 09, 2013 11:30 pm
Location: Doomawangara
Contact:

Re: Printing a program listing

Post by lurkio » Tue Dec 05, 2017 12:35 am

Download the .SSD disc-image for the game from here:
Then load the .SSD file into BeebEm.

Then type the following commands:

Code: Select all

PAGE=&1900
LOAD "GBLTD"
LIST
PAGE=&1A00
OLD
LIST
In an earlier post in this thread, John ("flaxcottage") explained how to use the print-to-clipboard feature of BeebEm to get a copy of the listing as plain text.

:idea:

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

Re: Printing a program listing

Post by jgharston » Tue Dec 05, 2017 1:20 am

danielj wrote:Here you go, I've attached it to this post.
Seems to work perfectly well on BBC BASIC for Windows, other than it annoyingly complains about lower case keypresses, so it most likely will run on ARM BASIC and any other BBC BASICs as well. I'll give it a try on the PDP11....

Code: Select all

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

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

Re: Printing a program listing

Post by jgharston » Tue Dec 05, 2017 1:37 am

jgharston wrote:I'll give it a try on the PDP11....
Wey hey! Works perfectly! :D

Though, after five years I got unemployment to zero, had a current account surplus and inflation down to 4%, but got kicked out in an SDP landslide!

Code: Select all

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

User avatar
daveejhitchins
Posts: 4201
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: Printing a program listing

Post by daveejhitchins » Tue Dec 05, 2017 8:52 am

If you're using BeebEM on a Mac then the * is <shift> ' (between ; and \)

Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

User avatar
NickB
Posts: 7
Joined: Sun Dec 03, 2017 2:34 pm
Contact:

Re: Printing a program listing

Post by NickB » Tue Dec 05, 2017 9:21 am

Once again, thanks to all.

As JG noted (reading between the lines), the game is immense fun, but its outcomes are questionable.

The code, on the other hand, is rather a mess. I think Mr Hessel went on to greater things in life

http://www.telegraph.co.uk/finance/2883 ... y-90m.html

assuming it's the same one, but I hope he became an ideas person and delegated the coding to folk who used meaningful variable names.
Cheers, NickB

User avatar
jms2
Posts: 1983
Joined: Mon Jan 08, 2007 6:38 am
Location: Derby, UK
Contact:

Re: Printing a program listing

Post by jms2 » Tue Dec 05, 2017 12:52 pm

Looking at the Companies House records for Dealogic and Computasoft, it does seem likely that its the same guy. It's Simon W Hessel, as I recall from playing the game, and that's the same middle initial I see here.

I reckon he probably did write it himself though - as a teenager, in common with many other BBC games of the period.

User avatar
NickB
Posts: 7
Joined: Sun Dec 03, 2017 2:34 pm
Contact:

Re: Printing a program listing

Post by NickB » Tue Dec 05, 2017 1:24 pm

Yes, I noted that he’d had 19 directorships, most now resigned. Also that, disappointingly, he is younger than me.
Cheers, NickB

User avatar
jms2
Posts: 1983
Joined: Mon Jan 08, 2007 6:38 am
Location: Derby, UK
Contact:

Re: Printing a program listing

Post by jms2 » Tue Dec 05, 2017 9:12 pm

Inriguingly, the listing for GBLTD contains his address at the time. Looking on Google Maps, it appears to be an unremarkable apartment block. It's nice to think that maybe this chap rose from a relatively poor background to be (most probably) a multimillionaire thanks in part to his skills with BBC BASIC!

Also in his defence I imagine that the meaningless variable names were probably due to needing to crunch the program up to save space.

User avatar
NickB
Posts: 7
Joined: Sun Dec 03, 2017 2:34 pm
Contact:

Re: Printing a program listing

Post by NickB » Tue Dec 05, 2017 9:50 pm

Good points, both.
Cheers, NickB

Post Reply