Echo works can I do it in a program?

DOS specific questions.
Post Reply
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Echo works can I do it in a program?

Post by Gablea »

Hi everyone

From my command line I can echo to a driver called DIS1 so in the dos program would I use open to access that driver?
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Echo works can I do it in a program?

Post by MrSwiss »

Could you plse. elaborate (give more details) on what:
  • the mentioned Driver is good for?
  • what do you mean exactly, with "echo" (as in a *.bat file?)
  • give any other useful information, you might have ...
There are (to my knowledge) no Mind-Readers in this Forum ;-)
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: Echo works can I do it in a program?

Post by Gablea »

ok I have a DOS Point of sale system and the Printer, Cash Drawer, scanner, Customer display are all controlled by drivers that are installed when the system boots.

Example

C:\4694\VFD-display.sys /NDIS1

The above loasd the driver to control the customer display and if i use the DOS command

Code: Select all

Echo Hello World > DIS1
I get on the Customer display Hello World.

so from the FreeBASIC app do I just use a system dump and drop this to the Command line to echo to the Driver or can I use Open "DIS1" For RANDOM as #CustomerDisplay to send commands etc to the display?
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Echo works can I do it in a program?

Post by MrSwiss »

Galea wrote:can I use Open "DIS1" For RANDOM as #CustomerDisplay to send commands etc to the display?
Well, I don't think RANDOM is the correct Mode, try for OUTPUT ...
then use Print "whatever" (to Out...).
Otherwise use Shell, Exec, or similar Command to use CLI ...
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: Echo works can I do it in a program?

Post by Gablea »

so

Code: Select all

Open "DIS1" for Output as #CustomerDisplay"
       Print #CustomerDisplay, "Welcome to the store"
close #CustomerDisplay
would work in theory COOL I shall try and let you all know

so if I wanted to get data FROM the driver would it be RANDOM or Input?
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Echo works can I do it in a program?

Post by MrSwiss »

Gablea wrote:so if I wanted to get data FROM the driver would it be RANDOM or Input?
Simple: INPUT

Code: Select all

Open "DIS1" for Output as #CustomerDisplay"    ' <<<< without "
       Print #CustomerDisplay, "Welcome to the store"
close #CustomerDisplay
First do something like:

Code: Select all

Dim As Long CustomerDisplay = FreeFile
IMPORTANT!
Post Reply