qdosmsq:traps:trap_3:elin

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
qdosmsq:traps:trap_3:elin [2009/05/20 15:19]
george.gwilt Redrafted
qdosmsq:traps:trap_3:elin [2009/05/29 10:50] (current)
george.gwilt Explanatory notes clarified(?)
Line 22: Line 22:
   * All registers not shown above are not used on entry and are preserved on exit.   * All registers not shown above are not used on entry and are preserved on exit.
   * This trap allows a line of characters situated in a buffer to be edited.   * This trap allows a line of characters situated in a buffer to be edited.
-  * On entry D1.W must contain the length of the line to be edited. +  * On entry D1.W must contain the length of the line to be edited ​(L)
-  * IO_EDLIN/​IOB_ELIN prints all, or the end part ofthe line before editing starts. The most significant word (msw) of D1 contains ​the position ​of the first character in that line to be printed. ​Thus position ​causes all the line to be printed. If the number equals ​D1.W (the length ​of the line) no characters are printed. The cursor on the line to be edited is positioned on the first character ​to be printed, or just after the end of the line if no characters are printed. ​   +  *Before the trap is calledsome or all of the characters from the start of the line can be printed. ​The number printed N, say, (from to the line length) must be set in the top word of D1. 
-  * A1 is the address, in the buffer, of the character just after end of the line to be edited. This value, plus the line length in D1.W, defines exactly where the line to be edited is.  ​+  * IO_EDLIN/​IOB_ELIN prints ​the remaining L - N characters ​of the line before editing starts. The cursor on the line to be edited is positioned on the first character ​so printed, or just after the end of the line if no characters are printed. ​   
 +  * A1 is the address, in the buffer, of the character just after end of the line to be edited. This value, plus the line length in D1.W (L), defines exactly where the line to be edited is.  ​
   * When the call is made there must be no terminating character, but the terminating character will be included in the character count on return.   * When the call is made there must be no terminating character, but the terminating character will be included in the character count on return.
   * ENTER, UP and DOWN arrows are acceptable terminators. In SMSQ/E the terminator ESC is also allowed.   * ENTER, UP and DOWN arrows are acceptable terminators. In SMSQ/E the terminator ESC is also allowed.
-  * On return D1.W contains the length of the line, including ​the terminating character.+  * On return D1.W contains the length of the line which includes ​the terminating character.
   * Note that this trap operates by keeping the position of the current character in the line in the msw of D1. This position is mirrored on the screen. Thus, if you move the cursor to the start of the line to be edited, the value of the msw of D1 becomes zero. For example, if the line length is 8 and the msw of D1 is set as 7, the last character of the line in the buffer will be printed to the screen at the current cursor position. The trap will assume that there are 7 previous positions on the screen (for the first part of the line). It is up to the user to see that this is so.    * Note that this trap operates by keeping the position of the current character in the line in the msw of D1. This position is mirrored on the screen. Thus, if you move the cursor to the start of the line to be edited, the value of the msw of D1 becomes zero. For example, if the line length is 8 and the msw of D1 is set as 7, the last character of the line in the buffer will be printed to the screen at the current cursor position. The trap will assume that there are 7 previous positions on the screen (for the first part of the line). It is up to the user to see that this is so. 
 ===== Example ===== ===== Example =====
  • qdosmsq/traps/trap_3/elin.txt
  • Last modified: 2009/05/29 10:50
  • by george.gwilt