CopyFilter 1.52 KB
Newer Older
Kevin Bracey's avatar
Kevin Bracey committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
; Copyright 1997 Acorn Computers Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
;     http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
; > s.copyFilter

;;----------------------------------------------------------------
;; copy_filter_handler
;;
;; This is called by the Wimp when copying a rectangle
;;
;; Entry:
;;
;;      R2-R5 - Destination bounding box.
;;	R6-R9 - Source bounding box.
;;      R10   - Window handle - 1
;;
;; Exit:
;;
;;      All other registers preserved.  (Except R12!)
;;
;;      All interested filters called.
;;
;;

copy_filter_handler

        Push    "r0-r2,r10,r11,LR"

40
        Rel     r0,r10
Kevin Bracey's avatar
Kevin Bracey committed
41 42 43 44

        LDR     r1,copy_filters
copy_filter_exit
        CMP     r1,#0
45 46 47 48 49
      [ No26bitCode
        Pull    "r0-r2,r10,r11,PC",EQ    ; End of list
      |
        Pull    "r0-r2,r10,r11,PC",EQ,^  ; End of list
      ]
Kevin Bracey's avatar
Kevin Bracey committed
50 51 52 53 54 55 56 57 58 59
        LDR     r14,[r1,#next_ptr]
        Push    "r14"

        LDR     r12,[r1,#f_R12]        ; Set R12.

        MOV     LR,PC
        LDR     PC, [r1,#f_address]
        NOP
        Pull    "r1"
        B       copy_filter_exit
Robert Sprowson's avatar
Robert Sprowson committed
60 61

        LNK     PostFilter.s
Kevin Bracey's avatar
Kevin Bracey committed
62 63