Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-05 - decus/20-0143/struct.rnd
There are 2 other files named struct.rnd in the archive. Click here to see a list.
.SUBTTL R.P.NIX  11/21/78
.TITLE STRUCTURED PROGRAMMING MACROS
.lm 10.rm 70
.center;DECsystem-10 Structured Programming Macros
.skip 3
.paragraph -5,1,5
.autoparagraph
 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:
.list 1
.nj.nf
.le;WHILE / ENDWHILE
%WHILE _<conditions_> ; DO
###(code)
%ENDWHILE
.LE;IF / ELSE / ENDIF
%IF _<conditions_> ; THEN
###(true code)
%ELSE
###(false code)
%ENDIF
.SKIP 1
#####- OR -
.SKIP 1
%IF _<conditions_> ; THEN
###(true code)
%ENDIF
.LE;REPEAT / UNTIL
%REPEAT
###(code)
%UNTIL _<conditions_>
.LE;CASE / WHEN / ENDCASE
%CASE
#%WHEN _<conditions> ; DO
###(code)
#%WHEN _<conditions_> ; DO
###(code)
%ENDCASE
.LE;LOOP / EXITIF / ENDLOOP
%LOOP
###(code)
#%EXITIF _<conditions_>
###(code)
%ENDLOOP
.END LIST
.f.j
 _<conditions_> is defined as:
.skip 1
.nj.nf
_<instr,afield,bfield,cond_>
_<_<conditions_>,AND,_<conditions_>_>
_<_<conditions_>,OR,_<conditions_>_>
_<NOT,_<conditions_>_>
.f.j
 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:
.skip 1
.nj.nf
Robert P. Nix
AMAX Coal Company
105 S. Meridan Street
Indianapolis, Indiana  46225
.f.j
 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.