                NOTE   to   tape   copy   people:   This
                contribution  contains  a  few   library
                (.olb) and object (.obj) files which are
                necessary for this to work properly. The
                program  herein is written in itself and
                therefore   the   sources   cannot    be
                translated    without    the   bootstrap
                version. 

    This directory contains a new version  of  the  Mp  macroprocessor
    found on the last tape. 

    This  version  has  a debugger, is smaller and faster, has sources
    supplied (80% or more has now been  rewritten  the  rest  is  only
    supplied  in  object  form  since  you  couldn't  do  much with it
    anyway). Thanks again to David Conroy for his fantastic C compiler
    and runtime library which I shamelessly copied. 

    For  those  of  you who liked supermac but did not like waiting on
    macro-11, the following may be of interest. A  1060  line  program
    took  2:45  to  compile (1:45 of it was macro-11) on a slow 11/45.
    Since the language supports independent subroutines (like  fortran
    or  C)  it is rather easy to test small pieces separately and then
    put them all together into one file when done.  When  testing  out
    new  code  the  usual  time to generate a reasonable object module
    from say 150 lines of code was about 15 seconds.  This  is  faster
    than  either  of  our C compilers or Pascal, F4p or anything other
    than the old FOR compiler. Task builds are also  very  fast  since
    the runtime is so small and FTB can be used. 

    To build:           tkb @mp.bld     also see make.cmd
    Documentation:      *.doc
    Command files:      mpex.cmd        Aids in running compiling,
					tailored to authors system.
					(This my version of cc).
			test.cmd        tests out if you got it built
					successfully

    Submitted by:

    Eric Levy
    Jet Propulsion Lab  264/125
    Pasadena Calif.

The following is an example Mp function. As you can see, it looks a little
like  a  strange C program. This was intended. It also can have any amount
of macro-11 code imbeded and is calling sequence compatible with  C.  (The
pretty print is the output of indent.bas). 

	auto ln,proc                    ;These are local stack variables
function breaks[nf,str,ptr,btype] is local ;breakpoint setup function
        select a btype from below       ;only `btype' used rest is just comment
        case 0                          ;`b'  breakpoint setup
        |   r4 := val[arg1,10]          ;get bin value of 1st command parm
        |   if nf gt 2                  ;if number of fragments gt 2
        |   |   r3 := lfunc[arg2]       ;we can get the function pointer
        |   |   if r3 = -1              ;but it better not be -1
        |   |   |   call err            ;or screem
        |   |   |   ret
        |   |   else
        |   |   |   if  insb[r3,r4] lt 0 ;install a breakpoint in named func
        |   |   |   |   call noroom      ;if it returns lt 0 nogood
        |   |   |   |...fi
        |   |   |...fi
        |   elseif nf = 2               ;on the other hand, exactly 2
        |   |   if  insb[dcur,r4] lt 0  ;arguments means install it using
        |   |   |   call noroom         ;default of current routine
        |   |   |...fi
        |   else
        |   |   jmp bl2                 ;horrors a goto!!! treat `b' as `bl'
        |   |...fi
        |   break
        case 1                          ;`bd' delete breakpoint
        |   if nf = 2                   ;delete specific one
        |   |   delb[val[arg1,10]]
        |   else                        ;or all of em
        |   |   loop for r4 = 0 to #nbrk-1      ;nbrk is a global def
        |   |   |   delb[r4]            ;delete breakpoint number r4
        |   |   |...next r4
        |   |...fi
        |   break
        case 2                          ;`bl' list breakpoints
bl2:    |
        |   loop for r4 := 0 to #nbrk-1   ;this displays current breakpoints
        |   |   if .bline[r4] ne 0         ;. is the array operator
        |   |   |   r3 := .bfunc[r4]
        |   |   |   printf "Brk %d: %6s ln %d proc=%d" r4 <r3 + #fname> ln proc
        |   |   |...fi
        |   |...next r4
        |...esac
        ret
        .end
