! (c) copyright 1984 by the Vrije Universiteit, Amsterdam, The Netherlands. ! Explicit permission is hereby granted to universities to use or duplicate ! this program for educational or research purposes. All other use or dup- ! lication by universities, and all use or duplication by other organiza- ! tions is expressly prohibited unless written permission has been obtained ! from the Vrije Universiteit. Requests for such permissions may be sent to ! Dr. Andrew S. Tanenbaum ! Wiskundig Seminarium ! Vrije Universiteit ! Postbox 7161 ! 1007 MC Amsterdam ! The Netherlands ! Organizations wishing to modify part of this software for subsequent sale ! must explicitly apply for permission. The exact arrangements will be ! worked out on a case by case basis, but at a minimum will require the or- ! ganization to include the following notice in all software and documenta- ! tion based on our work: ! This product is based on the Pascal system developed by ! Andrew S. Tanenbaum, Johan W. Stevenson and Hans van Staveren ! of the Vrije Universiteit, Amsterdam, The Netherlands. ! !========================================================================= ! This is an interpreter for EM programs with no virtual memory for the ! the PMDS-II . This interpreter is adapted from an interpreter which was ! made for the pdp11 by Evert Wattel and Hans van Staveren . The present ! version is made by Freek van Schagen ! Vrije Universiteit ! Amsterdam. !------------------------------------------------------------------------- ! The program requires preprocessing by the C-preprocessor . There are ! several options : ! lword: 4byte word size in stead of 2 byte word size ; ! test: checking for undefined variables , nil pointers ! array indices , overflow , etc ; ! last: generation of a file with the last 16 lines executed ; ! count: generation of a file with a flow count ; ! flow: generation of a file with a flow bitmap ; ! prof: generation of a file with a runtime profile ; ! opfreq: generation of a file with a frequency count per opcode. !-------------------------------------------------------------------------- ! Memory layout: ! -------------------------------------------------------------------------- ! | | | | | | | | | | ! | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | ! | | | | | | | | | | ! -------------------------------------------------------------------------- ! 1: Interpreter text+data+bss. ! 2: EM text. ! 3: EM procedure descriptors. ! 4: EM global data area. ! 5: tables for flow , count , profile. ! 6: EM heap area. ! 7: EM local data and stack. ! 8: Arguments to the interpreter . !REGISTER USE ! pc programcounter ! a7=sp stackpointer d7 if lword: 1 , if not lword: 0 ! a6 external base= eb d6 0 ! a5 scratch d5 scratch ! a4 address of loop d4 scratch ! a3 EM programcounter d3 scratch ! a2 local base =lb d2 scratch ! a1 address of return area d1 scratch ! a0 scratch d0 opcode byte and scratch