Article View: bit.listserv.asm370
Article #49Re: Named PUSH/PUP suggestion
From: David Cole
Date: Sun, 02 Oct 2005 17:51
Date: Sun, 02 Oct 2005 17:51
47 lines
3759 bytes
3759 bytes
At 10/2/2005 01:14 PM, you wrote: >David Cole wrote: > >>Sometimes when developing code I mismatch my Assembler PUSH/POP >>statements, and finding the excess PUSH or POP often is a tedious >>process. >> >>As it happens (and for unrelated reasons), I often replace the >>Assembler PUSH/POP instructions with macros. >> >>Recently it occurred to me, why don't I give my PUSH and POP >>statements matching names... Well, the native PUSH/POP statements do >>not permit name fields, but since I'm using my own macros, then why >>not... >> >>Two advantages arise. First, with matching name fields, it's now very >>easy for me to find unmatched PUSH/POPs. >> >>Second, the name could serve as tokens allowing for a single POP to >>pop all PUSH's at and lower than the corresponding named PUSH. >> >>Third, if a named POP does not have a corresponding PUSH, then the >>assembler could flag that error on the spot. >> >>What do you think? > > >I like this suggestion! I can't see any flaws. > >Just curious: Do your macros handle the (perfectly acceptable) situation >in which a single PUSH saves multiple stackable settings (e.g., USING, >PRINT and/or ACONTROL) while various POPs restore them individually? I doubt it. (That's not the way I use PUSH/POP. I use separate PUSH/POPs for separate functions, so I haven't tested my macros for those scenarios.) My macros (along with a TITLE macro and a SYSSTATE envelop macro) were written to add text to my assembly title lines when SYSSTATE has been set to non-default values of ASCENV, ARCLVL and AMODE64. They also support "MAYBE" values when the various states in a particular piece of code are uncertain. (The MAYBE values affect only what I display in the title lines. They are not, of course, propagated into the underlying GBLx symbols.) Dave
Technical Details
Message-ID:
<6.2.3.4.2.20051002134606.0396ad48@mail.swcp.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!logbridge.uoregon.edu!tethys.csu.net!nntp.csufresno.edu!sn-xit-03!sn-xit-08!sn-xit-14!supernews.com!149.173.6.116.MISMATCH!foggy!vm.sas.com!colesoft.com!dbcoleReferences:
<6F4F88E09079204787D7CD2FB91FA8FE01793CAD@hqmail.rocketsoftware.com> <6.2.3.4.2.20051002100259.03be4008@mail.swcp.com> <43401562.6040404@phoenixsoftware.com>Show Full Headers
Complete Article Headers
X-Google-Thread: fcdcb,f622ba550323cb9
X-Google-Attributes: gidfcdcb,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!logbridge.uoregon.edu!tethys.csu.net!nntp.csufresno.edu!sn-xit-03!sn-xit-08!sn-xit-14!supernews.com!149.173.6.116.MISMATCH!foggy!vm.sas.com!colesoft.com!dbcole
From: David Cole <dbcole@colesoft.com>
Newsgroups: bit.listserv.asm370
Subject: Re: Named PUSH/PUP suggestion
Date: Sun, 2 Oct 2005 13:51:49 -0400
Organization: SAS Inc.
Lines: 47
Sender: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU>
Message-ID: <6.2.3.4.2.20051002134606.0396ad48@mail.swcp.com>
References: <6F4F88E09079204787D7CD2FB91FA8FE01793CAD@hqmail.rocketsoftware.com>
<6.2.3.4.2.20051002100259.03be4008@mail.swcp.com>
<43401562.6040404@phoenixsoftware.com>
NNTP-Posting-Host: mozart.unx.sas.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: foggy.unx.sas.com 1128276769 4045 10.19.150.41 (2 Oct 2005 18:12:49 GMT)
X-Complaints-To: usenet@unx.sas.com
NNTP-Posting-Date: Sun, 2 Oct 2005 18:12:49 +0000 (UTC)
Comments: Gated by NETNEWS@VM.SAS.COM
Return-Path: <owner-assembler-list@LISTSERV.UGA.EDU>
X-Mailer: QUALCOMM Windows Eudora Version 6.2.3.4
X-Virus-Scanned: ClamAV 0.87/1107/Sun Oct 2 02:09:39 2005 on av1
X-Virus-Status: Clean
X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on kaimen.swcp.com
X-Spam-Status: No,
hits=-2.4 required=10.0 tests=ALL_TRUSTED autolearn=failed
version=3.0.4
Approved-By: David Cole <dbcole@COLESOFT.COM>
In-Reply-To: <43401562.6040404@phoenixsoftware.com>
Return-Path: owner-assembler-list@LISTSERV.UGA.EDU
X-OriginalArrivalTime: 02 Oct 2005 18:11:57.0488 (UTC)
FILETIME=[C6C94B00:01C5C77C]
Originator: daemon@mozart.unx.sas.com