No announcement yet.


  • Filter
  • Time
  • Show
Clear All
new posts

  • memory

    I don't think I should post my code due to the fact that showing
    my problem would take several hundred lines, so I'll do my best
    to explain.

    The code I'm working on moves numeric arrays to and from XMS, when
    moving (byte/word/integer,double word/long interger/quad integer) I
    have no code problems. When I try moving single or double precision
    arrays from XMS my placement of the data seems to be such that it
    overwrites other variables. This leads me to believe that maybe I do
    not fully understand the structure of precision variables. My current
    method of calculating the length of save and load is to multiply the
    number of elements by the size in bytes of the data type and I am
    using the VARPTR() and VARSEG() functions to find the location of the
    first and last elements in the array. If anyone could explain the
    structure of precision variables I would be thankful, that is, if they
    are any different from integer types.

  • #2
    <U>Moving</U> variable data should not be a problem. Single precision are four bytes, double precision are eight bytes. Contents are immaterial.

    But you can't do <U>assignment</U> ( eg., x=y) from one data type to another simply by 'moving' the bytes. The compiler handles any type conversions required during an assignment internally using its own proprietary techniques.

    Note: PB/DOS does not have any native 'XMS' storage. This could be a problem with whatever third-party library you are using.

    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]


    • #3
      I'll go over my code and see if I'm saving as one type and loading
      as another, if anything I can rewrite the code because I'm not
      using any libraries.

      Thanks for your reply.