On Dec 8, 2011, at 08:00, Bodoh John Robert wrote:

> No save area?  GET and PUT need a save area.
>
Well, since he doesn't modify R13, they'll user his caller's
save area.  That shouldn't cause any problems.  Until he tries
to return from his program.

> COPYFILE START 0
>         YREGS
> COPYFILE CSECT ,
> COPYFILE AMODE 24
> COPYFILE RMODE 24
>         DS    0H
>         BAKR  R14,0               Save caller's ARs and GPRs
>         LR    R12,R15             Set up 1st base register
>         USING COPYFILE,R12        and inform assembler
>         OPEN  (DCBIN1,(INPUT),DCBOUT1,(OUTPUT))
> LOOP     DS    0H
>         GET   DCBIN1,INOUTBUF
>         PUT   DCBOUT1,INOUTBUF
>         B     LOOP
> EOF      DS    0H                  no more records
>         CLOSE (DCBIN1,,DCBOUT1)
>         XR    15,15
>         PR    ,
>
> DCBIN1   DCB BLKSIZE=80,DDNAME=INPUT,RECFM=FB,LRECL=80,DSORG=PS,       X
>               EODAD=EOF,MACRF=GM
> DCBOUT1  DCB BLKSIZE=80,DDNAME=OUTPUT,RECFM=FB,LRECL=80,DSORG=PS,      X
>               MACRF=PM
> INOUTBUF DS    CL80                 Input/Output Storage Area
>         END   ,

-- gil

Reply via email to