Does anyone know where I can obtain MetaComCo BCPL?

Anything QL Software or Programming Related.
P2P
ROM Dongle
Posts: 18
Joined: Tue Apr 21, 2020 12:45 pm

Re: Does anyone know where I can obtain MetaComCo BCPL?

Post by P2P »

Hello Finn,
You mentioned that you could restore the header files of the executable programs in the BCPL.zip file
as was available as an attachment file in a post about BCPL on this site.
Could You please give the memory space that is needed for every executable file without an header line in the BCPL.zip file
(like bcpl, ed etc.), in order to restore the files for execution on the QL?
Otherwise it must be a wild guess to estimate the needed memory for every program used by BCPL, You already found that out, as I understand.
Thank you,

Greetings from Paul (The Netherlands).


User avatar
XorA
Site Admin
Posts: 1368
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: Does anyone know where I can obtain MetaComCo BCPL?

Post by XorA »

Does this help

Code: Select all

➜  PROGRAM xxd -seek 22 -len 4 bcpl           
00000016: 0000 1770                                ...p
➜  PROGRAM xxd -seek 22 -len 4 b_ed
00000016: 0000 12c0                                ....
➜  PROGRAM xxd -seek 22 -len 4 blink 
00000016: 0000 1f40                                ...@
EDIT: these are the actual values from the headers on the files I have (in hex)


User avatar
Finn
ROM Dongle
Posts: 4
Joined: Fri May 19, 2023 4:18 pm

Re: Does anyone know where I can obtain MetaComCo BCPL?

Post by Finn »

Hi Paul,
I seem to remember that I tried multiples of 1024 and that for some reason 4x1024=4096 worked for all three programmes: ED, BCPL and BLINK.

Unfortunately I don't have the actual program at my fingertips right now, but does that work for you?

Finn


P2P
ROM Dongle
Posts: 18
Joined: Tue Apr 21, 2020 12:45 pm

Re: Does anyone know where I can obtain MetaComCo BCPL?

Post by P2P »

Hello Finn,

thank you for your fast reaction.
The memory value of 4096 for the BCPL programs bcpl, ed and blink also works for me.
Now I can use the BCPL compiler.
Thank you,

greetings from Paul.


ones' complement
Over Heated PSU
Posts: 135
Joined: Tue Nov 30, 2021 1:19 am

Re: Does anyone know where I can obtain MetaComCo BCPL?

Post by ones' complement »

XorA wrote: Fri Jun 02, 2023 1:45 pm Does this help

Code: Select all

➜  PROGRAM xxd -seek 22 -len 4 bcpl           
00000016: 0000 1770                                ...p
➜  PROGRAM xxd -seek 22 -len 4 b_ed
00000016: 0000 12c0                                ....
➜  PROGRAM xxd -seek 22 -len 4 blink 
00000016: 0000 1f40                                ...@
EDIT: these are the actual values from the headers on the files I have (in hex)
Using those values for data space (BCPL=6000, ED=4800, BLINK=8000 bytes), here is updated zip with headers restored. I also changed the BCPL file 'FLP' reference back to 'MDV' (to be consistent with other files). This means the executables all work from RAM disk in SMSQmulator simply using RAM_USE MDV.
Attachments
BCPL.zip
(53.97 KiB) Downloaded 46 times


User avatar
ql_freak
Gold Card
Posts: 354
Joined: Sun Jan 18, 2015 1:29 am

Re: Does anyone know where I can obtain MetaComCo BCPL?

Post by ql_freak »

I think I have the original Metacomco BCPL development kit (at least I have the original blue manual, looks similar as Metacomco C). Unfortunately I have not the time to look in my big QL carton (as a lot of other cartons are above it ;-)) to look for the whole kit. But as far as I can remember, there was no ROM (as required for Mectacomco C).


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
Finn
ROM Dongle
Posts: 4
Joined: Fri May 19, 2023 4:18 pm

Re: Does anyone know where I can obtain MetaComCo BCPL?

Post by Finn »

In case anyone looks for something beyond Hello World to try the compiler on, here is a little program from the Richards distribution (which contains a host of examples), dealing with the coin problem: https://en.wikipedia.org/wiki/Coin_problem.

If you run it with EXEC rather than EXEC_W for large values it can be fun seeing how it multitasks in the background, spitting out solutions as they are computed - exactly how BCPL would have run under Tripos, as I understand it.

SECTION "COINS"

GET "libhdr"

LET coins(sum) = c(sum, (TABLE 200, 100, 50, 20, 10, 5, 2, 1))

AND c(sum, t) = sum<0 -> 0,
sum=0 | !t=1 -> 1,
c(sum, t+1) + c(sum-!t, t)

LET start() = VALOF
$( writes("Coins problem*n")

t(0)
t(1)
t(2)
t(5)
t(21)
t(100)
t(150)
RESULTIS 0
$)

AND t(n) BE writef("Sum = %i3 number of ways = %i6*n", n, coins(n))


ones' complement
Over Heated PSU
Posts: 135
Joined: Tue Nov 30, 2021 1:19 am

Re: Does anyone know where I can obtain MetaComCo BCPL?

Post by ones' complement »

Thanks. From wikipedia I read BCPL is the language in which the original "Hello, World!" program was written :)


User avatar
ql_freak
Gold Card
Posts: 354
Joined: Sun Jan 18, 2015 1:29 am

Re: Does anyone know where I can obtain MetaComCo BCPL?

Post by ql_freak »

I just have had a look into my original BCPL Development Kit manual, but the "hello world" seems not to be included.


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
jobdone
Forum Moderator
Posts: 45
Joined: Wed Aug 07, 2019 4:59 am

Re: Does anyone know where I can obtain MetaComCo BCPL?

Post by jobdone »

If it's any help, here is the output from qem-unzip on a different version of BCPL with the headers still intact.
Entry: ed
00 00 54 2C 00 01 00 00 12 C0 00 00 00 00 00 02 | ..T,............
65 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ed..............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00 00 00 00 49 43 AE 28 00 00 00 02 00 00 00 00 | ....IC.(........
Entry: install
00 00 09 94 00 00 00 00 00 00 00 00 00 00 00 07 | ................
69 6E 73 74 61 6C 6C 00 00 00 00 00 00 00 00 00 | install.........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00 00 00 00 49 43 AE 29 00 00 00 03 00 00 00 00 | ....IC.)........
Entry: bcpl_args
00 00 0E E4 00 00 00 00 00 00 00 00 00 00 00 09 | ................
62 63 70 6C 5F 61 72 67 73 00 00 00 00 00 00 00 | bcpl_args.......
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00 00 00 00 49 43 AE 29 00 00 00 04 00 00 00 00 | ....IC.)........
Entry: bcpl_trn
00 00 28 AC 00 00 00 00 00 00 00 00 00 00 00 08 | ..(.............
62 63 70 6C 5F 74 72 6E 00 00 00 00 00 00 00 00 | bcpl_trn........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00 00 00 00 49 43 AE 2A 00 00 00 05 00 00 00 00 | ....IC.*........
Entry: bcpl_syn
00 00 2E C4 00 00 00 00 00 00 00 00 00 00 00 08 | ................
62 63 70 6C 5F 73 79 6E 00 00 00 00 00 00 00 00 | bcpl_syn........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00 00 00 00 49 43 AE 2A 00 00 00 06 00 00 00 00 | ....IC.*........
Entry: bcpl_err
00 00 08 BC 00 00 00 00 00 00 00 00 00 00 00 08 | ................
62 63 70 6C 5F 65 72 72 00 00 00 00 00 00 00 00 | bcpl_err........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00 00 00 00 49 43 AE 2A 00 00 00 07 00 00 00 00 | ....IC.*........
Entry: bcpl_cg
00 00 58 AC 00 00 00 00 00 00 00 00 00 00 00 07 | ..X.............
62 63 70 6C 5F 63 67 00 00 00 00 00 00 00 00 00 | bcpl_cg.........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00 00 00 00 49 43 AE 2B 00 00 00 08 00 00 00 00 | ....IC.+........
Entry: bcpl
00 00 23 08 00 01 00 00 17 70 00 00 00 00 00 04 | ..#......p......
62 63 70 6C 00 00 00 00 00 00 00 00 00 00 00 00 | bcpl............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00 00 00 00 49 43 AE 2B 00 00 00 09 00 00 00 00 | ....IC.+........
Entry: blink
00 00 32 18 00 01 00 00 1F 40 00 00 00 00 00 05 | ..2......@......
62 6C 69 6E 6B 00 00 00 00 00 00 00 00 00 00 00 | blink...........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00 00 00 00 49 43 AE 2B 00 00 00 0A 00 00 00 00 | ....IC.+........
Entry: libhdr
00 00 08 49 00 00 00 00 00 00 00 00 00 00 00 06 | ...I............
6C 69 62 68 64 72 00 00 00 00 00 00 00 00 00 00 | libhdr..........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00 00 00 00 49 43 AE 2C 00 00 00 0B 00 00 00 00 | ....IC.,........
Entry: boot_bcpl
00 00 01 88 00 00 00 00 00 00 00 00 00 00 00 09 | ................
62 6F 6F 74 5F 62 63 70 6C 00 00 00 00 00 00 00 | boot_bcpl.......
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00 00 00 00 49 43 AE 2C 00 00 00 0C 00 00 00 00 | ....IC.,........


Post Reply