From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,9d5e1d36489fe2af X-Google-Attributes: gidf7344,public X-Google-Thread: fd705,87b7d570508d0b41 X-Google-Attributes: gidfd705,public X-Google-Thread: 1164f8,87b7d570508d0b41 X-Google-Attributes: gid1164f8,public From: Jerry Leichter Subject: Re: CDC-6600 Date: 1997/01/23 Message-ID: <32E7D03D.754A@smarts.com>#1/1 X-Deja-AN: 211774030 references: <1E061566A2E@orchid.le.ac.uk> <32CBACD3.2AC0@videotron.ca> to: Michael Moroney content-type: text/plain; charset=us-ascii organization: System Management ARTS mime-version: 1.0 newsgroups: comp.os.vms,comp.sys.dec,alt.folklore.computers x-mailer: Mozilla 3.01Gold (X11; I; SunOS 5.5 sun4d) | It was the A registers (18 bits) that were paired with the X registers | (60 bits). There were also B registers (18 bits). There were 8 of | each. | | ...[S]etting the value of an A register caused something to happen to | the corresponding X register. A1-A5 caused X1-X5 to be loaded from | memory, A6-A7, caused X6-X7 to be stored to memory. A0/X0 had no | connection. | | The B registers were index registers.... | | (exercise: From this, develop a sequence that saves or loads ALL | registers to/from memory given the above. It's harder than it looks!) Actually, it's not just *harder* than it looks - as posed, the problem can't be solved! (There *is* a solution, but it involves knowing that the subroutine call instruction on the 6600 planted the return address - well, a *junp* to the return address - at the beginning of the routine being called.) BTW, while many people know the "save all registers" question, not many realize that *restoring* all registers is at least as hard! (You can't do it using the parts of the instruction set defined so far either....) (And even once you figure out the trick - which involves one of the rarely-used FP instructions - you *still* will probably find that your code restores -0 incorrectly! That's easy to fix - but you have to think of it.) -- Jerry