Re: Polysemy in programming langs
From: | Ph. D. <phild@...> |
Date: | Wednesday, April 21, 2004, 3:00 |
Mark J. Reed wrote:
>
> Ph.D> As I recall, the shift was always one bit, but you could
> Ph.D> specify shifting only the AC or the AC and "link" bit as
> Ph.D> a unit.
>
> JWC> Nope, not the PDP-8. The assembler mnemonics were RAL/RAR (rotate AC
> JWC> and link left/right) and RTL/RTR (rotate AC and link twice
left/right).
>
> Ph. D may be thinking of other small computers of the era. For
> instance, on the MOS 6502 chip (the brains of the Apple ][, Commodore
> and Atari 8-bit computers, and many 1980s stand-up video games), you had
> a choice of "Shift" operations (ASL/LSR), which shifted into but not out
> of the "link" (the processor status register's carry bit), and
> "Rotate" operations (ROL/ROR), which used the link both ways. So the
> correct sequence for a four-byte shift was ASL, ROL, ROL, ROL.
Hey, it was thirty years ago! :-)
Speaking of old computers, does anyone remember the computer
made by the Singer Sewing Machine Company? Yep, they once
made a computer system back in around 1970.
It was strictly a storage-to-storage machine using six-bit bytes. They
eliminated the 32 control codes and the lowercase letters from
ASCII. Each instruction was ten bytes long. Each instruction had
two addresses of four bytes each so 10000 bytes could be
addressed. All arithmetic was performed in base ten. There were
only fourteen instructions:
MC Move 1-100 bytes from address1 to address2
MN Move numeric (only the lower four bits of each byte)
MA Move address (only the lower five bits of each byte)
C Compare up to 100 bytes at address1 to address2 and set
condition codes
E Format a number at address1 into an edit mask at address2
A Add number at address1 to the number at address2
S Subtract number at address1 from the number at address2
M Multiply address1 by address2 giving a double sized result
starting at address2
D Divide double sized number at address2 by the number at
address1.
FN Form Numeric (strip all non-digits from the string at address1
into address2)
R Read from a device (workstation or mas storage) into memory
W Write from memory to device
BC Branch on condition code
X Exchange the bytes addressed by address1 with those
addressed by address2
All arithmetic was performed on strings of up to ten digits. The four
digits starting at local address 11 could be used as index "register"
one. Ditto for index "registers" two and three at 21 and 31 respectively.
The Singer supported up to nineteen workstations. Each had its own
10000 bytes of local memory, and there was another 10000 bytes in
a common area. Because of the limited memory, lots of overlays
were used. The macro assembler was the most powerful I've ever
used. It contained an assembly-time language very similar to SNOBOL
for working with character strings. The Branch instruction had options
for calling subroutines. These could be combined so one could call
a subroutine only if a certain condition code was set.
--Ph. D.