Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!husc6!bloom-beacon!think!ames!ptsfa!hoptoad!academ!uhnix1!sugar!peter From: peter@sugar.UUCP (Peter DaSilva) Newsgroups: comp.lang.c,comp.lang.forth,comp.lang.misc Subject: The winner! Message-ID: <398@sugar.UUCP> Date: Tue, 14-Jul-87 08:48:15 EDT Article-I.D.: sugar.398 Posted: Tue Jul 14 08:48:15 1987 Date-Received: Sun, 19-Jul-87 06:38:09 EDT Organization: Sugar Land UNIX - Houston, TX Lines: 32 Keywords: ; anybody recognise this piece of code? Xref: mnetor comp.lang.c:3154 comp.lang.forth:89 comp.lang.misc:553 > > #pragma asm PDP-11 > > mov (IP)+,WP ; anybody recognise this > > jmp @(WP)+ ; piece of code? > > #pragma C > NEXT for FORTH? > --- > G. Ralph Kuntz N2HBN UUCP: {ihnp4,allegra}!attunix!grk > ARPA: rutgers.rutgers.edu!pisc2b!grk > PACKET: N2HBN @ NN2Z Give the man a cigar. More precisely, it's the NEXT from John James' FIG_FORTH for the PDP-11, and one of my main reasons for considering the PDP-11 instruction set the best thing DEC ever came up with (yes, I know the VAX is sexier, but it's evolutionary... not revolutionary). Using direct threaded code, you can actually implement both NEXT and DOCOL in one instruction apiece. NEXT: jmp (IP)+ DOCOL: jsr (IP),I challenge anyone to come up with a faster interpreter anywhere (how can you beat one instruction?). This is actually what the threaded interpreter for the threaded version of DEC fortran-IV used, with R4==IP. -- -- Peter da Silva `-_-' ...!seismo!soma!uhnix1!sugar!peter (I said, NO PHOTOS!)