Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly 370 > Re: Assembler M...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 31 Topic 305 of 328
Post > Topic >>

Re: Assembler Macros

by Steve Myers <noone@[EMAIL PROTECTED] > Jun 23, 2007 at 12:29 PM

SkippyPB wrote:
> On Fri, 22 Jun 2007 17:07:32 -0400, Steve Myers <noone@[EMAIL PROTECTED]
>
> wrote:
> 
>> SkippyPB wrote:
>>> On Fri, 22 Jun 2007 01:35:53 -0700, Karan <maranmeetsu@[EMAIL PROTECTED]
>
>>> wrote:
>>>
>>>> Can any one give me the source for macros in assembler with examples?
>>> Most IBM Assembler text books can give you this information.  Here's a
>>> simple Macro for getting the system date:
>>>
>>>            MACRO
>>> &LABEL     GETDATE   &FLD
>>> *  THE OPERAND FIELD SHOULD BE AT LEAST 4 BYTES
>>> &LABEL     TIME
>>>            MVC       &FLD.(4),0(1)
>>>            MEND
>>>
>>> Regards,
>>>           ////
>>>          (o o)
>>> -oOO--(_)--OOo-
>>>
>>>
>>> "I once made love to a female clown. It was weird
>>> because she twisted my ***** into a poodle."  
>>> --Dan Whitney  
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>> Remove nospam to email me.
>>>
>>> Steve
>> Now, if it was only right.  Reg 1 contains a date after TIME, not 
>> the address of the date.
> 
> I believe it is right.  The MVC would move the contents of the data
> addressed by at 0(1) into the 4 bytes at &fld.
> 
> Regards,
>           ////
>          (o o)
> -oOO--(_)--OOo-
> 
> 
> "I once made love to a female clown. It was weird
> because she twisted my ***** into a poodle."  
> --Dan Whitney  
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Remove nospam to email me.
> 
> Steve

Actually, we're both right, sort of.  See 
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2A971/75.5.5?SHELF=IEA2BK71&DT=20070126061230&CASE=

According to that, the contents of reg 1 are unpredictable if 
TIME is used the way you showed.

Karan, do not let the dispute between SkippyPB and me discourage 
you.  Many macros are quite simple.  Many of the IBM macros are 
exceedingly complex, but there are some easy ones, like, for 
example, SYS1.MACLIB(PUT).

Back in the early 70s I stole something like this from Assembler 
G, and have used it ever since.

          MACRO
          SETR
          LCLA  &A
..LOOP    AIF   (&A GT 15).EXIT
R&A      EQU   &A
&A       SETA  &A+1
          AGO   .LOOP
..EXIT    MEND
 




 31 Posts in Topic:
Assembler Macros
Karan <maranmeetsu@[EM  2007-06-22 01:35:53 
Re: Assembler Macros
Binyamin Dissen <posti  2007-06-22 12:43:01 
Re: Assembler Macros
"John W. Kennedy&quo  2007-06-22 08:52:05 
Re: Assembler Macros
SkippyPB <swiegand@[EM  2007-06-22 11:32:49 
Re: Assembler Macros
Steve Myers <noone@[EM  2007-06-22 17:07:32 
Re: Assembler Macros
SkippyPB <swiegand@[EM  2007-06-23 11:20:30 
Re: Assembler Macros
Steve Myers <noone@[EM  2007-06-23 12:29:06 
Re: Assembler Macros
"John Small" &l  2007-06-24 10:28:06 
Re: Assembler Macros
"Sven Pran" <  2007-06-24 12:53:03 
Re: Assembler Macros
Binyamin Dissen <posti  2007-06-24 16:19:10 
Re: Assembler Macros
"Sven Pran" <  2007-06-24 16:19:42 
Re: Assembler Macros
Steve Myers <noone@[EM  2007-06-24 14:28:56 
Re: Assembler Macros
"John W. Kennedy&quo  2007-06-24 22:22:20 
Re: Assembler Macros
Binyamin Dissen <posti  2007-06-25 10:14:30 
Re: Assembler Macros
"John W. Kennedy&quo  2007-06-25 15:59:30 
Re: Assembler Macros
spambait@[EMAIL PROTECTED  2007-06-26 15:36:45 
Re: Assembler Macros
woodag@[EMAIL PROTECTED]   2007-06-26 20:27:31 
Re: Assembler Macros
Steve Myers <noone@[EM  2007-06-26 18:27:55 
Re: Assembler Macros
"John W. Kennedy&quo  2007-06-26 22:08:05 
Re: Assembler Macros
glen herrmannsfeldt <g  2007-07-01 05:41:27 
Re: Assembler Macros
SkippyPB <swiegand@[EM  2007-06-25 11:04:23 
Re: Assembler Macros
"Sven Pran" <  2007-06-25 17:31:23 
Re: Assembler Macros
"John W. Kennedy&quo  2007-06-25 16:07:36 
Re: Assembler Macros
woodag@[EMAIL PROTECTED]   2007-06-25 23:40:34 
Re: Assembler Macros
Steve Myers <noone@[EM  2007-06-25 19:50:33 
Re: Assembler Macros
woodag@[EMAIL PROTECTED]   2007-06-26 00:25:40 
Re: Assembler Macros
"John W. Kennedy&quo  2007-06-25 20:41:51 
Re: Assembler Macros
Steve Myers <noone@[EM  2007-06-25 20:44:46 
Re: Assembler Macros
"John W. Kennedy&quo  2007-06-25 16:04:43 
Re: Assembler Macros
Barry Schwarz <schwarz  2007-06-23 10:02:07 
Re: Assembler Macros
Michel Hack <hack@[EMA  2007-06-26 13:06:18 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 2:27:34 CDT 2008.