home *** CD-ROM | disk | FTP | other *** search
- Introduction
- BDOS-Based Input Line Editors -- BBLINE and BLINE
- Independent Input Line Editor -- INLINE
- :Introduction
-
- Aεá Inpu⌠ Linσ Edito≥ i≤ useΣ t∩ accep⌠ ß linσ oµ tex⌠á froφ ì
- thσ user¼ allowinτ hiφ t∩ issuσ command≤ likσ backspacσ anΣ Ctrl-ì
- ╪á (erasσá al∞á oµ linσ typeΣ s∩ far⌐ t∩ edi⌠ hi≤ tex⌠ a≤á hσá i≤ ì
- inputtinτá it«á Oncσ thσ tex⌠ ha≤ beeε entered¼á thσ Inpu⌠á Linσ ì
- Edito≥ return≤ t∩ thσ callinτ prograφ witΦ thσ user'≤ tex⌠ storeΣ ì
- in a buffer. This text is terminated by a binary 0.
-
- Tw∩ oµ thσ Inpu⌠ Linσ Editor≤ iε SYSLI┬ usσ thσ CP/═ BDO╙ t∩ ì
- providσ thσ linσ edito≥ function«á The∙ mainl∙ servσ t∩ preservσ ì
- thσá register≤á durinτá thσá functioεá cal∞á anΣá t∩á storσáá thσ ì
- terminatinτ zer∩ a⌠ thσ enΣ oµ thσ text«á The∙ occup∙ les≤ spacσ ì
- than the third Input Line Editor, INLINE.
-
-
- Thσ thirΣ Inpu⌠ Linσ Editor¼á INLINE¼á i≤ useΣ wheε securit∙ ì
- i≤á important«á Unlikσá thσ othe≥ two¼á wheε typinτ ß Ctrl-├á t∩ ì
- INLINE¼á thσá Inpu⌠á Linσá Edito≥ (anΣ callinτá program⌐á i≤á no⌠ ì
- aborteΣ anΣ contro∞ returneΣ t∩ CP/M«á Instead¼á thσ Ctrl-├ cha≥ ì
- i≤ simpl∙ storeΣ iε thσ user'≤ line« Also¼ unlikσ thσ othe≥ two¼ ì
- INLIN┼á caεá bσá instructeΣá t∩á ech∩á o≥á no⌠á ech∩á thσáá inpu⌠ ì
- characters«á Thi≤á featurσ i≤ usefu∞ fo≥ program≤ whicΦ wan⌠á t∩ ì
- inpu⌠á ßá password«á INLIN┼á caε bσ instructeΣ no⌠ t∩á ech∩á thσ ì
- password¼á bu⌠á i⌠ wil∞ stil∞ providσ thσ linσ editinτá function≤ ì
- for the user so that he can correct mistakes if he makes them.
-
-
- :BDOS-Based Input Line Editors -- BBLINE and BLINE
-
- Routine Name: BBLINE
- Function:
- BBLIN┼ provide≤ ß ver∙ convenien⌠ interfacσ t∩ thσ BDO╙ ì
- fo≥á inpu⌠ linσ edito≥ functions«á I⌠ contain≤ it≤ owεá interna∞ ì
- buffe≥á fo≥ storagσ oµ thσ inpu⌠ linσ (20░ byte≤ allocated)¼á anΣ ì
- i⌠á return≤ ß pointe≥ t∩ thσ firs⌠ bytσ oµ thσ linσ upoεá return« ì
- Thσá linσá storeΣ iε thi≤ buffe≥ i≤ terminateΣ b∙ ßá binar∙á zer∩ ì
- (0).
- T∩á usσá BBLINE¼áá thσá use≥á neeΣá onl∙á cal∞á it¼á witΦá ß ì
- capitalizatioε flaτ storeΣ iε thσ ┴ Register«á Iµ ┴ ╜ 0¼á BBLIN┼ ì
- doe≤ no⌠ capitalizσ thσ inpu⌠ linσ characters╗á iµ ┴ <╛ 0¼ BBLIN┼ ì
- capitalize≤á thσá inpu⌠ linσ character≤ beforσ returninτá t∩á thσ ì
- caller.
- N∩ erro≥ code≤ arσ returneΣ b∙ BBLINE« Oε return¼ H╠ point≤ ì
- t∩ thσ firs⌠ bytσ oµ thσ inpu⌠ linσ anΣ ┴ contain≤ ß coun⌠ oµ thσ ì
- numbe≥ oµ character≤ iε tha⌠ linσ (no⌠ countinτ thσ endinτ zero).
-
-
- BBLINE, Con't
- Inputs: A=0 to Not Capitalize Line, A<>0 to Capitalize Line
- Outputs: HL pts to first char in the line
- A is number of characters in the line (not
- counting the ending zero)
- Registers Affected: PSW, HL
- SYSLIB Routines Called: CAPS
- Special Error Conditions: None
-
-
- Routine Name: BLINE
- Function:
- BLIN┼ provide≤ ß ver∙ convenien⌠ interfacσ t∩ thσá BDO╙ ì
- fo≥á inpu⌠ linσ edito≥ functions«á I⌠ perform≤ thσ samσ typσá oµ ì
- functioεá a≤á BBLINE¼á bu⌠ i⌠ doe≤ no⌠ contaiε it≤á owεá interna∞ ì
- buffer«á Thσ use≥ i≤ expecteΣ t∩ providσ sucΦ ß buffer¼ whicΦ i≤ ì
- structureΣ a≤ follows:
-
- SIZE: DB <Size of Buffer>
- CCNT: DS 1
- LINE: DS <Size of Buffer + 1>
- ì
- BLIN┼ return≤ ß pointe≥ t∩ thσ firs⌠ bytσ oµ thσ linσ (LINE⌐ upoε ì
- return« Thσ linσ storeΣ iε thi≤ buffe≥ i≤ terminateΣ b∙ ß binar∙ ì
- zer∩ (0).
- T∩ usσ BLINE¼á thσ use≥ neeΣ onl∙ cal∞ it¼ witΦ ß pointe≥ t∩ ì
- thσ user'≤ buffe≥ iε H╠ anΣ ß capitalizatioε flaτ storeΣ iε thσ ┴ ì
- Register«á Iµá ┴ ╜ 0¼á BLIN┼ doe≤ no⌠ capitalizσ thσ inpu⌠á linσ ì
- characters╗áá iµá ┴á <╛á 0¼á BLIN┼á capitalize≤á thσá inpu⌠á linσ ì
- character≤ beforσ returninτ t∩ thσ caller.
-
- BLINE, Con't
-
- N∩ erro≥ code≤ arσ returneΣ b∙ BLINE«á Oε return¼ H╠ point≤ ì
- t∩ thσ firs⌠ bytσ oµ thσ inpu⌠ linσ anΣ ┴ contain≤ ß coun⌠ oµ thσ ì
- numbe≥ oµ character≤ iε tha⌠ line (not counting the ending zero).
-
- Inputs: A=0 to Not Capitalize Line, A<>0 to Capitalize Line
- HL pts to first byte (SIZE) of user-supplied buffer
- Outputs: HL pts to first char in the line
- A is number of characters in the line (not
- counting the ending zero)
- Registers Affected: PSW, HL
- SYSLIB Routines Called: CAPS
- Special Error Conditions: None
-
- :Independent Input Line Editor -- INLINE
- Routine Name: INLINE
- Function║
- INLIN┼á allow≤á thσ use≥ t∩ inpu⌠ ß linσ oµá tex⌠á froφ ì
- CON║á int∩ thσ buffe≥ pointeΣ t∩ b∙ HL«á Thσ use≥ i≤ alloweΣá t∩ ì
- edi⌠á thσá tex⌠á a≤á hσ type≤ it¼á anΣá INLIN┼á respond≤á t∩á thσ ì
- followinτ edito≥ commands:
-
- Key Command Function
- <BS> Delete previous character and back up cursor
- <DEL> Delete previous character and echo it
- <CR> Input complete -- return to calling program
- <LF> Skip down to next physical line and insert a
- <CR> <LF> into buffer
- <TAB> Tabulate to next tab stop (every 8)
- Ctrl-U, Erase current line (clear buffer) and restart
- Ctrl-X input
- Ctrl-R Retype current line
- Ctrl-┼ Ski≡ dowε t∩ nex⌠ physica∞ line╗ inser⌠
- nothing into buffer
-
-
- INLINE, Con't
-
- Oε exit¼á thσ buffe≥ contain≤ thσ tex⌠ entereΣ followeΣ b∙ ß ì
- <NULL╛ (binar∙ 0)╗á thσ <CR╛ typeΣ t∩ enΣ thσ inpu⌠ i≤ NO╘ placeΣ ì
- iε thσ buffer.
-
- Inputs: HL = pointer to input line buffer
- A = Echo Flag (A=0 Means Don't Echo Input)
- Outputs: -None- (Input line buffer contains text typed by user)
- Registers Affected: -None-
- SYSLIB Routines Called: CCOUT, CIN, COUT, CRLF
- Specia∞á Erro≥ Conditions║
- <BEL╛á (Bee≡ a⌠ CON:⌐ i≤ outpu⌠ iµ attemp⌠ i≤á madσá t∩ ì
- deletσá characte≥ (<BS╛ o≥ <DEL>⌐ beforσ beginninτ oµá line«á N∩ ì
- limi⌠á o≥á erro≥ checkinτ i≤ donσ oε thσ sizσ oµ thσá inpu⌠á linσ ì
- buffe≥á (buffe≥ overflo≈ i≤ possible¼á s∩ i⌠ i≤ recommendeΣá tha⌠ ì
- buffe≥á i≤ madσ arbitraril∙ large)«á HasΦ marδ (#⌐ i≤ printeΣ iε ì
- responsσ t∩ Ctrl-R¼ Ctrl-U¼ anΣ Ctrl-X.
-
-
- INLINE, Con't
-
- Note║á INLIN┼á offer≤á tw∩ feature≤ no⌠ founΣ iε BLIN┼á anΣ ì
- BBLINE«á First¼á i⌠ canno⌠ bσ aborteΣ b∙ ß Ctrl-C╗ thi≤ i≤ good¼ ì
- sincσá i⌠á caε bσ useΣ iε "secureó program≤ withou⌠ fea≥á oµá thσ ì
- use≥ breakinτ ou⌠ oµ thσ program« Second¼ i⌠ caε bσ madσ t∩ ech∩ ì
- o≥á no⌠á ech∩á thσá input╗á thi≤á provide≤á somσá protectioεá fo≥ ì
- inputtinτ sensitivσ information¼ likσ ß password.
-
- INLIN┼á essentiall∙á provide≤ al∞ oµ thσ conventiona∞á inpu⌠ ì
- linσ edito≥ functions«á I⌠ i≤ somewha⌠ morσ flexiblσ thaεá BLIN┼ ì
- anΣá BBLINE¼á bu⌠ thσ tradeofµ i≤ tha⌠ INLIN┼ take≤ u≡ morσ spacσ ì
- thaε eithe≥ BLIN┼ o≥ BBLINE«á Iµ securit∙ i≤ no⌠ required¼ i⌠ i≤ ì
- recommendeΣ tha⌠ thσ programme≥ emplo∙ BLIN┼ o≥ BBLIN┼ insteaΣ oµ ì
- INLINE.
-