Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Depends on how you define "always". :-) -- Larry Wall in <199710211647.JAA17957@wall.org>


devel / comp.arch / Re: Did orthogonality save chip area?

SubjectAuthor
* Did orthogonality save chip area?Russell Wallace
+- Re: Did orthogonality save chip area?MitchAlsup
+* Re: Did orthogonality save chip area?Kent Dickey
|+- Re: Did orthogonality save chip area?Thomas Koenig
|+* Re: Did orthogonality save chip area?Scott Lurndal
||`- Re: Did orthogonality save chip area?Kent Dickey
|`* Re: Did orthogonality save chip area?Anton Ertl
| `* Re: Did orthogonality save chip area?EricP
|  +- Re: Did orthogonality save chip area?JimBrakefield
|  `* Re: Did orthogonality save chip area?Anton Ertl
|   `- Re: Did orthogonality save chip area?EricP
`- Re: Did orthogonality save chip area?MitchAlsup

1
Did orthogonality save chip area?

<a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=33500&group=comp.arch#33500

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ad4:58ed:0:b0:635:e17b:1c81 with SMTP id di13-20020ad458ed000000b00635e17b1c81mr9436qvb.3.1690413728166; Wed, 26 Jul 2023 16:22:08 -0700 (PDT)
X-Received: by 2002:a05:6830:6607:b0:6b8:70f3:fd36 with SMTP id cp7-20020a056830660700b006b870f3fd36mr1703331otb.2.1690413727975; Wed, 26 Jul 2023 16:22:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!69.80.99.11.MISMATCH!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 26 Jul 2023 16:22:07 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2a02:8084:601f:9880:f188:36de:dae5:bac4; posting-account=f4I3oAkAAABDSN7-E4aFhBpEX3HML7-_
NNTP-Posting-Host: 2a02:8084:601f:9880:f188:36de:dae5:bac4
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com>
Subject: Did orthogonality save chip area?
From: russell.wallace@gmail.com (Russell Wallace)
Injection-Date: Wed, 26 Jul 2023 23:22:08 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 40
 by: Russell Wallace - Wed, 26 Jul 2023 23:22 UTC

I'm trying to understand the constraints that went into the design of early microprocessors, and one of the questions I have is about orthogonality.

To be specific, say it's the 1970s and you are designing a CPU in the Z80 class. ~1e4 transistor budget, not ultra-minimalist like the 6502, you want some moderately complex instructions in the hope of achieving both speed and code density. As usual for that class of CPU, that time, the data bus is 8 bits and the address bus is 16 bits.

Does it save chip area to have an orthogonal register bank?

Say you have eight registers of 16 bits each. One of them is the stack pointer, and one of them is the instruction pointer.

Of course, if a descendent of the architecture lives into the era of out of order CPUs, having the instruction pointer be a general-purpose register will be a headache! But say you aren't thinking about that, say you are only concerned about the cost and performance of the initial implementation.

It seems to me that it would make sense to say, okay, the hardware provides a small repertoire of operations, like 'add a number to a 16-bit register' or 'Store two bytes at the address pointed to by a 16-bit register'. Then the microcode chains these into sequences of operations.

So a subroutine call, for example: subtract 2 from the stack pointer; store the current instruction pointer at the address pointed to by the stack pointer, load the instruction pointer from the address currently pointed to by the instruction pointer.

All straightforward microcode, /if/ SP and IP are general purpose registers, each designated by a 3-bit register number. But if they aren't, then it gets more complicated, and you have to spend chip area providing additional basic operations.

But I'm a programmer not a hardware engineer, so my intuition about what makes efficient hardware, is not necessarily reliable, and the 8080 and Z80 did not make the IP a general purpose register; maybe they had good reasons for that.

What are the trade-offs about orthogonality? Am I mistaken about the benefits, or missing costs?

Re: Did orthogonality save chip area?

<87116e0e-e988-4d2f-ab90-10575a5cbb92n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=33501&group=comp.arch#33501

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a0c:c349:0:b0:63c:edce:c71e with SMTP id j9-20020a0cc349000000b0063cedcec71emr5338qvi.3.1690420429078;
Wed, 26 Jul 2023 18:13:49 -0700 (PDT)
X-Received: by 2002:a05:6808:1891:b0:3a4:1082:9e5 with SMTP id
bi17-20020a056808189100b003a4108209e5mr2637937oib.2.1690420428559; Wed, 26
Jul 2023 18:13:48 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 26 Jul 2023 18:13:48 -0700 (PDT)
In-Reply-To: <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:9051:b8b1:3e11:16;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:9051:b8b1:3e11:16
References: <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <87116e0e-e988-4d2f-ab90-10575a5cbb92n@googlegroups.com>
Subject: Re: Did orthogonality save chip area?
From: MitchAlsup@aol.com (MitchAlsup)
Injection-Date: Thu, 27 Jul 2023 01:13:49 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 80
 by: MitchAlsup - Thu, 27 Jul 2023 01:13 UTC

On Wednesday, July 26, 2023 at 6:22:09 PM UTC-5, Russell Wallace wrote:
> I'm trying to understand the constraints that went into the design of early microprocessors, and one of the questions I have is about orthogonality.
>
> To be specific, say it's the 1970s and you are designing a CPU in the Z80 class. ~1e4 transistor budget, not ultra-minimalist like the 6502, you want some moderately complex instructions in the hope of achieving both speed and code density. As usual for that class of CPU, that time, the data bus is 8 bits and the address bus is 16 bits.
>
> Does it save chip area to have an orthogonal register bank?
<
You have to remember that in early MOS design, there was only 1 layer of low resistance wiring (aluminum) and 2 non-independent layers of medium resistance wiring; and finally that when the first of these second layers crosses over the third, you have a transistor--what kind of transistor is determined by how the gate and how the source-dram regions are "doped".
<
Given (realistically) only these 3 layers:: yes absolutely regularity was a key to getting things done. But the regularity was all on those second two layers (poly and diffusion) and the metal looks regular because of what it needed to connect as a wire.
>
> Say you have eight registers of 16 bits each. One of them is the stack pointer, and one of them is the instruction pointer.
>
> Of course, if a descendent of the architecture lives into the era of out of order CPUs, having the instruction pointer be a general-purpose register will be a headache! But say you aren't thinking about that, say you are only concerned about the cost and performance of the initial implementation.
<
This is such an easy problem to solve:: you build a comparitor that looks at register operand specifiers and decides if is the IP or some other register. IP = {special wiring, or special sequence, or if microcoded--proceed normally}.
<
But, here, you will have 6 layers of metal, polysilicon has become low-resistance (1Ohm/square), you have transitioned from PMOS to NMOS to CMOS and from 3µ to 60nm. Your die has gone from "about as big as we can yield in the reticle, to smaller than a single I/O pad area.
>
> It seems to me that it would make sense to say, okay, the hardware provides a small repertoire of operations, like 'add a number to a 16-bit register' or 'Store two bytes at the address pointed to by a 16-bit register'. Then the microcode chains these into sequences of operations. {{or just run RISC ISA}}
>
> So a subroutine call, for example: subtract 2 from the stack pointer; store the current instruction pointer at the address pointed to by the stack pointer, load the instruction pointer from the address currently pointed to by the instruction pointer.
>
> All straightforward microcode,
<
A straightforward sequence -- no µCode needed.
<
>/if/ SP and IP are general purpose registers, each designated by a 3-bit register number. But if they aren't, then it gets more complicated, and you have to spend chip area providing additional basic operations.
<
Realistically, you need the same paths whether {SP, IP} are part of RF or separate from RF. Instruction encoding can cause the designer to lean either way.
>
> But I'm a programmer not a hardware engineer, so my intuition about what makes efficient hardware, is not necessarily reliable, and the 8080 and Z80 did not make the IP a general purpose register; maybe they had good reasons for that.
<
PDP 11 did.
>
> What are the trade-offs about orthogonality? Am I mistaken about the benefits, or missing costs?
<
The perceived costs are different when you are at 4+cycles per instruction than when you are at 4+instructions per cycle.
The costs are definitely different when the FETCH stream uses the same AGEN unit as the DATA stream.

Re: Did orthogonality save chip area?

<ucb41e$6nir$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=33815&group=comp.arch#33815

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kegs@provalid.com (Kent Dickey)
Newsgroups: comp.arch
Subject: Re: Did orthogonality save chip area?
Date: Fri, 25 Aug 2023 20:47:42 -0000 (UTC)
Organization: provalid.com
Lines: 67
Message-ID: <ucb41e$6nir$1@dont-email.me>
References: <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com>
Injection-Date: Fri, 25 Aug 2023 20:47:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f999acd8661a37d1ddca274bfa341208";
logging-data="220763"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+JUPCnrP/EWeVUwZ7LfznO"
Cancel-Lock: sha1:VQJO8XkzgC2xw1ZzjKl+ts9Z1Fw=
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
Originator: kegs@provalid.com (Kent Dickey)
 by: Kent Dickey - Fri, 25 Aug 2023 20:47 UTC

In article <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com>,
Russell Wallace <russell.wallace@gmail.com> wrote:
>I'm trying to understand the constraints that went into the design of
>early microprocessors, and one of the questions I have is about
>orthogonality.
>
>To be specific, say it's the 1970s and you are designing a CPU in the
>Z80 class. ~1e4 transistor budget, not ultra-minimalist like the 6502,
>you want some moderately complex instructions in the hope of achieving
>both speed and code density. As usual for that class of CPU, that time,
>the data bus is 8 bits and the address bus is 16 bits.
>
>Does it save chip area to have an orthogonal register bank?
>
>Say you have eight registers of 16 bits each. One of them is the stack
>pointer, and one of them is the instruction pointer.
>
>Of course, if a descendent of the architecture lives into the era of out
>of order CPUs, having the instruction pointer be a general-purpose
>register will be a headache! But say you aren't thinking about that, say
>you are only concerned about the cost and performance of the initial
>implementation.
>
>It seems to me that it would make sense to say, okay, the hardware
>provides a small repertoire of operations, like 'add a number to a
>16-bit register' or 'Store two bytes at the address pointed to by a
>16-bit register'. Then the microcode chains these into sequences of
>operations.
>
>So a subroutine call, for example: subtract 2 from the stack pointer;
>store the current instruction pointer at the address pointed to by the
>stack pointer, load the instruction pointer from the address currently
>pointed to by the instruction pointer.
>
>All straightforward microcode, /if/ SP and IP are general purpose
>registers, each designated by a 3-bit register number. But if they
>aren't, then it gets more complicated, and you have to spend chip area
>providing additional basic operations.
>
>But I'm a programmer not a hardware engineer, so my intuition about what
>makes efficient hardware, is not necessarily reliable, and the 8080 and
>Z80 did not make the IP a general purpose register; maybe they had good
>reasons for that.
>
>What are the trade-offs about orthogonality? Am I mistaken about the
>benefits, or missing costs?

Mitch answered parts of your question.

First, it's important to realize in the 1976-1982 era, things were changing
fast. Something that didn't make sense in 1976 could be a good idea in 1979.

But to a first approximation, early CPUs were organized around their ALU.
And having orthogonal operations on the registers doesn't help much. The
logic to drive custom registers living spread out to the ALU is pretty
similar to the logic to read from an 8 entry "register file" (merely because
there were no tools to make a register file, so you did it by hand).
Not everyone got the same tools--some folks were doing very manual work
by the mid 1980's whereas others had much more involved tools by then.
Everything was a potential competitive advantage.

Early CPUs used one-byte opcodes (with additional bytes for operands), and
no one was going to encode two 3-bit registers in a one-byte instruction.
So non-orthogonal was the style, and why some operations could only
happen on some registers.

Kent

Re: Did orthogonality save chip area?

<ucb5ka$2u2gu$1@newsreader4.netcologne.de>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=33816&group=comp.arch#33816

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd4-f2a7-0-6b23-875f-bb68-360a.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Did orthogonality save chip area?
Date: Fri, 25 Aug 2023 21:14:50 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <ucb5ka$2u2gu$1@newsreader4.netcologne.de>
References: <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com>
<ucb41e$6nir$1@dont-email.me>
Injection-Date: Fri, 25 Aug 2023 21:14:50 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd4-f2a7-0-6b23-875f-bb68-360a.ipv6dyn.netcologne.de:2001:4dd4:f2a7:0:6b23:875f:bb68:360a";
logging-data="3082782"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Fri, 25 Aug 2023 21:14 UTC

Kent Dickey <kegs@provalid.com> schrieb:

> Early CPUs used one-byte opcodes (with additional bytes for operands),

I assume you mean early microprocessors.

Early CPUs used a wide variety of opcode sizes: The IBM 701 had 18-bit
instructions with five-bit opcodes, for example.

Re: Did orthogonality save chip area?

<Vu9GM.803951$TPw2.281893@fx17.iad>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=33818&group=comp.arch#33818

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Did orthogonality save chip area?
Newsgroups: comp.arch
References: <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com> <ucb41e$6nir$1@dont-email.me>
Lines: 89
Message-ID: <Vu9GM.803951$TPw2.281893@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Fri, 25 Aug 2023 21:59:17 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Fri, 25 Aug 2023 21:59:17 GMT
X-Received-Bytes: 4815
 by: Scott Lurndal - Fri, 25 Aug 2023 21:59 UTC

kegs@provalid.com (Kent Dickey) writes:
>In article <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com>,
>Russell Wallace <russell.wallace@gmail.com> wrote:
>>I'm trying to understand the constraints that went into the design of
>>early microprocessors, and one of the questions I have is about
>>orthogonality.
>>
>>To be specific, say it's the 1970s and you are designing a CPU in the
>>Z80 class. ~1e4 transistor budget, not ultra-minimalist like the 6502,
>>you want some moderately complex instructions in the hope of achieving
>>both speed and code density. As usual for that class of CPU, that time,
>>the data bus is 8 bits and the address bus is 16 bits.
>>
>>Does it save chip area to have an orthogonal register bank?
>>
>>Say you have eight registers of 16 bits each. One of them is the stack
>>pointer, and one of them is the instruction pointer.
>>
>>Of course, if a descendent of the architecture lives into the era of out
>>of order CPUs, having the instruction pointer be a general-purpose
>>register will be a headache! But say you aren't thinking about that, say
>>you are only concerned about the cost and performance of the initial
>>implementation.
>>
>>It seems to me that it would make sense to say, okay, the hardware
>>provides a small repertoire of operations, like 'add a number to a
>>16-bit register' or 'Store two bytes at the address pointed to by a
>>16-bit register'. Then the microcode chains these into sequences of
>>operations.
>>
>>So a subroutine call, for example: subtract 2 from the stack pointer;
>>store the current instruction pointer at the address pointed to by the
>>stack pointer, load the instruction pointer from the address currently
>>pointed to by the instruction pointer.
>>
>>All straightforward microcode, /if/ SP and IP are general purpose
>>registers, each designated by a 3-bit register number. But if they
>>aren't, then it gets more complicated, and you have to spend chip area
>>providing additional basic operations.
>>
>>But I'm a programmer not a hardware engineer, so my intuition about what
>>makes efficient hardware, is not necessarily reliable, and the 8080 and
>>Z80 did not make the IP a general purpose register; maybe they had good
>>reasons for that.
>>
>>What are the trade-offs about orthogonality? Am I mistaken about the
>>benefits, or missing costs?
>
>Mitch answered parts of your question.
>
>First, it's important to realize in the 1976-1982 era, things were changing
>fast. Something that didn't make sense in 1976 could be a good idea in 1979.
>
>But to a first approximation, early CPUs were organized around their ALU.
>And having orthogonal operations on the registers doesn't help much.

In that era, most early CPUs had at most one register (an accumulator, e.g. PDP8),
and several had no registers for general arithmentic operational use, supporting
instead operations directly on memory (eg.g the Electrodata and early Burroughs
BCD machines, IBM 1401), or were stack based like the B5500 and successors.

>Early CPUs used one-byte opcodes (with additional bytes for operands), and
>no one was going to encode two 3-bit registers in a one-byte instruction.
>So non-orthogonal was the style, and why some operations could only
>happen on some registers.

B3500, for example (Electrodata 220, B300 were similar)

OP AF BF AAAAAA BBBBBB CCCCCC

2-digit (1 byte) opcode, 2 digit A operand length (00 to 99 units of digits
or bytes depending, where 00 = 100), a 2 digit B operand length (") and two or
three operand syllables (6 digit memory address).

02 05 16 000100 000200 000300

Would add a 5 digit field at address 100 to a 16 digit
field at address 200 and store it in a 16-digit field
at address 300.

The B300 (circa 1960) was designed with all instructions supporting
three operands, even if the instruction opcode only required one
or two operands - the programmer was encouraged to use the unused
operand fields in the instruction stream for data storage....

The B3500 had an accumulator register for fixed point arithmetic,
but wasn't widely used by the COBOL code that ran on the machine.

Re: Did orthogonality save chip area?

<ucbq9v$dt00$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=33820&group=comp.arch#33820

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kegs@provalid.com (Kent Dickey)
Newsgroups: comp.arch
Subject: Re: Did orthogonality save chip area?
Date: Sat, 26 Aug 2023 03:07:43 -0000 (UTC)
Organization: provalid.com
Lines: 97
Message-ID: <ucbq9v$dt00$1@dont-email.me>
References: <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com> <ucb41e$6nir$1@dont-email.me> <Vu9GM.803951$TPw2.281893@fx17.iad>
Injection-Date: Sat, 26 Aug 2023 03:07:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="08a1e215ee5a1ab545ae319328012473";
logging-data="455680"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189uJLptju17oh3bv4pckqW"
Cancel-Lock: sha1:f1Ptg5OTTy2BYsaE/tYpnK0hxvw=
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
Originator: kegs@provalid.com (Kent Dickey)
 by: Kent Dickey - Sat, 26 Aug 2023 03:07 UTC

In article <Vu9GM.803951$TPw2.281893@fx17.iad>,
Scott Lurndal <slp53@pacbell.net> wrote:
>kegs@provalid.com (Kent Dickey) writes:
>>In article <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com>,
>>Russell Wallace <russell.wallace@gmail.com> wrote:
>>>I'm trying to understand the constraints that went into the design of
>>>early microprocessors, and one of the questions I have is about
>>>orthogonality.
>>>
>>>To be specific, say it's the 1970s and you are designing a CPU in the
>>>Z80 class. ~1e4 transistor budget, not ultra-minimalist like the 6502,
>>>you want some moderately complex instructions in the hope of achieving
>>>both speed and code density. As usual for that class of CPU, that time,
>>>the data bus is 8 bits and the address bus is 16 bits.
>>>
>>>Does it save chip area to have an orthogonal register bank?
>>>
>>>Say you have eight registers of 16 bits each. One of them is the stack
>>>pointer, and one of them is the instruction pointer.
>>>
>>>Of course, if a descendent of the architecture lives into the era of out
>>>of order CPUs, having the instruction pointer be a general-purpose
>>>register will be a headache! But say you aren't thinking about that, say
>>>you are only concerned about the cost and performance of the initial
>>>implementation.
>>>
>>>It seems to me that it would make sense to say, okay, the hardware
>>>provides a small repertoire of operations, like 'add a number to a
>>>16-bit register' or 'Store two bytes at the address pointed to by a
>>>16-bit register'. Then the microcode chains these into sequences of
>>>operations.
>>>
>>>So a subroutine call, for example: subtract 2 from the stack pointer;
>>>store the current instruction pointer at the address pointed to by the
>>>stack pointer, load the instruction pointer from the address currently
>>>pointed to by the instruction pointer.
>>>
>>>All straightforward microcode, /if/ SP and IP are general purpose
>>>registers, each designated by a 3-bit register number. But if they
>>>aren't, then it gets more complicated, and you have to spend chip area
>>>providing additional basic operations.
>>>
>>>But I'm a programmer not a hardware engineer, so my intuition about what
>>>makes efficient hardware, is not necessarily reliable, and the 8080 and
>>>Z80 did not make the IP a general purpose register; maybe they had good
>>>reasons for that.
>>>
>>>What are the trade-offs about orthogonality? Am I mistaken about the
>>>benefits, or missing costs?
>>
>>Mitch answered parts of your question.
>>
>>First, it's important to realize in the 1976-1982 era, things were changing
>>fast. Something that didn't make sense in 1976 could be a good idea in 1979.
>>
>>But to a first approximation, early CPUs were organized around their ALU.
>>And having orthogonal operations on the registers doesn't help much.
>
>In that era, most early CPUs had at most one register (an accumulator,
>e.g. PDP8),
>and several had no registers for general arithmentic operational use, supporting
>instead operations directly on memory (eg.g the Electrodata and early Burroughs
>BCD machines, IBM 1401), or were stack based like the B5500 and successors.
>
>
>
>>Early CPUs used one-byte opcodes (with additional bytes for operands), and
>>no one was going to encode two 3-bit registers in a one-byte instruction.
>>So non-orthogonal was the style, and why some operations could only
>>happen on some registers.
>
>B3500, for example (Electrodata 220, B300 were similar)
>
> OP AF BF AAAAAA BBBBBB CCCCCC
>
>2-digit (1 byte) opcode, 2 digit A operand length (00 to 99 units of digits
>or bytes depending, where 00 = 100), a 2 digit B operand length (") and two or
>three operand syllables (6 digit memory address).
>
> 02 05 16 000100 000200 000300
>
>Would add a 5 digit field at address 100 to a 16 digit
>field at address 200 and store it in a 16-digit field
>at address 300.
>
>The B300 (circa 1960) was designed with all instructions supporting
>three operands, even if the instruction opcode only required one
>or two operands - the programmer was encouraged to use the unused
>operand fields in the instruction stream for data storage....
>
>The B3500 had an accumulator register for fixed point arithmetic,
>but wasn't widely used by the COBOL code that ran on the machine.

Those are not Z80 class microprocessors from the 1970s. They are not
even microprocessors. IBM mainframes of the time did not use microprocessors.

Kent

Re: Did orthogonality save chip area?

<2023Aug26.075954@mips.complang.tuwien.ac.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=33821&group=comp.arch#33821

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Did orthogonality save chip area?
Date: Sat, 26 Aug 2023 05:59:54 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 40
Message-ID: <2023Aug26.075954@mips.complang.tuwien.ac.at>
References: <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com> <ucb41e$6nir$1@dont-email.me>
Injection-Info: dont-email.me; posting-host="b02cd02e31fbad78b0ada88de58dd681";
logging-data="507870"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18PV5ddZe3Ym0zZAoikY35Z"
Cancel-Lock: sha1:wFW+VVqaFR6G9SD3/EzT37IXAno=
X-newsreader: xrn 10.11
 by: Anton Ertl - Sat, 26 Aug 2023 05:59 UTC

kegs@provalid.com (Kent Dickey) writes:
[8-bit microprocessors]
>Early CPUs used one-byte opcodes (with additional bytes for operands), and
>no one was going to encode two 3-bit registers in a one-byte instruction.
>So non-orthogonal was the style, and why some operations could only
>happen on some registers.

Yes. Some time ago some of us explored the idea of what we would do
if we were in 1975 or so (with the transistor/area budget for the 6502
or maybe the Z80, and, of course, with an 8-bit data bus), but with
today's knowledge about computer architecture.

What I found was that, with a 6502 transistor budget, you could not
afford many registers and even fewer 16-bit registers. With a Z80
transistor budget, that restriction is more relaxed (and maybe you
could afford a 16-bit ALU; but does that really save much if you are
limited by an 8-bit data bus?), but you are very limited in the
instruction encoding:

If you use 16-bit instructions for, say, a load/store-architecture
with 8 16-bit registers, every instruction takes two memory cycles to
load, and it uses 2 bytes of the precious memory. And people
programmed these CPUs in assembly language, and humans are quite good
at dealing with non-orthogonal instructions (even though they usually
prefer orthogonal). So it was better to provide a bunch of dedicated
registers that are implicit in the instructions.

An interesting example is the 8086, designed for a 16-bit data bus,
but with an 8-bit legacy. It has orthogonal instructions for common
operations that can deal with all 8 registers and all the (limited)
addressing modes, somewhat in the PDP-11 style, but it also has
instructions like lods where all registers are implicit. You can see
a modern result of this in SectorLisp: IIRC it uses LODSW when it
wants to increment SI by 2, because LODSW uses only one byte, whereas
"ADD SI,2" uses more.

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: Did orthogonality save chip area?

<GZnGM.457115$xMqa.359651@fx12.iad>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=33826&group=comp.arch#33826

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx12.iad.POSTED!not-for-mail
From: ThatWouldBeTelling@thevillage.com (EricP)
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
Newsgroups: comp.arch
Subject: Re: Did orthogonality save chip area?
References: <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com> <ucb41e$6nir$1@dont-email.me> <2023Aug26.075954@mips.complang.tuwien.ac.at>
In-Reply-To: <2023Aug26.075954@mips.complang.tuwien.ac.at>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 48
Message-ID: <GZnGM.457115$xMqa.359651@fx12.iad>
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Sat, 26 Aug 2023 14:27:50 UTC
Date: Sat, 26 Aug 2023 10:27:33 -0400
X-Received-Bytes: 3044
 by: EricP - Sat, 26 Aug 2023 14:27 UTC

Anton Ertl wrote:
> kegs@provalid.com (Kent Dickey) writes:
> [8-bit microprocessors]
>> Early CPUs used one-byte opcodes (with additional bytes for operands), and
>> no one was going to encode two 3-bit registers in a one-byte instruction.
>> So non-orthogonal was the style, and why some operations could only
>> happen on some registers.
>
> Yes. Some time ago some of us explored the idea of what we would do
> if we were in 1975 or so (with the transistor/area budget for the 6502
> or maybe the Z80, and, of course, with an 8-bit data bus), but with
> today's knowledge about computer architecture.
>
> What I found was that, with a 6502 transistor budget, you could not
> afford many registers and even fewer 16-bit registers. With a Z80
> transistor budget, that restriction is more relaxed (and maybe you
> could afford a 16-bit ALU; but does that really save much if you are
> limited by an 8-bit data bus?), but you are very limited in the
> instruction encoding:
>
> If you use 16-bit instructions for, say, a load/store-architecture
> with 8 16-bit registers, every instruction takes two memory cycles to
> load, and it uses 2 bytes of the precious memory. And people
> programmed these CPUs in assembly language, and humans are quite good
> at dealing with non-orthogonal instructions (even though they usually
> prefer orthogonal). So it was better to provide a bunch of dedicated
> registers that are implicit in the instructions.
>
> An interesting example is the 8086, designed for a 16-bit data bus,
> but with an 8-bit legacy. It has orthogonal instructions for common
> operations that can deal with all 8 registers and all the (limited)
> addressing modes, somewhat in the PDP-11 style, but it also has
> instructions like lods where all registers are implicit. You can see
> a modern result of this in SectorLisp: IIRC it uses LODSW when it
> wants to increment SI by 2, because LODSW uses only one byte, whereas
> "ADD SI,2" uses more.
>
> - anton

By coincidence, Ken Shirriffs blog has a recent article which traces the
instructions from the Datapoint 2200, to 8008, to 8080, to 8086.

Tracing the roots of the 8086 instruction set to the
Datapoint 2200 minicomputer
http://www.righto.com/2023/08/datapoint-to-8086.html

Re: Did orthogonality save chip area?

<93657fa1-5748-4a4b-b6cd-9548b6e7fa2cn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=33854&group=comp.arch#33854

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:483:b0:76d:c77f:cf0b with SMTP id 3-20020a05620a048300b0076dc77fcf0bmr576971qkr.9.1693186256084;
Sun, 27 Aug 2023 18:30:56 -0700 (PDT)
X-Received: by 2002:a17:902:ecd1:b0:1bd:ca21:c64 with SMTP id
a17-20020a170902ecd100b001bdca210c64mr8674305plh.6.1693186255723; Sun, 27 Aug
2023 18:30:55 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sun, 27 Aug 2023 18:30:55 -0700 (PDT)
In-Reply-To: <GZnGM.457115$xMqa.359651@fx12.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=136.50.14.162; posting-account=AoizIQoAAADa7kQDpB0DAj2jwddxXUgl
NNTP-Posting-Host: 136.50.14.162
References: <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com>
<ucb41e$6nir$1@dont-email.me> <2023Aug26.075954@mips.complang.tuwien.ac.at> <GZnGM.457115$xMqa.359651@fx12.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <93657fa1-5748-4a4b-b6cd-9548b6e7fa2cn@googlegroups.com>
Subject: Re: Did orthogonality save chip area?
From: jim.brakefield@ieee.org (JimBrakefield)
Injection-Date: Mon, 28 Aug 2023 01:30:56 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 57
 by: JimBrakefield - Mon, 28 Aug 2023 01:30 UTC

On Saturday, August 26, 2023 at 9:27:55 AM UTC-5, EricP wrote:
> Anton Ertl wrote:
> > ke...@provalid.com (Kent Dickey) writes:
> > [8-bit microprocessors]
> >> Early CPUs used one-byte opcodes (with additional bytes for operands), and
> >> no one was going to encode two 3-bit registers in a one-byte instruction.
> >> So non-orthogonal was the style, and why some operations could only
> >> happen on some registers.
> >
> > Yes. Some time ago some of us explored the idea of what we would do
> > if we were in 1975 or so (with the transistor/area budget for the 6502
> > or maybe the Z80, and, of course, with an 8-bit data bus), but with
> > today's knowledge about computer architecture.
> >
> > What I found was that, with a 6502 transistor budget, you could not
> > afford many registers and even fewer 16-bit registers. With a Z80
> > transistor budget, that restriction is more relaxed (and maybe you
> > could afford a 16-bit ALU; but does that really save much if you are
> > limited by an 8-bit data bus?), but you are very limited in the
> > instruction encoding:
> >
> > If you use 16-bit instructions for, say, a load/store-architecture
> > with 8 16-bit registers, every instruction takes two memory cycles to
> > load, and it uses 2 bytes of the precious memory. And people
> > programmed these CPUs in assembly language, and humans are quite good
> > at dealing with non-orthogonal instructions (even though they usually
> > prefer orthogonal). So it was better to provide a bunch of dedicated
> > registers that are implicit in the instructions.
> >
> > An interesting example is the 8086, designed for a 16-bit data bus,
> > but with an 8-bit legacy. It has orthogonal instructions for common
> > operations that can deal with all 8 registers and all the (limited)
> > addressing modes, somewhat in the PDP-11 style, but it also has
> > instructions like lods where all registers are implicit. You can see
> > a modern result of this in SectorLisp: IIRC it uses LODSW when it
> > wants to increment SI by 2, because LODSW uses only one byte, whereas
> > "ADD SI,2" uses more.
> >
> > - anton
> By coincidence, Ken Shirriffs blog has a recent article which traces the
> instructions from the Datapoint 2200, to 8008, to 8080, to 8086.
>
> Tracing the roots of the 8086 instruction set to the
> Datapoint 2200 minicomputer
> http://www.righto.com/2023/08/datapoint-to-8086.html

This is marvelous.
Illustrates the x86 ISA history in full, incremental detail
|>Tracing the roots of the 8086 instruction set to the
|>Datapoint 2200 minicomputer

Re: Did orthogonality save chip area?

<2023Aug28.111225@mips.complang.tuwien.ac.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=33856&group=comp.arch#33856

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Did orthogonality save chip area?
Date: Mon, 28 Aug 2023 09:12:25 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 112
Message-ID: <2023Aug28.111225@mips.complang.tuwien.ac.at>
References: <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com> <ucb41e$6nir$1@dont-email.me> <2023Aug26.075954@mips.complang.tuwien.ac.at> <GZnGM.457115$xMqa.359651@fx12.iad>
Injection-Info: dont-email.me; posting-host="8ce4325bd9df033944ba17b95e5b9d20";
logging-data="1770597"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/V0BNpyjriz0+Ins2/BdU0"
Cancel-Lock: sha1:ATSIZko/c0xD245NzcidQPIMEbA=
X-newsreader: xrn 10.11
 by: Anton Ertl - Mon, 28 Aug 2023 09:12 UTC

EricP <ThatWouldBeTelling@thevillage.com> writes:
>Anton Ertl wrote:
>> An interesting example is the 8086, designed for a 16-bit data bus,
>> but with an 8-bit legacy. It has orthogonal instructions for common
>> operations that can deal with all 8 registers and all the (limited)
>> addressing modes, somewhat in the PDP-11 style, but it also has
>> instructions like lods where all registers are implicit. You can see
>> a modern result of this in SectorLisp: IIRC it uses LODSW when it
>> wants to increment SI by 2, because LODSW uses only one byte, whereas
>> "ADD SI,2" uses more.
>>
>> - anton
>
>By coincidence, Ken Shirriffs blog has a recent article which traces the
>instructions from the Datapoint 2200, to 8008, to 8080, to 8086.
>
>Tracing the roots of the 8086 instruction set to the
>Datapoint 2200 minicomputer
>http://www.righto.com/2023/08/datapoint-to-8086.html

Yes, very interesting. And looking at this posting and the 8080
instructions, I partially retract my claim above:

First of all, many of the instructions with implicit registers were
introduced with the 8086 instead of coming from the 8080 legacy,
in particular including the LODS instructions mentioned above.

However, the orthogonal instructions on the 8080 were much more
limited than on the 8086: on the 8080 you can do (in 8086 syntax):

add al, src
add al, imm

where src could be one of ch, cl, dh, dl, bh, bl, [bx], or al.

By contrast, on the 8086 this cabability was extended to

add reg, r/m
add r/m, reg

with byte or word width, in PDP-11 style. There are also encodings
for

add al/ax, imm
add r/m, imm

for the different widths.

For the memory operands we have an evolution towards more
orthogonality:

Datapoint 2200-Intel 8080: [BX] (in 8086 syntax)
8086: [bx/bp+si/di]+disp, [bx/bp/si/di]+disp, or absolute addressing.
IA-32: disp(reg), disp(reg,reg,1/2/4/8)

where on IA-32 you could use any register (except for minor
limitations on ESP).

The Datapoint 2200->8080 evolution is an interesting contrast to what we
see in the 6800 and its offspring:

The 8080 just has register, immediate, and indirect; I don't even see
absolute addressing in the instruction table for the 8080.

The 6800 has

addr8/addr16 direct/extended absolute
disp8,IX (index, only 8-bit displacement allowed, IX is 16-bit)

The 6502 is supposedly minimal, and it reduced the two accumulators
of the 6800 to one accumulator, and replaced the one 16-bit index
register IX with two 8-bit index registers X and Y. But the 6502 has
a lot of addressing modes. For the adc instruction (with one operand
and the destination in the accumulator), the addressing modes are:

addr8/addr16 zero-page/absolute
immediate
disp16,x/y EA=disp16+x/y
disp8,x EA=disp8+x
(disp8,x) tmp16=disp8+x, EA=[tmp16]
(addr8),y tmp16=[addr8], EA=tmp16+y

There are some other addressing modes used in other instructions:

disp8,y EA=disp8+y
(addr16) EA=[addr16]
offset8 PC-relative, EA=PC+offset8 (probably also in 6800)

The other notable descendant of the 6800 is the 6809, which also
provided many addressing modes:

PC-relative long and short
absolute direct and extended as on 6800
extended indirect EA=[addr16]
disp,X/Y/U/S constant-offset indexed
A/B/D,X/Y/U/S accumulator indexed
,X/Y/U/S+/++ autoincrement indexed
,-/--X/Y/U/S autodecrement indexed
[indexed] indirect indexed
PC-relative not just for branch instructions

The indirect indexed modes just add an indirection behind one of the
indexed addressing modes.

I wonder how much of this richness of addressing modes would have been
added to the 6809 if the 6502 had not existed or would have been
unsuccessful.

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: Did orthogonality save chip area?

<3PmHM.104210$VPEa.22114@fx33.iad>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=33866&group=comp.arch#33866

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx33.iad.POSTED!not-for-mail
From: ThatWouldBeTelling@thevillage.com (EricP)
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
Newsgroups: comp.arch
Subject: Re: Did orthogonality save chip area?
References: <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com> <ucb41e$6nir$1@dont-email.me> <2023Aug26.075954@mips.complang.tuwien.ac.at> <GZnGM.457115$xMqa.359651@fx12.iad> <2023Aug28.111225@mips.complang.tuwien.ac.at>
In-Reply-To: <2023Aug28.111225@mips.complang.tuwien.ac.at>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 161
Message-ID: <3PmHM.104210$VPEa.22114@fx33.iad>
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Tue, 29 Aug 2023 13:57:19 UTC
Date: Tue, 29 Aug 2023 09:56:16 -0400
X-Received-Bytes: 6922
 by: EricP - Tue, 29 Aug 2023 13:56 UTC

Anton Ertl wrote:
> EricP <ThatWouldBeTelling@thevillage.com> writes:
>> Anton Ertl wrote:
>>> An interesting example is the 8086, designed for a 16-bit data bus,
>>> but with an 8-bit legacy. It has orthogonal instructions for common
>>> operations that can deal with all 8 registers and all the (limited)
>>> addressing modes, somewhat in the PDP-11 style, but it also has
>>> instructions like lods where all registers are implicit. You can see
>>> a modern result of this in SectorLisp: IIRC it uses LODSW when it
>>> wants to increment SI by 2, because LODSW uses only one byte, whereas
>>> "ADD SI,2" uses more.
>>>
>>> - anton
>> By coincidence, Ken Shirriffs blog has a recent article which traces the
>> instructions from the Datapoint 2200, to 8008, to 8080, to 8086.
>>
>> Tracing the roots of the 8086 instruction set to the
>> Datapoint 2200 minicomputer
>> http://www.righto.com/2023/08/datapoint-to-8086.html
>
> Yes, very interesting. And looking at this posting and the 8080
> instructions, I partially retract my claim above:
>
> First of all, many of the instructions with implicit registers were
> introduced with the 8086 instead of coming from the 8080 legacy,
> in particular including the LODS instructions mentioned above.
>
> However, the orthogonal instructions on the 8080 were much more
> limited than on the 8086: on the 8080 you can do (in 8086 syntax):
>
> add al, src
> add al, imm
>
> where src could be one of ch, cl, dh, dl, bh, bl, [bx], or al.
>
> By contrast, on the 8086 this cabability was extended to
>
> add reg, r/m
> add r/m, reg
>
> with byte or word width, in PDP-11 style. There are also encodings
> for
>
> add al/ax, imm
> add r/m, imm
>
> for the different widths.
>
> For the memory operands we have an evolution towards more
> orthogonality:
>
> Datapoint 2200-Intel 8080: [BX] (in 8086 syntax)
> 8086: [bx/bp+si/di]+disp, [bx/bp/si/di]+disp, or absolute addressing.
> IA-32: disp(reg), disp(reg,reg,1/2/4/8)
>
> where on IA-32 you could use any register (except for minor
> limitations on ESP).
>
> The Datapoint 2200->8080 evolution is an interesting contrast to what we
> see in the 6800 and its offspring:
>
> The 8080 just has register, immediate, and indirect; I don't even see
> absolute addressing in the instruction table for the 8080.

Yes, but 8080 doesn't have any register indirect + offset addressing either
so you have to build such accesses.

So a ptr->field [reg+disp] memory access winds up as something like
LDA [abs16] // ptr.l
ADI #offset.l
MOV L,A
LDA [abs16] // ptr.h
ADI #offset.h
MOV H,A
MOV A,M

7 instructions for one 8-bit ptr->field read where ptr is a global address.
Even more if ptr was an arg on the stack.

8080 also doesn't have relative branches, just absolute jump/call
to a 16-bit immediate or a HL register value.

Basically you assemble the whole program each time, starting at a fixed
base address, the one where your EPROM's are hard-wired on the motherboard.
That's ok because you can only afford 2kB of EPROM memory and 1kB of DRAM.

This is mostly a consequence of having a 8-bit opcode and 8 registers.
So all of its opcode space is taken up with 3-bit register specifiers.

(My 8-bit ISA also has 8 general registers but more addressing modes.
The key is the dual-accumulator approach, borrowed from 6800.)

> The 6800 has
>
> addr8/addr16 direct/extended absolute
> disp8,IX (index, only 8-bit displacement allowed, IX is 16-bit)

6800 also had relative branch/call.

And it had the two accumulators, and only 4 general registers.
The two accumulators was also important because all ALU operations
are of the form A = A OP B where all registers are implicit.
So it had the opcode space to afford more and fancier addressing modes.

> The 6502 is supposedly minimal, and it reduced the two accumulators
> of the 6800 to one accumulator, and replaced the one 16-bit index
> register IX with two 8-bit index registers X and Y. But the 6502 has
> a lot of addressing modes. For the adc instruction (with one operand
> and the destination in the accumulator), the addressing modes are:
>
> addr8/addr16 zero-page/absolute
> immediate
> disp16,x/y EA=disp16+x/y
> disp8,x EA=disp8+x
> (disp8,x) tmp16=disp8+x, EA=[tmp16]
> (addr8),y tmp16=[addr8], EA=tmp16+y
>
> There are some other addressing modes used in other instructions:
>
> disp8,y EA=disp8+y
> (addr16) EA=[addr16]
> offset8 PC-relative, EA=PC+offset8 (probably also in 6800)
>
> The other notable descendant of the 6800 is the 6809, which also
> provided many addressing modes:
>
> PC-relative long and short
> absolute direct and extended as on 6800
> extended indirect EA=[addr16]
> disp,X/Y/U/S constant-offset indexed
> A/B/D,X/Y/U/S accumulator indexed
> ,X/Y/U/S+/++ autoincrement indexed
> ,-/--X/Y/U/S autodecrement indexed
> [indexed] indirect indexed
> PC-relative not just for branch instructions
>
> The indirect indexed modes just add an indirection behind one of the
> indexed addressing modes.
>
> I wonder how much of this richness of addressing modes would have been
> added to the 6809 if the 6502 had not existed or would have been
> unsuccessful.
>
> - anton

I built systems with the 8080, the 6800, and RCA 1802. I knew of the 6502
but never worked with it. Of the 8080, 6800 and 6502, the 8080 was the
most primitive, both from a software and hardware point of view.
The hardware interface for 8080 was just a pain.
The 6800 was a pleasure to work with.

I designed my own 8-bit ISA which also had 8 16-bit registers but I
borrowed the 6800's dual accumulator idea, also called A and B.
Having two accumulators is an advantage for an 8-bit ISA because the
ALU operations are the form A = A OP B where the registers are implicit.
This frees up all that opcode space for more addressing modes and even
a few 16-bit operations, more of a LD/ST ISA.

Re: Did orthogonality save chip area?

<fd40d164-9aa8-496c-aeb1-a0b0aac2c311n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=33883&group=comp.arch#33883

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:64f:b0:3df:375:5102 with SMTP id a15-20020a05622a064f00b003df03755102mr7389qtb.2.1693505512210;
Thu, 31 Aug 2023 11:11:52 -0700 (PDT)
X-Received: by 2002:a63:b553:0:b0:569:450d:cf3d with SMTP id
u19-20020a63b553000000b00569450dcf3dmr84896pgo.6.1693505512007; Thu, 31 Aug
2023 11:11:52 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!2.eu.feeder.erje.net!feeder.erje.net!fdn.fr!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Thu, 31 Aug 2023 11:11:51 -0700 (PDT)
In-Reply-To: <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:963:822f:f45:992c;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:963:822f:f45:992c
References: <a9b8478f-f179-410a-8bf5-431ef45b53ecn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fd40d164-9aa8-496c-aeb1-a0b0aac2c311n@googlegroups.com>
Subject: Re: Did orthogonality save chip area?
From: MitchAlsup@aol.com (MitchAlsup)
Injection-Date: Thu, 31 Aug 2023 18:11:52 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: MitchAlsup - Thu, 31 Aug 2023 18:11 UTC

Going back to the original question::

On Wednesday, July 26, 2023 at 6:22:09 PM UTC-5, Russell Wallace wrote:
> I'm trying to understand the constraints that went into the design of early microprocessors, and one of the questions I have is about orthogonality.
>
> To be specific, say it's the 1970s and you are designing a CPU in the Z80 class. ~1e4 transistor budget, not ultra-minimalist like the 6502, you want some moderately complex instructions in the hope of achieving both speed and code density. As usual for that class of CPU, that time, the data bus is 8 bits and the address bus is 16 bits.
>
> Does it save chip area to have an orthogonal register bank?
>
> Say you have eight registers of 16 bits each. One of them is the stack pointer, and one of them is the instruction pointer.
<
It saves chip area but it costs performance. At a 1E4 transistor count this will be a wash. At a 1E6 transistor count it will start hurting.
>
> Of course, if a descendent of the architecture lives into the era of out of order CPUs, having the instruction pointer be a general-purpose register will be a headache! But say you aren't thinking about that, say you are only concerned about the cost and performance of the initial implementation.
<
It harms future performance while making the original design easier in some regards, and harder in others. ALA PDP-11
>
> It seems to me that it would make sense to say, okay, the hardware provides a small repertoire of operations, like 'add a number to a 16-bit register' or 'Store two bytes at the address pointed to by a 16-bit register'. Then the microcode chains these into sequences of operations.
<
Chains is not the right word, there; performs is a more resonable choice.
>
> So a subroutine call, for example: subtract 2 from the stack pointer; store the current instruction pointer at the address pointed to by the stack pointer, load the instruction pointer from the address currently pointed to by the instruction pointer.
>
> All straightforward microcode, /if/ SP and IP are general purpose registers, each designated by a 3-bit register number. But if they aren't, then it gets more complicated, and you have to spend chip area providing additional basic operations.
<
What is more complicated (takes more control bits) writing directly to a vector of flip flops, or writing to a specific vector of flips flops in an array of flip flops ?? No modern general purpose architecture has chosen to place the IP in the register file--mainly because one needs the IP every cycle to fetch the next instructions and reading and writing into a register file for this requires more ports in the RF, and adds latency to this calculation (FETCH) loop.
>
> But I'm a programmer not a hardware engineer, so my intuition about what makes efficient hardware, is not necessarily reliable, and the 8080 and Z80 did not make the IP a general purpose register; maybe they had good reasons for that.
>
> What are the trade-offs about orthogonality? Am I mistaken about the benefits, or missing costs?
<
The trade offs are different at the several cycles per instruction than at the several instructions per cycle realms.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor