Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Support bacteria -- it's the only culture some people have!


devel / comp.arch / Re: Around the bike shed: Instruction names and assembler syntax

SubjectAuthor
* Around the bike shed: Instruction names and assembler syntaxThomas Koenig
+- Re: Around the bike shed: Instruction names and assembler syntaxTerje Mathisen
+* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|+- Re: Around the bike shed: Instruction names and assembler syntaxStephen Fuld
|+* Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
||`* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|| `* Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
||  `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
||   +* Re: Around the bike shed: Instruction names and assembler syntaxTerje Mathisen
||   |`- Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
||   `* Fortran for The Mill (was: Around the bike shed: Instruction namesThomas Koenig
||    `- Re: Fortran for The Mill (was: Around the bike shed: InstructionIvan Godard
|`* Re: Around the bike shed: Instruction names and assembler syntaxJohn Levine
| +- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
| +* Re: Around the bike shed: Instruction names and assembler syntaxEricP
| |`* Re: Around the bike shed: Instruction names and assembler syntaxJohn Levine
| | `* Re: Around the bike shed: Instruction names and assembler syntaxEricP
| |  `- Re: high and higner level assemblers, was Around the bike shed: Instruction nameJohn Levine
| `* Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
|  `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|   `* Re: Around the bike shed: Instruction names and assembler syntaxNiklas Holsti
|    `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|     `* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      +* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |`* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      | `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |  `* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      |   +- Re: Around the bike shed: Instruction names and assembler syntaxTerje Mathisen
|      |   `* Re: Around the bike shed: Instruction names and assembler syntaxStefan Monnier
|      |    +- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |    `* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      |     `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |      `* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      |       `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |        `* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      |         +* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |         |+* Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
|      |         ||+* Re: Around the bike shed: Instruction names and assembler syntaxTim Rentsch
|      |         |||`* Re: Around the bike shed: Instruction names and assembler syntaxJohn Levine
|      |         ||| +- Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|      |         ||| `- Re: Around the bike shed: Instruction names and assembler syntaxTim Rentsch
|      |         ||`- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |         |`* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      |         | `- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |         `* Re: Around the bike shed: Instruction names and assembler syntaxTim Rentsch
|      |          +* Re: Around the bike shed: Instruction names and assembler syntaxStefan Monnier
|      |          |`- Re: Around the bike shed: Instruction names and assembler syntaxTim Rentsch
|      |          `* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      |           +- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      |           `* Re: Around the bike shed: Instruction names and assembler syntaxTim Rentsch
|      |            `- Re: Around the bike shed: Instruction names and assembler syntaxStefan Monnier
|      +* Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
|      |`* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      | +* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      | |+* Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
|      | ||`* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      | || +- Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
|      | || `* Re: Around the bike shed: Instruction names and assembler syntaxJohn Levine
|      | ||  `- Re: Around the bike shed: Instruction names and assembler syntaxNiklas Holsti
|      | |`* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      | | `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      | |  `* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      | |   `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      | |    `- Re: Around the bike shed: Instruction names and assembler syntaxTerje Mathisen
|      | +- Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
|      | +* Re: Around the bike shed: Instruction names and assembler syntaxNiklas Holsti
|      | |`* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|      | | `- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|      | `* Re: Around the bike shed: Instruction names and assembler syntaxTerje Mathisen
|      |  `- Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
|      `* Re: Around the bike shed: Instruction names and assembler syntaxTim Rentsch
|       +* Re: Around the bike shed: Instruction names and assembler syntaxNiklas Holsti
|       |`* Re: Around the bike shed: Instruction names and assembler syntaxTim Rentsch
|       | `* Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
|       |  +* Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  |+* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|       |  ||+* Re: Around the bike shed: Instruction names and assembler syntaxEricP
|       |  |||+- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|       |  |||`* Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
|       |  ||| +* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|       |  ||| |+* Re: Around the bike shed: Instruction names and assembler syntaxNiklas Holsti
|       |  ||| ||+* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|       |  ||| |||`* Re: Around the bike shed: Instruction names and assembler syntaxTerje Mathisen
|       |  ||| ||| +- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|       |  ||| ||| `- Re: Around the bike shed: Instruction names and assembler syntaxStefan Monnier
|       |  ||| ||`* Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  ||| || `* Re: Around the bike shed: Instruction names and assembler syntaxNiklas Holsti
|       |  ||| ||  +* Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  ||| ||  |`* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|       |  ||| ||  | `* Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  ||| ||  |  `- Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|       |  ||| ||  `- Re: Around the bike shed: Instruction names and assembler syntaxEricP
|       |  ||| |+- Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
|       |  ||| |`- Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  ||| `- Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  ||+- Re: Around the bike shed: Instruction names and assembler syntaxStephen Fuld
|       |  ||+* Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  |||+* Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
|       |  ||||`* Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  |||| +* Re: Around the bike shed: Instruction names and assembler syntaxTom Gardner
|       |  |||| |+* Re: Around the bike shed: Instruction names and assembler syntaxDavid Brown
|       |  |||| |`- Re: Around the bike shed: Instruction names and assembler syntaxStefan Monnier
|       |  |||| `* Re: Around the bike shed: Instruction names and assembler syntaxIvan Godard
|       |  |||`- Re: Around the bike shed: Instruction names and assembler syntaxTerje Mathisen
|       |  ||`* Re: Around the bike shed: Instruction names and assembler syntaxAnton Ertl
|       |  |`- Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
|       |  `- Re: Around the bike shed: Instruction names and assembler syntaxTim Rentsch
|       +* Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig
|       `* Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
+- Re: Around the bike shed: Instruction names and assembler syntaxStefan Monnier
+* Re: Around the bike shed: Instruction names and assembler syntaxMitchAlsup
+* Re: Around the bike shed: Instruction names and assembler syntaxJames Van Buskirk
+- Re: Around the bike shed: Instruction names and assembler syntaxBGB
`* Re: Around the bike shed: Instruction names and assembler syntaxThomas Koenig

Pages:12345678910
Re: Around the bike shed: Instruction names and assembler syntax

<t05evu$52b$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sfu...@alumni.cmu.edu.invalid (Stephen Fuld)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Mon, 7 Mar 2022 09:22:05 -0800
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <t05evu$52b$1@dont-email.me>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de>
<nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<lYOdnWGA3onVN73_nZ2dnUU7-RnNnZ2d@supernews.com> <svr3l5$18b$1@dont-email.me>
<a3033fd1-881d-47c5-a340-de6236f40311n@googlegroups.com>
<t03glf$e98$1@dont-email.me>
<632875fd-ece4-4dc1-ba36-4d4cfc283533n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 7 Mar 2022 17:22:06 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="0c66aff54dfd5d1fa3826ed4065e5d6e";
logging-data="5195"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19sgkFcfCMqiSqD+igNaI9WJAFtn8q8b+I="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.2
Cancel-Lock: sha1:kV0FuSAr1NcPDt5TF+4QNo34FZE=
In-Reply-To: <632875fd-ece4-4dc1-ba36-4d4cfc283533n@googlegroups.com>
Content-Language: en-US
 by: Stephen Fuld - Mon, 7 Mar 2022 17:22 UTC

On 3/6/2022 4:49 PM, MitchAlsup wrote:
> On Sunday, March 6, 2022 at 5:38:27 PM UTC-6, Stephen Fuld wrote:

snip

>> I apologize that I fear I am not expressing this clearly. :-( I want to
>> have a "master" task that say gets work requests from some external
>> source and then sends the requests to the appropriate "slave" task, then
>> returns to potentially get another request before the first one is
>> finished. (Assuming multiple cores or equivalent.)
> <
> You want Send message not Message call. Send message is also used
> for ADA rendezvous, Deferred Procedure Calls, Soft_IRQs, and basically
> anything one thread wants another thread to perform, with threads only
> operating at its own defined priority and only on cores it has affinity. Send
> can also be used to setup co-routines between multiple threads each
> manipulating their own state machine to coordinate individual activities.

Good. Just to check my understanding, "Send" sends a message to some
other task, then returns immediately to the sending task? That seems
clean for the send side.

But a few questions about the receiving side (let me abbreviate it RS).
How does RS indicate it is ready to receive a message? If the RS is
"busy" when someone sends it a message, is the message queued somewhere?
If so, can the RS "inspect" the queue or at least tell if there is
one? There are a lot of scenarios that people might want, and I want to
see how they are accommodated.

--
- Stephen Fuld
(e-mail address disguised to prevent spam)

Re: Around the bike shed: Instruction names and assembler syntax

<9e7dc34a-4eb5-40e4-b83f-ed49e1095418n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:500f:b0:435:796b:7c62 with SMTP id jo15-20020a056214500f00b00435796b7c62mr6824455qvb.12.1646674512067;
Mon, 07 Mar 2022 09:35:12 -0800 (PST)
X-Received: by 2002:a05:6870:f2a5:b0:da:b3f:2b50 with SMTP id
u37-20020a056870f2a500b000da0b3f2b50mr6706342oap.239.1646674511812; Mon, 07
Mar 2022 09:35:11 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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: Mon, 7 Mar 2022 09:35:11 -0800 (PST)
In-Reply-To: <WfpVJ.96200$Lbb6.40450@fx45.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:e9ee:3df:f03b:70f9;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:e9ee:3df:f03b:70f9
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de> <nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<oLf*yP-Hy@news.chiark.greenend.org.uk> <svprsc$buf$1@newsreader4.netcologne.de>
<2022Mar3.130732@mips.complang.tuwien.ac.at> <Uy4UJ.91086$Lbb6.86739@fx45.iad>
<e348105a-d9c8-4dda-a843-14e403ad804fn@googlegroups.com> <EUbUJ.32421$dln7.10284@fx03.iad>
<1f1b31df-b5dd-490f-b2fe-138444616650n@googlegroups.com> <plMUJ.35998$mF2.6634@fx11.iad>
<t006du$2f1$1@dont-email.me> <WfpVJ.96200$Lbb6.40450@fx45.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9e7dc34a-4eb5-40e4-b83f-ed49e1095418n@googlegroups.com>
Subject: Re: Around the bike shed: Instruction names and assembler syntax
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Mon, 07 Mar 2022 17:35:12 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 56
 by: MitchAlsup - Mon, 7 Mar 2022 17:35 UTC

On Monday, March 7, 2022 at 9:10:49 AM UTC-6, EricP wrote:
> Ivan Godard wrote:
> >
> > In all the discussion here about STM/LDM here I have yet to see a case
> > where the address of the location wasn't the same for every use, or
> > could be the same with a little rearranging of the call protocol. But if
> > the address is always static known, why not fold the action into some
> > other instruction and do it lazy?
<
struct xyz function( struct xyz a);
{}
<
xyzarray[k] = function( xyzarray[k] );
<
MUL R25,Ri,sizeof(struct xyz)
LDM R1,[Rxyzarray+R25]
CALL function
STM R1,[Rxyzarray+R25]
<
note: pass by value, return by value.
> >
> > Have I overlooked some usecase?
> It sounds like you are suggesting that the effective address of the
> save/restore block be implied by LDM/STM. I think that is too constrained
> as in each of the following it is a software specified decision.
<
This implication, in my opinion, can be done for prologue and epilogue
but basically not for anything else.
<
>
> - kernel and/or user mode thread switch
<
Note: My 66000 does not have the CPU change threads by executing
instructions........
<
> - setjmp,longjmp
<
I got ENTER and EXIT to do this.
<
> - user mode exception/signal handler entry,exit
<
Note: My 66000 does not need code to save/restore state as
control arrives at or leaves from various "handlers".
<
> - languages with structured exception handling, try...catch
> need to spill all the dynamic registers before entry so the handler,
> if triggered, has a known location to pick variables up.
<
ENTER and EXIT again.
>
> For example, does the structured exception handler prologue spill
> to the current frame FP-relative or stack SP-relative? At what offset?
<
Why not spill the registers to their permanent in-memory locations ?
<
> And if SP-relative is the save area allocated earlier or on demand?
> All of those design decisions are implementation specific.

Re: Around the bike shed: Instruction names and assembler syntax

<369bc250-9ea8-43ac-8ff1-c84df13b8f60n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:d241:0:b0:67b:3360:3644 with SMTP id f62-20020a37d241000000b0067b33603644mr2355923qkj.274.1646674569587;
Mon, 07 Mar 2022 09:36:09 -0800 (PST)
X-Received: by 2002:a05:6808:1912:b0:2d9:a01a:4877 with SMTP id
bf18-20020a056808191200b002d9a01a4877mr2061oib.194.1646674569296; Mon, 07 Mar
2022 09:36:09 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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: Mon, 7 Mar 2022 09:36:09 -0800 (PST)
In-Reply-To: <%upVJ.46116$mF2.13431@fx11.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:e9ee:3df:f03b:70f9;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:e9ee:3df:f03b:70f9
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <svd280$fiv$1@dont-email.me>
<svh2tg$j53$1@gal.iecc.com> <svj2ki$q0p$4@newsreader4.netcologne.de>
<svjblm$idv$1@dont-email.me> <j8666pFh0klU1@mid.individual.net>
<svl27r$r8m$1@dont-email.me> <2022Mar1.133629@mips.complang.tuwien.ac.at>
<864k4bf8yv.fsf@linuxsc.com> <j8k20sF6k96U1@mid.individual.net>
<86mti2ekig.fsf@linuxsc.com> <749c68b2-8394-413d-9ce7-3e929637b392n@googlegroups.com>
<t04g2j$7ip$1@dont-email.me> <t056q0$hom$1@dont-email.me> <%upVJ.46116$mF2.13431@fx11.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <369bc250-9ea8-43ac-8ff1-c84df13b8f60n@googlegroups.com>
Subject: Re: Around the bike shed: Instruction names and assembler syntax
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Mon, 07 Mar 2022 17:36:09 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 18
 by: MitchAlsup - Mon, 7 Mar 2022 17:36 UTC

On Monday, March 7, 2022 at 9:26:55 AM UTC-6, EricP wrote:
> Ivan Godard wrote:
> > On 3/7/2022 12:34 AM, David Brown wrote:
> >>
> >> Extra parenthesis makes things abundantly clear at a glance - the reader
> >> can be in no doubt. They are useful for operators that are relatively
> >> rarely used or rarely used in particular combinations, but they are also
> >> useful to give the reader an idea of how you are building up the
> >> expression logically. Maybe "(a + b) + (c + d)" gives the reader more
> >> information than just "a + b + c + d". Making code clear to read - so
> >> that the compiler and the reader are in sync - is vital.
> >
> > Which is why having no precedence at all, just lexical order on the
> > page, gets rid of all the problems.
> Ah but then we will have the left-endians and the right-endians,
> and heretics will still abound!
<
Is there any room for a middle-endian ? That is start from the middle
and progress outwards in both directions simultaneously.

Re: Around the bike shed: Instruction names and assembler syntax

<127620d4-7617-4ccc-935f-f71b4581b187n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ad4:5d64:0:b0:42c:3f9f:a154 with SMTP id fn4-20020ad45d64000000b0042c3f9fa154mr9316998qvb.26.1646674783012;
Mon, 07 Mar 2022 09:39:43 -0800 (PST)
X-Received: by 2002:a05:6870:f297:b0:c5:570:32da with SMTP id
u23-20020a056870f29700b000c5057032damr30242oap.106.1646674782778; Mon, 07 Mar
2022 09:39:42 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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: Mon, 7 Mar 2022 09:39:42 -0800 (PST)
In-Reply-To: <t05evu$52b$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:e9ee:3df:f03b:70f9;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:e9ee:3df:f03b:70f9
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de> <nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<lYOdnWGA3onVN73_nZ2dnUU7-RnNnZ2d@supernews.com> <svr3l5$18b$1@dont-email.me>
<a3033fd1-881d-47c5-a340-de6236f40311n@googlegroups.com> <t03glf$e98$1@dont-email.me>
<632875fd-ece4-4dc1-ba36-4d4cfc283533n@googlegroups.com> <t05evu$52b$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <127620d4-7617-4ccc-935f-f71b4581b187n@googlegroups.com>
Subject: Re: Around the bike shed: Instruction names and assembler syntax
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Mon, 07 Mar 2022 17:39:43 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 36
 by: MitchAlsup - Mon, 7 Mar 2022 17:39 UTC

On Monday, March 7, 2022 at 11:22:09 AM UTC-6, Stephen Fuld wrote:
> On 3/6/2022 4:49 PM, MitchAlsup wrote:
> > On Sunday, March 6, 2022 at 5:38:27 PM UTC-6, Stephen Fuld wrote:
> snip
> >> I apologize that I fear I am not expressing this clearly. :-( I want to
> >> have a "master" task that say gets work requests from some external
> >> source and then sends the requests to the appropriate "slave" task, then
> >> returns to potentially get another request before the first one is
> >> finished. (Assuming multiple cores or equivalent.)
> > <
> > You want Send message not Message call. Send message is also used
> > for ADA rendezvous, Deferred Procedure Calls, Soft_IRQs, and basically
> > anything one thread wants another thread to perform, with threads only
> > operating at its own defined priority and only on cores it has affinity. Send
> > can also be used to setup co-routines between multiple threads each
> > manipulating their own state machine to coordinate individual activities.
> Good. Just to check my understanding, "Send" sends a message to some
> other task, then returns immediately to the sending task? That seems
> clean for the send side.
>
> But a few questions about the receiving side (let me abbreviate it RS).
> How does RS indicate it is ready to receive a message? If the RS is
> "busy" when someone sends it a message, is the message queued somewhere?
<
Queued.
<
> If so, can the RS "inspect" the queue or at least tell if there is one?
<
There is an instruction whereby RS would ask if the queue is non-empty.
But I am still working in this domain of the architecture. I want to
accommodate ADA semantics.
<
< There are a lot of scenarios that people might want, and I want to
> see how they are accommodated.
> --
> - Stephen Fuld
> (e-mail address disguised to prevent spam)

Re: Around the bike shed: Instruction names and assembler syntax

<%ArVJ.105807$aT3.4954@fx09.iad>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx09.iad.POSTED!not-for-mail
From: ThatWoul...@thevillage.com (EricP)
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <memo.20220226104336.7708a@jgd.cix.co.uk> <svgqq7$cll$1@newsreader4.netcologne.de> <nLf*r48Hy@news.chiark.greenend.org.uk> <ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me> <lYOdnWGA3onVN73_nZ2dnUU7-RnNnZ2d@supernews.com> <svr3l5$18b$1@dont-email.me> <a3033fd1-881d-47c5-a340-de6236f40311n@googlegroups.com> <t03glf$e98$1@dont-email.me> <632875fd-ece4-4dc1-ba36-4d4cfc283533n@googlegroups.com> <t05evu$52b$1@dont-email.me> <127620d4-7617-4ccc-935f-f71b4581b187n@googlegroups.com>
In-Reply-To: <127620d4-7617-4ccc-935f-f71b4581b187n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 41
Message-ID: <%ArVJ.105807$aT3.4954@fx09.iad>
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Mon, 07 Mar 2022 17:49:47 UTC
Date: Mon, 07 Mar 2022 12:49:32 -0500
X-Received-Bytes: 3300
 by: EricP - Mon, 7 Mar 2022 17:49 UTC

MitchAlsup wrote:
> On Monday, March 7, 2022 at 11:22:09 AM UTC-6, Stephen Fuld wrote:
>> On 3/6/2022 4:49 PM, MitchAlsup wrote:
>>> On Sunday, March 6, 2022 at 5:38:27 PM UTC-6, Stephen Fuld wrote:
>> snip
>>>> I apologize that I fear I am not expressing this clearly. :-( I want to
>>>> have a "master" task that say gets work requests from some external
>>>> source and then sends the requests to the appropriate "slave" task, then
>>>> returns to potentially get another request before the first one is
>>>> finished. (Assuming multiple cores or equivalent.)
>>> <
>>> You want Send message not Message call. Send message is also used
>>> for ADA rendezvous, Deferred Procedure Calls, Soft_IRQs, and basically
>>> anything one thread wants another thread to perform, with threads only
>>> operating at its own defined priority and only on cores it has affinity. Send
>>> can also be used to setup co-routines between multiple threads each
>>> manipulating their own state machine to coordinate individual activities.
>> Good. Just to check my understanding, "Send" sends a message to some
>> other task, then returns immediately to the sending task? That seems
>> clean for the send side.
>>
>> But a few questions about the receiving side (let me abbreviate it RS).
>> How does RS indicate it is ready to receive a message? If the RS is
>> "busy" when someone sends it a message, is the message queued somewhere?
> <
> Queued.
> <
>> If so, can the RS "inspect" the queue or at least tell if there is one?
> <
> There is an instruction whereby RS would ask if the queue is non-empty.
> But I am still working in this domain of the architecture. I want to
> accommodate ADA semantics.
> <
> < There are a lot of scenarios that people might want, and I want to
>> see how they are accommodated.

By the way, synchronous Ada rendezvous allows deadlock.
I haven't looked at it but I believe deadlock detection
between arbitrary tasks is a traveling salesman problem.

Re: Around the bike shed: Instruction names and assembler syntax

<t05gs7$8g1$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Mon, 7 Mar 2022 09:54:16 -0800
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <t05gs7$8g1$1@dont-email.me>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<svd280$fiv$1@dont-email.me> <svh2tg$j53$1@gal.iecc.com>
<svj2ki$q0p$4@newsreader4.netcologne.de> <svjblm$idv$1@dont-email.me>
<j8666pFh0klU1@mid.individual.net> <svl27r$r8m$1@dont-email.me>
<2022Mar1.133629@mips.complang.tuwien.ac.at> <864k4bf8yv.fsf@linuxsc.com>
<j8k20sF6k96U1@mid.individual.net> <86mti2ekig.fsf@linuxsc.com>
<749c68b2-8394-413d-9ce7-3e929637b392n@googlegroups.com>
<t04g2j$7ip$1@dont-email.me> <t056q0$hom$1@dont-email.me>
<%upVJ.46116$mF2.13431@fx11.iad>
<369bc250-9ea8-43ac-8ff1-c84df13b8f60n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 7 Mar 2022 17:54:15 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="993e743fddc9c24b4517a045a96596b6";
logging-data="8705"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX193d8e2zCgd2wg6OIxlE0aa"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Cancel-Lock: sha1:y5T02wYz43Qa0KiJff24F54PGAM=
In-Reply-To: <369bc250-9ea8-43ac-8ff1-c84df13b8f60n@googlegroups.com>
Content-Language: en-US
 by: Ivan Godard - Mon, 7 Mar 2022 17:54 UTC

On 3/7/2022 9:36 AM, MitchAlsup wrote:
> On Monday, March 7, 2022 at 9:26:55 AM UTC-6, EricP wrote:
>> Ivan Godard wrote:
>>> On 3/7/2022 12:34 AM, David Brown wrote:
>>>>
>>>> Extra parenthesis makes things abundantly clear at a glance - the reader
>>>> can be in no doubt. They are useful for operators that are relatively
>>>> rarely used or rarely used in particular combinations, but they are also
>>>> useful to give the reader an idea of how you are building up the
>>>> expression logically. Maybe "(a + b) + (c + d)" gives the reader more
>>>> information than just "a + b + c + d". Making code clear to read - so
>>>> that the compiler and the reader are in sync - is vital.
>>>
>>> Which is why having no precedence at all, just lexical order on the
>>> page, gets rid of all the problems.
>> Ah but then we will have the left-endians and the right-endians,
>> and heretics will still abound!
> <
> Is there any room for a middle-endian ? That is start from the middle
> and progress outwards in both directions simultaneously.

No languages that I know of are middle-endian in that sense. However
several switch directions at each line: l2r->r2l->l2r->etc, an endless
snake.

Re: Around the bike shed: Instruction names and assembler syntax

<uSrVJ.46122$mF2.25802@fx11.iad>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx11.iad.POSTED!not-for-mail
From: ThatWoul...@thevillage.com (EricP)
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <memo.20220226104336.7708a@jgd.cix.co.uk> <svgqq7$cll$1@newsreader4.netcologne.de> <nLf*r48Hy@news.chiark.greenend.org.uk> <ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me> <oLf*yP-Hy@news.chiark.greenend.org.uk> <svprsc$buf$1@newsreader4.netcologne.de> <2022Mar3.130732@mips.complang.tuwien.ac.at> <Uy4UJ.91086$Lbb6.86739@fx45.iad> <2022Mar5.183421@mips.complang.tuwien.ac.at> <xH5VJ.57841$oF2.18867@fx10.iad> <q3k*BGyIy@news.chiark.greenend.org.uk>
In-Reply-To: <q3k*BGyIy@news.chiark.greenend.org.uk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 53
Message-ID: <uSrVJ.46122$mF2.25802@fx11.iad>
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Mon, 07 Mar 2022 18:08:26 UTC
Date: Mon, 07 Mar 2022 13:08:26 -0500
X-Received-Bytes: 3912
 by: EricP - Mon, 7 Mar 2022 18:08 UTC

Theo wrote:
> EricP <ThatWouldBeTelling@thevillage.com> wrote:
>> Anton Ertl wrote:
>>> For the current implementation technology (with separate I-cache) and
>>> renamed registers with register port limits, the architects designed
>>> ldp/stp.
>>>
>>> In 1983, with no caches, and instructions competing with data for RAM
>>> access, LDM/STM worked nicely, not just for function
>>> prologue/epilogue, but also for copying and initializing large memory
>>> blocks.
>> The original ARM1 and later commercial ARMv3 aka ARM6 didn't use microcode
>> for LDM/STM. The register save/restore set was specified by a 16-bit mask
>> and the control sequencer selects the registers with a priority encoder.
>>
>> You can see in the attached micrograph of the ARM1 the priority encoder,
>> which is only present to support LDM/STM, at the top of the picture takes
>> as much chip area as the whole rest of the decoder.
>>
>> http://www.righto.com/2016/02/reverse-engineering-arm1-instruction.html
>>
>> On ARM1 LDM/STM were by far the most HW expensive instructions and
>> (just guessing) probably remained so even after they added
>> MUL instructions which likely used Booth's shift-add.
>
> The reason for this is that it made optimal use of DRAM bandwidth, being
> essentially burst read/write operation. At the start of the LDM/STM you did
> a row select, and then you only needed a column select for each subsequent
> 32-bit value being transferred (unless you wrapped off the end of a row).
> In a MIPS style machine you'd be doing a full DRAM fetch (two cycles) each
> time *and* you'd be doing an instruction fetch (from DRAM, another two
> cycles), which would mean four cycles for every 32 bit transferred rather
> than one. This was probably a good contribution to ARM2's competitiveness.
>
> These days with caches the calculus has changed: instruction fetches from
> cache are 'free' (no DRAM cycles) and bursting from cache makes life
> complicated when you're crossing cache lines/page boundaries. Hence
> load/store pair and vector instructions sit at different tradeoff points.
>
> Theo

Yes, that makes sense.
Even for a mid-80's TTL DRAM controller I would be
surprised if it didn't have same-row detection.
Its a few latches and xors.

So you are saying that because LDM/STM do a single instruction fetch,
then a sequence of data addresses, it allows same-row detection
and just a column address strobe CAS will do.
For a sequence of individual LD or ST, the instruction addresses
would most likely be to a different row than their data addresses
so same-row detect doesn't kick in, and requires full RAS and CAS.

Re: Around the bike shed: Instruction names and assembler syntax

<j8n3j6FojdnU1@mid.individual.net>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.h...@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Mon, 7 Mar 2022 21:09:25 +0200
Organization: Tidorum Ltd
Lines: 35
Message-ID: <j8n3j6FojdnU1@mid.individual.net>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<svd280$fiv$1@dont-email.me> <svh2tg$j53$1@gal.iecc.com>
<svj2ki$q0p$4@newsreader4.netcologne.de> <svjblm$idv$1@dont-email.me>
<j8666pFh0klU1@mid.individual.net> <svl27r$r8m$1@dont-email.me>
<2022Mar1.133629@mips.complang.tuwien.ac.at> <864k4bf8yv.fsf@linuxsc.com>
<j8k20sF6k96U1@mid.individual.net> <86mti2ekig.fsf@linuxsc.com>
<749c68b2-8394-413d-9ce7-3e929637b392n@googlegroups.com>
<t04g2j$7ip$1@dont-email.me> <t056q0$hom$1@dont-email.me>
<%upVJ.46116$mF2.13431@fx11.iad>
<369bc250-9ea8-43ac-8ff1-c84df13b8f60n@googlegroups.com>
<t05gs7$8g1$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net GhZ9kLb5AA3vbUydSDwcTAMEAkus+ZvfVBHTkVe9Bacvp60MIf
Cancel-Lock: sha1:qxrKYTNqEc5VjrwAKSI5/RMlB8Q=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:91.0)
Gecko/20100101 Thunderbird/91.6.2
Content-Language: en-US
In-Reply-To: <t05gs7$8g1$1@dont-email.me>
 by: Niklas Holsti - Mon, 7 Mar 2022 19:09 UTC

On 2022-03-07 19:54, Ivan Godard wrote:
> On 3/7/2022 9:36 AM, MitchAlsup wrote:
>> On Monday, March 7, 2022 at 9:26:55 AM UTC-6, EricP wrote:
>>> Ivan Godard wrote:
>>>> On 3/7/2022 12:34 AM, David Brown wrote:
>>>>>
>>>>> Extra parenthesis makes things abundantly clear at a glance - the
>>>>> reader
>>>>> can be in no doubt. They are useful for operators that are relatively
>>>>> rarely used or rarely used in particular combinations, but they are
>>>>> also
>>>>> useful to give the reader an idea of how you are building up the
>>>>> expression logically. Maybe "(a + b) + (c + d)" gives the reader more
>>>>> information than just "a + b + c + d". Making code clear to read - so
>>>>> that the compiler and the reader are in sync - is vital.
>>>>
>>>> Which is why having no precedence at all, just lexical order on the
>>>> page, gets rid of all the problems.
>>> Ah but then we will have the left-endians and the right-endians,
>>> and heretics will still abound!
>> <
>> Is there any room for a middle-endian ? That is start from the middle
>> and progress outwards in both directions simultaneously.
>
> No languages that I know of are middle-endian in that sense. However
> several switch directions at each line: l2r->r2l->l2r->etc, an endless
> snake.

In some viruses (I believe) the genetic code can be read in both
directions along the DNA or RNA strand, and each direction produces
different useful proteins. So a language without precedence could be
both left-to-right and right-to-left, computing two different useful
answers at the same time.

Re: Around the bike shed: Instruction names and assembler syntax

<IOsVJ.76022$41E7.35886@fx37.iad>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx37.iad.POSTED!not-for-mail
From: ThatWoul...@thevillage.com (EricP)
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <memo.20220226104336.7708a@jgd.cix.co.uk> <svgqq7$cll$1@newsreader4.netcologne.de> <nLf*r48Hy@news.chiark.greenend.org.uk> <ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me> <oLf*yP-Hy@news.chiark.greenend.org.uk> <svprsc$buf$1@newsreader4.netcologne.de> <2022Mar3.130732@mips.complang.tuwien.ac.at> <Uy4UJ.91086$Lbb6.86739@fx45.iad> <e348105a-d9c8-4dda-a843-14e403ad804fn@googlegroups.com> <EUbUJ.32421$dln7.10284@fx03.iad> <1f1b31df-b5dd-490f-b2fe-138444616650n@googlegroups.com> <plMUJ.35998$mF2.6634@fx11.iad> <t006du$2f1$1@dont-email.me> <WfpVJ.96200$Lbb6.40450@fx45.iad> <t05bb4$jo8$1@dont-email.me>
In-Reply-To: <t05bb4$jo8$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 89
Message-ID: <IOsVJ.76022$41E7.35886@fx37.iad>
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Mon, 07 Mar 2022 19:12:40 UTC
Date: Mon, 07 Mar 2022 14:10:38 -0500
X-Received-Bytes: 5110
 by: EricP - Mon, 7 Mar 2022 19:10 UTC

Ivan Godard wrote:
> On 3/7/2022 7:10 AM, EricP wrote:
>> Ivan Godard wrote:
>>>
>>> In all the discussion here about STM/LDM here I have yet to see a
>>> case where the address of the location wasn't the same for every use,
>>> or could be the same with a little rearranging of the call protocol.
>>> But if the address is always static known, why not fold the action
>>> into some other instruction and do it lazy?
>>>
>>> Have I overlooked some usecase?
>>
>> It sounds like you are suggesting that the effective address of the
>> save/restore block be implied by LDM/STM. I think that is too constrained
>> as in each of the following it is a software specified decision.
>>
>> - kernel and/or user mode thread switch
>> - setjmp,longjmp
>> - user mode exception/signal handler entry,exit
>> - languages with structured exception handling, try...catch
>> need to spill all the dynamic registers before entry so the handler,
>> if triggered, has a known location to pick variables up.
>>
>> For example, does the structured exception handler prologue spill
>> to the current frame FP-relative or stack SP-relative? At what offset?
>> And if SP-relative is the save area allocated earlier or on demand?
>> All of those design decisions are implementation specific.
>>
>
> When solutions are complicated it's usually a sign that the problem has
> been defined as complicated.

I don't think this is complicated.
Sometimes one wants to take a specified set of registers and
store them in a contiguous memory block of ones' choosing.

> > - kernel and/or user mode thread switch
>
> What's this "mode" thing you speak of?

Privilege mode - user or super.

> > - setjmp,longjmp
>
> are these speed sensitive?

Its not about speed. People use LDM/STM as it is a concise way
to specify a set of registers to save/restore in a contiguous block.
That it also offers hardware a chance to optimize the sequence is a bonus.

> > - user mode exception/signal handler entry,exit
>
> Why are exceptions different from calls you didn't ask for?

If I was doing it, the OS deposits (pushes) a packet of exception info
and the return PC onto the apps' user mode stack, and OS returns to
the exception routine. User mode exception handler saves the full integer
context on the stack, and calls the exception dispatcher routine
passing pointers to the exception info and saved context structs as args.
Exception handlers can edit saved context as they wish.
When handlers return, exception dispatcher reloads the now possibly edited
interrupted context, restores stack, and returns to the possibly edited PC.

> > - languages with structured exception handling, try...catch
> > need to spill all the dynamic registers before entry so the handler,
>
> why before entry, as opposed to lazy later?

If the try-catch calls inner routines and those throw an exception,
the exception dispatcher walks the stack evaluating catch conditions
in the context of each catch's frame, then the saved info has to be
valid and in a known location in that frame.

Yes it could be done lazy, and possibly the save even canceled later,
but then you'd need a mechanism to sync the memory state under various
conditions, like if any interrupt or exception occurred,
or upon manual request.

Sparc ran into various issues with its lazy register windows
so I'd check on their experiences first before going the lazy route.
There could be issues with multi-threading like where one threads'
lazy update memory is passed by reference to another thread
which doesn't know it is lazy update.

> > if triggered, has a known location to pick variables up.
>
> Why not?

Re: Around the bike shed: Instruction names and assembler syntax

<0cf6bca6-43e0-4f01-bc2a-a5957a3a22acn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:29e9:b0:435:3424:f812 with SMTP id jv9-20020a05621429e900b004353424f812mr9308933qvb.37.1646680609914;
Mon, 07 Mar 2022 11:16:49 -0800 (PST)
X-Received: by 2002:a05:6870:241b:b0:d7:22f5:815e with SMTP id
n27-20020a056870241b00b000d722f5815emr308174oap.58.1646680609630; Mon, 07 Mar
2022 11:16:49 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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: Mon, 7 Mar 2022 11:16:49 -0800 (PST)
In-Reply-To: <t05gs7$8g1$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:e9ee:3df:f03b:70f9;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:e9ee:3df:f03b:70f9
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <svd280$fiv$1@dont-email.me>
<svh2tg$j53$1@gal.iecc.com> <svj2ki$q0p$4@newsreader4.netcologne.de>
<svjblm$idv$1@dont-email.me> <j8666pFh0klU1@mid.individual.net>
<svl27r$r8m$1@dont-email.me> <2022Mar1.133629@mips.complang.tuwien.ac.at>
<864k4bf8yv.fsf@linuxsc.com> <j8k20sF6k96U1@mid.individual.net>
<86mti2ekig.fsf@linuxsc.com> <749c68b2-8394-413d-9ce7-3e929637b392n@googlegroups.com>
<t04g2j$7ip$1@dont-email.me> <t056q0$hom$1@dont-email.me> <%upVJ.46116$mF2.13431@fx11.iad>
<369bc250-9ea8-43ac-8ff1-c84df13b8f60n@googlegroups.com> <t05gs7$8g1$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0cf6bca6-43e0-4f01-bc2a-a5957a3a22acn@googlegroups.com>
Subject: Re: Around the bike shed: Instruction names and assembler syntax
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Mon, 07 Mar 2022 19:16:49 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 25
 by: MitchAlsup - Mon, 7 Mar 2022 19:16 UTC

On Monday, March 7, 2022 at 11:54:19 AM UTC-6, Ivan Godard wrote:
> On 3/7/2022 9:36 AM, MitchAlsup wrote:
> > On Monday, March 7, 2022 at 9:26:55 AM UTC-6, EricP wrote:
> >> Ivan Godard wrote:
> >>> On 3/7/2022 12:34 AM, David Brown wrote:
> >>>>
> >>>> Extra parenthesis makes things abundantly clear at a glance - the reader
> >>>> can be in no doubt. They are useful for operators that are relatively
> >>>> rarely used or rarely used in particular combinations, but they are also
> >>>> useful to give the reader an idea of how you are building up the
> >>>> expression logically. Maybe "(a + b) + (c + d)" gives the reader more
> >>>> information than just "a + b + c + d". Making code clear to read - so
> >>>> that the compiler and the reader are in sync - is vital.
> >>>
> >>> Which is why having no precedence at all, just lexical order on the
> >>> page, gets rid of all the problems.
> >> Ah but then we will have the left-endians and the right-endians,
> >> and heretics will still abound!
> > <
> > Is there any room for a middle-endian ? That is start from the middle
> > and progress outwards in both directions simultaneously.
> No languages that I know of are middle-endian in that sense. However
> several switch directions at each line: l2r->r2l->l2r->etc, an endless
> snake.
<
That is almost Z-ordering.

Re: Around the bike shed: Instruction names and assembler syntax

<eae06fdf-0661-46b0-a176-ebd7e2226801n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:4542:b0:663:96f9:98e3 with SMTP id u2-20020a05620a454200b0066396f998e3mr7796291qkp.526.1646680879516;
Mon, 07 Mar 2022 11:21:19 -0800 (PST)
X-Received: by 2002:a4a:3e02:0:b0:320:fdab:dcfd with SMTP id
t2-20020a4a3e02000000b00320fdabdcfdmr1601715oot.16.1646680879250; Mon, 07 Mar
2022 11:21:19 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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: Mon, 7 Mar 2022 11:21:19 -0800 (PST)
In-Reply-To: <IOsVJ.76022$41E7.35886@fx37.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:e9ee:3df:f03b:70f9;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:e9ee:3df:f03b:70f9
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de> <nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<oLf*yP-Hy@news.chiark.greenend.org.uk> <svprsc$buf$1@newsreader4.netcologne.de>
<2022Mar3.130732@mips.complang.tuwien.ac.at> <Uy4UJ.91086$Lbb6.86739@fx45.iad>
<e348105a-d9c8-4dda-a843-14e403ad804fn@googlegroups.com> <EUbUJ.32421$dln7.10284@fx03.iad>
<1f1b31df-b5dd-490f-b2fe-138444616650n@googlegroups.com> <plMUJ.35998$mF2.6634@fx11.iad>
<t006du$2f1$1@dont-email.me> <WfpVJ.96200$Lbb6.40450@fx45.iad>
<t05bb4$jo8$1@dont-email.me> <IOsVJ.76022$41E7.35886@fx37.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <eae06fdf-0661-46b0-a176-ebd7e2226801n@googlegroups.com>
Subject: Re: Around the bike shed: Instruction names and assembler syntax
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Mon, 07 Mar 2022 19:21:19 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 80
 by: MitchAlsup - Mon, 7 Mar 2022 19:21 UTC

On Monday, March 7, 2022 at 1:12:43 PM UTC-6, EricP wrote:
> Ivan Godard wrote:
> > On 3/7/2022 7:10 AM, EricP wrote:
> >> Ivan Godard wrote:
> >>>
> >>> In all the discussion here about STM/LDM here I have yet to see a
> >>> case where the address of the location wasn't the same for every use,
> >>> or could be the same with a little rearranging of the call protocol.
> >>> But if the address is always static known, why not fold the action
> >>> into some other instruction and do it lazy?
> >>>
> >>> Have I overlooked some usecase?
> >>
> >> It sounds like you are suggesting that the effective address of the
> >> save/restore block be implied by LDM/STM. I think that is too constrained
> >> as in each of the following it is a software specified decision.
> >>
> >> - kernel and/or user mode thread switch
> >> - setjmp,longjmp
> >> - user mode exception/signal handler entry,exit
> >> - languages with structured exception handling, try...catch
> >> need to spill all the dynamic registers before entry so the handler,
> >> if triggered, has a known location to pick variables up.
> >>
> >> For example, does the structured exception handler prologue spill
> >> to the current frame FP-relative or stack SP-relative? At what offset?
> >> And if SP-relative is the save area allocated earlier or on demand?
> >> All of those design decisions are implementation specific.
> >>
> >
> > When solutions are complicated it's usually a sign that the problem has
> > been defined as complicated.
> I don't think this is complicated.
> Sometimes one wants to take a specified set of registers and
> store them in a contiguous memory block of ones' choosing.
> > > - kernel and/or user mode thread switch
> >
> > What's this "mode" thing you speak of?
> Privilege mode - user or super.
> > > - setjmp,longjmp
> >
> > are these speed sensitive?
> Its not about speed. People use LDM/STM as it is a concise way
> to specify a set of registers to save/restore in a contiguous block.
> That it also offers hardware a chance to optimize the sequence is a bonus.
> > > - user mode exception/signal handler entry,exit
> >
> > Why are exceptions different from calls you didn't ask for?
> If I was doing it, the OS deposits (pushes) a packet of exception info
> and the return PC onto the apps' user mode stack, and OS returns to
> the exception routine. User mode exception handler saves the full integer
> context on the stack, and calls the exception dispatcher routine
> passing pointers to the exception info and saved context structs as args.
> Exception handlers can edit saved context as they wish.
> When handlers return, exception dispatcher reloads the now possibly edited
> interrupted context, restores stack, and returns to the possibly edited PC.
> > > - languages with structured exception handling, try...catch
> > > need to spill all the dynamic registers before entry so the handler,
> >
> > why before entry, as opposed to lazy later?
> If the try-catch calls inner routines and those throw an exception,
> the exception dispatcher walks the stack evaluating catch conditions
> in the context of each catch's frame, then the saved info has to be
> valid and in a known location in that frame.
<
The stack walker must also ~new the newed structures as it walks
the stack back.
>
> Yes it could be done lazy, and possibly the save even canceled later,
> but then you'd need a mechanism to sync the memory state under various
> conditions, like if any interrupt or exception occurred,
> or upon manual request.
>
> Sparc ran into various issues with its lazy register windows
> so I'd check on their experiences first before going the lazy route.
> There could be issues with multi-threading like where one threads'
> lazy update memory is passed by reference to another thread
> which doesn't know it is lazy update.
> > > if triggered, has a known location to pick variables up.
> >
> > Why not?

Re: Around the bike shed: Instruction names and assembler syntax

<t05n08$q3k$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Mon, 7 Mar 2022 11:38:47 -0800
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <t05n08$q3k$1@dont-email.me>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<svd280$fiv$1@dont-email.me> <svh2tg$j53$1@gal.iecc.com>
<svj2ki$q0p$4@newsreader4.netcologne.de> <svjblm$idv$1@dont-email.me>
<j8666pFh0klU1@mid.individual.net> <svl27r$r8m$1@dont-email.me>
<2022Mar1.133629@mips.complang.tuwien.ac.at> <864k4bf8yv.fsf@linuxsc.com>
<j8k20sF6k96U1@mid.individual.net> <86mti2ekig.fsf@linuxsc.com>
<749c68b2-8394-413d-9ce7-3e929637b392n@googlegroups.com>
<t04g2j$7ip$1@dont-email.me> <t056q0$hom$1@dont-email.me>
<%upVJ.46116$mF2.13431@fx11.iad>
<369bc250-9ea8-43ac-8ff1-c84df13b8f60n@googlegroups.com>
<t05gs7$8g1$1@dont-email.me> <j8n3j6FojdnU1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 7 Mar 2022 19:38:48 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="993e743fddc9c24b4517a045a96596b6";
logging-data="26740"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19trMHHeFXAvoyyWV2YAxW0"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Cancel-Lock: sha1:A9Zt3lS4jsl833hn1yVUkmisgeE=
In-Reply-To: <j8n3j6FojdnU1@mid.individual.net>
Content-Language: en-US
 by: Ivan Godard - Mon, 7 Mar 2022 19:38 UTC

On 3/7/2022 11:09 AM, Niklas Holsti wrote:
> On 2022-03-07 19:54, Ivan Godard wrote:
>> On 3/7/2022 9:36 AM, MitchAlsup wrote:
>>> On Monday, March 7, 2022 at 9:26:55 AM UTC-6, EricP wrote:
>>>> Ivan Godard wrote:
>>>>> On 3/7/2022 12:34 AM, David Brown wrote:
>>>>>>
>>>>>> Extra parenthesis makes things abundantly clear at a glance - the
>>>>>> reader
>>>>>> can be in no doubt. They are useful for operators that are relatively
>>>>>> rarely used or rarely used in particular combinations, but they
>>>>>> are also
>>>>>> useful to give the reader an idea of how you are building up the
>>>>>> expression logically. Maybe "(a + b) + (c + d)" gives the reader more
>>>>>> information than just "a + b + c + d". Making code clear to read - so
>>>>>> that the compiler and the reader are in sync - is vital.
>>>>>
>>>>> Which is why having no precedence at all, just lexical order on the
>>>>> page, gets rid of all the problems.
>>>> Ah but then we will have the left-endians and the right-endians,
>>>> and heretics will still abound!
>>> <
>>> Is there any room for a middle-endian ? That is start from the middle
>>> and progress outwards in both directions simultaneously.
>>
>> No languages that I know of are middle-endian in that sense. However
>> several switch directions at each line: l2r->r2l->l2r->etc, an endless
>> snake.
>
>
> In some viruses (I believe) the genetic code can be read in both
> directions along the DNA or RNA strand, and each direction produces
> different useful proteins. So a language without precedence could be
> both left-to-right and right-to-left, computing two different useful
> answers at the same time.
>

Clever! Some also get more than one protein from a xna strand by
starting the frame on a different one of the three coding phases.

I did that last trick in a memory-dumping utility for the B6500 that had
to entirely fit on an 80-column card, but I've never written code that
read backwards. As it happens, one could do that on a Mill, because the
two decoders read away from each other. Sounds like a challenge for Terje!

Re: Around the bike shed: Instruction names and assembler syntax

<t05nad$1i9$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Mon, 7 Mar 2022 11:44:12 -0800
Organization: A noiseless patient Spider
Lines: 74
Message-ID: <t05nad$1i9$1@dont-email.me>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<memo.20220226104336.7708a@jgd.cix.co.uk>
<svgqq7$cll$1@newsreader4.netcologne.de>
<nLf*r48Hy@news.chiark.greenend.org.uk>
<ANidnT3Kb-ZszoL_nZ2dnUU7-LHNnZ2d@supernews.com> <svodqv$rc$1@dont-email.me>
<oLf*yP-Hy@news.chiark.greenend.org.uk>
<svprsc$buf$1@newsreader4.netcologne.de>
<2022Mar3.130732@mips.complang.tuwien.ac.at>
<Uy4UJ.91086$Lbb6.86739@fx45.iad>
<e348105a-d9c8-4dda-a843-14e403ad804fn@googlegroups.com>
<EUbUJ.32421$dln7.10284@fx03.iad>
<1f1b31df-b5dd-490f-b2fe-138444616650n@googlegroups.com>
<plMUJ.35998$mF2.6634@fx11.iad> <t006du$2f1$1@dont-email.me>
<WfpVJ.96200$Lbb6.40450@fx45.iad> <t05bb4$jo8$1@dont-email.me>
<IOsVJ.76022$41E7.35886@fx37.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 7 Mar 2022 19:44:13 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="993e743fddc9c24b4517a045a96596b6";
logging-data="1609"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19i6i94DipK9/21W3Eqd6Ci"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Cancel-Lock: sha1:3z+Q2TptMMONQOjZRIA04BQj+vs=
In-Reply-To: <IOsVJ.76022$41E7.35886@fx37.iad>
Content-Language: en-US
 by: Ivan Godard - Mon, 7 Mar 2022 19:44 UTC

On 3/7/2022 11:10 AM, EricP wrote:
> Ivan Godard wrote:
>> On 3/7/2022 7:10 AM, EricP wrote:
>>> Ivan Godard wrote:
>>>>
>>>> In all the discussion here about STM/LDM here I have yet to see a
>>>> case where the address of the location wasn't the same for every
>>>> use, or could be the same with a little rearranging of the call
>>>> protocol. But if the address is always static known, why not fold
>>>> the action into some other instruction and do it lazy?
>>>>
>>>> Have I overlooked some usecase?
>>>
>>> It sounds like you are suggesting that the effective address of the
>>> save/restore block be implied by LDM/STM. I think that is too
>>> constrained
>>> as in each of the following it is a software specified decision.
>>>
>>> - kernel and/or user mode thread switch
>>> - setjmp,longjmp
>>> - user mode exception/signal handler entry,exit
>>> - languages with structured exception handling, try...catch
>>>    need to spill all the dynamic registers before entry so the handler,
>>>    if triggered, has a known location to pick variables up.
>>>
>>> For example, does the structured exception handler prologue spill
>>> to the current frame FP-relative or stack SP-relative? At what offset?
>>> And if SP-relative is the save area allocated earlier or on demand?
>>> All of those design decisions are implementation specific.
>>>
>>
>> When solutions are complicated it's usually a sign that the problem
>> has been defined as complicated.
>
> I don't think this is complicated.
> Sometimes one wants to take a specified set of registers and
> store them in a contiguous memory block of ones' choosing.
>
>>  > - kernel and/or user mode thread switch
>>
>> What's this "mode" thing you speak of?
>
> Privilege mode - user or super.

Sorry, missing irony alert. Note that neither Mill not my66 have
user/super modes.

>
>>  > - setjmp,longjmp
>>
>> are these speed sensitive?
>
> Its not about speed. People use LDM/STM as it is a concise way
> to specify a set of registers to save/restore in a contiguous block.
> That it also offers hardware a chance to optimize the sequence is a bonus.

Notation is handled by an asm macro; why have an actual instruction?

>
>>  > - user mode exception/signal handler entry,exit
>>
>> Why are exceptions different from calls you didn't ask for?
>
> If I was doing it, the OS deposits (pushes) a packet of exception info
> and the return PC onto the apps' user mode stack, and OS returns to
> the exception routine. User mode exception handler saves the full integer
> context on the stack, and calls the exception dispatcher routine
> passing pointers to the exception info and saved context structs as args.
> Exception handlers can edit saved context as they wish.
> When handlers return, exception dispatcher reloads the now possibly edited
> interrupted context, restores stack, and returns to the possibly edited PC.

How do you do it if there are no modes?

Re: Around the bike shed: Instruction names and assembler syntax

<t05pln$ldu$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Mon, 7 Mar 2022 21:24:23 +0100
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <t05pln$ldu$1@dont-email.me>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<svd280$fiv$1@dont-email.me> <svh2tg$j53$1@gal.iecc.com>
<svj2ki$q0p$4@newsreader4.netcologne.de> <svjblm$idv$1@dont-email.me>
<j8666pFh0klU1@mid.individual.net> <svl27r$r8m$1@dont-email.me>
<2022Mar1.133629@mips.complang.tuwien.ac.at> <864k4bf8yv.fsf@linuxsc.com>
<j8k20sF6k96U1@mid.individual.net> <86mti2ekig.fsf@linuxsc.com>
<749c68b2-8394-413d-9ce7-3e929637b392n@googlegroups.com>
<t04g2j$7ip$1@dont-email.me> <t056q0$hom$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 7 Mar 2022 20:24:23 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="ae605fe176535bb26970bcfc35a358b0";
logging-data="21950"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/HlqScYNfuGuBUsdGP35xE0rgVvnf3Flw="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:rCihwvQaMy2OX7Nk7ammMFw5zdk=
In-Reply-To: <t056q0$hom$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Mon, 7 Mar 2022 20:24 UTC

On 07/03/2022 16:02, Ivan Godard wrote:
> On 3/7/2022 12:34 AM, David Brown wrote:
>>
>> Extra parenthesis makes things abundantly clear at a glance - the reader
>> can be in no doubt.  They are useful for operators that are relatively
>> rarely used or rarely used in particular combinations, but they are also
>> useful to give the reader an idea of how you are building up the
>> expression logically.  Maybe "(a + b) + (c + d)" gives the reader more
>> information than just "a + b + c + d".  Making code clear to read - so
>> that the compiler and the reader are in sync - is vital.
>
> Which is why having no precedence at all, just lexical order on the
> page, gets rid of all the problems.

That would get rid of such problems (though obviously it is not
applicable to C or C-like languages). However, it would introduce new
problems - people expect "a + b * c" to have the same precedence as in
normal mathematics.

Other alternatives would be to switch to prefix functional notation
"add(a, multiply(b, c))" or postfix RPN like Forth "a b c * +", where
you don't need precedence levels to make things unambiguous.

>
>> The worst possible choice is to have something controlled by programmer
>> but with no meaning in the language as a way to indicate precedence to
>> the reader. 
>
> This was A68's bete noir.
>
>> Using whitespace is worse than useless - how could it
>> possibly help anyone to write "a & b<<2" or "a&b << 2" ?  Just write
>> either "a & (b << 2)" or "(a & b) << 2", depending on what you mean.
>> Only one of these needs parenthesis according to the language - both
>> need parenthesis according to the principles of writing clear code.
>
> Is that white area a space or a tab? Does it make a difference?
>
I wrote it with space characters - but I think making a language
sensitive to the number or type of white spaces is at best a
questionable decision. (Newline can be different from spaces or tabs in
some circumstances.) Python's decision to use indentation for block
structuring is not universally popular, and make's distinction between
leading spaces and leading tabs is considered its worst feature (by the
original author of the program).

Re: Around the bike shed: Instruction names and assembler syntax

<t05prl$pfu$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Mon, 7 Mar 2022 21:27:32 +0100
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <t05prl$pfu$1@dont-email.me>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<svd280$fiv$1@dont-email.me> <svh2tg$j53$1@gal.iecc.com>
<svj2ki$q0p$4@newsreader4.netcologne.de> <svjblm$idv$1@dont-email.me>
<j8666pFh0klU1@mid.individual.net> <svl27r$r8m$1@dont-email.me>
<2022Mar1.133629@mips.complang.tuwien.ac.at> <864k4bf8yv.fsf@linuxsc.com>
<j8k20sF6k96U1@mid.individual.net> <86mti2ekig.fsf@linuxsc.com>
<749c68b2-8394-413d-9ce7-3e929637b392n@googlegroups.com>
<t04g2j$7ip$1@dont-email.me> <t056q0$hom$1@dont-email.me>
<%upVJ.46116$mF2.13431@fx11.iad>
<369bc250-9ea8-43ac-8ff1-c84df13b8f60n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 7 Mar 2022 20:27:33 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="ae605fe176535bb26970bcfc35a358b0";
logging-data="26110"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/U5dK0z4BfW+rZDbZvCbxIJHhCnvWemSo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:ByfUAuTXJysYpvmDWRAo77G2fCM=
In-Reply-To: <369bc250-9ea8-43ac-8ff1-c84df13b8f60n@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Mon, 7 Mar 2022 20:27 UTC

On 07/03/2022 18:36, MitchAlsup wrote:
> On Monday, March 7, 2022 at 9:26:55 AM UTC-6, EricP wrote:
>> Ivan Godard wrote:
>>> On 3/7/2022 12:34 AM, David Brown wrote:
>>>>
>>>> Extra parenthesis makes things abundantly clear at a glance - the reader
>>>> can be in no doubt. They are useful for operators that are relatively
>>>> rarely used or rarely used in particular combinations, but they are also
>>>> useful to give the reader an idea of how you are building up the
>>>> expression logically. Maybe "(a + b) + (c + d)" gives the reader more
>>>> information than just "a + b + c + d". Making code clear to read - so
>>>> that the compiler and the reader are in sync - is vital.
>>>
>>> Which is why having no precedence at all, just lexical order on the
>>> page, gets rid of all the problems.
>> Ah but then we will have the left-endians and the right-endians,
>> and heretics will still abound!
> <
> Is there any room for a middle-endian ? That is start from the middle
> and progress outwards in both directions simultaneously.
>

Why limit yourself to two directions?

<https://en.wikipedia.org/wiki/Befunge>

Re: Around the bike shed: Instruction names and assembler syntax

<t05q9q$3hv$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Mon, 7 Mar 2022 21:35:05 +0100
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <t05q9q$3hv$1@dont-email.me>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<svd280$fiv$1@dont-email.me> <svh2tg$j53$1@gal.iecc.com>
<svj2ki$q0p$4@newsreader4.netcologne.de> <svjblm$idv$1@dont-email.me>
<j8666pFh0klU1@mid.individual.net> <svl27r$r8m$1@dont-email.me>
<2022Mar1.133629@mips.complang.tuwien.ac.at> <864k4bf8yv.fsf@linuxsc.com>
<j8k20sF6k96U1@mid.individual.net> <86mti2ekig.fsf@linuxsc.com>
<749c68b2-8394-413d-9ce7-3e929637b392n@googlegroups.com>
<t04g2j$7ip$1@dont-email.me> <t056q0$hom$1@dont-email.me>
<%upVJ.46116$mF2.13431@fx11.iad>
<369bc250-9ea8-43ac-8ff1-c84df13b8f60n@googlegroups.com>
<t05gs7$8g1$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 7 Mar 2022 20:35:06 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="ae605fe176535bb26970bcfc35a358b0";
logging-data="3647"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18lR7TcQYhJWWk9yrYZN5usxBupwBCLIEI="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:MyPEBj02y0IqkDB2nQ1K7utAt5c=
In-Reply-To: <t05gs7$8g1$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Mon, 7 Mar 2022 20:35 UTC

On 07/03/2022 18:54, Ivan Godard wrote:
> On 3/7/2022 9:36 AM, MitchAlsup wrote:
>> On Monday, March 7, 2022 at 9:26:55 AM UTC-6, EricP wrote:
>>> Ivan Godard wrote:
>>>> On 3/7/2022 12:34 AM, David Brown wrote:
>>>>>
>>>>> Extra parenthesis makes things abundantly clear at a glance - the
>>>>> reader
>>>>> can be in no doubt. They are useful for operators that are relatively
>>>>> rarely used or rarely used in particular combinations, but they are
>>>>> also
>>>>> useful to give the reader an idea of how you are building up the
>>>>> expression logically. Maybe "(a + b) + (c + d)" gives the reader more
>>>>> information than just "a + b + c + d". Making code clear to read - so
>>>>> that the compiler and the reader are in sync - is vital.
>>>>
>>>> Which is why having no precedence at all, just lexical order on the
>>>> page, gets rid of all the problems.
>>> Ah but then we will have the left-endians and the right-endians,
>>> and heretics will still abound!
>> <
>> Is there any room for a middle-endian ? That is start from the middle
>> and progress outwards in both directions simultaneously.
>
> No languages that I know of are middle-endian in that sense. However
> several switch directions at each line: l2r->r2l->l2r->etc, an endless
> snake.

I think such direction-switching writing is only found historically, and
not used by any current languages.

<https://en.wikipedia.org/wiki/Boustrophedon>

Re: Around the bike shed: Instruction names and assembler syntax

<c1752c86-c84b-4294-8bdf-84eee2b783c7n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:1a27:b0:2e0:64c2:7469 with SMTP id f39-20020a05622a1a2700b002e064c27469mr6740976qtb.187.1646689734254;
Mon, 07 Mar 2022 13:48:54 -0800 (PST)
X-Received: by 2002:a05:6808:11cc:b0:2d9:a01a:4ba6 with SMTP id
p12-20020a05680811cc00b002d9a01a4ba6mr692868oiv.205.1646689734022; Mon, 07
Mar 2022 13:48:54 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.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: Mon, 7 Mar 2022 13:48:53 -0800 (PST)
In-Reply-To: <t05pln$ldu$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:f84f:f8f1:e26f:a89c;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:f84f:f8f1:e26f:a89c
References: <svcqrj$jj6$1@newsreader4.netcologne.de> <svd280$fiv$1@dont-email.me>
<svh2tg$j53$1@gal.iecc.com> <svj2ki$q0p$4@newsreader4.netcologne.de>
<svjblm$idv$1@dont-email.me> <j8666pFh0klU1@mid.individual.net>
<svl27r$r8m$1@dont-email.me> <2022Mar1.133629@mips.complang.tuwien.ac.at>
<864k4bf8yv.fsf@linuxsc.com> <j8k20sF6k96U1@mid.individual.net>
<86mti2ekig.fsf@linuxsc.com> <749c68b2-8394-413d-9ce7-3e929637b392n@googlegroups.com>
<t04g2j$7ip$1@dont-email.me> <t056q0$hom$1@dont-email.me> <t05pln$ldu$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c1752c86-c84b-4294-8bdf-84eee2b783c7n@googlegroups.com>
Subject: Re: Around the bike shed: Instruction names and assembler syntax
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Mon, 07 Mar 2022 21:48:54 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 58
 by: MitchAlsup - Mon, 7 Mar 2022 21:48 UTC

On Monday, March 7, 2022 at 2:24:27 PM UTC-6, David Brown wrote:
> On 07/03/2022 16:02, Ivan Godard wrote:
> > On 3/7/2022 12:34 AM, David Brown wrote:
> >>
> >> Extra parenthesis makes things abundantly clear at a glance - the reader
> >> can be in no doubt. They are useful for operators that are relatively
> >> rarely used or rarely used in particular combinations, but they are also
> >> useful to give the reader an idea of how you are building up the
> >> expression logically. Maybe "(a + b) + (c + d)" gives the reader more
> >> information than just "a + b + c + d". Making code clear to read - so
> >> that the compiler and the reader are in sync - is vital.
> >
> > Which is why having no precedence at all, just lexical order on the
> > page, gets rid of all the problems.
> That would get rid of such problems (though obviously it is not
> applicable to C or C-like languages). However, it would introduce new
> problems - people expect "a + b * c" to have the same precedence as in
> normal mathematics.
<
Only when you have never written in a precedence-free language.
<
a + b * c
<
Reads just like ASM:
<
ADD Rt,Ra,Rb
MUL Rt,Rt,Rc
>
> Other alternatives would be to switch to prefix functional notation
> "add(a, multiply(b, c))" or postfix RPN like Forth "a b c * +", where
> you don't need precedence levels to make things unambiguous.
<
You will find the road ahead very steep indeed.
> >
> >> The worst possible choice is to have something controlled by programmer
> >> but with no meaning in the language as a way to indicate precedence to
> >> the reader.
> >
> > This was A68's bete noir.
> >
> >> Using whitespace is worse than useless - how could it
> >> possibly help anyone to write "a & b<<2" or "a&b << 2" ? Just write
> >> either "a & (b << 2)" or "(a & b) << 2", depending on what you mean.
> >> Only one of these needs parenthesis according to the language - both
> >> need parenthesis according to the principles of writing clear code.
> >
> > Is that white area a space or a tab? Does it make a difference?
<
You forgot vertical tab, and page feed.
> >
> I wrote it with space characters - but I think making a language
> sensitive to the number or type of white spaces is at best a
> questionable decision. (Newline can be different from spaces or tabs in
> some circumstances.) Python's decision to use indentation for block
> structuring is not universally popular, and make's distinction between
> leading spaces and leading tabs is considered its worst feature (by the
> original author of the program).
<
All white space should be equivalent.

Re: Around the bike shed: Instruction names and assembler syntax

<t06ubj$56j$1@newsreader4.netcologne.de>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!news.freedyn.de!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd4-fef8-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Tue, 8 Mar 2022 06:50:27 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <t06ubj$56j$1@newsreader4.netcologne.de>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<svd280$fiv$1@dont-email.me> <svh2tg$j53$1@gal.iecc.com>
<svj2ki$q0p$4@newsreader4.netcologne.de> <svjblm$idv$1@dont-email.me>
<j8666pFh0klU1@mid.individual.net> <svl27r$r8m$1@dont-email.me>
<2022Mar1.133629@mips.complang.tuwien.ac.at> <864k4bf8yv.fsf@linuxsc.com>
<t02pm2$b7g$1@newsreader4.netcologne.de> <86ilsqekay.fsf@linuxsc.com>
Injection-Date: Tue, 8 Mar 2022 06:50:27 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd4-fef8-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd4:fef8:0:7285:c2ff:fe6c:992d";
logging-data="5331"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Tue, 8 Mar 2022 06:50 UTC

Tim Rentsch <tr.17687@z991.linuxsc.com> schrieb:
> Thomas Koenig <tkoenig@netcologne.de> writes:
>
>> Tim Rentsch <tr.17687@z991.linuxsc.com> schrieb:
>>
>>> Taking C as a
>>> canonical example, given that C does have precisely defined
>>> precedence rules, it would be better if any redundant parentheses
>>> were disallowed and flagged as errors by the compiler.
>>
>> I actually took this serious for a minute :-)
>
> On this point you may rest assured I am quite serious.

Sorry for confusing intentional and unintentional humor, then.

Re: Around the bike shed: Instruction names and assembler syntax

<t071mm$gh3$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Tue, 8 Mar 2022 08:47:34 +0100
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <t071mm$gh3$1@dont-email.me>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<svd280$fiv$1@dont-email.me> <svh2tg$j53$1@gal.iecc.com>
<svj2ki$q0p$4@newsreader4.netcologne.de> <svjblm$idv$1@dont-email.me>
<j8666pFh0klU1@mid.individual.net> <svl27r$r8m$1@dont-email.me>
<2022Mar1.133629@mips.complang.tuwien.ac.at> <864k4bf8yv.fsf@linuxsc.com>
<j8k20sF6k96U1@mid.individual.net> <86mti2ekig.fsf@linuxsc.com>
<749c68b2-8394-413d-9ce7-3e929637b392n@googlegroups.com>
<t04g2j$7ip$1@dont-email.me> <t056q0$hom$1@dont-email.me>
<%upVJ.46116$mF2.13431@fx11.iad>
<369bc250-9ea8-43ac-8ff1-c84df13b8f60n@googlegroups.com>
<t05gs7$8g1$1@dont-email.me> <j8n3j6FojdnU1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 8 Mar 2022 07:47:34 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c52bacc949cc36754019b6f709eed4a6";
logging-data="16931"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19cNIbMI1FOSG9EUkJrf+WCldeBLhcf0ZA="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:aoG7/1SwixUw9sQZp/Ed940FCKs=
In-Reply-To: <j8n3j6FojdnU1@mid.individual.net>
Content-Language: en-GB
 by: David Brown - Tue, 8 Mar 2022 07:47 UTC

On 07/03/2022 20:09, Niklas Holsti wrote:
>
> In some viruses (I believe) the genetic code can be read in both
> directions along the DNA or RNA strand, and each direction produces
> different useful proteins.

I know this is getting /really/ off-topic, but do you have any
references for that? I know that transcription from DNA to RNA can run
in both directions at once, but AFAIUI in eukaryotes there are
mechanisms in place to identify the wrong half and reject it.

From the way proteins are coded and the complexity of most of them, I
find it hard to imagine that you could get two useful proteins from the
same RNA in different directions - it's like trying to run a
byte-reversed program. It is (to me) a lot more believable that there
are bits of virus DNA or RNA that are simply backwards.

Re: Around the bike shed: Instruction names and assembler syntax

<t072bg$k6k$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Tue, 8 Mar 2022 08:58:40 +0100
Organization: A noiseless patient Spider
Lines: 87
Message-ID: <t072bg$k6k$1@dont-email.me>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<svd280$fiv$1@dont-email.me> <svh2tg$j53$1@gal.iecc.com>
<svj2ki$q0p$4@newsreader4.netcologne.de> <svjblm$idv$1@dont-email.me>
<j8666pFh0klU1@mid.individual.net> <svl27r$r8m$1@dont-email.me>
<2022Mar1.133629@mips.complang.tuwien.ac.at> <864k4bf8yv.fsf@linuxsc.com>
<j8k20sF6k96U1@mid.individual.net> <86mti2ekig.fsf@linuxsc.com>
<749c68b2-8394-413d-9ce7-3e929637b392n@googlegroups.com>
<t04g2j$7ip$1@dont-email.me> <t056q0$hom$1@dont-email.me>
<t05pln$ldu$1@dont-email.me>
<c1752c86-c84b-4294-8bdf-84eee2b783c7n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 8 Mar 2022 07:58:40 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c52bacc949cc36754019b6f709eed4a6";
logging-data="20692"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yo4ZzshF7W2DliONbAmmf56PN+Nftxcc="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:NjS1SDPkDH5EenU/zC6Q/pR80E4=
In-Reply-To: <c1752c86-c84b-4294-8bdf-84eee2b783c7n@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Tue, 8 Mar 2022 07:58 UTC

On 07/03/2022 22:48, MitchAlsup wrote:
> On Monday, March 7, 2022 at 2:24:27 PM UTC-6, David Brown wrote:
>> On 07/03/2022 16:02, Ivan Godard wrote:
>>> On 3/7/2022 12:34 AM, David Brown wrote:
>>>>
>>>> Extra parenthesis makes things abundantly clear at a glance - the reader
>>>> can be in no doubt. They are useful for operators that are relatively
>>>> rarely used or rarely used in particular combinations, but they are also
>>>> useful to give the reader an idea of how you are building up the
>>>> expression logically. Maybe "(a + b) + (c + d)" gives the reader more
>>>> information than just "a + b + c + d". Making code clear to read - so
>>>> that the compiler and the reader are in sync - is vital.
>>>
>>> Which is why having no precedence at all, just lexical order on the
>>> page, gets rid of all the problems.
>> That would get rid of such problems (though obviously it is not
>> applicable to C or C-like languages). However, it would introduce new
>> problems - people expect "a + b * c" to have the same precedence as in
>> normal mathematics.
> <
> Only when you have never written in a precedence-free language.
> <
> a + b * c
> <
> Reads just like ASM:
> <
> ADD Rt,Ra,Rb
> MUL Rt,Rt,Rc

I've written plenty of assembly. But assembly is not a precedence-free
language - it is a language using prefix functional notation. That is a
very different thing.

I know there /are/ languages without operator precedence, where "a + b *
c" is "(a + b) * c". And I expect that people who use them get used to
it. But I think it would take a fair amount of effort for most people
to change their thinking when starting with such a language, and
mistakes and misunderstandings would be common.

>>
>> Other alternatives would be to switch to prefix functional notation
>> "add(a, multiply(b, c))" or postfix RPN like Forth "a b c * +", where
>> you don't need precedence levels to make things unambiguous.
> <
> You will find the road ahead very steep indeed.

I have done a little (a very little) Forth programming. Yes, it
requires a bit of mind-twisting!

>>>
>>>> The worst possible choice is to have something controlled by programmer
>>>> but with no meaning in the language as a way to indicate precedence to
>>>> the reader.
>>>
>>> This was A68's bete noir.
>>>
>>>> Using whitespace is worse than useless - how could it
>>>> possibly help anyone to write "a & b<<2" or "a&b << 2" ? Just write
>>>> either "a & (b << 2)" or "(a & b) << 2", depending on what you mean.
>>>> Only one of these needs parenthesis according to the language - both
>>>> need parenthesis according to the principles of writing clear code.
>>>
>>> Is that white area a space or a tab? Does it make a difference?
> <
> You forgot vertical tab, and page feed.

No one has used these this century. But you can include them if you
like (and perhaps some Unicode spaces of different sizes).

>>>
>> I wrote it with space characters - but I think making a language
>> sensitive to the number or type of white spaces is at best a
>> questionable decision. (Newline can be different from spaces or tabs in
>> some circumstances.) Python's decision to use indentation for block
>> structuring is not universally popular, and make's distinction between
>> leading spaces and leading tabs is considered its worst feature (by the
>> original author of the program).
> <
> All white space should be equivalent.
>

There is a convenience in things like line-limited comments, and it is
not uncommon for programming languages to equate "end of line" with "end
of statement". (This has its adherents and detractor.)

In general, however, I agree that white space should be equivalent.

Re: Around the bike shed: Instruction names and assembler syntax

<t072f3$1h5u$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!UXtAIYUgaw/fkqnS/V28xg.user.46.165.242.91.POSTED!not-for-mail
From: terje.ma...@tmsw.no (Terje Mathisen)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Tue, 8 Mar 2022 09:00:36 +0100
Organization: Aioe.org NNTP Server
Message-ID: <t072f3$1h5u$1@gioia.aioe.org>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<svd280$fiv$1@dont-email.me> <svh2tg$j53$1@gal.iecc.com>
<svj2ki$q0p$4@newsreader4.netcologne.de> <svjblm$idv$1@dont-email.me>
<j8666pFh0klU1@mid.individual.net> <svl27r$r8m$1@dont-email.me>
<2022Mar1.133629@mips.complang.tuwien.ac.at> <864k4bf8yv.fsf@linuxsc.com>
<j8k20sF6k96U1@mid.individual.net> <86mti2ekig.fsf@linuxsc.com>
<749c68b2-8394-413d-9ce7-3e929637b392n@googlegroups.com>
<t04g2j$7ip$1@dont-email.me> <t056q0$hom$1@dont-email.me>
<%upVJ.46116$mF2.13431@fx11.iad>
<369bc250-9ea8-43ac-8ff1-c84df13b8f60n@googlegroups.com>
<t05gs7$8g1$1@dont-email.me> <j8n3j6FojdnU1@mid.individual.net>
<t05n08$q3k$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="50366"; posting-host="UXtAIYUgaw/fkqnS/V28xg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101
Firefox/68.0 SeaMonkey/2.53.10.2
X-Notice: Filtered by postfilter v. 0.9.2
 by: Terje Mathisen - Tue, 8 Mar 2022 08:00 UTC

Ivan Godard wrote:
> On 3/7/2022 11:09 AM, Niklas Holsti wrote:
>> On 2022-03-07 19:54, Ivan Godard wrote:
>>> On 3/7/2022 9:36 AM, MitchAlsup wrote:
>>>> On Monday, March 7, 2022 at 9:26:55 AM UTC-6, EricP wrote:
>>>>> Ivan Godard wrote:
>>>>>> On 3/7/2022 12:34 AM, David Brown wrote:
>>>>>>>
>>>>>>> Extra parenthesis makes things abundantly clear at a glance - the
>>>>>>> reader
>>>>>>> can be in no doubt. They are useful for operators that are
>>>>>>> relatively
>>>>>>> rarely used or rarely used in particular combinations, but they
>>>>>>> are also
>>>>>>> useful to give the reader an idea of how you are building up the
>>>>>>> expression logically. Maybe "(a + b) + (c + d)" gives the reader
>>>>>>> more
>>>>>>> information than just "a + b + c + d". Making code clear to read
>>>>>>> - so
>>>>>>> that the compiler and the reader are in sync - is vital.
>>>>>>
>>>>>> Which is why having no precedence at all, just lexical order on the
>>>>>> page, gets rid of all the problems.
>>>>> Ah but then we will have the left-endians and the right-endians,
>>>>> and heretics will still abound!
>>>> <
>>>> Is there any room for a middle-endian ? That is start from the middle
>>>> and progress outwards in both directions simultaneously.
>>>
>>> No languages that I know of are middle-endian in that sense. However
>>> several switch directions at each line: l2r->r2l->l2r->etc, an
>>> endless snake.
>>
>>
>> In some viruses (I believe) the genetic code can be read in both
>> directions along the DNA or RNA strand, and each direction produces
>> different useful proteins. So a language without precedence could be
>> both left-to-right and right-to-left, computing two different useful
>> answers at the same time.
>>
>
>
> Clever! Some also get more than one protein from a xna strand by
> starting the frame on a different one of the three coding phases.
>
> I did that last trick in a memory-dumping utility for the B6500 that had
> to entirely fit on an 80-column card, but I've never written code that
> read backwards. As it happens, one could do that on a Mill, because the
> two decoders read away from each other. Sounds like a challenge for Terje!

This is of course quite easy on a RISC style fixed-length instruction
set, you just need to write code that makes sense in both directions.

It is a bit more complicated with varible-length instructions like x86,
where you will very quickly run into issues like prefix bytes (like REP
CMPS etc), in order to use those for a block move I would need something
like MOVS REP MOVS, while all/most function calls require hiding the
opposite endian code inside immediates.

I.e. almost certainly doable, but very hard to make it space-saving.

Terje

--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

Re: Around the bike shed: Instruction names and assembler syntax

<t072o3$1ki4$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!UXtAIYUgaw/fkqnS/V28xg.user.46.165.242.91.POSTED!not-for-mail
From: terje.ma...@tmsw.no (Terje Mathisen)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Tue, 8 Mar 2022 09:05:24 +0100
Organization: Aioe.org NNTP Server
Message-ID: <t072o3$1ki4$1@gioia.aioe.org>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<svd280$fiv$1@dont-email.me> <svh2tg$j53$1@gal.iecc.com>
<svj2ki$q0p$4@newsreader4.netcologne.de> <svjblm$idv$1@dont-email.me>
<j8666pFh0klU1@mid.individual.net> <svl27r$r8m$1@dont-email.me>
<2022Mar1.133629@mips.complang.tuwien.ac.at> <864k4bf8yv.fsf@linuxsc.com>
<j8k20sF6k96U1@mid.individual.net> <86mti2ekig.fsf@linuxsc.com>
<749c68b2-8394-413d-9ce7-3e929637b392n@googlegroups.com>
<t04g2j$7ip$1@dont-email.me> <t056q0$hom$1@dont-email.me>
<t05pln$ldu$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="53828"; posting-host="UXtAIYUgaw/fkqnS/V28xg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101
Firefox/68.0 SeaMonkey/2.53.10.2
X-Notice: Filtered by postfilter v. 0.9.2
 by: Terje Mathisen - Tue, 8 Mar 2022 08:05 UTC

David Brown wrote:
> On 07/03/2022 16:02, Ivan Godard wrote:
>> On 3/7/2022 12:34 AM, David Brown wrote:
>>>
>>> Extra parenthesis makes things abundantly clear at a glance - the reader
>>> can be in no doubt.  They are useful for operators that are relatively
>>> rarely used or rarely used in particular combinations, but they are also
>>> useful to give the reader an idea of how you are building up the
>>> expression logically.  Maybe "(a + b) + (c + d)" gives the reader more
>>> information than just "a + b + c + d".  Making code clear to read - so
>>> that the compiler and the reader are in sync - is vital.
>>
>> Which is why having no precedence at all, just lexical order on the
>> page, gets rid of all the problems.
>
> That would get rid of such problems (though obviously it is not
> applicable to C or C-like languages). However, it would introduce new
> problems - people expect "a + b * c" to have the same precedence as in
> normal mathematics.
>
> Other alternatives would be to switch to prefix functional notation
> "add(a, multiply(b, c))" or postfix RPN like Forth "a b c * +", where
> you don't need precedence levels to make things unambiguous.
>
>>
>>> The worst possible choice is to have something controlled by programmer
>>> but with no meaning in the language as a way to indicate precedence to
>>> the reader.Â
>>
>> This was A68's bete noir.
>>
>>> Using whitespace is worse than useless - how could it
>>> possibly help anyone to write "a & b<<2" or "a&b << 2" ?  Just write
>>> either "a & (b << 2)" or "(a & b) << 2", depending on what you mean.
>>> Only one of these needs parenthesis according to the language - both
>>> need parenthesis according to the principles of writing clear code.
>>
>> Is that white area a space or a tab? Does it make a difference?
>>
> I wrote it with space characters - but I think making a language
> sensitive to the number or type of white spaces is at best a
> questionable decision. (Newline can be different from spaces or tabs in
> some circumstances.) Python's decision to use indentation for block
> structuring is not universally popular, and make's distinction between
> leading spaces and leading tabs is considered its worst feature (by the
> original author of the program).

Space vs Tab is a feature, not a bug, at least according to the Perl
Acme::Bleach module!

Insert "use Acme::Bleach;" at the top of your program, then run it once
which turns it into a new version with just that line at the top:
Everything else is just whitespace, but it still runs! :-)

Terje

--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

Re: Around the bike shed: Instruction names and assembler syntax

<t0736m$7gu$1@newsreader4.netcologne.de>

  copy mid

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

  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-fef8-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Tue, 8 Mar 2022 08:13:10 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <t0736m$7gu$1@newsreader4.netcologne.de>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<svd280$fiv$1@dont-email.me> <svh2tg$j53$1@gal.iecc.com>
<svj2ki$q0p$4@newsreader4.netcologne.de> <svjblm$idv$1@dont-email.me>
<j8666pFh0klU1@mid.individual.net> <svl27r$r8m$1@dont-email.me>
<2022Mar1.133629@mips.complang.tuwien.ac.at> <864k4bf8yv.fsf@linuxsc.com>
<j8k20sF6k96U1@mid.individual.net> <86mti2ekig.fsf@linuxsc.com>
<749c68b2-8394-413d-9ce7-3e929637b392n@googlegroups.com>
<t04g2j$7ip$1@dont-email.me>
Injection-Date: Tue, 8 Mar 2022 08:13:10 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd4-fef8-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd4:fef8:0:7285:c2ff:fe6c:992d";
logging-data="7710"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Tue, 8 Mar 2022 08:13 UTC

David Brown <david.brown@hesbynett.no> schrieb:

> Maybe "(a + b) + (c + d)" gives the reader more
> information than just "a + b + c + d".

The two expressions might also mean different things (even in
the absence of operator overloading). Think floating point
arithmetic and a language which used parenthses to force
evaluation of something in parentheses first.

> Making code clear to read - so
> that the compiler and the reader are in sync - is vital.

> The worst possible choice is to have something controlled by programmer
> but with no meaning in the language as a way to indicate precedence to
> the reader. Using whitespace is worse than useless - how could it
> possibly help anyone to write "a & b<<2" or "a&b << 2" ? Just write
> either "a & (b << 2)" or "(a & b) << 2", depending on what you mean.
> Only one of these needs parenthesis according to the language - both
> need parenthesis according to the principles of writing clear code.

I concur.

Re: Around the bike shed: Instruction names and assembler syntax

<2022Mar8.091833@mips.complang.tuwien.ac.at>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Tue, 08 Mar 2022 08:18:33 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 20
Message-ID: <2022Mar8.091833@mips.complang.tuwien.ac.at>
References: <svd280$fiv$1@dont-email.me> <svh2tg$j53$1@gal.iecc.com> <svj2ki$q0p$4@newsreader4.netcologne.de> <svjblm$idv$1@dont-email.me> <j8666pFh0klU1@mid.individual.net> <svl27r$r8m$1@dont-email.me> <2022Mar1.133629@mips.complang.tuwien.ac.at> <864k4bf8yv.fsf@linuxsc.com> <j8k20sF6k96U1@mid.individual.net> <86mti2ekig.fsf@linuxsc.com> <749c68b2-8394-413d-9ce7-3e929637b392n@googlegroups.com> <t04g2j$7ip$1@dont-email.me> <t056q0$hom$1@dont-email.me> <pj2e2hpvcn97c170cmrugvd7uvi2sklmcs@4ax.com>
Injection-Info: reader02.eternal-september.org; posting-host="a5f5f70d5ec44970af8065ad8c068359";
logging-data="3626"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18w10ayG7pgGnFi28YSCIGO"
Cancel-Lock: sha1:guJbz2UzWeaet1/6bMUz1E6hAFQ=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Tue, 8 Mar 2022 08:18 UTC

George Neuner <gneuner2@comcast.net> writes:
>On Mon, 7 Mar 2022 07:02:23 -0800, Ivan Godard
><ivan@millcomputing.com> wrote:
>
>>Which is why having no precedence at all, just lexical order on the
>>page, gets rid of all the problems.
>
>Lisp tried that

And Forth and Postscript (without all these parentheses). And, for
infix, APL, Smalltalk and, as I learned here), Mary.

>... how many people today use SExpr languages?

Or any of the others.

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

Re: Around the bike shed: Instruction names and assembler syntax

<j8on5bF3b0bU1@mid.individual.net>

  copy mid

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

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.h...@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.arch
Subject: Re: Around the bike shed: Instruction names and assembler syntax
Date: Tue, 8 Mar 2022 11:49:30 +0200
Organization: Tidorum Ltd
Lines: 33
Message-ID: <j8on5bF3b0bU1@mid.individual.net>
References: <svcqrj$jj6$1@newsreader4.netcologne.de>
<svd280$fiv$1@dont-email.me> <svh2tg$j53$1@gal.iecc.com>
<svj2ki$q0p$4@newsreader4.netcologne.de> <svjblm$idv$1@dont-email.me>
<j8666pFh0klU1@mid.individual.net> <svl27r$r8m$1@dont-email.me>
<2022Mar1.133629@mips.complang.tuwien.ac.at> <864k4bf8yv.fsf@linuxsc.com>
<j8k20sF6k96U1@mid.individual.net> <86mti2ekig.fsf@linuxsc.com>
<749c68b2-8394-413d-9ce7-3e929637b392n@googlegroups.com>
<t04g2j$7ip$1@dont-email.me> <t056q0$hom$1@dont-email.me>
<%upVJ.46116$mF2.13431@fx11.iad>
<369bc250-9ea8-43ac-8ff1-c84df13b8f60n@googlegroups.com>
<t05gs7$8g1$1@dont-email.me> <j8n3j6FojdnU1@mid.individual.net>
<t071mm$gh3$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 6qaOpiqVHx0Pk3MGV2kFaQAg9Yv5xpoHMzAfzHUVCCaiOVUQmo
Cancel-Lock: sha1:RggrAnmS+llsdgtyiQMrF1hofQs=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:91.0)
Gecko/20100101 Thunderbird/91.6.2
Content-Language: en-US
In-Reply-To: <t071mm$gh3$1@dont-email.me>
 by: Niklas Holsti - Tue, 8 Mar 2022 09:49 UTC

On 2022-03-08 9:47, David Brown wrote:
> On 07/03/2022 20:09, Niklas Holsti wrote:
>>
>> In some viruses (I believe) the genetic code can be read in both
>> directions along the DNA or RNA strand, and each direction produces
>> different useful proteins.
>
> I know this is getting /really/ off-topic, but do you have any
> references for that? I know that transcription from DNA to RNA can run
> in both directions at once, but AFAIUI in eukaryotes there are
> mechanisms in place to identify the wrong half and reject it.
>
> From the way proteins are coded and the complexity of most of them, I
> find it hard to imagine that you could get two useful proteins from the
> same RNA in different directions - it's like trying to run a
> byte-reversed program. It is (to me) a lot more believable that there
> are bits of virus DNA or RNA that are simply backwards.

My recollection may be at fault, and I may have confused "direction"
with "sense" (that is, strand complementarity). Or I may have
mis-remembered the use of different coding-frame phases that Ivan
described (which is already an amazing feat of biology).

The section titled "Ambisense" in
https://en.wikipedia.org/wiki/Sense_(molecular_biology) seems to come
close, but perhaps it only means that the same RNA strand contains
sections that are read in one direction, and sections that are read in
the other direction, but no section is read in both directions. That
resembles the alternation of reading direction line by line that Ivan
also described. So, sorry, that is the closest I can come to a
reference. I would not have made my comment in a serious discussion
without checking it better.

Pages:12345678910
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor