Acornsoft C

discussion of beeb/electron applications, languages, utils and educational s/w
Post Reply
MM5XT
Posts: 12
Joined: Mon Jan 07, 2019 12:49 pm
Contact:

Acornsoft C

Post by MM5XT » Fri Feb 22, 2019 4:21 am

Good day

Anyone know if a copy of Acornsoft C for the BBC exists anywhere online? using Beebug C at the moment, but keen to take a peek.

Cheers!

Michael

User avatar
DutchAcorn
Posts: 2130
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: Acornsoft C

Post by DutchAcorn » Fri Feb 22, 2019 5:17 am

MM5XT wrote:
Fri Feb 22, 2019 4:21 am
Good day

Anyone know if a copy of Acornsoft C for the BBC exists anywhere online? using Beebug C at the moment, but keen to take a peek.

Cheers!

Michael
Can’t recall if there is a BBC B version but for the Master version see this post: http://stardot.org.uk/forums/viewtopic.php?t=3361
Paul

Image

MM5XT
Posts: 12
Joined: Mon Jan 07, 2019 12:49 pm
Contact:

Re: Acornsoft C

Post by MM5XT » Fri Feb 22, 2019 5:31 am

Oh sweet!
I could swore I did a search of the forum before I posted, ah well.

Thanks

Michael

RobC
Posts: 2687
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Acornsoft C

Post by RobC » Fri Feb 22, 2019 11:31 am

DutchAcorn wrote:
Fri Feb 22, 2019 5:17 am
Can’t recall if there is a BBC B version...
I think it'll run on the 6502 co-pro or from sideways RAM on the Master.

Andrew_Waite
Posts: 168
Joined: Tue Aug 30, 2016 2:58 pm
Contact:

Re: Acornsoft C

Post by Andrew_Waite » Fri Feb 22, 2019 2:02 pm

Would BCPL, the forerunner of both the 'B' and 'C' programming languages, be a suitable substitute for these folks who are looking for a C-compiler for the Beeb?

BCPL for the BBC Micro seems to have an excellent pedigree, being marketed by a company set up by the brother of the language's inventor.

https://en.wikipedia.org/wiki/BCPL
Last edited by Andrew_Waite on Fri Feb 22, 2019 2:13 pm, edited 7 times in total.

User avatar
Lardo Boffin
Posts: 1648
Joined: Thu Aug 06, 2015 6:47 am
Contact:

Re: Acornsoft C

Post by Lardo Boffin » Fri Feb 22, 2019 2:19 pm

Andrew_Waite wrote:
Fri Feb 22, 2019 2:02 pm
Is Acornsoft BCPL, the forerunner of both the 'B' and 'C' programming languages, a suitable substitute for these folks who are looking for a C-compiler for the Beeb?

https://en.wikipedia.org/wiki/BCPL
I guess it depends what they want to do. If they want to write in a structured language that is compiled not interpreted then maybe it will scratch an itch. Obviously it doesn’t compile to produce C code (or machine code either - it compiles to produce an internediate code which needs a BCPL ROM or runtime to process).
I quite like BCPL myself and have written a few simple programs in it. Some discussions here

viewtopic.php?f=2&t=13158&hilit=Bcpl
Atom, issue 5
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
USA Model B
BBC Master, Datacentre + HDD, pi co-proc, econet, NULA

RobC
Posts: 2687
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Acornsoft C

Post by RobC » Fri Feb 22, 2019 3:03 pm

Andrew_Waite wrote:
Fri Feb 22, 2019 2:02 pm
Would BCPL, the forerunner of both the 'B' and 'C' programming languages, be a suitable substitute for these folks who are looking for a C-compiler for the Beeb?
I know I go on about this a fair bit but I think the easiest and best way to get a C compiler on the Beeb is to use a Pi co-pro. There are decent C compilers for most (all?) of the cores (Z80, 6502, 6809, 32016, ARM2, x86 & native ARM). If you use the native ARM core, you can even do graphics/sprites quicker than on the host and you get loads of memory.

User avatar
Lardo Boffin
Posts: 1648
Joined: Thu Aug 06, 2015 6:47 am
Contact:

Re: Acornsoft C

Post by Lardo Boffin » Fri Feb 22, 2019 9:13 pm

RobC wrote:
Fri Feb 22, 2019 3:03 pm
Andrew_Waite wrote:
Fri Feb 22, 2019 2:02 pm
Would BCPL, the forerunner of both the 'B' and 'C' programming languages, be a suitable substitute for these folks who are looking for a C-compiler for the Beeb?
I know I go on about this a fair bit but I think the easiest and best way to get a C compiler on the Beeb is to use a Pi co-pro. There are decent C compilers for most (all?) of the cores (Z80, 6502, 6809, 32016, ARM2, x86 & native ARM). If you use the native ARM core, you can even do graphics/sprites quicker than on the host and you get loads of memory.
Any idea which of these options is best? I gave Beebug C a go but it is rather tricky to configure and slow to compile without a co-proc. Unfortunately I couldn’t find an editor that allowed me to edit the source files and then run them.
By best I mean easiest to set up and use I guess. I have a gotek on a Master so DFS and ADFS based options should be fine. I think I saw some x86 files on there as well. :D
Atom, issue 5
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
USA Model B
BBC Master, Datacentre + HDD, pi co-proc, econet, NULA

RobC
Posts: 2687
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: Acornsoft C

Post by RobC » Fri Feb 22, 2019 10:48 pm

Lardo Boffin wrote:
Fri Feb 22, 2019 9:13 pm
Any idea which of these options is best?
Depends whether you want to compile on the BBC or not. If not, the native ARM core is the best as it's the quickest and has the most memory.

If you want to compile on the Beeb, I think the 32016 and ARM2 work well. There are some useful options for the x86 and 6809 too but I haven't used them as much.

I have a DC CF card image with loads of co-pro compilers on it if you want. You can use something like ADFS Explorer to move the files to ADFS floppy images.

User avatar
Lardo Boffin
Posts: 1648
Joined: Thu Aug 06, 2015 6:47 am
Contact:

Re: Acornsoft C

Post by Lardo Boffin » Sat Feb 23, 2019 8:33 am

RobC wrote:
Fri Feb 22, 2019 10:48 pm
Lardo Boffin wrote:
Fri Feb 22, 2019 9:13 pm
Any idea which of these options is best?
Depends whether you want to compile on the BBC or not. If not, the native ARM core is the best as it's the quickest and has the most memory.

If you want to compile on the Beeb, I think the 32016 and ARM2 work well. There are some useful options for the x86 and 6809 too but I haven't used them as much.

I have a DC CF card image with loads of co-pro compilers on it if you want. You can use something like ADFS Explorer to move the files to ADFS floppy images.
Thanks. :D

Definitely on beeb for me please!

My ideal scenario would be to have it running on a mode B with a pi co proc and connecting to my econet to build files from and to.
Atom, issue 5
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
USA Model B
BBC Master, Datacentre + HDD, pi co-proc, econet, NULA

User avatar
Lardo Boffin
Posts: 1648
Joined: Thu Aug 06, 2015 6:47 am
Contact:

Re: Acornsoft C

Post by Lardo Boffin » Thu Mar 07, 2019 10:12 pm

Probably a daft question but on a beeb how do you get the double vertical lines that represent ‘or’ in an if statement in C?

For example

if (key=‘Y’ || key=‘y’){....

Thanks!
Atom, issue 5
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
USA Model B
BBC Master, Datacentre + HDD, pi co-proc, econet, NULA

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

Re: Acornsoft C

Post by danielj » Thu Mar 07, 2019 10:13 pm

Above the backslash.

User avatar
Lardo Boffin
Posts: 1648
Joined: Thu Aug 06, 2015 6:47 am
Contact:

Re: Acornsoft C

Post by Lardo Boffin » Thu Mar 07, 2019 10:57 pm

Thanks. I tried that but get a compile error using the Norcroft C compiler on the ARM evaluation co-proc. Which I should have probably mentioned I was using... :oops:

Code snippet:-
C8F573B1-C4DD-4D8B-9575-DB1BEEA610FE.jpeg
Atom, issue 5
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
USA Model B
BBC Master, Datacentre + HDD, pi co-proc, econet, NULA

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

Re: Acornsoft C

Post by danielj » Thu Mar 07, 2019 11:17 pm

Crumbs, no idea then... It should be ASCII character 124 which is what that is :?

User avatar
Lardo Boffin
Posts: 1648
Joined: Thu Aug 06, 2015 6:47 am
Contact:

Re: Acornsoft C

Post by Lardo Boffin » Thu Mar 07, 2019 11:22 pm

I’m pretty sure that one worked in Beebug C but not figured this one out yet...
Atom, issue 5
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
USA Model B
BBC Master, Datacentre + HDD, pi co-proc, econet, NULA

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

Re: Acornsoft C

Post by BigEd » Fri Mar 08, 2019 7:28 am

You have an = instead of == on the RHS of that expression - might that be confusing the compiler? Is there any more to the error message?

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

Re: Acornsoft C

Post by danielj » Fri Mar 08, 2019 7:41 am

BigEd wrote:
Fri Mar 08, 2019 7:28 am
You have an = instead of == on the RHS of that expression - might that be confusing the compiler? Is there any more to the error message?
That'd do it!

User avatar
Lardo Boffin
Posts: 1648
Joined: Thu Aug 06, 2015 6:47 am
Contact:

Re: Acornsoft C

Post by Lardo Boffin » Fri Mar 08, 2019 10:12 am

danielj wrote:
Fri Mar 08, 2019 7:41 am
BigEd wrote:
Fri Mar 08, 2019 7:28 am
You have an = instead of == on the RHS of that expression - might that be confusing the compiler? Is there any more to the error message?
That'd do it!
:oops:
Atom, issue 5
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
USA Model B
BBC Master, Datacentre + HDD, pi co-proc, econet, NULA

Post Reply