Good Morning,
we need to run an old bas file that uses all the 25 lines of gwbasic screen; PC-BASIC only allows 24 lines? How could we solve the problem? It is very important, because the correction of the code should be very very long and complicated. Thank you and Best Regards
Paolo
Make sure your program includes KEY OFF at the start, which will clear line 25 and make it available to print. This would also be necessary to make it run correctly in GW-BASIC, by the way.
Another option is to run the program directly with PC-BASIC from the command line: pcbasic PROGRAM.BAS
will set KEY OFF automatically before running PROGRAM.BAS (again, following GW-BASIC behaviour).
For example, the following short program should work:
Regular GW-BASIC doesn't actually allow VIEW PRINT 1 to 25, but Tandy-1000 GW-BASIC does. (I don't know why - this is the behaviour I reverse engineered from my copy of GW-BASIC 3.23.) So I would suspect your program was perhaps developed for Tandy. Fortunately, PC-BASIC can handle that too.
If you tell PC-BASIC to accept Tandy syntax, your code should run fine. Either specify --syntax=tandy on the command line (so run as pcbasic --syntax=tandy) or set a line syntax=tandy in your PCBASIC.INI file.
If you actually need Tandy graphics modes as well (SCREEN 3 to SCREEN 6), you should go for full Tandy emulation with --preset=tandy, but note that you'll have lower resolution in text mode.
Rob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good Morning,
we need to run an old bas file that uses all the 25 lines of gwbasic screen; PC-BASIC only allows 24 lines? How could we solve the problem? It is very important, because the correction of the code should be very very long and complicated. Thank you and Best Regards
Paolo
Hi Paolo,
Make sure your program includes
KEY OFF
at the start, which will clear line 25 and make it available to print. This would also be necessary to make it run correctly in GW-BASIC, by the way.Another option is to run the program directly with PC-BASIC from the command line:
pcbasic PROGRAM.BAS
will set
KEY OFF
automatically before runningPROGRAM.BAS
(again, following GW-BASIC behaviour).For example, the following short program should work:
Hope this helps; let me know if you run into any issues - it's easiest if you include a short program that illustrates what doesn't work.
Rob
Hi Rob, thank you for the fast answer!
Here a sample:
30 KEY 4 , "SYSTEM"+CHR$(13)
32 KEY 10, "GOTO 2000"+CHR$(13)
34 COMMON P1$ :KEY OFF
36 VIEW PRINT 1 TO 25 :CLS
I get "Illegal function call in 36"
BR
Paolo
Thanks, that makes clear what's going on.
Regular GW-BASIC doesn't actually allow
VIEW PRINT 1 to 25
, but Tandy-1000 GW-BASIC does. (I don't know why - this is the behaviour I reverse engineered from my copy of GW-BASIC 3.23.) So I would suspect your program was perhaps developed for Tandy. Fortunately, PC-BASIC can handle that too.If you tell PC-BASIC to accept Tandy syntax, your code should run fine. Either specify
--syntax=tandy
on the command line (so run as pcbasic--syntax=tandy
) or set a linesyntax=tandy
in yourPCBASIC.INI
file.If you actually need Tandy graphics modes as well (
SCREEN 3
toSCREEN 6
), you should go for full Tandy emulation with--preset=tandy
, but note that you'll have lower resolution in text mode.Rob