Home » Archimedes archive » Acorn User » AU 1994-03.adf » !StarInfo_StarInfo » Turnbull/!Pyramid/Library/PlotCode6
Turnbull/!Pyramid/Library/PlotCode6
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1994-03.adf » !StarInfo_StarInfo |
Filename: | Turnbull/!Pyramid/Library/PlotCode6 |
Read OK: | ✔ |
File size: | 0407 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10DEFPROCplotcode64 20LOCALerr$:err$="PlotCode64" 30[OPT T% 40; Code to plot a 64x64 sprite onto a 128x128 sprite 50: 60.plot64routines% 70]:FORU%=0TO15:[OPT T% 80EQUD endplot64-plot64routines% 90]:NEXT:[OPT T% 100: 110]:plot64routines%!0=P%-plot64routines%:[OPT T% 120OPT FNadr(11,sp6%,2):; Sprite address 130MOV R10,#64:; Y Counter 140.yloop 150LDMIA R14,{R0-R3} 160LDMIA R11!,{R5-R8} 170ORR R0,R0,R5 180ORR R1,R1,R6 190ORR R2,R2,R7 200ORR R3,R3,R8 210STMIA R14,{R0-R3} 220ADD R14,R14,#32 230SUBS R10,R10,#1 240BGT yloop 250B endplot64 260: 270]:FORV%=1TO15:W%=V%<<1:[OPT T% 280]:plot64routines%!(V%<<2)=P%-plot64routines%:[OPT T% 290OPT FNadr(11,sp6%,2):; Sprite address 300MOV R10,#64:; Y Counter 310.yloop 320LDMIA R14,{R0-R4} 330LDMIA R11!,{R5-R8} 340ORR R0,R0,R5,LSL#W%:ORR R1,R1,R5,LSR#32-W% 350ORR R1,R1,R6,LSL#W%:ORR R2,R2,R6,LSR#32-W% 360ORR R2,R2,R7,LSL#W%:ORR R3,R3,R7,LSR#32-W% 370ORR R3,R3,R8,LSL#W%:ORR R4,R4,R8,LSR#32-W% 380STMIA R14,{R0-R4} 390ADD R14,R14,#32 400SUBS R10,R10,#1 410BGT yloop 420B endplot64 430]:NEXT:[OPT T% 440: 450]:ENDPROC
��plotcode64 �err$:err$="PlotCode64" [OPT T% (7; Code to plot a 64x64 sprite onto a 128x128 sprite 2: <.plot64routines% F]:�U%=0�15:[OPT T% P"EQUD endplot64-plot64routines% Z]:�:[OPT T% d: n2]:plot64routines%!0=P%-plot64routines%:[OPT T% x(OPT �adr(11,sp6%,2):; Sprite address �MOV R10,#64:; Y Counter � .yloop �LDMIA R14,{R0-R3} �LDMIA R11!,{R5-R8} ��R R0,R0,R5 ��R R1,R1,R6 ��R R2,R2,R7 ��R R3,R3,R8 �STMIA R14,{R0-R3} �ADD R14,R14,#32 �SUBS R10,R10,#1 � BGT yloop �B endplot64 : ]:�V%=1�15:W%=V%<<1:[OPT T% 8]:plot64routines%!(V%<<2)=P%-plot64routines%:[OPT T% "(OPT �adr(11,sp6%,2):; Sprite address ,MOV R10,#64:; Y Counter 6 .yloop @LDMIA R14,{R0-R4} JLDMIA R11!,{R5-R8} T,�R R0,R0,R5,LSL#W%:�R R1,R1,R5,LSR#32-W% ^,�R R1,R1,R6,LSL#W%:�R R2,R2,R6,LSR#32-W% h,�R R2,R2,R7,LSL#W%:�R R3,R3,R7,LSR#32-W% r,�R R3,R3,R8,LSL#W%:�R R4,R4,R8,LSR#32-W% |STMIA R14,{R0-R4} �ADD R14,R14,#32 �SUBS R10,R10,#1 � BGT yloop �B endplot64 �]:�:[OPT T% �: �]:� �
00000000 0d 00 0a 10 dd f2 70 6c 6f 74 63 6f 64 65 36 34 |......plotcode64| 00000010 0d 00 14 1b ea 65 72 72 24 3a 65 72 72 24 3d 22 |.....err$:err$="| 00000020 50 6c 6f 74 43 6f 64 65 36 34 22 0d 00 1e 0b 5b |PlotCode64"....[| 00000030 4f 50 54 20 54 25 0d 00 28 37 3b 20 43 6f 64 65 |OPT T%..(7; Code| 00000040 20 74 6f 20 70 6c 6f 74 20 61 20 36 34 78 36 34 | to plot a 64x64| 00000050 20 73 70 72 69 74 65 20 6f 6e 74 6f 20 61 20 31 | sprite onto a 1| 00000060 32 38 78 31 32 38 20 73 70 72 69 74 65 0d 00 32 |28x128 sprite..2| 00000070 05 3a 0d 00 3c 14 2e 70 6c 6f 74 36 34 72 6f 75 |.:..<..plot64rou| 00000080 74 69 6e 65 73 25 0d 00 46 16 5d 3a e3 55 25 3d |tines%..F.]:.U%=| 00000090 30 b8 31 35 3a 5b 4f 50 54 20 54 25 0d 00 50 22 |0.15:[OPT T%..P"| 000000a0 45 51 55 44 20 65 6e 64 70 6c 6f 74 36 34 2d 70 |EQUD endplot64-p| 000000b0 6c 6f 74 36 34 72 6f 75 74 69 6e 65 73 25 0d 00 |lot64routines%..| 000000c0 5a 0f 5d 3a ed 3a 5b 4f 50 54 20 54 25 0d 00 64 |Z.]:.:[OPT T%..d| 000000d0 05 3a 0d 00 6e 32 5d 3a 70 6c 6f 74 36 34 72 6f |.:..n2]:plot64ro| 000000e0 75 74 69 6e 65 73 25 21 30 3d 50 25 2d 70 6c 6f |utines%!0=P%-plo| 000000f0 74 36 34 72 6f 75 74 69 6e 65 73 25 3a 5b 4f 50 |t64routines%:[OP| 00000100 54 20 54 25 0d 00 78 28 4f 50 54 20 a4 61 64 72 |T T%..x(OPT .adr| 00000110 28 31 31 2c 73 70 36 25 2c 32 29 3a 3b 20 53 70 |(11,sp6%,2):; Sp| 00000120 72 69 74 65 20 61 64 64 72 65 73 73 0d 00 82 1b |rite address....| 00000130 4d 4f 56 20 52 31 30 2c 23 36 34 3a 3b 20 59 20 |MOV R10,#64:; Y | 00000140 43 6f 75 6e 74 65 72 0d 00 8c 0a 2e 79 6c 6f 6f |Counter.....yloo| 00000150 70 0d 00 96 15 4c 44 4d 49 41 20 52 31 34 2c 7b |p....LDMIA R14,{| 00000160 52 30 2d 52 33 7d 0d 00 a0 16 4c 44 4d 49 41 20 |R0-R3}....LDMIA | 00000170 52 31 31 21 2c 7b 52 35 2d 52 38 7d 0d 00 aa 0f |R11!,{R5-R8}....| 00000180 84 52 20 52 30 2c 52 30 2c 52 35 0d 00 b4 0f 84 |.R R0,R0,R5.....| 00000190 52 20 52 31 2c 52 31 2c 52 36 0d 00 be 0f 84 52 |R R1,R1,R6.....R| 000001a0 20 52 32 2c 52 32 2c 52 37 0d 00 c8 0f 84 52 20 | R2,R2,R7.....R | 000001b0 52 33 2c 52 33 2c 52 38 0d 00 d2 15 53 54 4d 49 |R3,R3,R8....STMI| 000001c0 41 20 52 31 34 2c 7b 52 30 2d 52 33 7d 0d 00 dc |A R14,{R0-R3}...| 000001d0 13 41 44 44 20 52 31 34 2c 52 31 34 2c 23 33 32 |.ADD R14,R14,#32| 000001e0 0d 00 e6 13 53 55 42 53 20 52 31 30 2c 52 31 30 |....SUBS R10,R10| 000001f0 2c 23 31 0d 00 f0 0d 42 47 54 20 79 6c 6f 6f 70 |,#1....BGT yloop| 00000200 0d 00 fa 0f 42 20 65 6e 64 70 6c 6f 74 36 34 0d |....B endplot64.| 00000210 01 04 05 3a 0d 01 0e 1f 5d 3a e3 56 25 3d 31 b8 |...:....]:.V%=1.| 00000220 31 35 3a 57 25 3d 56 25 3c 3c 31 3a 5b 4f 50 54 |15:W%=V%<<1:[OPT| 00000230 20 54 25 0d 01 18 38 5d 3a 70 6c 6f 74 36 34 72 | T%...8]:plot64r| 00000240 6f 75 74 69 6e 65 73 25 21 28 56 25 3c 3c 32 29 |outines%!(V%<<2)| 00000250 3d 50 25 2d 70 6c 6f 74 36 34 72 6f 75 74 69 6e |=P%-plot64routin| 00000260 65 73 25 3a 5b 4f 50 54 20 54 25 0d 01 22 28 4f |es%:[OPT T%.."(O| 00000270 50 54 20 a4 61 64 72 28 31 31 2c 73 70 36 25 2c |PT .adr(11,sp6%,| 00000280 32 29 3a 3b 20 53 70 72 69 74 65 20 61 64 64 72 |2):; Sprite addr| 00000290 65 73 73 0d 01 2c 1b 4d 4f 56 20 52 31 30 2c 23 |ess..,.MOV R10,#| 000002a0 36 34 3a 3b 20 59 20 43 6f 75 6e 74 65 72 0d 01 |64:; Y Counter..| 000002b0 36 0a 2e 79 6c 6f 6f 70 0d 01 40 15 4c 44 4d 49 |6..yloop..@.LDMI| 000002c0 41 20 52 31 34 2c 7b 52 30 2d 52 34 7d 0d 01 4a |A R14,{R0-R4}..J| 000002d0 16 4c 44 4d 49 41 20 52 31 31 21 2c 7b 52 35 2d |.LDMIA R11!,{R5-| 000002e0 52 38 7d 0d 01 54 2c 84 52 20 52 30 2c 52 30 2c |R8}..T,.R R0,R0,| 000002f0 52 35 2c 4c 53 4c 23 57 25 3a 84 52 20 52 31 2c |R5,LSL#W%:.R R1,| 00000300 52 31 2c 52 35 2c 4c 53 52 23 33 32 2d 57 25 0d |R1,R5,LSR#32-W%.| 00000310 01 5e 2c 84 52 20 52 31 2c 52 31 2c 52 36 2c 4c |.^,.R R1,R1,R6,L| 00000320 53 4c 23 57 25 3a 84 52 20 52 32 2c 52 32 2c 52 |SL#W%:.R R2,R2,R| 00000330 36 2c 4c 53 52 23 33 32 2d 57 25 0d 01 68 2c 84 |6,LSR#32-W%..h,.| 00000340 52 20 52 32 2c 52 32 2c 52 37 2c 4c 53 4c 23 57 |R R2,R2,R7,LSL#W| 00000350 25 3a 84 52 20 52 33 2c 52 33 2c 52 37 2c 4c 53 |%:.R R3,R3,R7,LS| 00000360 52 23 33 32 2d 57 25 0d 01 72 2c 84 52 20 52 33 |R#32-W%..r,.R R3| 00000370 2c 52 33 2c 52 38 2c 4c 53 4c 23 57 25 3a 84 52 |,R3,R8,LSL#W%:.R| 00000380 20 52 34 2c 52 34 2c 52 38 2c 4c 53 52 23 33 32 | R4,R4,R8,LSR#32| 00000390 2d 57 25 0d 01 7c 15 53 54 4d 49 41 20 52 31 34 |-W%..|.STMIA R14| 000003a0 2c 7b 52 30 2d 52 34 7d 0d 01 86 13 41 44 44 20 |,{R0-R4}....ADD | 000003b0 52 31 34 2c 52 31 34 2c 23 33 32 0d 01 90 13 53 |R14,R14,#32....S| 000003c0 55 42 53 20 52 31 30 2c 52 31 30 2c 23 31 0d 01 |UBS R10,R10,#1..| 000003d0 9a 0d 42 47 54 20 79 6c 6f 6f 70 0d 01 a4 0f 42 |..BGT yloop....B| 000003e0 20 65 6e 64 70 6c 6f 74 36 34 0d 01 ae 0f 5d 3a | endplot64....]:| 000003f0 ed 3a 5b 4f 50 54 20 54 25 0d 01 b8 05 3a 0d 01 |.:[OPT T%....:..| 00000400 c2 07 5d 3a e1 0d ff |..]:...| 00000407