Announcement

Collapse
No announcement yet.

Porting Powerbasic 3.1 program to PB Windows

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

  • Porting Powerbasic 3.1 program to PB Windows

    I have a PowerBasic 3.1 program that in particular uses the following commands:

    PSET (x,y)
    Line (x1,y1)-(x2,y2)
    Line -(x,y)
    VIEW {no argument}
    WINDOW {no argument}
    VIEW (X1,Y1) - (X2,Y2)
    WINDOW (X1,Y1) - (X2,Y2)
    VARPTR(variable)
    VARSEG(variable)
    DEF SEG = variable
    BLOAD filespec$, address
    BSAVE filespec$, address, length
    CALL ABSOLUTE address
    POKE address,data

    Currently, this compiled PB progam is incorporated into a win-32 "wrapper" that pokes holes in the I/O permission map and the PB program inherits these permissions so that it can run under win 2K and XP. It does not need this wrapper to run under win-9x.

    I would like to re-compile this program to run in Windows.
    How many of the above commands and functions have equivalent commands and functions in PB-Win?

  • #2
    Code:
    PSET (x,y)
    Line (x1,y1)-(x2,y2)
    Line -(x,y)
    VIEW {no argument}
    WINDOW {no argument}
    VIEW (X1,Y1) - (X2,Y2)
    WINDOW (X1,Y1) - (X2,Y2)
    Not done this way under Windows; however, the GRAPHICS commands provide approximate equivalents.

    Code:
    VARPTR(variable)
    VARSEG(variable)
    DEF SEG = variable
    BLOAD filespec$, address
    BSAVE filespec$, address, length
    CALL ABSOLUTE address
    POKE address,data
    VARSEG and DEF SEG have no meaning under Win/32.

    BLOAD and BSAVE are seldom necessary; POKE works the same but POINTER variables (instroduced in PB/DOS 3.2 or maybe 3.5) are the preferred way to do the same thing.

    CALL ABSOLUTE is CALL DWORD, but again under Windows it's usaully not done that way (not necessary).

    HOWEVER.....

    If all these commands are used in your DOS program to support some nice graphics, the intrinsic GRAPHIC commands are all you should need.

    Currently, this compiled PB progam is incorporated into a win-32 "wrapper" that pokes holes in the I/O permission map and the PB program inherits these permissions so that it can run under win 2K and XP. It does not need this wrapper to run under win-9x.
    You won't need that at all.

    MCM
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment

    Working...
    X