No announcement yet.

DOS 3.5 POPUP as memory extender

  • Filter
  • Time
  • Show
Clear All
new posts

    DOS 3.5 POPUP as memory extender

    I have an old DOS program that needs a small extension. But -- I
    run out of memory, Error 7.
    This happens late in the program, in a SUBroutine that prepares
    and then prints an output file to a Windows printer. The error
    pops up right after the MEMPACK statement.
    Since POPUP loads the program intp EMS memory to make room for
    the following code I thought that POPUP could be my savior.
    Never tried POPUp before. Below is the code snippet to show you
    what I did. The DOSPrint is to start after a simple <Enter> key
    press, nothing fancey. The program compiles but does not run.
    Apparently it does not like the SHELL statement?
    The OUTGO$ + E$ is the assembled output file ready to be printed.


    PopUp Key CHR$(0, &H1C)
    dummy1& = setmem (-600000)
    PopUp sleep USING EMS

    cursorx = pos
    cursory = csrlin
    def seg = &hb800
    savescreen$ = peek$(0, 4000)

    DELAY 3

    locate cursory, cursorx
    def seg = &hb800
    poke$ 0, savescreen$
    PopUp sleep
    loop until 0

    Does anybody have an idea what to do?


    Use the paid for utility Ultrashell...

    It's a Godsend. It slushes your program into upper memory prior
    to the Shell except for a small stub that keeps track of all the
    messy details. When the Child program is done, it rolls it all
    back into place.

    Obviously, there are a few things you should not do when you have
    told the Child to go stand in the corner and be quiet for a while!
    But they are mostly common sense, and you'll likely be one of the
    happiest programmers ever seen if you've reached the place where
    you need something like this tool and buy into the knowledge that
    was granted to create it!

    Mike Luther
    [email protected]
    Mike Luther
    [email protected]


      Mike: I have already [highly] recommended UltraShell to Rolf, but he is looking for a solution that works from within the IDE too -- which is a fairly tall order I believe.

      Rolf: where did you find this "popup" memory-swapping utility? If I ever get time (yeah, right! ) I'd like to investigate it further.

      However, I personally believe that a TSR approach to this problem is probably more hassle than it's worth, especially since your main app and the TSR will be "fighting" over access to conventional memory constantly.

      Therefore, since it appears you own a copy of PB/CC, I would recommend that you consider writing a PB/CC app that uses FindFirstChangeNotification/FindNextChangeNotification/FindCloseChangeNotification API functions to create a "monitor" app that waits for files to appear in a specific directory. It's not the simplest project for someone who is only starting to get accustomed to Windows programming (it involves some intermediate-level Windows programming techniques such as Events, etc), but there are a number of examples of using these API functions... Mr Mattias posted one useful one under the title "Cookie Monitor" which will give you a good starting place. BTW, these API functions mean that a directory monitor app will use almost ZERO CPU time, since the OS notifies your app when a file change occurs - your code does not need to "poll" the directory file list constantly.

      BTW, DOSPRINT V3.0 will include an advanced monitoring program, implemented as a System Tray utility. This is some time away from final completion though, due to my current commitments... however I might be able to squeeze you in as a beta tester, since you are a licensed DOSPRINT owner. Please email me privately to discuss this further.


      PowerBASIC Support
      mailto:[email protected][email protected]</A>
      mailto:[email protected]


        Hi guys, thanks for the reply.
        I guess you are right; have to bite the bullet.
        Running from the IDE would be MUCH nicer in this
        case, but . . . .

        Before I go to CC with this one I have to solve this
        print problem and then go from floppy to CD-ROM.

        THEN, it will be CC time, and I can hardly wait.
        Thanks again, Rolf