Re: How bad is the EX instruction?

2012-01-16 Thread Dan Skomsky, PSTI
One Assembler trick I have seen in speeding up scanning loops was to use a
CLI instruction to check the first byte of a string and then only doing the
CLC/CLCL if the CLI matches.  This trick even works if doing a binary
search.

-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU]
On Behalf Of Tom Marchant
Sent: Monday, January 16, 2012 6:35 AM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: How bad is the EX instruction?

On Fri, 13 Jan 2012 18:29:55 -0800, glen herrmannsfeldt wrote:

>> The EX CLC is in fact in loop scanning a linked list for the right
>> entry among 100-200 elements.
>
>You could also do binary search, which will find the right entry with
>about log(n) comparisons.

How do you do a binary search on a linked list?

--
Tom Marchant


Re: ASM Program to copy a file

2011-12-09 Thread Dan Skomsky, PSTI
Oops.  Don't you mean "MVC OUTBUF+1(L'OUTBUFF-1),OUTBUF"?  I'm sure you
don't want to zap the byte immediately after OUTBUF.  What is "MVC2",
another MACRO?  Why not just code the literal move "MVC OUTBUF,
=(L'OUTBUF)'this is a sample'" like it's been done for the past 40 years?
Why is there no LTORG statement in the sample?  For good practice one should
always be there.  Once another CSECT is added to the program, the coder is
in for a surprise.

-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU]
On Behalf Of Martin Truebner
Sent: Friday, December 09, 2011 4:50 AM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: ASM Program to copy a file

Rob,

I felt bad about posting it...it does waste storage under a baseregister
(which is still in most cases 4K)

Much better is the MACRO-way by Ed.J (and some extra code)

like this:

 MVI OUTBUF,C' '
 MVC OUTBUF+1(L'OUTBUF),OUTBUF
 MVC2 OUTBUF,=C'this is a sample'

Wastes instructions (but we are not into this any more), and space in
"procedure division" - (not covered by a base anyway).

>> ... Martin does not use it as often as he should (the second "="
>> should not be
there... )

For the quick and dirty I do - but the ones to be shown use either above
technique or use a next available byte point (with appropriate clearing if
required).

--
Martin

Pi_cap_CPU - all you ever need around MWLC/SCRT/CMT in z/VSE more at
http://www.picapcpu.de


Re: ASSEMBLER-LIST Digest - 18 Aug 2011 to 19 Aug 2011 (#2011-135)

2011-08-22 Thread Dan Skomsky, PSTI
Wow!  If you think IBM Assembler Language and POPS manuals are difficult to
navigate, you ain't seen nutten.  Compared to other computer makers, IBM's
attempts are golden!  For a truly eye opening experience, try writing
interface code for Motorola and ATT radio systems.  You would never bitch
about IBM manuals again.

Why not just do Google searches for the what you are searching for?


-Original Message-
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU]
On Behalf Of John Walker
Sent: Monday, August 22, 2011 3:30 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: ASSEMBLER-LIST Digest - 18 Aug 2011 to 19 Aug 2011 (#2011-135)

In regards to the comments about IBM assembler manuals:
The biggest issue for me is that NONE of their manuals in pdf or tso
datasets have any easy connectivity.  I am sorry, but I don't know the
answer to the following question:
Do I look it up in POOP or in Language Reference?
AND that is crucial to know.  NOT knowing where to look I always have to
look through x number of manuals.  And by-the-way, it might not even be in
an Assembler manual.  It might be in a totally unrelated manual.  So THEN, I
have to go look through ALL IBM manuals on the face of the planet.  PLEASE.
That's just wrong and it wastes your valuable time.  You know how I avoid
that?  I keep everything I want to know, regardless of what it's about in
ONE flat file on the mainframe.  I keep a consistent naming convention for
each 'how to' entry and so GENERALLY I know how to find the info I'm looking
for.  Table of contents?  It's nice, but my next question would be then,
'which chapter do I look in?'.  I don't know which chapter something is in
sometimes(or most of the time), so here we go again.  Looking through all of
the TOC entries in this book, then this one, then this one...  Again, that's
not good.  Yes, some of you know how and where to  look.  I don't, and I
never have in IBM manuals.  And yet, with the way I keep notes, I can ALWAYS
find what I need.  More importantly, for anybody except experts, it's a
technique which would be best for EVERYONE(unless you have a preferrence to
take longer finding something). So, my goal would be to get IBM to implement
one file for anything which has an Assembler related datum in it.  Then
provide a simple, non-techie-cized search algorithm to find things.  Keep it
up-to-date everytime there is any new procedure, instruction, or problem
found with an Assembler instruction or a procedure implemented in
Assembler.  BTW, yes I know about IBMIN.   It's ok for looking for some
things, but it has significant irrelevancy in what searches done on it
finds.