News for hackers. Stuff that matters.
Re:Bitcoin mining on a vintage Xerox Alto: very slow at 1.5 ... by rjsw on Sunday July 02, 2017 @01:46PM (#14683512)
My copy of The TTL Data Book suggests that the ALU was able to do XOR, an earlier blog post stated that microcode opcode bits go through a table instead of being fed directly to the 74181 function pins.

I wonder why Xerox didn't want to use all the ALU features.

Re:Bitcoin mining on a vintage Xerox Alto: very slow at 1.5 ... by kens on Sunday July 02, 2017 @01:57PM (#14683563)
In microcode, the Alto provides the 16 most useful functions of the 74181 (calling most of the 74181's operations "mostly useless"). This includes XOR and OR. However, the Alto copied the Data General Nova's instruction set, which doesn't include OR and XOR, so you can't use these instructions from machine code. I think there's extended microcode that provides "extra" instructions for XOR and OR and an improved BCPL compiler to make use of them, but I haven't tracked it down.

See the Alto hardware manual (page 4) on bitsavers for details: http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/alto/...

Re:Bitcoin mining on a vintage Xerox Alto: very slow at 1.5 ... by userbinator on Sunday July 02, 2017 @02:09PM (#14683616)
Here is a document I found on the DG Nova instruction set:

http://users.rcn.com/crfriend/museum/doco/DG/Nova/base-instr...

If you scroll down to "Arithmetic/Logic Instructions" you'll see that they did not have room for XOR nor OR, since several of the 8 opcodes that fit into the 3-bit field are what we'd normally think of as "one-operand", but have been expanded to be "two-operand" (oddly enough, there is an increment but no decrement instruction either.)

It's interesting to compare to two other well-known CPUs with a 3-bit ALU opcode field:

The Z80's (and 8008/8080/8085) ALU opcodes are: ADD/ADC/SUB/SBC/AND/XOR/OR/CP

The x86's ALU opcodes are: ADD/OR/ADC/SBB/AND/SUB/XOR/CMP

Re:Bitcoin mining on a vintage Xerox Alto: very slow at 1.5 ... by kens on Sunday July 02, 2017 @02:22PM (#14683685)
That's an interesting comparison with microprocessor ALU operations. (6502 is similar to Intel but doesn't have add/subtract without carry.)

Note that the Nova uses two additional instruction bits for the carry. Thus, the Intel instruction sets use two of the 8 opcodes for add with carry and subtract with borrow/carry, but the Nova doesn't. So it should be easier for the Nova to fit in additional useful ALU instructions. (Not to mention the Nova has 16-bit instructions.)

Re:Bitcoin mining on a vintage Xerox Alto: very slow at 1.5 ... by rjsw on Sunday July 02, 2017 @02:14PM (#14683646)
From your link there looks to be two functions spare, I guess you would need a new PROM to make use of them though.

The MIT Lisp Machine does just map microcode instruction bits onto the 74181 function pins but it has much wider microinstructions than the 32-bit Alto ones.

Re:Bitcoin mining on a vintage Xerox Alto: very slow at 1.5 ... by zkms on Sunday July 02, 2017 @05:23PM (#14684427)
Is there documentation/examples for how to program the Alto's microcode?
Re:Bitcoin mining on a vintage Xerox Alto: very slow at 1.5 ... by kens on Sunday July 02, 2017 @06:15PM (#14684626)
The Alto hardware manual explains how the microcode works (see sections 2 and 9 and try to memorize Figure 1). For examples, see the existing Alto microcode. The subsystem manual p90 describes the MU microcode assembler and the syntax. See also RPRAM in the subsystem manual that describes how to load microcode into control RAM. I haven't seen anything like a howto/tutorial for microcode in the Alto documentation.

http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/alto/... http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/alto/... http://www.mirrorservice.org/sites/www.bitsavers.org/pdf/xer...

If you want to try this stuff out for yourself (and don't have an Alto handy), use the ContrAlto emulator: https://github.com/livingcomputermuseum/ContrAlto

Re:Bitcoin mining on a vintage Xerox Alto: very slow at 1.5 ... by jecel on Monday July 03, 2017 @03:55PM (#14690931)
An option is to use the BITBLT instruction which could be called from BCPL:

ftp://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/alto/BitBLT_Nov1975.pdf

Dan Ingalls showed how to implement the Game of Life and how to rotate bitmaps using this instruction in a SIMD style. While BITBLT implemented all 16 possible boolean functions, not all were equally fast.