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

Link to this comparison view

qdosmsq:traps:trap_3:clra [2009/05/10 15:52] (current)
george.gwilt created
Line 1: Line 1:
 +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.|
 +|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.
 +clear   moveq   #SD_CLEAR,d0    ; $20
 +        moveq   #-1,d3          ; Timeout
 +        trap    #3              ; Clear window
 +        tst.l   d0              ; OK? . .
 +        bne     error           ; . . no!
  • qdosmsq/traps/trap_3/clra.txt
  • Last modified: 2009/05/10 15:52
  • by george.gwilt