Instruction of the Week--LOCTR anyone? 
Author Message
 Instruction of the Week--LOCTR anyone?

Quote:

> I'd like to propose the and an instruction of the week.  I have
> found it to be VERY controversial, people either love it, or they
> hate it.  As such it should make for an interesting discussion.

> Loctr is similar to a CSECT in that it defines a group of related
> code or data, but is relative to the CSECT in which it was defined.

It's not an instruction, it's a pseudo-op. It has the advantage that you can
put the source code for your constants inline without having to branch around
them or use separate CSECTs. Not nearly as obscure as the older DXD et al.

Quote:
> The downside is that it is not compatible with the CSECT
> directive in open code.  Anyone want to explain why?

Pardon? I routinely use it in open code.

--

Shmuel (Seymour J.) Metz
Reply to host nsf (dot) gov, user smetz



Fri, 12 Jan 2001 03:00:00 GMT  
 Instruction of the Week--LOCTR anyone?
I broke in with the IBM 7040 IBSYS assembler.  They had something
similar, though I cannot recall what they called it.  I used it and
liked it.

Then along came Assembler F, which did not have LOCTR.  I got out of the
habit of thinking in LOCTR style terms.  LOCTR has been in AsmH from
the beginning, but my cheapo employer at the time didn't get it until
they had to get it for MVS/XA.  After something more than 10 years,
and with about 60% of my present coding style pretty well set, I never
really felt the need for it.

Speaking of Q constants, DXD, CXD, and DSECTS referenced by Q constants.
They are not instructions, of course, and are rarely used by "pure"
Assembler types.  I wrote a TSO command some years ago that made
heavy use of them because it seemed they would resolve a conceptual
problem I had in writing reentrant code.  Never repeated the business,
but I could work something up.

I am thinking of writing a short post about LA as a three input adder,
and also a post on the EX instruction.  Anyone interested?

-- Steve Myers

The E-mail addresses in this message are private property.  Any use of them
to  send  unsolicited  E-mail  messages  of  a  commerical  nature  will be
considered trespassing,  and the originator of the message will be  sued in
small claims court in Camden County,  New Jersey,  for the  maximum penalty
allowed by law.



Sat, 13 Jan 2001 03:00:00 GMT  
 Instruction of the Week--LOCTR anyone?

Quote:

> I broke in with the IBM 7040 IBSYS assembler.  They had something
> similar, though I cannot recall what they called it.  I used it and
> liked it.

I don't recall the pseudo-op you're referring to, but I have fond memories of
QUAL. It's a shame that they never picked up on the idea for the S/360
assemblers.

Quote:
> -- Steve Myers

--

Shmuel (Seymour J.) Metz
Reply to host nsf (dot) gov, user smetz



Sat, 13 Jan 2001 03:00:00 GMT  
 Instruction of the Week--LOCTR anyone?

(snip regarding LOCTR)

Quote:
>Not nearly as obscure as the older DXD et al.

Well, obscure except in the PL/I F library.

Maybe other PL/I libraries use it, too.

-- glen



Sat, 13 Jan 2001 03:00:00 GMT  
 Instruction of the Week--LOCTR anyone?
PL/I F made heavy use of what it called pseudo registers.  PL/I
Optimizer, and subsequent PL/I implementation, continue to use them,
but not as much as PL/I.  Seems like Hursley either can't figure out how
to get rid of 'em, or someone there really likes 'em!


Quote:

>(snip regarding LOCTR)

>>Not nearly as obscure as the older DXD et al.

>Well, obscure except in the PL/I F library.

>Maybe other PL/I libraries use it, too.

>-- glen

-- Steve Myers

The E-mail addresses in this message are private property.  Any use of them
to  send  unsolicited  E-mail  messages  of  a  commerical  nature  will be
considered trespassing,  and the originator of the message will be  sued in
small claims court in Camden County,  New Jersey,  for the  maximum penalty
allowed by law.



Sat, 13 Jan 2001 03:00:00 GMT  
 Instruction of the Week--LOCTR anyone?
Someone else will have to do negative indexing.  Haven't come across
the idea in S/360.  I remember it well, though not with pleasure,
from 7040 days.

Quote:

><snip>
>Sounds cool, let's see it. Maybe a post about negative indexing would
>be rather nifty, also?

-- Steve Myers

The E-mail addresses in this message are private property.  Any use of them
to  send  unsolicited  E-mail  messages  of  a  commerical  nature  will be
considered trespassing,  and the originator of the message will be  sued in
small claims court in Camden County,  New Jersey,  for the  maximum penalty
allowed by law.



Sat, 13 Jan 2001 03:00:00 GMT  
 Instruction of the Week--LOCTR anyone?
: PL/I F made heavy use of what it called pseudo registers.  PL/I
: Optimizer, and subsequent PL/I implementation, continue to use them,
: but not as much as PL/I.  Seems like Hursley either can't figure out how
: to get rid of 'em, or someone there really likes 'em!

Object code produced by the SAS C compiler uses pseudo registers as well
(CXD, DXD, Q-CON, etc.) for static variables.  I don't know whether or not
the IBM C compiler's run-times do this or not.

--
| Edward E. Jaffe                | Voice:      (310) 338-0400 x318     |
| Mgr., Research & Development   | Facsimile:  (310) 338-0801          |

| 9841 Airport Blvd, Suite 700   | IBM Mail:   USS24J24 at IBMMAIL     |        
| Los Angeles, CA 90045          | Web page:   www.phoenixsoftware.com |



Sat, 13 Jan 2001 03:00:00 GMT  
 Instruction of the Week--LOCTR anyone?

Quote:

>PL/I F made heavy use of what it called pseudo registers.  PL/I
>Optimizer, and subsequent PL/I implementation, continue to use them,
>but not as much as PL/I.  Seems like Hursley either can't figure out how
>to get rid of 'em, or someone there really likes 'em!

PL/I uses them for controlled variables.  They are actually quite
useful in some circumstances.

If you were building a library of general purpose subroutines to be
used in many programs, and if you wanted them to be reentrant, you
might very well use pseudo-registers to keep track of dynamically
allocated memory between successive calls to the same subroutine.



Sat, 13 Jan 2001 03:00:00 GMT  
 
 [ 13 post ] 

 Relevant Pages 

1. Instructions of the week -- LA and EX

2. Proposed D & DR instructions of the week

3. Instructions of the week -- LA and EX

4. Instruction for next week: BC

5. Instruction of the week -- EDMK

6. Instruction of the week - BXLE

7. WEEK()-function, anyone ?!??

8. Anyone out there subscribe to Aviation Week?

9. Anyone going to Internet 95 in a week?

10. Does anyone have experience with MMX instructions ?

11. Week number + firstDay of week

12. DAY OF THE WEEK ROUTINE - day-week.txt (1/1)

 

 
Powered by phpBB® Forum Software