Home » Personal collection » Acorn hard disk » files » DomFord » RoughWork/MCColour

RoughWork/MCColour

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 » Personal collection » Acorn hard disk » files » DomFord
Filename: RoughWork/MCColour
Read OK:
File size: 0386 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM SpriteTest-Most common colour
   20*I AM DOMFORD
   30*SLOAD !Sprites
   40DIMc%(15),MCC$(15),MCC%(15),CM%(15)
   50FORR=0TO15
   60CM%(R)=0
   70NEXT
   80FORX=0TO25
   90FORY=0TO25
  100SYS "OS_SpriteOp",41,,"Sprite",X,Y TO ,,,,,C,T
  110c%(C)=c%(C)+1
  120NEXT,
  130CM=0:MCC=0:MCC$="White":CMB=0:FORC=1TO15:READ C$
  140FORs=0TO15
  150IFc%(s)>=CM%(s)THENPOSITION=s
  160NEXT
  170FORs=1TOPOSITION
  180MCC%(s-1)=MCC%(s)
  190CM%(s-1)=CM%(s)
  200MCC$(s-1)=MCC$(s)
  210NEXT
  220MCC%(POSITION)=C
  230CM%(POSITION)=c%(C)
  240MCC$(POSITION)=C$
  250NEXT
  260FORs=15TO0STEP-1
  270READno$
  280PRINTno$;" most common colour is ";MCC$(s);" (";MCC%(s);") with ";CM%(s);" pixels."
  290NEXT
  300END
  310DATA "Light grey","Medium grey","Dark grey","Very dark grey"
  320DATA "Extremely dark grey","Light Black","Black","Dark blue","Yellow"
  330DATA "Green","Red","Light Yellow","Dark Green","Orange","Light Blue"
  340DATA "1st","2nd","3rd","4th","5th","6th","7th","8th","9th","10th"
  350DATA "11th","12th","13th","14th","15th","16th"

#� SpriteTest-Most common colour
*I AM DOMFORD
*SLOAD !Sprites
(%�c%(15),MCC$(15),MCC%(15),CM%(15)
2�R=0�15
<CM%(R)=0
F�
P�X=0�25
Z�Y=0�25
d0ș "OS_SpriteOp",41,,"Sprite",X,Y � ,,,,,C,T
nc%(C)=c%(C)+1
x�,
�.CM=0:MCC=0:MCC$="White":CMB=0:�C=1�15:� C$
��s=0�15
��c%(s)>=CM%(s)�POSITION=s
��
��s=1�POSITION
�MCC%(s-1)=MCC%(s)
�CM%(s-1)=CM%(s)
�MCC$(s-1)=MCC$(s)
��
�MCC%(POSITION)=C
�CM%(POSITION)=c%(C)
�MCC$(POSITION)=C$
��
�s=15�0�-1
�no$
S�no$;" most common colour is ";MCC$(s);" (";MCC%(s);") with ";CM%(s);" pixels."
"�
,�
6=� "Light grey","Medium grey","Dark grey","Very dark grey"
@F� "Extremely dark grey","Light Black","Black","Dark blue","Yellow"
JE� "Green","Red","Light Yellow","Dark Green","Orange","Light Blue"
TB� "1st","2nd","3rd","4th","5th","6th","7th","8th","9th","10th"
^/� "11th","12th","13th","14th","15th","16th"
�
00000000  0d 00 0a 23 f4 20 53 70  72 69 74 65 54 65 73 74  |...#. SpriteTest|
00000010  2d 4d 6f 73 74 20 63 6f  6d 6d 6f 6e 20 63 6f 6c  |-Most common col|
00000020  6f 75 72 0d 00 14 11 2a  49 20 41 4d 20 44 4f 4d  |our....*I AM DOM|
00000030  46 4f 52 44 0d 00 1e 13  2a 53 4c 4f 41 44 20 21  |FORD....*SLOAD !|
00000040  53 70 72 69 74 65 73 0d  00 28 25 de 63 25 28 31  |Sprites..(%.c%(1|
00000050  35 29 2c 4d 43 43 24 28  31 35 29 2c 4d 43 43 25  |5),MCC$(15),MCC%|
00000060  28 31 35 29 2c 43 4d 25  28 31 35 29 0d 00 32 0b  |(15),CM%(15)..2.|
00000070  e3 52 3d 30 b8 31 35 0d  00 3c 0c 43 4d 25 28 52  |.R=0.15..<.CM%(R|
00000080  29 3d 30 0d 00 46 05 ed  0d 00 50 0b e3 58 3d 30  |)=0..F....P..X=0|
00000090  b8 32 35 0d 00 5a 0b e3  59 3d 30 b8 32 35 0d 00  |.25..Z..Y=0.25..|
000000a0  64 30 c8 99 20 22 4f 53  5f 53 70 72 69 74 65 4f  |d0.. "OS_SpriteO|
000000b0  70 22 2c 34 31 2c 2c 22  53 70 72 69 74 65 22 2c  |p",41,,"Sprite",|
000000c0  58 2c 59 20 b8 20 2c 2c  2c 2c 2c 43 2c 54 0d 00  |X,Y . ,,,,,C,T..|
000000d0  6e 11 63 25 28 43 29 3d  63 25 28 43 29 2b 31 0d  |n.c%(C)=c%(C)+1.|
000000e0  00 78 06 ed 2c 0d 00 82  2e 43 4d 3d 30 3a 4d 43  |.x..,....CM=0:MC|
000000f0  43 3d 30 3a 4d 43 43 24  3d 22 57 68 69 74 65 22  |C=0:MCC$="White"|
00000100  3a 43 4d 42 3d 30 3a e3  43 3d 31 b8 31 35 3a f3  |:CMB=0:.C=1.15:.|
00000110  20 43 24 0d 00 8c 0b e3  73 3d 30 b8 31 35 0d 00  | C$.....s=0.15..|
00000120  96 1d e7 63 25 28 73 29  3e 3d 43 4d 25 28 73 29  |...c%(s)>=CM%(s)|
00000130  8c 50 4f 53 49 54 49 4f  4e 3d 73 0d 00 a0 05 ed  |.POSITION=s.....|
00000140  0d 00 aa 11 e3 73 3d 31  b8 50 4f 53 49 54 49 4f  |.....s=1.POSITIO|
00000150  4e 0d 00 b4 15 4d 43 43  25 28 73 2d 31 29 3d 4d  |N....MCC%(s-1)=M|
00000160  43 43 25 28 73 29 0d 00  be 13 43 4d 25 28 73 2d  |CC%(s)....CM%(s-|
00000170  31 29 3d 43 4d 25 28 73  29 0d 00 c8 15 4d 43 43  |1)=CM%(s)....MCC|
00000180  24 28 73 2d 31 29 3d 4d  43 43 24 28 73 29 0d 00  |$(s-1)=MCC$(s)..|
00000190  d2 05 ed 0d 00 dc 14 4d  43 43 25 28 50 4f 53 49  |.......MCC%(POSI|
000001a0  54 49 4f 4e 29 3d 43 0d  00 e6 17 43 4d 25 28 50  |TION)=C....CM%(P|
000001b0  4f 53 49 54 49 4f 4e 29  3d 63 25 28 43 29 0d 00  |OSITION)=c%(C)..|
000001c0  f0 15 4d 43 43 24 28 50  4f 53 49 54 49 4f 4e 29  |..MCC$(POSITION)|
000001d0  3d 43 24 0d 00 fa 05 ed  0d 01 04 0e e3 73 3d 31  |=C$..........s=1|
000001e0  35 b8 30 88 2d 31 0d 01  0e 08 f3 6e 6f 24 0d 01  |5.0.-1.....no$..|
000001f0  18 53 f1 6e 6f 24 3b 22  20 6d 6f 73 74 20 63 6f  |.S.no$;" most co|
00000200  6d 6d 6f 6e 20 63 6f 6c  6f 75 72 20 69 73 20 22  |mmon colour is "|
00000210  3b 4d 43 43 24 28 73 29  3b 22 20 28 22 3b 4d 43  |;MCC$(s);" (";MC|
00000220  43 25 28 73 29 3b 22 29  20 77 69 74 68 20 22 3b  |C%(s);") with ";|
00000230  43 4d 25 28 73 29 3b 22  20 70 69 78 65 6c 73 2e  |CM%(s);" pixels.|
00000240  22 0d 01 22 05 ed 0d 01  2c 05 e0 0d 01 36 3d dc  |".."....,....6=.|
00000250  20 22 4c 69 67 68 74 20  67 72 65 79 22 2c 22 4d  | "Light grey","M|
00000260  65 64 69 75 6d 20 67 72  65 79 22 2c 22 44 61 72  |edium grey","Dar|
00000270  6b 20 67 72 65 79 22 2c  22 56 65 72 79 20 64 61  |k grey","Very da|
00000280  72 6b 20 67 72 65 79 22  0d 01 40 46 dc 20 22 45  |rk grey"..@F. "E|
00000290  78 74 72 65 6d 65 6c 79  20 64 61 72 6b 20 67 72  |xtremely dark gr|
000002a0  65 79 22 2c 22 4c 69 67  68 74 20 42 6c 61 63 6b  |ey","Light Black|
000002b0  22 2c 22 42 6c 61 63 6b  22 2c 22 44 61 72 6b 20  |","Black","Dark |
000002c0  62 6c 75 65 22 2c 22 59  65 6c 6c 6f 77 22 0d 01  |blue","Yellow"..|
000002d0  4a 45 dc 20 22 47 72 65  65 6e 22 2c 22 52 65 64  |JE. "Green","Red|
000002e0  22 2c 22 4c 69 67 68 74  20 59 65 6c 6c 6f 77 22  |","Light Yellow"|
000002f0  2c 22 44 61 72 6b 20 47  72 65 65 6e 22 2c 22 4f  |,"Dark Green","O|
00000300  72 61 6e 67 65 22 2c 22  4c 69 67 68 74 20 42 6c  |range","Light Bl|
00000310  75 65 22 0d 01 54 42 dc  20 22 31 73 74 22 2c 22  |ue"..TB. "1st","|
00000320  32 6e 64 22 2c 22 33 72  64 22 2c 22 34 74 68 22  |2nd","3rd","4th"|
00000330  2c 22 35 74 68 22 2c 22  36 74 68 22 2c 22 37 74  |,"5th","6th","7t|
00000340  68 22 2c 22 38 74 68 22  2c 22 39 74 68 22 2c 22  |h","8th","9th","|
00000350  31 30 74 68 22 0d 01 5e  2f dc 20 22 31 31 74 68  |10th"..^/. "11th|
00000360  22 2c 22 31 32 74 68 22  2c 22 31 33 74 68 22 2c  |","12th","13th",|
00000370  22 31 34 74 68 22 2c 22  31 35 74 68 22 2c 22 31  |"14th","15th","1|
00000380  36 74 68 22 0d ff                                 |6th"..|
00000386