• Please review our updated Terms and Rules here

LDOS (LBASIC) Help

irishmike

Experienced Member
Joined
Sep 21, 2006
Messages
331
Location
Overland Park, KS USA
Hi Guys:

I am beginning the process of converting one of my QuickBasic programs (this was DOS on a later Tandy 1000 machine) to LBASIC.

Some of the commands that I am sure are going to be unecessary are 'KEY OFF" since that dealt with the function key map on the QB editor and screens. But there are few that might need a BASIC to BASIC translation... here is a list of a few that I know I need to find equivalent commands for:

LOCATE -- used to position a string on the screen given the line number and column number (eg LOCATE 1, 25 yeilds the start character is at ROW 1 and COL 25 on the screen.)

CHR$(x) gives the character that X represents (eg on QB CHR$(205) yeilds a "-" on the screen)

Need to generate a random number, in QB RANDOMIZE TIMER and then a statement like I= INT(15 * RND) +1 gives us a number between 1 and 15.

There may be others as I get into it, but those are the "biggies" for now.

Help is appreciated, as always.

Mike

ALSO: How do I save the BASIC file to my :1 drive. I have a data disk on that place and tried SAVE":1 EXAMPLE/BAS", A and it did not like the file name.
 
Last edited:
I suppose I should be very specific, I am trying to go from QBASIC to BASIC under LDOS. I appreciate the reply, but not L-BASIC, This is the version that comes with LDOS 5.1.3 that I am working with. It is possible that I want to use another flavor of BASIC, but I figure it should have some equivalences for positioning things on the screen at least.
 
Hello guys. It looks like the BASIC that comes with LDOS is quite limited. Maybe there is another better BASIC out there for the TRS-80? I mean no support for TAB() even... I guess that screen placement was not important in LBASIC. So I am open for suggestions on what BASIC to use and naturally where to get it.

Thanks,

Mike
 
I believe there is either locate or print @ in lbasic. I just need to boot up one of the machines and check it out. There are also basic compilers (bascom) for the model 4.
 
@kb2syd: If they are in there, they are not documented well. Both the LBASIC manual and the LDOS manual and the online help on the LDOS bootable disk don't cover the variations at all. So if you find them, I would like to know how the syntax looks.

Thanks.
 
Assuming the BASIC in LDOS BASIC is a superset of the original Tandy/Microsoft Level II BASIC, then PRINT@ is used instead of LOCATE. I'd be suprised if PRINT TAB is missing as this is a part of Level II BASIC?

Tez
 
Hi Tez:

I tried PRINT @X; "statement" and got a syntax error. tried tab, not print tab... same thing... so not sure on that. Does the syntax need to be PRINT@ X instead and how would one format the number... I read that the it is something like 64*row + column.

Thanks,

Mike
 
I think for whatever reason you don't use a ; if you're going to use a statement? (I'm guessing also.. wish that read easier). print @ 26 "testing" maybe?

Editing (again) the index at the end of the page also has it listed as print@, I'm not sure if the spaces are needed or could also be throwing things off. In commodore land you don't need to put spaces (makes it a hell of a lot more difficult to read, but they're not necessary). x86 you do need spaces IIRC.
 
@barythin: Thanks for jumping in :) Tried the statement minus the ";" but it still is getting a syntax error. "statement" is a string... not another statement just FYI.
 
Mike, this short and dirty program will show how the PRINT@ command works

10 I =1
20 PRINT@I,I
30 I=I+1
40 FOR J = 1 TO 100
50 NEXT J
55 CLS
60 GOTO 20
 
@Tezza: Yes PRINT@456, "DOES THIS WORK" worked! Thanks. That means that this part is solved. Now on to the Random number generation.
 
Last edited:
Well, the manual I'm looking at says rnd(40) will give a random number between 1 and 40. It doesn't indicate a way to initialize the seed. Oh, wait. There is a random statement to reseed the random number generator. I'll send you a link to the manuals. I put up about 40 GB of tandy/trs-80 manuals last night.
 
Back
Top