• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

MS Basic 2.0 Help

gavo

Well-known member
Hi,

For some odd nostalgic reason I have started to play around with

Microsoft basic 2.0 on my old (512k) Mac. I'm particularly interested

in any capabilities it has to drive the serial ports for good old

serial communications, however I dont have any reference materials

that describe how to go about it.

I purchased a rather good guide to MS Basic from amazon, but although

its a good reference on how to write code and covers many aspects of

the platform, it doesnt cover serial comms.

I see there are several other old MS Basic for Mac books I could buy,

but I've got no idea if any of them will cover the information I want

either.

So, I was wondering if anyone could either point me to an online

resource, or name a book (if anyone can remember that far back :) )

that contains information on how to do serial comms in MS Basic 2.0

for Mac.

Cheers,

 

Aoresteen

Well-known member
I'm doing this off the top of my head. And I used Zbasic far more than MS Basic.

You need to use the OPEN command and treat the serial port as a sequential file.

OPEN "COM1" FOR INPUT AS #1

GET #1, variable1 ect

OPEN "COM1" FOR OUTPUT AS #1

PRINT #1, varible1 etc

In a statement before you need to set up the COM1 or COM2 port:

"COM1:9600,N,8,1"

I don't remember the exact syntax.

You will need a book for all the verbs and syntax.

Is there a help file?

I used to test my serial ports by hooking up ImageWriter and sendint text to it. If it prints you are doing things right.

I don't have any of my old ZBASIC source code here but I'm sure the syntax was very close if not the same.

open "COM1:1200,N,8,1" for output as #1

open "COM1:1200,N,8,1" for input as #2

This might work as well

 

gavo

Well-known member
I'm doing this off the top of my head. And I used Zbasic far more than MS Basic.
You need to use the OPEN command and treat the serial port as a sequential file.
Thanks Tony, I'll have a play around with that. I'm starting to think (hope) that the syntax was fairly similar to other Basic's of the era (as you suggest).

Cheers,

 
Top