Announcement

Collapse
No announcement yet.

Command extensions to PB.EXE

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

  • Command extensions to PB.EXE

    I am new to Power Basic for Dos, buying it a couple months ago.
    I had problems compiling other peoples programs which were written
    in PB for DOS and then found the solution to it. Now, a month or
    more has gone by and I am now trying to relearn what I had to do then.
    I believe I needed to add a command extension to PB.exe when I
    started the program. What, if any, command extensions are possible
    for starting the program? And what are their purposes? I am
    referring to something like PB /xyz; where the /xyz indicates the
    startup of PB needs to do something to help in running the
    written program.

    Thank you for any enlightenment.
    Gary



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

  • #2
    you know, that is a good question. most of us just settle for
    the pb ide that comes with each powerbasic product, which is
    somewhat basic in nature but serves very well if your needs are
    minimal. occasionally you chance onto a discussion where
    someone admints to using a different editor in place of the pb
    ide, but i've not seen any real discussion of the command line
    extensions that are possible when calling the compiler from the
    command line, which is probably how some, if not all, of these
    editors "shell" to the compiler.

    searching the forums, i came up with this link:
    http://www.powerbasic.com/support/pb...ad.php?t=27460

    it does not discuss the command line options per se, but does
    talk about various editors that have been used with powerbasic
    (i'm assuming you want to use a different editor, right?)

    the pb/cc manual does give you a list of command line options
    when calling the compiler directly. these include:
    Code:
    pbcc [[/ipath] [[/l] [[/q]]] | [/cfilename]] filename
    
    /ipath       - include and resource files path
    /l           - create log file
    /q           - quite mode (no message box) use only with /l
    /cfilename   - textfile containing command line to pass to
                   compiled program.  note that you cannot use
                   this in conjunction with other options.
    filename     - path & name of bas program to compile.
    
    
    the ccedit also has command line options:
    
    ccedit.exe [g:row,col:] [/p:mainfile] [filename]
    
    g:            - return to a specific row & column in source file
    /p:           - load the primary source file in the "main" window
    filename      - load the current source file in a second window
    optional settings for the compiler, debugger, and editor are
    controlled though the pbwin.ini file. normally you change these
    within ccedit.exe, but you can tailor them directly in pbwin.ini
    if you know what you are doing. whether a third party editor
    would use the setting here is another question.

    ------------------
    old navy chief, systems engineer, systems analyst, now semi-retired

    Comment


    • #3
      Thanks, Chief. (Sorry, a habit of saying this from my USMC days)

      I appreciate the efforts of the people here to help
      me in my pursuit of using PowerBASIC for DOS. I am developing
      embedded systems for my own start-up company and I prefer this
      language since I am an old time QuickBasic programmer. I've been
      away from programming so long that I am having to relearn certain
      things.

      Thank you,
      Gary

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

      Comment


      • #4
        I could not find the command-line options for PB-DOS in the PB/DOS 3.5 help file, but I know they exist because I used to do nothing BUT command-line compiles.

        Maybe they are in your printed manual?

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

        Comment


        • #5
          I don't have PB/DOS loaded right now but, the full manuals are already
          supplied in .PDF form-- check the installation CD or the last two disks
          of the floppy set. Or, if you downloaded, see the .PDF files, eh? It's
          in there.

          ------------------
          Tom Hanlin, PowerBASIC Staff
          Opinions expressed may not be those of my employer or myself

          Comment


          • #6
            The Printed "Users Guide" for PB/DOS 3.5 has all options explained in chapter 17, pages 277-286.

            While I'm not going to type all that, bottom line is you can specify settings on command line, specify settings in PBC.CFG file, or specify most settings 'in-line' with #COMPILER_DIRECTIVE statements.

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

            Comment


            • #7
              Executing pbc, with no options, at the command line produced this:
              Code:
              PowerBASIC Compiler Version 3.50   Copyright (c) 1989-1999 by Robert Zale
              PowerBASIC Inc.  *  Carmel, CA  USA
              Syntax is:  PBC  [options]  file  [options]    * = default    -x- = turn x off
                -CE     *compile to .EXE               -FEMU  *emulator float
                -CU      compile to .PBU               -FNPX   NPX ('87) float
                -CC      compile to .PBC               -FP     procedural float
                -ODA     declare arrays                -G86   *generate 8086
                -ODV     declare vars/arrays           -G286   generate 80286
                -OD      attach PBD debug info         -G386   generate 80386
                -OG      gosub preserve                -OZF   *optimize faster
                -OM      debug map file                -LS    *serial com lib
                -OP      path names in unit debug      -LP    *printer lib
                -OU      unit full debug               -LB    *ctrl-break lib
                -RExxx   find run-time error           -LG    *graphics libs
                -ES      stack error test              -LC    *CGA graphics lib
                -EB      bounds error test             -LE    *EGA graphics lib
                -EO      overflow error test           -LV    *VGA graphics lib
                -EN      numeric error test            -LA     All libs
                -DExxx   executable directory          -LI     interpreted print
                -DUxxx   unit directory                -LF     full float emulate
                -DSxxx   source directories            -DLxxx  link directories
              but if you want a better description of the options you should
              probably do like Michael said and go to chapter 17 in the users
              guide. I personally prefer to use the $compiler directives, but
              everybody has their own way of doing it.

              Buck


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


              [This message has been edited by Buck Huffman (edited December 20, 2004).]

              Comment

              Working...
              X