Anyway to get lowword & highword to work like low & high? 
Author Message
 Anyway to get lowword & highword to work like low & high?

I have a problem where I need the lowword & highword, but they need to
work on an OFFSET(like low & high). is there anyway to write a macro to
do this?

               WORD         WORD       WORD
        <LOW OFFSET MY_PROC, 0 , HIGH OFFSET MY_PROC>
works... but

                WORD            WORD          WORD
        <LOWWORD OFFSET MY_PROC, 0 , HIGHWORD OFFSET MY_PROC>

doesn't.



Thu, 24 Dec 1998 03:00:00 GMT  
 Anyway to get lowword & highword to work like low & high?

Quote:

> I have a problem where I need the lowword & highword, but they need to
> work on an OFFSET(like low & high). is there anyway to write a macro to
> do this?

>                WORD         WORD       WORD
>         <LOW OFFSET MY_PROC, 0 , HIGH OFFSET MY_PROC>
> works... but

>                 WORD            WORD          WORD
>         <LOWWORD OFFSET MY_PROC, 0 , HIGHWORD OFFSET MY_PROC>

> doesn't.

I presume you're talking about 32-bit assembly language, right? The
problem may be that MY_PROC is relocatable, which means that for the
HIGHWORD expression, the object file would need to contain a special kind
of fixup record that says, "Add the base address of whatever segment
contains MY_PROC to such-and-such local offset, and then stuff the high
word of the answer into the memory image." There is exactly such a
construct in the Intel Object Module Format for the high byte of a word,
but I don't think there is for the high word of a dword. (The low word is
no problem, as that's just a truncation, which is what you'd get anyway.)
There's no way around this, except to store the 32-bit offset
contiguously, and then write initialization code to go through your data
structure and rearrange things. Ugh. Sorry.

--

Ciao,
Paul D. DeRocco



Thu, 24 Dec 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Getting low and high date values in a filterable report view

2. HTMLParser: getting one extra space around &gt;/&lt;/^M tags

3. ABC Templates @#$%^&*&&*&*!!!!!!

4. SPIN - Continuos flow low to high to low

5. Cybersex--(*&$%*&(*&^% C programmers

6. List & Label template bundle at lower price

7. High Edit Help & Address Request

8. Matrox Millennium & low resolution modes

9. high school programming & python

10. high school programming & python

11. Raise & Lower toplevel windows

12. How does TclAppInit() work anyway?

 

 
Powered by phpBB® Forum Software