Path: utzoo!attcan!uunet!steinmetz!davidsen From: davidsen@steinmetz.ge.com (William E. Davidsen Jr) Newsgroups: comp.arch Subject: Execute instructions Keywords: writing return address to routine front Message-ID: <11588@steinmetz.ge.com> Date: 20 Jul 88 13:51:54 GMT Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 31 The old GE600 series had two instructions called XEC (execute) and XED (execute double). What these did was to fetch an operation from the target location and execute it (or them) while leaving the IC pointing at the XED instruction. Since the machine was able to apply IC modification to any operation, jumps relative to the original instruction were allowed. Here is how it could be used for a procedure call: xed proc1 ; call proc1 proc1: even stc1 stak,di ; push on stack "stak" the IC+1 and ; flags, IC still at XED jmp *+1 ; 1st instruction in proc1 . . ldi stak,i ; reload flags, skip if not needed jmp stak,idc ; return to caller (I may not have the ; modifier right on this one) What other machines have this type feature, and do people use it anymore? It allowed the called program to save the registers modified, was a one word calling sequence, and didn't destroy ANY registers (the regular calls set the return in a register). It also saved the flags, which could be preserved or not. -- bill davidsen (wedu@ge-crd.arpa) {uunet | philabs | seismo}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me