Announcement

Collapse
No announcement yet.

Conventional Ram

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Conventional Ram


    Adding the i=B000-B7FF option to EMM386 in the config.sys file will
    free up memmory that would be used by a monocrome display adapter.

    Can this same option be done, from within a PB program to free up conventional ram?

    Also, what exactly is MEMSET used for? example?

    TIA

    Tim


    ------------------

  • #2
    It's been my experience: In a pure DOS environment, use
    DeviceHigh in your CONFIG.SYS file to load all (or most)
    drivers into the upper memory area (between 640k and 1m).
    Then use LH or LoadHigh to load file from your AUTOEXEC.BAT
    file into the same area.

    This frees up the maximum amount of conventional memory for
    PB to use. I've had data as much as 450k big in memory ready
    for manuplition as I saw fit. PB/DOS (current version) can only
    "see" the base 640k memory area but, some time ago, I put on
    the wish list that the next version be able to use XMS or EMS.

    I've never used MEMSET so....



    ------------------
    There are no atheists in a fox hole or the morning of a math test.
    If my flag offends you, I'll help you pack.

    Comment


    • #3
      Adding the i=B000-B7FF option to EMM386 in the config.sys file will
      free up memmory that would be used by a monocrome display adapter.
      This is safe, if you're using an old-fashioned DOS-only computer with CGA
      graphics. On anything approaching modern hardware, you're asking for trouble.
      Can this same option be done, from within a PB program to free up conventional ram?
      No. It needs to be set up during the boot process.
      Also, what exactly is MEMSET used for?
      Normally, a DOS program allocates all available (DOS-arena) memory.
      MEMSET allows you to reduce the amount of memory claimed by your PB
      application. This is rarely useful but, can be used to help test
      your code against low-memory conditions, say, or add on a third-party
      library that provides new forms of dynamic memory management.

      ------------------
      Tom Hanlin
      PowerBASIC Staff

      Comment


      • #4
        Quote:
        "On anything approaching modern hardware, you're asking for trouble."

        What trouble do you have to expect? I always believed B000-B7FF would be unused or used by DOS as upper memory block.

        ------------------

        Comment


        • #5
          "Upper memory" is scavenged from memory areas outside the basic DOS
          arena. These upper memory areas were originally intended for use by
          devices, not program space. Since DOS is no longer a big selling
          point for current computers, manufacturers have been reclaiming the
          upper memory blocks for their own purposes-- sometimes, to the point
          where Windows can't even create a 64Kb page frame for EMS emulation.

          So, you need to be very careful about causing EMM386 to believe that
          it can allocate memory that something else may already be using.

          ------------------
          Tom Hanlin
          PowerBASIC Staff

          Comment


          • #6
            Stay away from AGP video cards if you want to use that space.
            I still use monochrome cards and monitors, and I have yet to
            find an AGP card that does NOT grab the B000-B7FF memory area
            for itself. All the PCI video cards I have tested, on the other
            hand, play nice and leave that area untouched.



            ------------------

            Comment


            • #7
              A monochrome card in a DOS only system will use the space B000-B7FF while a color card will use B800-BFFF. So if your monochrome card uses the B000-B7FF area it should leave the B800-BFFF area unused.

              Up to now I thought there would be only color cards in use so it would be save to assume that the area B000-B7FF is unused.

              An old test whether a monochrome or color card is installed is reading the BIOS equipment-flag at &H410:

              def seg = 0
              If (Peek(&H410) And &H30) <> &H30 Then 'color card using B800-BFFF - bits 4 and 5 are not set

              Maybe your AGP card does not use the B800-BFFF area and you can use this test to determine which area is unused by the graphics card.




              ------------------

              Comment

              Working...
              X