Pascal's triangle: Difference between revisions
Content deleted Content added
PatGarrett (talk | contribs) m →{{header|360 Assembly}}: Superfluous blanks suppressed |
PatGarrett (talk | contribs) m →{{header|360 Assembly}}: shorter |
||
Line 22:
BH ELOOPN if n>m then goto
MVC U,=F'1' u(1)=1
LA R6,1 i=1
BH
LR R1,R6 i
SLA R1,2 i*4
Line 31 ⟶ 32:
AR R3,R4 t(i)+t(i+1)
ST R3,U(R1) u(i+1)=t(i)+t(i+1)
▲ELOOPI1 LA R8,PG pgi=@pg
LR R1,R6 i
SLA R1,2 i*4
Line 44 ⟶ 39:
LA R8,4(R8) pgi=pgi+4
LA R6,1(R6) i=i+1
B
XPRNT PG,80 print
LA R7,1(R7) n=n+1
Line 56 ⟶ 51:
PG DC CL80' ' pg init ' '
XD DS CL12 temp
YREGS
END PASCAL</lang>
{{out}}
|