Qbasic and Mx2

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
teekeegod
LCD?
Posts: 1
Joined: Mon Feb 13, 2006 12:17 am

Qbasic and Mx2

Post by teekeegod »

OK Im dumb, but i want to learn, I know wabout basic lanuage, but how would i just print text out like could i do this

5 input "what is yiour name";N$
10 print "hello";n$
15 end

in line ten i would like to "print" it out the Mx2 display, anyone out there can tech me some thing or know some code i can copy and paste?

Aniso
-=Beloved by all=-
-=Beloved by all=-
Posts: 286
Joined: Tue Aug 14, 2001 6:00 pm
Location: ...I could tell you my velocity...

Post by Aniso »

Generally, programming languages are never capable of input or output. When you use the "print" function, you are doing just that - using a function. The language itself really knows nothing about "printing". QBASIC (whatever that is - seriously) probably comes installed with the ability to "print" to the screen because this is real handy, but this is an extension to the language. What you need is to find a way to "print" to a serial port. Once you can do this, you will be able to do exactly as you suggested and simply send stuff to your display which is hooked up to a (virtual) serial port. It might look something like:

sprint(COM5, "Hello World") (I forget how to format variables for BASIC)
or
10 MyNewPrintFunction "Hello";n$

depending on whether you can specify the port globally or whether you need to do it every time.

Ask around about how to talk to a serial port - maybe your QBASIC has something for this "built in".

Post Reply