Board index » delphi » Expert help required

Expert help required

Greetings fellow programmers,

I need to write a TSR that reads a line of CRT text, on the screen (in 80
lines mode).
So when the user runs a program (such as dos edit) it will constantly read
the line (once a second will do) and put it in a string.

Thats the part i'm having trouble with.

I then want to output this to a COM port for display on an lcd screen.

Any help would be greatly appreciated.

Regards,

Mike

 

Re:Expert help required


Hi Mike,

Could you describe your problem with more details please ?

Denis

Mike a crit dans le message <39581f80$0$...@echo-01.iinet.net.au>...

Quote
>Greetings fellow programmers,

>I need to write a TSR that reads a line of CRT text, on the screen (in 80
>lines mode).
>So when the user runs a program (such as dos edit) it will constantly read
>the line (once a second will do) and put it in a string.

>Thats the part i'm having trouble with.

>I then want to output this to a COM port for display on an lcd screen.

>Any help would be greatly appreciated.

>Regards,

>Mike

Re:Expert help required


Mike <mike...@iinet.net.au> said

Quote
>Greetings fellow programmers,

>I need to write a TSR that reads a line of CRT text, on the screen (in 80
>lines mode).
>So when the user runs a program (such as dos edit) it will constantly read
>the line (once a second will do) and put it in a string.

>Thats the part i'm having trouble with.

Which bit of the above is the problem: writing the TSR, knowing when a
program has been started, reading the line or putting it in a string ?
Bit more info would be helpful.

--
Pedt Scragg     http://signpost-design.co.uk/   ODP Editor: http://dmoz.org/
Signpost Web Design, Wrecsam, North Wales       Member of FSB
                                                NIC Handle: PS4032

Re:Expert help required


JRS:  In article <Toc$cgFzGJX5E...@pedt.demon.co.uk> of Fri, 30 Jun 2000
13:25:23 seen in news:comp.lang.pascal.borland, Pedt Scragg

Quote
<p...@signpost-design.co.uk> wrote:
>Mike <mike...@iinet.net.au> said
>>Greetings fellow programmers,

>>I need to write a TSR that reads a line of CRT text, on the screen (in 80
>>lines mode).
>>So when the user runs a program (such as dos edit) it will constantly read
>>the line (once a second will do) and put it in a string.

>>Thats the part i'm having trouble with.

>Which bit of the above is the problem: writing the TSR, knowing when a
>program has been started, reading the line or putting it in a string ?
>Bit more info would be helpful.

I envisage it as providing a remote display of the latest complete line
of the CRT, which is used in glass-TTY mode; or possibly the Crt.Window
function is being used to segregate off an area of the screen for
display.  It may be that a user is visually handicapped, either
medically or by having eyeballs too far from the screen.

I did much the same, years ago, with a 40*1 vacuum-flourescent display,
serial-interfaced to an LSI-11; though there the main program had code
to drive the VFD as well as the main screen.  Case of distant eyeballs.

I've rarely thought about TSRs; it will need to read every alternate
byte from Base ($B800:0000 or ...) + Page offset (probably 0) + 160 *
LineCount.

I see no need to put a line in a string, though; the TSR can read a
character from the screen whenever the serial port is ready for it, and
output it directly.  It should be a TSR driven by the serial port
interrupt.  

It may be acceptable just to let this loop all the time (it will not use
much CPU, assuming something better than a pre-AT PC); otherwise,
perhaps to stabilise the display, it can march on the spot for a while
at the end of each line.

There is an implication, ISTM, that the program will always be running,
in which case there's no need to be able to unload it <g>; but, if
permanent, one might need to consider possible changes in screen mode,
moving the source region.

The crude code is therefore ? along the lines of

var StartPtr, P : ^char ;

begin set up port;
StartPtr := Ptr($B8000:160*LineCount {+1?} ) ; N := 0 ; Keep end.

IntServ : if N=0 then P := StartPtr else Inc(P, 2) ;
SetPortOutBuf := P^ ;
Inc(N) ; if N=80 then N := 0 ;
End of IntServ.

but remembering the formalities of talking to the interrupt control
system - my programs/int70at2.pas may be a guide here, though it's not a
TSR.

--
? John Stockton, Surrey, UK.  j...@merlyn.demon.co.uk   Turnpike v4.00   MIME. ?
 <URL: http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
 <URL: ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip> Timo Salmi's Turbo Pascal FAQ;
 <URL: http://www.merlyn.demon.co.uk/clpb-faq.txt> Pedt Scragg: c.l.p.b. mFAQ.

Other Threads