XMS? No, DWORD...

I have troubles finding a DWORD in TP7!


I am trying to allocate XMS-memory, but it all is halted because of this...THING!


Please help me :)





Comments

  • Unfortunantly, the geniuses at Borland never added a

    32-bit unsigned variable to TP 7.0. You can use Longint

    instead. It'll work, but if you go over the max, it'll

    roll over. This will still be read correctly when doing

    XMS ops, but don't try adding anything more to it. (i.e.

    after it rolls over, TP 7.0 thinks it's a negative number)


    Matthew Gross

    Acheron@Hotmail.com




    URL:http://acheronx.resnet.tamu.edu

  • You can use Longint

    : instead. It'll work, but if you go over the max, it'll

    : roll over. This will still be read correctly when doing

    : XMS ops, but don't try adding anything more to it. (i.e.

    : after it rolls over, TP 7.0 thinks it's a negative number)


    Well, I totally agree, except for the fact that the roll-over would be a problem, which it really wouldn't... Since the only thing you will be using the dword for (even after the addition) will be doing more interrupt calls, there really is no such thing as a "roll over" since the interrupt just will interpret the numer unsigned.


    (for those who don't know: a "roll-over" does not actually change the number, it is just a matter of interpretation... and since only the addition, not the interpretation, will be handled by TP, there is no problem.)


    The Watcher




    URL:http://www.tuhb.org

  • I meant don't do anything more with it in TP 7.0 is it rolls over.

    ASM will deal with it correctly, but TP 7.0 will think it's negative.

    You might do something more with in TP 7.0 if the longint in question is

    being used as a linear address.




    URL:http://acheronx.resnet.tamu.edu

  • : I meant don't do anything more with it in TP 7.0 is it rolls over.

    : ASM will deal with it correctly, but TP 7.0 will think it's negative.

    : You might do something more with in TP 7.0 if the longint in question is

    : being used as a linear address.


    You can't use linear address in TP7.0 :-)

    You would have to split it up again using

    AND $FFFF0000 and AND $0000FFFF, or force it directly into a pointer variable, thus removing the "signed" interpretation.


    (it's just that I can't come up with any further use for the number in pascal whatever... Ofcourse I understood what you meant with your remark, but I just thought I had to be annoying and point out that it won't be much of practical problem... nutthing said 'bout the validity of your post)


    happy pascalizing

    the watcher




Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories