Trailing-Edge - PDP-10 Archives - decuslib20-05 - decus/20-0143/struct.doc
There are 2 other files named struct.doc in the archive. Click here to see a list.

              DECsystem-10 Structured Programming Macros

     The  rules  for  structured  programming  show  that  only  three
          structures  of  flow  are needed to flowchart or program any
          problem.  The problem with this is that  no  facilities  are
          available  to  the  assembler programmer on most machines to
          make use of the structured programming techniques directly.

     This is what prompted the development of this set  of  structured
          programming  macros  for  the DECsystem-10.  Five structures
          are implemented:

          1.  WHILE / ENDWHILE
              %WHILE <conditions> ; DO

          2.  IF / ELSE / ENDIF
              %IF <conditions> ; THEN
                 (true code)
                 (false code)

                   - OR -

              %IF <conditions> ; THEN
                 (true code)

          3.  REPEAT / UNTIL
              %UNTIL <conditions>

          4.  CASE / WHEN / ENDCASE
               %WHEN <conditions> ; DO
               %WHEN <conditions> ; DO

          5.  LOOP / EXITIF / ENDLOOP
               %EXITIF <conditions>
STRUCTURED PROGRAMMING MACROS                                   Page 2
R.P.NIX  11/21/78

     <conditions> is defined as:


     instr is defined as a SKIP, CAI,  or  another  instruction  which
          skips  on  condition  met,  and  accepts an opcode extension
          giving the condition to be met.

     cond is defined as the opcode extension (E, N, LE, L, etc.) to be
          used with instr.

     E.G.  <<<NOT,<CAI,a,b,E>>,AND,<SKIP,a,c,N>>,OR,<TRN,a,d,E>>

     If any improvments or additions are made  to  these  macros,  any
          errors are found, or a set of similar macros are desired for
          IBM 370 series computers, please write to:

          Robert P. Nix
          AMAX Coal Company
          105 S. Meridan Street
          Indianapolis, Indiana  46225

     For the IBM macros, please send a magtape, and I will  return  it
          with  the  IBM assembler macros in DEC-10 backup/interchange
          format, 1600 or 800 bpi, 9trk.