Announcement

Collapse
No announcement yet.

Porting code from Turbobasic

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

  • Aldo Cavini
    replied
    Just now I purchased my PB/DOS compiler. Thanks for all your replys.

    Aldo

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

    Leave a comment:


  • Tom Hanlin
    replied
    2- Will my code be compiled (that is, my code is near or far from the PB/DOS limits)? At the moment I must compile with VIDRAM ON!
    I would not expect a problem, but there is no way to be 100% sure without trying it.

    3- Will my code run? I guess I must put my arrays into EMS. Will my DOS program with EMS work under all Windows versions (Win 9x, NT, 2K)?
    EMS will work with all Windows versions. There have been a few defective machines that don't get along with EMS (an issue with some Dell units), but this is a rare problem.


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

    Leave a comment:


  • Bob Zale
    replied
    WinNT will offer EMS support for Dos applications. It's just a bit more effort. Each app that needs EMS must be started from a shortcut, which is where you note the EMS needs.

    Regards,

    Bob Zale
    PowerBASIC Inc.


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

    Leave a comment:


  • Gary Akins
    Guest replied
    Aldo:

    Yes, your code will be compiled. Depending on what it does and what features it uses, and on what the target environment is, your code may or may not be the same size after compilation in PB/DOS as it is in TurboBASIC. Just of the top of my admittedly rusty memory (it's been ages since I dealt with TurboBASIC! ) ), though, I think you'll get a smaller .EXE out of PB/DOS because of issues like a better-optimized compiler, a more efficient linker, and the ability to target 80386 CPUs and/or exploit the FPU. (I forget, could TurboBASIC generate x87 FPU instructions?)

    As far as EMS support for DOS programs in a DOS-box under Windows, you may have problems there, depending on your target environment. The Windows 95/98 environment supports EMS, but I've had problems with EMS-using programs under Windows NT 4.0; apparantly, the NT DOS box doesn't provide EMS services. (??? If it does, I can't find how to enable it.) Whether Win2K, ME, or XP provide EMS to DOS programs, I have no idea.

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

    Leave a comment:


  • Aldo Cavini
    replied
    Michael,

    Of course this is a solution. But I'm looking for the SIMPLEST solution. The source code is not easy to divide-and-chain (COMMON variables, a lot of self-written pseudo-library calls)... I'd like to keep the program monolithic.

    Lance,

    you replied only to my question #1 - fortunately I havn't INLINE statements.

    What about questions #2 and #3? I tried TRYPB32 some time ago - unfortunately I can't load my source...

    I'm not worried about spending 99$; I need to know if I must expect some limitation in size - both compile and run time.

    Thanks

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

    Leave a comment:


  • Lance Edmonds
    replied
    I forgot to mention...

    Individual VIRTUAL arrays may be up to 32Mb each, so if the EMM memory manager provides 64Mb, you could create 2x 32Mb arrays, or 4x 16Mb arrays, or 1x32+2x16, etc. However, many EMM's provide only a "modest" 16 to 32Mb of EMS.

    Any operating system with a stable memory manager that can provide EMS memory will be able to run your PB/DOS applications.




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

    Leave a comment:


  • Lance Edmonds
    replied
    Aldo, the syntax differences between TurboBasic and PowerBASIC/DOS are small. You may encounter some keywork/variable-name conflicts since PB/DOS supports many keywords that TurboBasic does not. Essentially, there is nothing serious to worry about that a global search+replace wont fix.

    Moving dynamic & static arrays from conventional memory to EMS (with the DIM VIRTUAL statement) will very likely free up a lot of conventional memory. You can do this to all arrays whose subscripts have a constant size (ie, all variable types including fixed-length and ASCIIZ, but not dynamic string arrays).
    (Does TB support static arrays? I honestly cannot remember after so many years! )

    There _could_ be a few changes needed with any assembly code ($INLINE or SUB INLINE), but it will depend on what that code does. PB/DOS still supports $INLINE and SUB INLINE, but this may not always be the case for future versions, so if you need to rework any assembly code, it would probably be worthwhile converting it to use ASM statements instead.

    Finally, there is a 30-day money-back guarantee on PowerBASIC products (except when delivered electronically), so you can always try it for your self. However, you can also download the TRYPB32 demo version of PB/DOS 3.2 to experiment with...

    I hope this helps!

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

    Leave a comment:


  • Michael Mattias
    replied
    Showing my age....

    Code:
    CHAIN "Thousand line program added to System"
    ????

    MCM

    Leave a comment:


  • Aldo Cavini
    started a topic Porting code from Turbobasic

    Porting code from Turbobasic

    Two or three customers of mine still use an old program (20000 rows) coded in TurboBasic. I have to add some thousand lines, and I have big memory problems (to compile, and even to run).

    I'm wondering how to solve the problem. I can't even imagine to translate the code to PB/DLL (too work for so few customers); I could use PB/CC + addons for graphics, but may be the better solution is to use PB/DOS. The questions are the following:

    1- Has someone experience in translating code from TurboBasic to PB/DOSL? How different the syntaxes are?
    2- Will my code be compiled (that is, my code is near or far from the PB/DOS limits)? At the moment I must compile with VIDRAM ON!
    3- Will my code run? I guess I must put my arrays into EMS. Will my DOS program with EMS work under all Windows versions (Win 9x, NT, 2K)?

    Thanks

    ------------------
Working...
X
😀
🥰
🤢
😎
😡
👍
👎