Acornsoft ISO Pascal object-code format?

handy tools that can assist in the development of new software
Post Reply
nicolagiacobbe
Posts: 215
Joined: Tue Jul 03, 2007 10:40 am
Location: italy
Contact:

Acornsoft ISO Pascal object-code format?

Post by nicolagiacobbe »

Hello everybody.
Sorry for asking help but to date I have been unable to find what seemed a simple piece of information. I am playing with Acornsoft ISO pascal and it is working great (with some quirks) but it is a black box to me. I would like to use the pascal interpreter alone as a virtual machine on ROM and make a few tests to see how efficient could be in term of code space.
Anyone pointing me to some resource to understand the object format and the underlying VM?
User avatar
SKS1
Posts: 327
Joined: Sat Sep 19, 2020 12:04 am
Location: Highland Perthshire
Contact:

Re: Acornsoft ISO Pascal object-code format?

Post by SKS1 »

nicolagiacobbe wrote: Thu Apr 11, 2024 8:05 pm Hello everybody.
Sorry for asking help but to date I have been unable to find what seemed a simple piece of information. I am playing with Acornsoft ISO pascal and it is working great (with some quirks) but it is a black box to me. I would like to use the pascal interpreter alone as a virtual machine on ROM and make a few tests to see how efficient could be in term of code space.
Anyone pointing me to some resource to understand the object format and the underlying VM?
Have a look at its compiler? Or rather, one that's as close as you can get given the actual source is lost in the Acorn Drawing Office.

https://gtoal.com/acorn/arm/TutuPascal/AComp/

I was adapting the 6502 one for ARM in late 1985/early 1986, having done a 65816 version earlier in 1985 for the Communicator, as well as bug fixing the 6502 one that was written by Ben and Li (hence BL code). I'd adapted it fairly carefully for wider pointers etc.: see comments containing "Tutu - was" ...
Miserable old curmudgeon who still likes a bit of an ARM wrestle now and then. Pi 4, 3, ARMX6, SA Risc PC, A540, A440
nicolagiacobbe
Posts: 215
Joined: Tue Jul 03, 2007 10:40 am
Location: italy
Contact:

Re: Acornsoft ISO Pascal object-code format?

Post by nicolagiacobbe »

Thanks SKS1, now that you pointed me to it I think is the best way, just hoping for something more specific but this is already great.
User avatar
SKS1
Posts: 327
Joined: Sat Sep 19, 2020 12:04 am
Location: Highland Perthshire
Contact:

Re: Acornsoft ISO Pascal object-code format?

Post by SKS1 »

nicolagiacobbe wrote: Thu Apr 11, 2024 8:34 pm Thanks SKS1, now that you pointed me to it I think is the best way, just hoping for something more specific but this is already great.
I think the 6502 optimiser is lost as well; that was needed to be able to fit the BL coded compiler into a single ROM, otherwise it's about 20KB. It scanned the compiler output for commonly-found sequences and squeezed them into previously unused BL codes. I also think the disc-based compiler was slightly more functional.

I don't recall seeing a disassembly of the 6502 BL code interpreter here?
Miserable old curmudgeon who still likes a bit of an ARM wrestle now and then. Pi 4, 3, ARMX6, SA Risc PC, A540, A440
nicolagiacobbe
Posts: 215
Joined: Tue Jul 03, 2007 10:40 am
Location: italy
Contact:

Re: Acornsoft ISO Pascal object-code format?

Post by nicolagiacobbe »

neither do I, it would be nice. It could be solved but I fear it could become another rabbit pit...
User avatar
dominicbeesley
Posts: 2210
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: Acornsoft ISO Pascal object-code format?

Post by dominicbeesley »

I'd be interested in finding out more about the 816 version. Is that lost?
User avatar
SKS1
Posts: 327
Joined: Sat Sep 19, 2020 12:04 am
Location: Highland Perthshire
Contact:

Re: Acornsoft ISO Pascal object-code format?

Post by SKS1 »

SKS1 wrote: Thu Apr 11, 2024 8:39 pm
nicolagiacobbe wrote: Thu Apr 11, 2024 8:34 pm Thanks SKS1, now that you pointed me to it I think is the best way, just hoping for something more specific but this is already great.
I think the 6502 optimiser is lost as well; that was needed to be able to fit the BL coded compiler into a single ROM, otherwise it's about 20KB. It scanned the compiler output for commonly-found sequences and squeezed them into previously unused BL codes. I also think the disc-based compiler was slightly more functional.
Ah, there seems to be a copy of the optimiser on Graham's site, as well as the BL code disassembler

https://gtoal.com/acorn/arm/TutuPascal/BBCPascal/
Miserable old curmudgeon who still likes a bit of an ARM wrestle now and then. Pi 4, 3, ARMX6, SA Risc PC, A540, A440
User avatar
SKS1
Posts: 327
Joined: Sat Sep 19, 2020 12:04 am
Location: Highland Perthshire
Contact:

Re: Acornsoft ISO Pascal object-code format?

Post by SKS1 »

dominicbeesley wrote: Fri Apr 12, 2024 1:39 pm I'd be interested in finding out more about the 816 version. Is that lost?
As far as I am aware, yes. Worked OK, interpreter stayed in 16-bit mode all the time, using 24-bit pointers everywhere for all Pascal objects.
Miserable old curmudgeon who still likes a bit of an ARM wrestle now and then. Pi 4, 3, ARMX6, SA Risc PC, A540, A440
Coeus
Posts: 3557
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Re: Acornsoft ISO Pascal object-code format?

Post by Coeus »

SKS1 wrote: Fri Apr 12, 2024 2:00 pm Ah, there seems to be a copy of the optimiser on Graham's site, as well as the BL code disassembler
Are these files in BL-code? They don't look like source.
User avatar
SKS1
Posts: 327
Joined: Sat Sep 19, 2020 12:04 am
Location: Highland Perthshire
Contact:

Re: Acornsoft ISO Pascal object-code format?

Post by SKS1 »

Coeus wrote: Wed Apr 17, 2024 11:45 pm
SKS1 wrote: Fri Apr 12, 2024 2:00 pm Ah, there seems to be a copy of the optimiser on Graham's site, as well as the BL code disassembler
Are these files in BL-code? They don't look like source.
They're Beeb executables, can't remember whether they are run under the BL interpreter.
Miserable old curmudgeon who still likes a bit of an ARM wrestle now and then. Pi 4, 3, ARMX6, SA Risc PC, A540, A440
Post Reply

Return to “development tools”