Announcement

Collapse
No announcement yet.

Width and Length of a window

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

  • Width and Length of a window

    Hi!

    Is there any way to display more than 80 characters across; and how many lines down is the maximum.

    Using Screen 12; I can get 30 lines down but only 80 across. Is there any code in powerbasic which will allow me to get more characters across using a different font or routine etc.

    Code :-

    Cls
    Screen 12
    For y=1 to 30
    Print using”Line : ## : ”;y
    For x=1 to 70
    Print mid$(str$(x),2,1);
    Next
    Next y

    Thanks in Advance

    BASit

    ------------------- www.compubyte.co.za


    [This message has been edited by A.Basit A.Bulbulia (edited August 21, 2006).]

  • #2
    Using only PB-Native functions, I don't think so.
    .....If you only specify size in the WIDTH statement, the logical line
    size of the display (SCRN is set. size can be 40 or 80 for a color
    display, 80 for a monochrome display, or 0..255 for a printer or
    communications port...
    But I know I did a 132 column thing with PB/DOS many years ago, so I must have done something outside the 'native' feature set, either a BIOS call or the use of some helper library.

    That is, I can't tell you how to do it, but I can tell you all hope is not lost.


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

    Comment


    • #3
      [QUOTE]Originally posted by A.Basit A.Bulbulia:
      Is there any way to display more than 80 characters across
      [/QUOTE

      This code runs fine!

      Posted by Woody on March 31, 1998 at 08:07:03:
      Subject: 132 colunms text modes on DOS

      The following snippet shows how to find/change video mode
      and how Power Basic can print to 132-col screen

      DEFINT A-Z
      OPEN "SCRN:" FOR OUTPUT AS #1
      DEF SEG = 0: VGA = 20
      LOOP1:
      REG 1, VGA
      CALL INTERRUPT 16
      C = PEEK(1098)
      L = PEEK(1156)
      IF C <> 80 THEN GOTO SHOW
      IF L = 24 THEN GOTO MORE
      SHOW:
      L = L + 1
      PRINT #1, "THIS IS VIDEO MODE"; VGA; ". "; C; " COLUMNS x"; L; " LINES."
      PRINT #1, "Press return..";: INPUT A$
      MORE:
      REG 1, 3
      CALL INTERRUPT 16: CLS
      VGA = VGA + 1
      IF VGA <> 100 THEN GOTO LOOP1
      END

      Best Regards,

      Arthur.


      ------------------
      "The trouble with quotes on the Internet is that you can never know if they are genuine." - Abraham Lincoln.

      Comment


      • #4
        Hi !

        Thanks for the quick replies ; I tried using Arthur's code; however I am using XP and as soon as the code is run it enlargers the window and crashes the dos session.

        Arthur, is there any modifications on the code I can make to work in an XP (cmd window). I also dont understand the peeks or pokes.


        Thanks in advance,

        BASit www.compubyte.co.za

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


        [This message has been edited by A.Basit A.Bulbulia (edited August 21, 2006).]

        Comment


        • #5
          Originally posted by A.Basit A.Bulbulia:
          however I am using XP and as soon as the code is run it enlargers the window and crashes the dos session.
          This code is for pure DOS environment!

          For Windows you must use the console compiler PB/CC which has support for other combinations of row/colunms in text mode.

          Take a look at http://www.powerbasic.com/support/help/pbcc/wf_njs.htm

          Best Regards,

          Arthur.

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


          [This message has been edited by Arthur Gomide (edited August 21, 2006).]
          "The trouble with quotes on the Internet is that you can never know if they are genuine." - Abraham Lincoln.

          Comment

          Working...
          X