šŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.linux.misc
Article #2101

Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)

#2101
From: Richard Kettlewell
Date: Fri, 06 Nov 2026 08:46
43 lines
3765 bytes
Lawrence D’Oliveiro <ldo@nz.invalid> writes:
> Carlos E. R. wrote:
>> The 68000 had a beautiful assembler. Or rather, a beautiful
>> instruction set.
>
> Definitely inspired by the PDP-11. Pity it was big-endian. Also, the
> division into ā€œaddressā€ versus ā€œdataā€ registers did seem to be a step
> backwards.
>
> Here’s one trivia question: the decrement-and-branch instruction would
> fall out of the loop when the count reached -1, not 0 as the
> equivalent instruction in nearly every other computer architecture
> did. Why?

At the surface level, because DBcc is a rather bizarrely shaped
instruction, with the condition code applying to the whole instruction
rather; operating with inverse sense; and branching unless the decrement
results in a value of -1 (i.e. 0xFFFF). So there’s _two_ conditional
steps (unless the condition is a constant, e.g. the common use of
DBF). Page 4-90 in the PRM[1] shows the definition.

So there’s several things to explain. I don’t have access to the
thinking of the designers, but I think the following are plausible
explanations:

1) The whole-instruction conditionality allows for early exits from
   loops (depending of course how they are structured). So you get two
   checks for a single instruction.

2) Using 0xFFFF for the sentinel value comes, microarchitecturally, ā€˜for
   free’ because it just means checking the carry out from the
   decrement, which is 1 in precisely the situation where the decrement
   reaches -1. Using 0 as the sentintel would mean testing the whole
   result value.

3) The inverse sense of the conditional. The PRM explains this one in
   terms of ā€˜UNTIL’ loops, which were perhaps more popular in the
   programming languages of the time than they are today.

[1] https://www.nxp.com/docs/en/reference-manual/M68000PRM.pdf

-- 
https://www.greenend.org.uk/rjk/
Technical Details
Message-ID: <wwvmrrmmjoe.fsf@LkoBDZeT.terraraq.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.uk!not-for-mail
References: <18dee4b6cab427fa$865$2574533$802601b3@news.usenetexpress.com> <ayudnc43iJgfVXr3nZ2dnZfqn_adnZ2d@giganews.com> <11c8mg3$2e89e$2@kst.eternal-september.org> <_ZucnafJTvBFc3r3nZ2dnZfqnPGdnZ2d@giganews.com> <11c8rq9$1e6t$1@gal.iecc.com> <nkqj0vFftq4U8@mid.individual.net> <URVFS.20180$1WK1.4115@fx14.ams4> <nkqpvsFftq4U9@mid.individual.net> <%Y_FS.30812$Gsmc.9148@fx17.ams4> <nks7oaF2rmsU2@mid.individual.net> <20261103155316.609@kylheku.com> <BRedndRyj8uMNnf3nZ2dnZfqnPSdnZ2d@giganews.com> <20261105095148.000026b0@gmail.com> <nl42ntF2rmsU25@mid.individual.net> <20261105121255.00003b4b@gmail.com> <1j6dnU7499aecXH3nZ2dnZfqn_WdnZ2d@giganews.com> <11cirsg$1votj$9@dont-email.me> <nl4afqFaf1bU7@mid.individual.net> <11cj2r4$22bch$7@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.uk!not-for-mail
From: Richard Kettlewell <invalid@invalid.invalid>
Newsgroups: comp.os.linux.misc,alt.folklore.computers
Subject: Re: [OT] Dead DEC Punch card times (was Re: Taking Speedy too seriously)
Date: Fri, 06 Nov 2026 08:46:25 +0000
Organization: terraraq NNTP server
Message-ID: <wwvmrrmmjoe.fsf@LkoBDZeT.terraraq.uk>
References: <18dee4b6cab427fa$865$2574533$802601b3@news.usenetexpress.com>
	<ayudnc43iJgfVXr3nZ2dnZfqn_adnZ2d@giganews.com>
	<11c8mg3$2e89e$2@kst.eternal-september.org>
	<_ZucnafJTvBFc3r3nZ2dnZfqnPGdnZ2d@giganews.com>
	<11c8rq9$1e6t$1@gal.iecc.com> <nkqj0vFftq4U8@mid.individual.net>
	<URVFS.20180$1WK1.4115@fx14.ams4> <nkqpvsFftq4U9@mid.individual.net>
	<%Y_FS.30812$Gsmc.9148@fx17.ams4> <nks7oaF2rmsU2@mid.individual.net>
	<20261103155316.609@kylheku.com>
	<BRedndRyj8uMNnf3nZ2dnZfqnPSdnZ2d@giganews.com>
	<20261105095148.000026b0@gmail.com>
	<nl42ntF2rmsU25@mid.individual.net>
	<20261105121255.00003b4b@gmail.com>
	<1j6dnU7499aecXH3nZ2dnZfqn_WdnZ2d@giganews.com>
	<11cirsg$1votj$9@dont-email.me> <nl4afqFaf1bU7@mid.individual.net>
	<11cj2r4$22bch$7@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.uk:172.17.207.6";
	logging-data="58710"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:MttjOKs33uJvnNrRSg+pSxuYukI=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
     F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
     +r0NzP?vnz:e/knOY)PI-
X-Boydie: NO