Echo works can I do it in a program?

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

Echo works can I do it in a program?

Postby Gablea » Jun 12, 2016 15:13

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: 2024
Joined: Jun 02, 2013 9:27
Location: Switzerland

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

Postby MrSwiss » Jun 12, 2016 20:33

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: 850
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

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

Postby Gablea » Jun 12, 2016 20:37

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: 2024
Joined: Jun 02, 2013 9:27
Location: Switzerland

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

Postby MrSwiss » Jun 12, 2016 20:46

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: 850
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

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

Postby Gablea » Jun 12, 2016 20:49

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: 2024
Joined: Jun 02, 2013 9:27
Location: Switzerland

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

Postby MrSwiss » Jun 12, 2016 20:56

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!

Return to “DOS”

Who is online

Users browsing this forum: No registered users and 1 guest