qdosmsq:traps:trap_3:clra

Differences

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

Link to this comparison view

qdosmsq:traps:trap_3:clra [2009/05/10 16:52] (current)
george.gwilt created
Line 1: Line 1:
 +
 +====== SD_CLEAR/​IOW_CLRA & SD_CLRTP/​IOW_CLRT & SD_CLRBT/​IOW_CLRB & SD_CLRLN/​IOW_CLRL & SD_CLRRT/​IOW_CLRR ======
 +
 +
 +These traps clear the whole of a window or parts of it.
 +
 +^Name^Value of D0.B^Action^
 +|SD_CLEAR/​IOW_CLRA|$20|Clear all window|
 +|SD_CLRTP/​IOW_CLRT|$21|Clear top of window|
 +|SD_CLRBT/​IOW_CLRB|$22|Clear bottom of window|
 +|SD_CLRLN/​IOW_CLRL|$23|Clear all line|
 +|SD_CLRTT/​IOW_CLRR|$24|Clear to line end|
 +
 +^Call Parameters^^Return Parameters^^
 +|D0.B|See above|D0.L|Corrupted?​|
 +|D1.L| |D1.L|Corrupted.|
 +|D2.L| |D2.L|Preserved.|
 +|D3.W|Timeout|D3.L|Preserved.|
 +|A0.L|Channel ID |A0.L|Preserved.|
 +|A1.L| |A1.L|Corrupted.|
 +
 +===== Errors =====
 +
 +
 +|ERR_NC|Not complete.|
 +|ERR_NO|Channel not open.|
 +
 +
 +===== Notes =====
 +  * All registers not shown above are not used on entry and are preserved on exit.
 +  * When only a part of the window is to be cleared the part is defined by reference to the position of the cursor. The top of the window consists of all lines above the cursor line. The bottom of the window consists of all lines below the cursor line. When only a line is cleared it is the line on which the cursor lies. When only part of a line is cleared it is all positions to the end of the line including the cursor'​s position.
 +  ​
 +  ​
 +
 +===== Example =====
 +The example below shows the use of this trap call to clear a window. It is assumed that the channel ID is in A0.L.
 +
 +<​code>​
 +clear   ​moveq ​  #​SD_CLEAR,​d0 ​   ; $20
 +        moveq   #​-1,​d3 ​         ; Timeout
 +        trap    #3              ; Clear window
 +        tst.l   ​d0 ​             ; OK? . .
 +        bne     ​error ​          ; . . no!
 +</​code>​
 +
  
  • qdosmsq/traps/trap_3/clra.txt
  • Last modified: 2009/05/10 16:52
  • by george.gwilt