19682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;
29682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;    SDL - Simple DirectMedia Layer
39682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;    Copyright (C) 1997-2012 Sam Lantinga
49682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;
59682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;    This library is free software; you can redistribute it and/or
69682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;    modify it under the terms of the GNU Library General Public
79682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;    License as published by the Free Software Foundation; either
89682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;    version 2 of the License, or (at your option) any later version.
99682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;
109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;    This library is distributed in the hope that it will be useful,
119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;    but WITHOUT ANY WARRANTY; without even the implied warranty of
129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;    Library General Public License for more details.
149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;
159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;    You should have received a copy of the GNU Library General Public
169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;    License along with this library; if not, write to the Free
179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;
199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;    Sam Lantinga
209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;    slouken@libsdl.org
219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;
229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall; Assembler routines for RISC OS display
239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;
249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	AREA |C$$CODE|
269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	EXPORT |RISCOS_Put32|
289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall; Display 32bpp to 32bpp, 1:1
309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;
319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall; Code provided by Adrain Lees
329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;
339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall; entry a1 -> destination
349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;       a2 =  dest width in pixels
359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;       a3 =  dest line length in bytes
369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;       a4 =  dest height in scanlines
379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;       arg5 -> source
389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall;       arg6 =  byte offset from end of source line to start of next
399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallArg5    *       10*4
419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallArg6    *       Arg5+4
429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse HallRISCOS_Put32    ROUT
449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STMFD   sp!,{a2,v1-v6,sl,fp,lr}
459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     ip,[sp,#Arg5]
469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                MOV     lr,a1
479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                B       ucp64lp
489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall00              ;tail strip of 1-15 pixels
509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     v1,[ip],#4
529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall01              SUBS    a2,a2,#1
539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     v1,[lr],#4
549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDRHI   v1,[ip],#4
559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                BHI     %01
569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                B       %02
579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallucp64end        ADDS    a2,a2,#16
599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                BNE     %00
609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall02              SUBS    a4,a4,#1                ;height--
629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDRHI   v1,[sp,#Arg6]
639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDRHI   a2,[sp]                 ;reload width
649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                BLS     %03
659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                ;move to start of next scanline
679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                ADD     lr,a1,a3
699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                ADD     a1,a1,a3
709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                ADD     ip,ip,v1
719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallucp64lp         SUBS    a2,a2,#16
739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                BLO     ucp64end
749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                PLD     [ip,#64]
769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     v1,[ip],#4
789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     v2,[ip],#4
799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     v3,[ip],#4
809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     v4,[ip],#4
819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     v5,[ip],#4
829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     v6,[ip],#4
839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     sl,[ip],#4
849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     fp,[ip],#4
859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     v1,[lr],#4
869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     v2,[lr],#4
879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     v3,[lr],#4
889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     v4,[lr],#4
899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     v5,[lr],#4
909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     v6,[lr],#4
919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     sl,[lr],#4
929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     fp,[lr],#4
939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                PLD     [ip,#64]
959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     v1,[ip],#4
979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     v2,[ip],#4
989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     v3,[ip],#4
999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     v4,[ip],#4
1009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     v5,[ip],#4
1019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     v6,[ip],#4
1029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     sl,[ip],#4
1039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                LDR     fp,[ip],#4
1049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     v1,[lr],#4
1059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     v2,[lr],#4
1069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     v3,[lr],#4
1079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     v4,[lr],#4
1089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     v5,[lr],#4
1099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     v6,[lr],#4
1109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     sl,[lr],#4
1119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                STR     fp,[lr],#4
1129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                B       ucp64lp
1149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall03              LDMFD   sp!,{a2,v1-v6,sl,fp,pc}
1169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
117