Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Your mode of life will be changed to EBCDIC.


devel / comp.compilers / Re: PALM challenge

SubjectAuthor
* PALM challengeSteve Lewis
+- Re: PALM challengegah4
`* Re: PALM challengeThomas Koenig
 `- Re: PALM challengegah4

1
PALM challenge

<22-10-001@comp.compilers>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=562&group=comp.compilers#562

 copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: lewiss...@gmail.com (Steve Lewis)
Newsgroups: comp.compilers
Subject: PALM challenge
Date: Sat, 1 Oct 2022 01:24:20 -0700 (PDT)
Organization: Compilers Central
Lines: 27
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-10-001@comp.compilers>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="25624"; mail-complaints-to="abuse@iecc.com"
Keywords: history, architecture, comment
Posted-Date: 01 Oct 2022 15:16:21 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
 by: Steve Lewis - Sat, 1 Oct 2022 08:24 UTC

Lots of new CPUs, sure.

But let's explore an old CPU: the 1975 PALM.

I'm looking for anyone interested to explore the idea. Maybe prove how
robust modern tools are at adapting C, by exploring this ancient instruction
set.

You won't find much about this instruction set. But, we've found an internal
IBM documentation about it. We have an emulator for it. And we have an
assembler for it.

I'm no expert about this process, hence seeking help. From what I understand,
the instruction set has 4 tiers of 32 registers. Each tier is an interrupt
level. In Level 0, the first register holds the program counter (and the
second register is reserved as a branch target for certain branch
instructions- other than that, I think the registers are all fair game).
There are no Index registers, and no Overflow/Underflow registers (that I'm
aware of). There is a special instruction for accessing some Devices (so
retaining the option for some inline assembly would good - these may be
necessary for keyboard and screen output). In total it is approximately 45
instructions.

-Steve
[Architecture described here http://computermuseum.informatik.uni-stuttgart.de/dev/ibm_5110/technik/en/
It doesn't look like it would be all that bad as a target for C although the code to handle the stack
might be a bit tedious. -John]

Re: PALM challenge

<22-10-005@comp.compilers>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=565&group=comp.compilers#565

 copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: gah...@u.washington.edu (gah4)
Newsgroups: comp.compilers
Subject: Re: PALM challenge
Date: Sat, 1 Oct 2022 17:09:53 -0700 (PDT)
Organization: Compilers Central
Lines: 16
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-10-005@comp.compilers>
References: <22-10-001@comp.compilers>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="14918"; mail-complaints-to="abuse@iecc.com"
Keywords: architecture, history
Posted-Date: 01 Oct 2022 21:35:17 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
In-Reply-To: <22-10-001@comp.compilers>
 by: gah4 - Sun, 2 Oct 2022 00:09 UTC

On Saturday, October 1, 2022 at 12:16:25 PM UTC-7, lewi...@gmail.com wrote:
> Lots of new CPUs, sure.

> But let's explore an old CPU: the 1975 PALM.

> I'm looking for anyone interested to explore the idea. Maybe prove how
> robust modern tools are at adapting C, by exploring this ancient instruction
> set.

My favorite for adapting C to new (or old) hardware is LCC.

You only have to rewrite the code generator, and it has a code generator
generator to make it easier. The usual case, as with many Unix C
compilers, is to write out assembly code, and feed it to an assembler.

Since you already have an assembler, it should be pretty fast.

Re: PALM challenge

<22-10-011@comp.compilers>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=568&group=comp.compilers#568

 copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.compilers
Subject: Re: PALM challenge
Date: Sun, 2 Oct 2022 20:13:42 -0000 (UTC)
Organization: news.netcologne.de
Lines: 19
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-10-011@comp.compilers>
References: <22-10-001@comp.compilers>
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="74503"; mail-complaints-to="abuse@iecc.com"
Keywords: architecture, history
Posted-Date: 02 Oct 2022 20:58:29 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
 by: Thomas Koenig - Sun, 2 Oct 2022 20:13 UTC

Steve Lewis <lewissa78@gmail.com> schrieb:
> Lots of new CPUs, sure.
>
> But let's explore an old CPU: the 1975 PALM. ...

> [Architecture described here http://computermuseum.informatik.uni-stuttgart.de/dev/ibm_5110/technik/en/
> It doesn't look like it would be all that bad as a target for C although the code to handle the stack
> might be a bit tedious. -John]

Interesting having 16-bit integers but only an 8-bit ALU, where
a carry for addition is added to the upper bit, would need a few
instrucions for a 16-bit addtion. It would be straightforward
to write out such an instruction sequence each time a 16-bit
addition was required, though.
[IBM programmed the PALM to simulate most of S/360 to run APL\360 and
the System/3 mini to run the BASIC interpreter, both I assume hand
coded in assembler. It was a tour de force at the time. I agree that
generating code for C doesn't look hard, just tedious. -John]

Re: PALM challenge

<22-10-016@comp.compilers>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=571&group=comp.compilers#571

 copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: gah...@u.washington.edu (gah4)
Newsgroups: comp.compilers
Subject: Re: PALM challenge
Date: Mon, 3 Oct 2022 04:37:01 -0700 (PDT)
Organization: Compilers Central
Lines: 39
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-10-016@comp.compilers>
References: <22-10-001@comp.compilers> <22-10-011@comp.compilers>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="43224"; mail-complaints-to="abuse@iecc.com"
Keywords: history, translator, comment
Posted-Date: 03 Oct 2022 15:17:47 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
In-Reply-To: <22-10-011@comp.compilers>
 by: gah4 - Mon, 3 Oct 2022 11:37 UTC

On Sunday, October 2, 2022 at 5:58:33 PM UTC-7, Thomas Koenig wrote:

(snip)
> Interesting having 16-bit integers but only an 8-bit ALU, where
> a carry for addition is added to the upper bit, would need a few
> instrucions for a 16-bit addtion. It would be straightforward
> to write out such an instruction sequence each time a 16-bit
> addition was required, though.

The small ALU was usual at the time. The 360/30 and 360/40 both
have an 8 bit ALU, but implement the usual 32 bit S/360. It just
takes more microinstructions, and so more time. They even
implement the S/360 double precision 64 bit hexadecimal
floating point with that 8 bit ALU.

The 360/20 has a four bit ALU that only can add or subtract 1.
Binary or BCD 4 bit arithmetic is done in a microcode subroutine
loop, which is then called to implement larger operations.
It includes the full S/360 decimal instruction set, with up to 31
digit operands, including multiply and divide. But no 32 bit
binary instructions and no floating point.

As well as I know it, the ALU runs parity all the way though, so given
two 8 bit operands plus parity, it generates the 8 bit sum, or other
operation, with parity.

> [IBM programmed the PALM to simulate most of S/360 to run APL\360 and
> the System/3 mini to run the BASIC interpreter, both I assume hand
> coded in assembler. It was a tour de force at the time. I agree that
> generating code for C doesn't look hard, just tedious. -John]

The description I thought I remembered was, instead of interpreting
the user level instructions, like usual for microcoded machines,
they are compiled into microcode. If you have a microcode subroutine
call instruction, you write the code for the larger operations once,
and then call the micro-subroutine.
[Pretty sure the 5100 didn't do that due to its modest speed and memory.
There are certainly modern JIT translators. Apple's Rosetta works that way.
Fun fact: 360/30 long floating divide took 1.6ms and I don't mean us. -John]

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor