How this solution was used...
Q:
Recently I was reviewing your EBL+ documentation hoping that it my be able
to solve a problem. Ater reading the doc, I'm not so sure. I was
overwhelmed with the functional sophistication of the program. It is has
many more magnitudes of functionality than I need.
BACKGROUND:
For the past several years, I have been using a black box (actually a FM
receiver tied to a Com port) and the associated DOS-based software (Signal
-640K) from Data Broadcasting Corp (DBC) to get end-of-day stock (high, low,
close and volume) data. Every evening I capture stats on about 1,200
stocks. Stock data are transmitted and received continuously throughout
the evening. During this time window Signal is loaded twice (600 stocks
per portfolio).
PROBLEM:
Each Signal load is allowed to run about 60 minutes to capture the data then
it must be manually terminated so that it will download portfolios into a
Lotus WKS/WK1 formatted file. To terminate I must hit a "F" function key,
enter the portfolio name and hit the Enter key several times. This works OK
when I am at home, but not so good when I am away (e.g. vacation). The
computer could be plugged into a common wall timer that turns it on at about
7:00 pm. and off several hours later. Because Signal is DOS-based, I can't
figure how to automate the Signal shutdown process. The obvious solution is
to have DBC upgrade their software to compare the computer time-of-day with
a user entered parm. No luck with DBC on this suggestion.
I've tried a PC Magazine utility WINCMD (command processor) running Signal
in a window, but it doesn't always run properly. Seems to be a timing
problem between DOS Signal, the Com port and Windows internals. Data
Broadcasting acknowledges this fact.
ANALYSIS:
Your doc seems to indicate that the target program must "request" data.
Initially, I thought your STACK loading mechanism would work. The program
loads OK, but after it loaded I could not find a way to communicate the
aforementioned keystrokes to do the Signal shutdown process.
MY SIMPLE NEEDS:
Timer turns on the computer
Autoexec.bat...
*Load Signal 1st portfolio
*Wait for 60 minutes
*Send keystrokes to
initiate shutdown
*Load Signal 2nd portfolio
*Wait for 60 minutes
*Send keystrokes to
initiate shutdown
.............................
*Run several BASIC programs
for file saving, etc.
Autoexec.bat exit
Timer shuts off the computer
A: ...and the solution is...
The basic answer is that EBL already has a built in mechanism
to wait for N amount of timer ticks between keystrokes.....
unfortunately timer ticks are 1/18th of a second, and N can
be 255 maximum. We can chain these together, but it would
take a lot to add up to an hour as you need.
Fortunately starting from EBL version 4.05 (currently we're at v4.09)
there's a mechanism to do virtually anything between keystokes
(eject paper, ring bells, or even wait 1 hour). If you want,
here is the assembly language magic
that this corresponds to if
you're so inclined, however the special codes needed wait for one
hour are shown between the keystrokes that you've asked for above.
Please copy it exactly (semicolons and all). I've also simulated
what EBL+ statements you'd need in your autoexec.bat file...
REM first part of autoexec.bat file is here
REM ...more statements...
BAT /n * Start EBL but keep logo silent...
BEGSTACK
Load Signal 1st portfolio
\f0\02\45;
\EB\04\00\00\00\00\06\B8\40\00\8E\C0\83\7C\02\00;
\75\1C\83\7C\04\00\75\16\26\A1\6C\00\05\07\00\89;
\44\04\26\A1\6E\00\15\01\00\89\44\02\EB\12\26\A1;
\6E\00\3B\44\02\72\09\26\A1\6C\00\3B\44\04\73\03;
\BE\00\00\07\C3;
These are keystrokes to
initiate shutdown
Load Signal 2nd portfolio
\f0\02\45;
\EB\04\00\00\00\00\06\B8\40\00\8E\C0\83\7C\02\00;
\75\1C\83\7C\04\00\75\16\26\A1\6C\00\05\07\00\89;
\44\04\26\A1\6E\00\15\01\00\89\44\02\EB\12\26\A1;
\6E\00\3B\44\02\72\09\26\A1\6C\00\3B\44\04\73\03;
\BE\00\00\07\C3;
Sending keystrokes to
initiate shutdown
These are keystokes for several BASIC programs
for file saving, etc.
END