Home » Archimedes archive » Acorn User » AU 1994-03.adf » !StarInfo_StarInfo » Turnbull/!Pyramid/Library/PlotCode7
Turnbull/!Pyramid/Library/PlotCode7
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/PlotCode7 |
Read OK: | ✔ |
File size: | 0534 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10DEFPROCplotcode128 20LOCALerr$:err$="PlotCode128" 30[OPT T% 40; Code to plot a 128x128 sprite onto the screen 50: 60.plot128routines% 70]:FORU%=0TO15:[OPT T% 80EQUD endplot128-plot128routines% 90]:NEXT:[OPT T% 100: 110]:plot128routines%!0=P%-plot128routines%:[OPT T% 120OPT FNadr(11,sp7%,2):; Sprite address 130MOV R10,#128:; Y Counter 140.yloop 150]:FORU%=0TO127STEP4*16:[OPT T% 160LDMIA R14,{R0-R3} 170LDMIA R11!,{R5-R8} 180ORR R0,R0,R5 190ORR R1,R1,R6 200ORR R2,R2,R7 210ORR R3,R3,R8 220STMIA R14!,{R0-R3} 230]:NEXT:[OPT T% 240ADD R14,R14,#80-32 250SUBS R10,R10,#1 260BGT yloop 270B endplot128 280: 290]:FORV%=1TO15:W%=V%<<1:[OPT T% 300]:plot128routines%!(V%<<2)=P%-plot128routines%:[OPT T% 310OPT FNadr(11,sp7%,2):; Sprite address 320MOV R10,#128:; Y Counter 330.yloop 340LDMIA R14,{R0-R4} 350LDMIA R11!,{R5-R8} 360ORR R0,R0,R5,LSL#W%:ORR R1,R1,R5,LSR#32-W% 370ORR R1,R1,R6,LSL#W%:ORR R2,R2,R6,LSR#32-W% 380ORR R2,R2,R7,LSL#W%:ORR R3,R3,R7,LSR#32-W% 390ORR R3,R3,R8,LSL#W%:ORR R4,R4,R8,LSR#32-W% 400STMIA R14!,{R0-R3} 410LDMIB R14,{R5-R8} 420LDMIA R11!,{R0-R3} 430ORR R4,R4,R0,LSL#W%:ORR R5,R5,R0,LSR#32-W% 440ORR R5,R5,R1,LSL#W%:ORR R6,R6,R1,LSR#32-W% 450ORR R6,R6,R2,LSL#W%:ORR R7,R7,R2,LSR#32-W% 460ORR R7,R7,R3,LSL#W%:ORR R8,R8,R3,LSR#32-W% 470STMIA R14!,{R4-R8} 480ADD R14,R14,#80-36 490SUBS R10,R10,#1 500BGT yloop 510B endplot128 520]:NEXT:[OPT T% 530: 540]:ENDPROC
��plotcode128 �err$:err$="PlotCode128" [OPT T% (3; Code to plot a 128x128 sprite onto the screen 2: <.plot128routines% F]:�U%=0�15:[OPT T% P$EQUD endplot128-plot128routines% Z]:�:[OPT T% d: n4]:plot128routines%!0=P%-plot128routines%:[OPT T% x(OPT �adr(11,sp7%,2):; Sprite address �MOV R10,#128:; Y Counter � .yloop �]:�U%=0�127�4*16:[OPT T% �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} �]:�:[OPT T% �ADD R14,R14,#80-32 �SUBS R10,R10,#1 BGT yloop B endplot128 : "]:�V%=1�15:W%=V%<<1:[OPT T% ,:]:plot128routines%!(V%<<2)=P%-plot128routines%:[OPT T% 6(OPT �adr(11,sp7%,2):; Sprite address @MOV R10,#128:; Y Counter J .yloop TLDMIA R14,{R0-R4} ^LDMIA R11!,{R5-R8} h,�R R0,R0,R5,LSL#W%:�R R1,R1,R5,LSR#32-W% r,�R R1,R1,R6,LSL#W%:�R R2,R2,R6,LSR#32-W% |,�R R2,R2,R7,LSL#W%:�R R3,R3,R7,LSR#32-W% �,�R R3,R3,R8,LSL#W%:�R R4,R4,R8,LSR#32-W% �STMIA R14!,{R0-R3} �LDMIB R14,{R5-R8} �LDMIA R11!,{R0-R3} �,�R R4,R4,R0,LSL#W%:�R R5,R5,R0,LSR#32-W% �,�R R5,R5,R1,LSL#W%:�R R6,R6,R1,LSR#32-W% �,�R R6,R6,R2,LSL#W%:�R R7,R7,R2,LSR#32-W% �,�R R7,R7,R3,LSL#W%:�R R8,R8,R3,LSR#32-W% �STMIA R14!,{R4-R8} �ADD R14,R14,#80-36 �SUBS R10,R10,#1 � BGT yloop �B endplot128 ]:�:[OPT T% : ]:� �
00000000 0d 00 0a 11 dd f2 70 6c 6f 74 63 6f 64 65 31 32 |......plotcode12| 00000010 38 0d 00 14 1c ea 65 72 72 24 3a 65 72 72 24 3d |8.....err$:err$=| 00000020 22 50 6c 6f 74 43 6f 64 65 31 32 38 22 0d 00 1e |"PlotCode128"...| 00000030 0b 5b 4f 50 54 20 54 25 0d 00 28 33 3b 20 43 6f |.[OPT T%..(3; Co| 00000040 64 65 20 74 6f 20 70 6c 6f 74 20 61 20 31 32 38 |de to plot a 128| 00000050 78 31 32 38 20 73 70 72 69 74 65 20 6f 6e 74 6f |x128 sprite onto| 00000060 20 74 68 65 20 73 63 72 65 65 6e 0d 00 32 05 3a | the screen..2.:| 00000070 0d 00 3c 15 2e 70 6c 6f 74 31 32 38 72 6f 75 74 |..<..plot128rout| 00000080 69 6e 65 73 25 0d 00 46 16 5d 3a e3 55 25 3d 30 |ines%..F.]:.U%=0| 00000090 b8 31 35 3a 5b 4f 50 54 20 54 25 0d 00 50 24 45 |.15:[OPT T%..P$E| 000000a0 51 55 44 20 65 6e 64 70 6c 6f 74 31 32 38 2d 70 |QUD endplot128-p| 000000b0 6c 6f 74 31 32 38 72 6f 75 74 69 6e 65 73 25 0d |lot128routines%.| 000000c0 00 5a 0f 5d 3a ed 3a 5b 4f 50 54 20 54 25 0d 00 |.Z.]:.:[OPT T%..| 000000d0 64 05 3a 0d 00 6e 34 5d 3a 70 6c 6f 74 31 32 38 |d.:..n4]:plot128| 000000e0 72 6f 75 74 69 6e 65 73 25 21 30 3d 50 25 2d 70 |routines%!0=P%-p| 000000f0 6c 6f 74 31 32 38 72 6f 75 74 69 6e 65 73 25 3a |lot128routines%:| 00000100 5b 4f 50 54 20 54 25 0d 00 78 28 4f 50 54 20 a4 |[OPT T%..x(OPT .| 00000110 61 64 72 28 31 31 2c 73 70 37 25 2c 32 29 3a 3b |adr(11,sp7%,2):;| 00000120 20 53 70 72 69 74 65 20 61 64 64 72 65 73 73 0d | Sprite address.| 00000130 00 82 1c 4d 4f 56 20 52 31 30 2c 23 31 32 38 3a |...MOV R10,#128:| 00000140 3b 20 59 20 43 6f 75 6e 74 65 72 0d 00 8c 0a 2e |; Y Counter.....| 00000150 79 6c 6f 6f 70 0d 00 96 1c 5d 3a e3 55 25 3d 30 |yloop....]:.U%=0| 00000160 b8 31 32 37 88 34 2a 31 36 3a 5b 4f 50 54 20 54 |.127.4*16:[OPT T| 00000170 25 0d 00 a0 15 4c 44 4d 49 41 20 52 31 34 2c 7b |%....LDMIA R14,{| 00000180 52 30 2d 52 33 7d 0d 00 aa 16 4c 44 4d 49 41 20 |R0-R3}....LDMIA | 00000190 52 31 31 21 2c 7b 52 35 2d 52 38 7d 0d 00 b4 0f |R11!,{R5-R8}....| 000001a0 84 52 20 52 30 2c 52 30 2c 52 35 0d 00 be 0f 84 |.R R0,R0,R5.....| 000001b0 52 20 52 31 2c 52 31 2c 52 36 0d 00 c8 0f 84 52 |R R1,R1,R6.....R| 000001c0 20 52 32 2c 52 32 2c 52 37 0d 00 d2 0f 84 52 20 | R2,R2,R7.....R | 000001d0 52 33 2c 52 33 2c 52 38 0d 00 dc 16 53 54 4d 49 |R3,R3,R8....STMI| 000001e0 41 20 52 31 34 21 2c 7b 52 30 2d 52 33 7d 0d 00 |A R14!,{R0-R3}..| 000001f0 e6 0f 5d 3a ed 3a 5b 4f 50 54 20 54 25 0d 00 f0 |..]:.:[OPT T%...| 00000200 16 41 44 44 20 52 31 34 2c 52 31 34 2c 23 38 30 |.ADD R14,R14,#80| 00000210 2d 33 32 0d 00 fa 13 53 55 42 53 20 52 31 30 2c |-32....SUBS R10,| 00000220 52 31 30 2c 23 31 0d 01 04 0d 42 47 54 20 79 6c |R10,#1....BGT yl| 00000230 6f 6f 70 0d 01 0e 10 42 20 65 6e 64 70 6c 6f 74 |oop....B endplot| 00000240 31 32 38 0d 01 18 05 3a 0d 01 22 1f 5d 3a e3 56 |128....:..".]:.V| 00000250 25 3d 31 b8 31 35 3a 57 25 3d 56 25 3c 3c 31 3a |%=1.15:W%=V%<<1:| 00000260 5b 4f 50 54 20 54 25 0d 01 2c 3a 5d 3a 70 6c 6f |[OPT T%..,:]:plo| 00000270 74 31 32 38 72 6f 75 74 69 6e 65 73 25 21 28 56 |t128routines%!(V| 00000280 25 3c 3c 32 29 3d 50 25 2d 70 6c 6f 74 31 32 38 |%<<2)=P%-plot128| 00000290 72 6f 75 74 69 6e 65 73 25 3a 5b 4f 50 54 20 54 |routines%:[OPT T| 000002a0 25 0d 01 36 28 4f 50 54 20 a4 61 64 72 28 31 31 |%..6(OPT .adr(11| 000002b0 2c 73 70 37 25 2c 32 29 3a 3b 20 53 70 72 69 74 |,sp7%,2):; Sprit| 000002c0 65 20 61 64 64 72 65 73 73 0d 01 40 1c 4d 4f 56 |e address..@.MOV| 000002d0 20 52 31 30 2c 23 31 32 38 3a 3b 20 59 20 43 6f | R10,#128:; Y Co| 000002e0 75 6e 74 65 72 0d 01 4a 0a 2e 79 6c 6f 6f 70 0d |unter..J..yloop.| 000002f0 01 54 15 4c 44 4d 49 41 20 52 31 34 2c 7b 52 30 |.T.LDMIA R14,{R0| 00000300 2d 52 34 7d 0d 01 5e 16 4c 44 4d 49 41 20 52 31 |-R4}..^.LDMIA R1| 00000310 31 21 2c 7b 52 35 2d 52 38 7d 0d 01 68 2c 84 52 |1!,{R5-R8}..h,.R| 00000320 20 52 30 2c 52 30 2c 52 35 2c 4c 53 4c 23 57 25 | R0,R0,R5,LSL#W%| 00000330 3a 84 52 20 52 31 2c 52 31 2c 52 35 2c 4c 53 52 |:.R R1,R1,R5,LSR| 00000340 23 33 32 2d 57 25 0d 01 72 2c 84 52 20 52 31 2c |#32-W%..r,.R R1,| 00000350 52 31 2c 52 36 2c 4c 53 4c 23 57 25 3a 84 52 20 |R1,R6,LSL#W%:.R | 00000360 52 32 2c 52 32 2c 52 36 2c 4c 53 52 23 33 32 2d |R2,R2,R6,LSR#32-| 00000370 57 25 0d 01 7c 2c 84 52 20 52 32 2c 52 32 2c 52 |W%..|,.R R2,R2,R| 00000380 37 2c 4c 53 4c 23 57 25 3a 84 52 20 52 33 2c 52 |7,LSL#W%:.R R3,R| 00000390 33 2c 52 37 2c 4c 53 52 23 33 32 2d 57 25 0d 01 |3,R7,LSR#32-W%..| 000003a0 86 2c 84 52 20 52 33 2c 52 33 2c 52 38 2c 4c 53 |.,.R R3,R3,R8,LS| 000003b0 4c 23 57 25 3a 84 52 20 52 34 2c 52 34 2c 52 38 |L#W%:.R R4,R4,R8| 000003c0 2c 4c 53 52 23 33 32 2d 57 25 0d 01 90 16 53 54 |,LSR#32-W%....ST| 000003d0 4d 49 41 20 52 31 34 21 2c 7b 52 30 2d 52 33 7d |MIA R14!,{R0-R3}| 000003e0 0d 01 9a 15 4c 44 4d 49 42 20 52 31 34 2c 7b 52 |....LDMIB R14,{R| 000003f0 35 2d 52 38 7d 0d 01 a4 16 4c 44 4d 49 41 20 52 |5-R8}....LDMIA R| 00000400 31 31 21 2c 7b 52 30 2d 52 33 7d 0d 01 ae 2c 84 |11!,{R0-R3}...,.| 00000410 52 20 52 34 2c 52 34 2c 52 30 2c 4c 53 4c 23 57 |R R4,R4,R0,LSL#W| 00000420 25 3a 84 52 20 52 35 2c 52 35 2c 52 30 2c 4c 53 |%:.R R5,R5,R0,LS| 00000430 52 23 33 32 2d 57 25 0d 01 b8 2c 84 52 20 52 35 |R#32-W%...,.R R5| 00000440 2c 52 35 2c 52 31 2c 4c 53 4c 23 57 25 3a 84 52 |,R5,R1,LSL#W%:.R| 00000450 20 52 36 2c 52 36 2c 52 31 2c 4c 53 52 23 33 32 | R6,R6,R1,LSR#32| 00000460 2d 57 25 0d 01 c2 2c 84 52 20 52 36 2c 52 36 2c |-W%...,.R R6,R6,| 00000470 52 32 2c 4c 53 4c 23 57 25 3a 84 52 20 52 37 2c |R2,LSL#W%:.R R7,| 00000480 52 37 2c 52 32 2c 4c 53 52 23 33 32 2d 57 25 0d |R7,R2,LSR#32-W%.| 00000490 01 cc 2c 84 52 20 52 37 2c 52 37 2c 52 33 2c 4c |..,.R R7,R7,R3,L| 000004a0 53 4c 23 57 25 3a 84 52 20 52 38 2c 52 38 2c 52 |SL#W%:.R R8,R8,R| 000004b0 33 2c 4c 53 52 23 33 32 2d 57 25 0d 01 d6 16 53 |3,LSR#32-W%....S| 000004c0 54 4d 49 41 20 52 31 34 21 2c 7b 52 34 2d 52 38 |TMIA R14!,{R4-R8| 000004d0 7d 0d 01 e0 16 41 44 44 20 52 31 34 2c 52 31 34 |}....ADD R14,R14| 000004e0 2c 23 38 30 2d 33 36 0d 01 ea 13 53 55 42 53 20 |,#80-36....SUBS | 000004f0 52 31 30 2c 52 31 30 2c 23 31 0d 01 f4 0d 42 47 |R10,R10,#1....BG| 00000500 54 20 79 6c 6f 6f 70 0d 01 fe 10 42 20 65 6e 64 |T yloop....B end| 00000510 70 6c 6f 74 31 32 38 0d 02 08 0f 5d 3a ed 3a 5b |plot128....]:.:[| 00000520 4f 50 54 20 54 25 0d 02 12 05 3a 0d 02 1c 07 5d |OPT T%....:....]| 00000530 3a e1 0d ff |:...| 00000534