Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ts_set_camp
- ;
- ; This module will map a range the physical pages (r1) to the logical page (r0) and
- ; set the protection mode (r2). This module will return to the location from where
- ; either itself or ts_set_cam or ts_set_cam_idle were called from.
- ;
- ; Corrupts r0,r1,r2,r3,r4,r6,r9,r11
- ;
- ; Calls the RISC OS routine BangCam to do the PPNO, LPNO bit switching.
- ; First, jumble the registers to suit BangCam ..
- ;
- ; r2 = CAM entry (PPNO)
- ; r3 = logical address
- ; r9 = current MEMC setting (for pagesize)
- ; r11 = PPL
- ;
- MOV r3,r0 ; logical page number
- MOV r11,r2 ; protection level
- MOV r2,r1 ; physical page number
- MOV_fiq r0, r11_fiq ; MEMC configuration
- MOV r9, r0 ; keep a copy in r9
- MOV r1, r9, LSR #2
- AND r1, r1, #3 ; calculate pagesize shift
- ADD r1, r1, #12
- MOV r3, r3, LSL r1 ; convert LPN to logaddr
- B BangCam ; return thro' BangCam
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement