2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -0,0 +1,20 @@
|
|||
* Loops/For with a specified step 12/08/2015
|
||||
LOOPFORS CSECT
|
||||
USING LOOPFORS,R12
|
||||
LR R12,R15
|
||||
* == Algol style ================ test at the beginning
|
||||
LA R3,BUF idx=0
|
||||
LA R5,0 from 5 (from-step=0)
|
||||
LA R6,5 step 5
|
||||
LA R7,25 to 25
|
||||
LOOPI BXH R5,R6,ELOOPI for i=5 to 25 step 5
|
||||
XDECO R5,XDEC edit i
|
||||
MVC 0(4,R3),XDEC+8 output i
|
||||
LA R3,4(R3) idx=idx+4
|
||||
B LOOPI next i
|
||||
ELOOPI XPRNT BUF,80 print buffer
|
||||
BR R14
|
||||
BUF DC CL80' ' buffer
|
||||
XDEC DS CL12 temp for edit
|
||||
YREGS
|
||||
END LOOPFORS
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
* == Fortran style ============== test at the end
|
||||
LA R3,BUF idx=0
|
||||
LA R5,5 from 5
|
||||
LA R6,5 step 5
|
||||
LA R7,25 to 25
|
||||
LOOPJ XDECO R5,XDEC for j=5 to 25 step 5; edit j
|
||||
MVC 0(4,R3),XDEC+8 output j
|
||||
LA R3,4(R3) idx=idx+4
|
||||
BXLE R5,R6,LOOPJ next j
|
||||
XPRNT BUF,80 print buffer
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
* == Algol style ================ test at the beginning
|
||||
LA R3,BUF idx=0
|
||||
LA R5,5 from 5
|
||||
LA R6,5 step 5
|
||||
LA R7,25 to 25
|
||||
DO WHILE=(CR,R5,LE,R7) for i=5 to 25 step 5
|
||||
XDECO R5,XDEC edit i
|
||||
MVC 0(4,R3),XDEC+8 output i
|
||||
LA R3,4(R3) idx=idx+4
|
||||
AR R5,R6 i=i+step
|
||||
ENDDO , next i
|
||||
XPRNT BUF,80 print buffer
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
* == Fortran style ============== test at the end
|
||||
LA R3,BUF idx=0
|
||||
DO FROM=(R5,5),TO=(R7,25),BY=(R6,5) for i=5 to 25 step 5
|
||||
XDECO R5,XDEC edit i
|
||||
MVC 0(4,R3),XDEC+8 output i
|
||||
LA R3,4(R3) idx=idx+4
|
||||
ENDDO , next i
|
||||
XPRNT BUF,80 print buffer
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
* Loops/For with a specified step 12/08/2015
|
||||
LOOPFORS CSECT
|
||||
USING LOOPFORS,R12
|
||||
LR R12,R15
|
||||
BEGIN LA R3,MVC
|
||||
SR R5,R5 index
|
||||
LA R6,5 step 5
|
||||
LA R7,25 to 25
|
||||
LOOPI BXH R5,R6,ELOOPI for i=5 to 25 step 5
|
||||
XDECO R5,XDEC
|
||||
MVC 0(4,R3),XDEC+8
|
||||
LA R3,4(R3)
|
||||
NEXTI B LOOPI next i
|
||||
ELOOPI XPRNT MVC,80
|
||||
XR R15,R15
|
||||
BR R14
|
||||
MVC DC CL80' '
|
||||
XDEC DS CL12
|
||||
YREGS
|
||||
END LOOPFORS
|
||||
Loading…
Add table
Add a link
Reference in a new issue