At 06:21 PM 7/14/2012, Richard wrote:
In article <4FFEAC19.2080507 at update.uu.se>,
Johnny Billquist <bqt at update.uu.se> writes:
However, with only 13 bits for integers in TECO,
I'm not sure how you
would go about to solve it in a reasonable way...
I'm not sure why you think TECO has 13-bit integers on a 12-bit
machine...
I'm not sure why you don't think it does. The fact is that TECO-8 does
13-bit math.
It's a PDP-8, after all - combining the AC with the link bit gives you
13 bits. TECO-8 retains the full AC and Link for Q-register numeric
values and numeric operations. That's why you can get a return value
from ^B that's basically 4096 added to the 12-bit
date word. How are
you going to add 4096 to a 12-bit value and make a difference?
Or, I can quote from the DEC documentation [1]:
H.16 Arithmetic Precision
TECO-8 performs 13-bit arithmetic except that multiplication
and division by
negative numbers gives unpredictable results. All numbers
stored in Q-registers
are 13 bits long. Numbers stored in flags (such as ET, EU,
etc.) are only 12-bits
long. When storing a number into a flag, the high order (sign
bit) is lost. When
using the value of a flag in an arithmetic expression, the
12-bit value is sign
extended first.
[1]
<http://h71000.www7.hp.com/doc/73final/documentation/pdf/teco.pdf>http://h71000.www7.hp.com/doc/73final/documentation/pdf/teco.pdf
(It's good to see credit for the TECO-32 creator in this document.)
-Rick