Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PDP-11 compat mode [was Re: New Vax - future directions :-)]

On Sat 17 Jul 2021 at 17:09:37 -0400, Mouse wrote:
> >>              C <- {borrow into most significant bit};
> >> That looks...implausible.  I believe it should be
> >>              C <- {borrow out of most significant bit};
> > You're correct; the description you cited is an obvious typo.
> A nigh-ubiquitous one!  Turns out EL-00032-00-decStd32_Jan90.txt
> contains much the same language in other places as well.  Here are the
> ones I've managed to find:

I usually think of the carry as an extra bit left to the most
significant bit of the register involved; before subtracting, set it to
1 so you can borrow from it if needed.  That is literally how it works
on the 6502 (the SuBtract-with-Carry instruction subtracts, taking the
carry also as input, and as output)

The VAX just has the actual C bit inverted after the operation (set to 1
if there was need to borrow, instead of 0 because it was borrowed from).
So you *could* describe it as "(a) borrow into most significant bit

___ "Buying carbon credits is a bit like a serial killer paying someone else to
\X/  have kids to make his activity cost neutral." -The BOFH    falu.nl@rhialto

Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index