🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #39953

Submitted Without Comment

#39953
From: Laurence Leff
Date: Tue, 19 Dec 1989 01:20
27 lines
1636 bytes
This item is extracted from IBM PC Assembly Language: A Guide for
Programmers Page 43
Leo J. Scanlon

The EXITM Pseudo-Op

The EXITM pseudo-op makes the macro expansion terminate early, based on the
outcome of a preceding test.  For instance, recall the ALLOCATE macro that
we defined with the REPT pseudo-op.  You might like to redefine this macro so
that the assembler only allocates the table space if the LENGTH parameter is
less than 50.  A macro that makes this determination is:

ALL_LT_50   MACRO  LENGTH
            LOCAL  OKAY
VALUE       =      0
            MOV    AX,LENGTH
            CMP    AX,50             ;Is LENGTH < 50
            JB     OKAY
            EXITM                    ; If not, exit
OKAY:       REPT   LENGTH            ; If so, allocate the table
VALUE       =      VALUE+1
            DB     VALUE
            ENDM
 Laurence Leff, Ph.D               |A job is like sex, when you do it for money
CS,SMU, Dallas, Texas 75275-0122,  |You take away all the fun.
Phone: 214-692-3459 Moderator comp.doc.techreports/TRLIST, Symbolic Math List 
 convex!smu!leff leff%smu.uucp@uunet  E1AR0002 at SMUVM1 (BITNET) 
Technical Details
Message-ID: <16037@pollux.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!bloom-beacon!snorkelwacker!apple!sun-barr!newstop!texsun!pollux!smu.edu!leff

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!bloom-beacon!snorkelwacker!apple!sun-barr!newstop!texsun!pollux!smu.edu!leff
From: leff@smu.edu (Laurence Leff)
Newsgroups: comp.sys.ibm.pc
Subject: Submitted Without Comment
Message-ID: <16037@pollux.UUCP>
Date: 19 Dec 89 01:20:35 GMT
Sender: news@pollux.UUCP
Reply-To: leff@smu.edu (Laurence Leff)
Organization: Southern Methodist University, CSE Dept. Dallas, TX
Lines: 27