|
Hi Brian, Thanks for the code snippet. I'll compare it to what we're doing. I used to be a real Delphi programmer years ago. Turbo Pascal before that. Mike On Fri, 14 Apr 2000, Alex Brainman wrote: > > ----- Original Message ----- > From: Mike Madore <mmadore@mail.turbolinux.com> > To: <LINUX5250@midrange.com> > Sent: Friday, April 14, 2000 2:05 AM > Subject: Re: The Diabolical Cursor Part II: This Time He's Mad > > > > > The spec says that during the WRITE TO DISPLAY command the following logic > > is used to determine cursor position: > > > > if (keyboard is locked) then > > Leave the cursor where it is > > else > > 1) Honer any insert cursor order > > 2) Move to the first non-bypass field > > 3) Move to position 0,0 > > > > That is how I do it (no warranty implied), if it's any help... > > You DON'T move cursor while processing command. > You MUST do the processing on after WTD or Read, > in fact, I DEFER ALL IC and MC until then, and the action > DEPENDS on aCC = write control char 2: > > if ((aCC and $08) <> 0) and (State <> stateNormalUnlocked) then begin > KeyboardLocked := False; > AID.Reset; > if SystemIC.IsMC then begin > { MC order } > if SystemIC.Pending then > CurPos := SystemIC.Value; > end else begin > { IC order or nothing } > if (aCC and $40) = 0 then > MoveCursorHome; > end; > end; > > where: > > procedure TN5250Console.MoveCursorHome; > begin > if SystemIC.Pending then > CurPos := SystemIC.HomePos > else begin > CurPos := 0; > Tab; > end; > end; > > I do SystemIC.Reset on > > 1) Clear Unit > 2) Clear Format Table > 3) At the begining of Start Of Header > > If you see, I use MoveCursorHome on Home key too > (it took me a while to work that on out), whether it is > right or not, but I haven't seen any problems yet. > > Sorry, the code is Delphi, but, I assume, it's simple enough. > > > Alex > > > > +--- > | This is the LINUX5250 Mailing List! > | To submit a new message, send your mail to LINUX5250@midrange.com. > | To subscribe to this list send email to LINUX5250-SUB@midrange.com. > | To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: david@midrange.com > +--- > +--- | This is the LINUX5250 Mailing List! | To submit a new message, send your mail to LINUX5250@midrange.com. | To subscribe to this list send email to LINUX5250-SUB@midrange.com. | To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.