31 bit vs 24 bit - two easy questions 
Author Message
 31 bit vs 24 bit - two easy questions

I'm re-working a 24 bit mode program, and moving it above the line, and I
don't know what to do with the following:

     DC    AL1(128),AL3(label)   .'label' IS IN THIS CSECT

1.  Do I have to change anything?  IOW, does the loader see the AL3 and
think it's 24-bit, or does it know it's 31 bit and resolve the whole address
properly?

2.  Is it any different if it's coded as below?
      DC    0F'0',X'80',AL3(label)

Thanks,
Greg



Mon, 27 Jan 2003 03:00:00 GMT  
 31 bit vs 24 bit - two easy questions

Quote:

> I'm re-working a 24 bit mode program, and moving it above the line, and I
> don't know what to do with the following:

>      DC    AL1(128),AL3(label)   .'label' IS IN THIS CSECT

> 1.  Do I have to change anything?  IOW, does the loader see the AL3 and
> think it's 24-bit, or does it know it's 31 bit and resolve the whole address
> properly?

> 2.  Is it any different if it's coded as below?
>       DC    0F'0',X'80',AL3(label)

> Thanks,
> Greg

Greg -

  You will probably get a complaint from the assembler...

  And, nope - the loaded won't do anything "magic" for you...
it will see the 24-bit address and provide only 24 bits...

  You should look to see how your program is using
this data, it's possible you can simply change this to:

   DC A(LABEL)

 If you need the upper-bit set, you can do something like:

   DC A(X'80000000'+LABEL)

        - Dave Rivers -

--

Get your mainframe (370) `C' compiler at http://www.dignus.com



Mon, 27 Jan 2003 03:00:00 GMT  
 31 bit vs 24 bit - two easy questions


Quote:
> I'm re-working a 24 bit mode program, and moving it above the line,
and I
> don't know what to do with the following:

>      DC    AL1(128),AL3(label)   .'label' IS IN THIS CSECT

> 1.  Do I have to change anything?  IOW, does the loader see the AL3
and
> think it's 24-bit, or does it know it's 31 bit and resolve the whole
address
> properly?

> 2.  Is it any different if it's coded as below?
>       DC    0F'0',X'80',AL3(label)

> Thanks,
> Greg

Use this instead:

    DC  A(X'80000000'+label)

You get a full size address constant with the high order bit on.

--
... and this time, I mean it!

Sent via Deja.com http://www.deja.com/
Before you buy.



Mon, 27 Jan 2003 03:00:00 GMT  
 31 bit vs 24 bit - two easy questions

Quote:
>I'm re-working a 24 bit mode program, and moving it above the line, and I
>don't know what to do with the following:

>     DC    AL1(128),AL3(label)   .'label' IS IN THIS CSECT

>1.  Do I have to change anything?  IOW, does the loader see the AL3 and
>think it's 24-bit, or does it know it's 31 bit and resolve the whole address
>properly?

Yes -- DC    AL4(X'80000000'+label) works well

Quote:

>2.  Is it any different if it's coded as below?
>      DC    0F'0',X'80',AL3(label)

This usage forces word boundary alignment, which the first usage
does not.

       DC    A(X'80000000'+label) is a 31-bit equivalent

Quote:

>Thanks,
>Greg

-- Steve Myers


Mon, 27 Jan 2003 03:00:00 GMT  
 31 bit vs 24 bit - two easy questions

Quote:

>I'm re-working a 24 bit mode program, and moving it above the line, and I
>don't know what to do with the following:

>     DC    AL1(128),AL3(label)   .'label' IS IN THIS CSECT

>1.  Do I have to change anything?  IOW, does the loader see the AL3 and
>think it's 24-bit, or does it know it's 31 bit and resolve the whole
address
>properly?

>2.  Is it any different if it's coded as below?
>      DC    0F'0',X'80',AL3(label)

>Thanks,
>Greg

I doubt either of them would work, and I would not bother trying.

Use     DC   A(X'80000000' +label)

This will work in either mode. Just make sure you count the zeroes carefully
(the object listing will tell you if you get it wrong though.

    John Homes.



Tue, 28 Jan 2003 03:00:00 GMT  
 31 bit vs 24 bit - two easy questions

Quote:
>I'm re-working a 24 bit mode program, and moving it above the line, and I
>don't know what to do with the following:

>     DC    AL1(128),AL3(label)   .'label' IS IN THIS CSECT

>1.  Do I have to change anything?  IOW, does the loader see the AL3 and
>think it's 24-bit, or does it know it's 31 bit and resolve the whole address
>properly?

Yes, you do have to change something.  In this case,
         DC   AL4(X'80000000'+label)  works well

Quote:

>2.  Is it any different if it's coded as below?
>      DC    0F'0',X'80',AL3(label)

This use forces alignment.
         DC   A(X'80000000'+label)  works well

Quote:

>Thanks,
>Greg

-- Steve Myers


Tue, 28 Jan 2003 03:00:00 GMT  
 31 bit vs 24 bit - two easy questions
Another point to consider is that the 24 bit program might be doing
something with the other 7 bits in the high byte of that address. In
that case more work would need to be done to convert to running RMODE
ANY.

Quote:


> >I'm re-working a 24 bit mode program, and moving it above the line, and I
> >don't know what to do with the following:

> >     DC    AL1(128),AL3(label)   .'label' IS IN THIS CSECT

> >1.  Do I have to change anything?  IOW, does the loader see the AL3 and
> >think it's 24-bit, or does it know it's 31 bit and resolve the whole address
> >properly?

> Yes, you do have to change something.  In this case,
>          DC   AL4(X'80000000'+label)  works well

> >2.  Is it any different if it's coded as below?
> >      DC    0F'0',X'80',AL3(label)

> This use forces alignment.
>          DC   A(X'80000000'+label)  works well

> >Thanks,
> >Greg

> -- Steve Myers

--
Don Poitras - SAS/C Development - SAS Institute Inc. -  SAS Campus Drive



Tue, 28 Jan 2003 03:00:00 GMT  
 31 bit vs 24 bit - two easy questions


Quote:
>>I'm re-working a 24 bit mode program, and moving it above the line,
>>and I don't know what to do with the following:

>>     DC    AL1(128),AL3(label)   .'label' IS IN THIS CSECT
>Use     DC   A(X'80000000'+label)
>This will work in either mode. Just make sure you count the zeroes
>carefully (the object listing will tell you if you get it wrong though.

To facilitate the zero-counting part, I often do this:

       DC   A(label1+VL)
  .  .  .  .  .  .
VL     EQU   X'80000000'

So, if I use VL multiple times, I only have to count the zeroes once.  I
call the symbol VL because of the VL key-word on the CALL and LINK macros,
but any name would do, of course.

 Gilbert Saint-flour
 http://members.home.net/gsf/



Thu, 30 Jan 2003 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. New Release Info/24 vs. 31 bit

2. 24 bit colormap to 8 bit colormap

3. 31-bit Programming Question

4. Newbie question...24 bit integer into LSB,MSB,HSB

5. HELP: Bunch of NEWBIE tk4.1a2 Questions [A: 24-bit visual]

6. top 32 bits of 64-bit product of two 32-bit integers

7. 31-bit Addressing Problem

8. 31 Bit Addressing

9. Use of ARCHRCAL in 31 bit address spece ?

10. Switcing amode 24 / 31 dynamically?

11. 31-bit addressing in MVS CICS

12. Bit instructions with offset more than 31

 

 
Powered by phpBB® Forum Software