Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.sys.pdp10 > #9956

Re: Accumulator naming

From Rich Alderson <news@alderson.users.panix.com>
Newsgroups alt.sys.pdp10
Subject Re: Accumulator naming
Date 2026-07-30 18:56 -0400
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <mddv79wjdc8.fsf@panix5.panix.com> (permalink)
References <87wlulwflh.fsf@atr2.ath.cx> <mdd33x9cbvq.fsf@panix5.panix.com> <87se579i01.fsf@atr2.ath.cx> <mddqzklxxa5.fsf_-_@panix5.panix.com> <87zez8pkku.fsf@atr2.ath.cx>

Show all headers | View raw


jayjwa <jayjwa@atr2.ath.cx.invalid> writes:

> Rich Alderson <news@alderson.users.panix.com> writes:

>> Why shouldn't they then be referred to by numeric addresses just like
>> the rest of memory?

> It's confusing to new students and looks weird. Consider:

>         PRINT   (MESS)
>         move    1, save                         ; Setting up RDTTY%
>         movei   2, 10                           ; for 8 chars
>         setz    3,                              ; No reprompter ctrl-r
>         rdtty%

> 2,10? There's integers on both sides of the comma. And the SETZ
> instruction looks like someone forgot to type part of the
> line. Probably, if you've looked at it for 30+ years it makes sense, and
> I am getting used to it by now, but it's the only CPU architecture I
> could find going forward that does this.

The IBM System/360 was my first assembler language experience, where as noted
elsewhere in this thread the general registers are numbered 0 to F (I learned
hexadecimal before I learned octal), but are not mapped to memory.[1]  The
floating point registers are number 0, 2, 4, 6, and IIRC 8, but I'm not going
to go look that up right now.

So your experience is actually quite limited.

> https://en.wikipedia.org/wiki/PDP-11_architecture  (PDP-11)
> https://cybersandeep.gitbook.io/arm64basicguide/chapter-2-understanding-arm64-registers  (ARM64)
> https://www.ece.lsu.edu/ee4720/doc/vax-11780-arch-handbook.pdf  (VAX)
> (page 3-4 in the PDF itself, not your reader)
> https://math.hws.edu/eck/cs220/f22/registers.html  (x86-64)
> https://en.wikipedia.org/wiki/MOS_Technology_6502#Registers  (6502)
> https://en.wikibooks.org/wiki/68000_Assembly/Registers  (68000)

All much newer architectures than real iron. ;-)

> It's easier, at least for me, to make a "mental map" of where things are
> when they have names rather than numbers, even if those names are
> short. It's easier to recall "watermellon", "apple", "grape" than 39,
> 23, 5 even though both sets are decending in magnitude. We can assign
> names, but see my next reply...

>> Secondly, unlike the named registers in the X86/X64 architecture,
>> there are no special case uses in the hardware for any accumulator.

> I'm not sure if this is bad or good, but it's a bit like driving in the
> city with no road markings. I've been using STDAC. since I found out
> about it, and its mere presence indicates there was a need for it, but
> people often do as follows (code from an ITS program):

> A=1
> B=2
> T=10
> TT=11
> Q=16
> P=17
> ...

> LITES0: MOVE Q,PC
>         POP P,A
>         JSP Q,(Q)                       ;Coroutine call.
>         MOVEM Q,PC
>         DATAO PI,A                      ;Display A on memory indicators.
>         SOS TICK
>         POPJ P,

> That is, assign accums as they see fit.

The reason for STDAC. is precisely so that programmers do not have to learn
each other's coding preferences, but early on we were in the Wild West.

For example, in the source for Macro-10, we find the following:

AC0==   0
AC1=    AC0+1
AC2=    AC1+1
SDEL=   3                       ;SEARCH INCREMENT
SX=     SDEL+1                  ;SEARCH INDEX
ARG=    5                       ;ARGUMENT
V=      6                       ;VALUE
C=      7                       ;CURRENT CHARACTER
CS=     C+1                     ;CHARACTER STATUS BITS
RC=     11                      ;RELOCATION BITS
MWP=    12                      ;MACRO WRITE POINTER
MRP=    13                      ;MACRO READ POINTER
IO=     14                      ;IO REGISTER (LEFT)
ER==    IO                      ;ERROR REGISTER (RIGHT)
FR=     15                      ;FLAG REGISTER (LEFT)
FRR==   FR                      ;[613] MOVE FLAGS (RIGHT)
MP=     16                      ;MACRO PUSHDOWN POINTER
P=      17                      ;BASIC PUSHDOWN POINTER

In real life, I currently am working on a new release of Macro-20; in order to
do that, I had to drop all expectations for which ACs would be used to do what
(since it began as a PDP-10/Tops-10 program).

With great freedom comes great responsibility, and all that...  

[1] In 360 assembler, they are written in decimal, so 0 to 15.

-- 
Rich Alderson					  news@alderson.users.panix.com
      Audendum est, et veritas investiganda; quam etiamsi non assequamur,
	  omnino tamen proprius, quam nunc sumus, ad eam perveniemus.
									--Galen

Back to alt.sys.pdp10 | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Fizz Buzz jayjwa <jayjwa@atr2.ath.cx.invalid> - 2026-07-23 17:39 -0400
  Re: Fizz Buzz Rich Alderson <news@alderson.users.panix.com> - 2026-07-23 23:19 -0400
    Re: Fizz Buzz jayjwa <jayjwa@atr2.ath.cx.invalid> - 2026-07-25 12:00 -0400
      Re: Fizz Buzz Rich Alderson <news@alderson.users.panix.com> - 2026-07-25 18:05 -0400
        Re: Fizz Buzz jayjwa <jayjwa@atr2.ath.cx.invalid> - 2026-07-26 11:12 -0400
      Accumulator naming Rich Alderson <news@alderson.users.panix.com> - 2026-07-29 18:10 -0400
        Re: Accumulator naming scott@slp53.sl.home (Scott Lurndal) - 2026-07-30 15:14 +0000
          Re: old architectures, was Accumulator naming John Levine <johnl@taugh.com> - 2026-07-30 20:40 +0000
          Re: Accumulator naming Rich Alderson <news@alderson.users.panix.com> - 2026-07-30 18:41 -0400
        Re: Accumulator naming jayjwa <jayjwa@atr2.ath.cx.invalid> - 2026-07-30 11:24 -0400
          Re: Accumulator naming scott@slp53.sl.home (Scott Lurndal) - 2026-07-30 16:03 +0000
          Re: Accumulator naming Rich Alderson <news@alderson.users.panix.com> - 2026-07-30 18:56 -0400
            Re: Accumulator naming cross@spitfire.i.gajendra.net (Dan Cross) - 2026-07-30 23:48 +0000
              Re: Accumulator naming John Levine <johnl@taugh.com> - 2026-07-31 01:31 +0000
                Re: Accumulator naming cross@spitfire.i.gajendra.net (Dan Cross) - 2026-07-31 02:52 +0000
                Re: Accumulator naming John Levine <johnl@taugh.com> - 2026-07-31 03:36 +0000
                Re: Accumulator naming Lars Brinkhoff <lars.spam@nocrew.org> - 2026-07-31 13:40 +0000
          Re: Accumulator naming Lars Brinkhoff <lars.spam@nocrew.org> - 2026-07-31 13:35 +0000
          the Ten Heavenly Stems (was Re: Accumulator naming) Kragen Javier Sitaker <kragen@canonical.org> - 2026-09-11 16:07 -0300
            Re: the Ten Heavenly Stems (was Re: Accumulator naming) Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-09-14 01:12 +0800
              Re: the Ten Heavenly Stems (was Re: Accumulator naming) Kragen Javier Sitaker <kragen@canonical.org> - 2026-09-14 14:40 -0300
                Re: the Ten Heavenly Stems (was Re: Accumulator naming) scott@slp53.sl.home (Scott Lurndal) - 2026-09-14 18:09 +0000
                Re: the Ten Heavenly Stems (was Re: Accumulator naming) quadibloc@invalid.com (John Savard) - 2026-10-26 03:00 +0000
  Re: Fizz Buzz "Kerr-Mudd, John" <admin@127.0.0.1> - 2026-08-21 13:27 +0100

csiph-web