🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.asm370
Article #348

Re: SAVE/RETURN macros in AMODE 64

#348
From: Steve Comstock
Date: Fri, 16 Sep 2005 21:00
65 lines
4359 bytes
Edward E. Jaffe wrote:
> Steve Comstock wrote:
>
>>          LARL  R12,TEST64
>>          USING *,R12
>
>
>
> Ignoring the fact that the above USING is wrong, 64-bit programs are
> intended to use relative addressing. Thus, the base register would
> normally cover constants and literals only (for reentrant code) and the
> work area (for non-reentrant code). That is, under normal circumstances,
> the LARL would not point to the start of the program. I believe these
> examples may be somewhat more typical:
>
> Reentrant code:
> |         LARL  R12,TEST64_Const    Point to constants area
> |         USING TEST64_Const,R12    Synchronize base register
> |         STORAGE OBTAIN,           Acquire the work area
> |               LENGTH=WKAREA_LEN   Acquire work area
> |         STG   R1,136(,R13)        Chain save areas
> |         STG   R13,128(,R1)        (same)
> |         LGR   R13,R1              Get area address in R13
> |         USING WKAREA,R13          Synchronize WKAREA
> |         .
> |         .
> |               CNOP  0,8           Align to doubleword
> |TEST64_Const   DC    0D            Begin constants area
> |               .
> |               .
> |               LTORG ,             Define literals
> |
> |WKAREA         DSECT ,             Program work area DSECT
> |               DS    18D           Program save area
> |               .
> |               .
> |WKAREA_LEN     EQU   *-WKAREA      Length of work area
>
>
> Non-reentrant code:
> |         LARL  R1,TEST64_Const     Point to constants area
> |         STG   R1,136(,R13)        Chain save areas
> |         STG   R13,128(,R1)        (same)
> |         LGR   R13,R1              Get area address in R13
> |         USING TEST64_Const,R13    Synchronize base register
> |         .
> |         .
> |               CNOP  0,8           Align to doubleword
> |TEST64_Const   DC    0D            Begin constants area
> |               DC    18D'0'        Define program save area
> |               .
> |               .
> |               LTORG ,             Define literals


Well, good point. But I focus on using the relative addressing
approach in other places. Just trying to respond to the OP
(but blew it with the USING). Otherwise, there was no
context in his example to tell us what was needed.

[BTW, I thought you only coded reentrant code these days?]

Kind regards,

-Steve
Technical Details
Message-ID: <432B326A.30909@trainersfriend.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-14!supernews.com!149.173.6.116.MISMATCH!foggy!vm.sas.com!trainersfriend.com!steve
References: <432b0ef8$0$29922$ba620e4c@news.skynet.be> <432B1FDD.70706@trainersfriend.com> <432B306F.4010405@phoenixsoftware.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: fcdcb,5aef08407a8abe43
X-Google-Attributes: gidfcdcb,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-14!supernews.com!149.173.6.116.MISMATCH!foggy!vm.sas.com!trainersfriend.com!steve
From: Steve Comstock <steve@trainersfriend.com>
Newsgroups: bit.listserv.asm370
Subject: Re: SAVE/RETURN macros in AMODE 64
Date: Fri, 16 Sep 2005 15:00:26 -0600
Organization: SAS Inc.
Lines: 65
Sender: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU>
Message-ID: <432B326A.30909@trainersfriend.com>
References: <432b0ef8$0$29922$ba620e4c@news.skynet.be>
            <432B1FDD.70706@trainersfriend.com>
            <432B306F.4010405@phoenixsoftware.com>
Reply-To: IBM Mainframe Assembler List <ASSEMBLER-LIST@listserv.uga.edu>
NNTP-Posting-Host: mozart.unx.sas.com
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: foggy.unx.sas.com 1126905068 5674 10.19.150.41 (16 Sep 2005 21:11:08 GMT)
X-Complaints-To: usenet@unx.sas.com
NNTP-Posting-Date: Fri, 16 Sep 2005 21:11:08 +0000 (UTC)
Comments: Gated by NETNEWS@VM.SAS.COM
Return-Path: <owner-assembler-list@LISTSERV.UGA.EDU>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
X-Spam: [F=0.0100000000; heur=0.500(-26400); stat=0.010;
        spamtraq-heur=0.500(2005091609)]
X-MAIL-FROM: <steve@trainersfriend.com>
X-SOURCE-IP: [209.238.255.225]
X-Loop-Detect: 1
X-DistLoop-Detect: 1
Approved-By: Steve Comstock <steve@TRAINERSFRIEND.COM>
In-Reply-To: <432B306F.4010405@phoenixsoftware.com>
Return-Path: owner-assembler-list@LISTSERV.UGA.EDU
X-OriginalArrivalTime: 16 Sep 2005 21:11:05.0353 (UTC)
                       FILETIME=[26675790:01C5BB03]
Originator: daemon@mozart.unx.sas.com