Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_36.ADF » F/+BARCD2

F/+BARCD2

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 ADFS disks » Electron_User_Group » EUG_36.ADF
Filename: F/+BARCD2
Read OK:
File size: 08C7 bytes
Load address: 2B204556
Exec address: 43524142
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
CODE 13 BARCODES...

Using the EAN (European article number) encoding the barcode consists of 

1.Combination number.This is the first digit,in our example is 5.
                     It refers to how the next 6 digits are encrypted as 
                     follows
                     COMB #       PATTERN TO FOLLOW
                        0         A  A  A  A  A  A
                        1         A  A  B  A  B  B
                        2         A  A  B  B  A  B
                        3         A  A  B  B  B  A
                        4         A  B  A  A  B  B
                        5         A  B  B  A  A  B
                        6         A  B  B  B  A  A
                        7         A  B  A  B  A  B
                        8         A  B  A  B  B  A
                        9         A  B  B  A  B  A

2.The start bit.Two parallel bars

3.The following 6.Encrypted as above,then (taking '1' as black and '0' as 
                  white) are converted onto 7 bit binary digits.

REPRESENTS...  SET A     SET B     SET C
     0         0001101   0100111   1110010
     1         0011001   0110011   1100110
     2         0010011   0011011   1101100
     3         0111101   0100001   1000010
     4         0100011   0011101   1011100  Notice that not C = A and that
     5         0110001   0111001   1001110  reverse of C = B
     6         0101111   0000101   1010000
     7         0111011   0010001   1000100
     8         0110111   0001001   1001000
     9         0001011   0010111   1110100

4.The guard bit.Two parallel bars

5.The following 6.Encrypted in set C always,then (taking '1' as black and 
                  white as '0') are converted onto 7 bit binary digits.

6.The end bit.Two parallel bars

7.The checksum.For the barcode 123456782093C where C is the check bit to be determined by the following calculation
1.Add up the alternate numbers starting at the 12th:
  [3+0+8+6+4+2=23]
2.Times (1) by 3 => 69
3.Add up the alternate numbers starting at the 11th:
  [9+2+7+5+3+1=27]
4.Add parts (2) and (3) => 96
5.Find the smallest number needed to make part (4) evenly divisible by ten
  [100-96=4 so C=4 as 100x10 is even and 4 < 14 which would be the next]

FROM...
Robert Sprowson.
Happy soldering!
00000000  0d 43 4f 44 45 20 31 33  20 42 41 52 43 4f 44 45  |.CODE 13 BARCODE|
00000010  53 2e 2e 2e 0d 0d 55 73  69 6e 67 20 74 68 65 20  |S.....Using the |
00000020  45 41 4e 20 28 45 75 72  6f 70 65 61 6e 20 61 72  |EAN (European ar|
00000030  74 69 63 6c 65 20 6e 75  6d 62 65 72 29 20 65 6e  |ticle number) en|
00000040  63 6f 64 69 6e 67 20 74  68 65 20 62 61 72 63 6f  |coding the barco|
00000050  64 65 20 63 6f 6e 73 69  73 74 73 20 6f 66 20 0d  |de consists of .|
00000060  0d 31 2e 43 6f 6d 62 69  6e 61 74 69 6f 6e 20 6e  |.1.Combination n|
00000070  75 6d 62 65 72 2e 54 68  69 73 20 69 73 20 74 68  |umber.This is th|
00000080  65 20 66 69 72 73 74 20  64 69 67 69 74 2c 69 6e  |e first digit,in|
00000090  20 6f 75 72 20 65 78 61  6d 70 6c 65 20 69 73 20  | our example is |
000000a0  35 2e 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |5..             |
000000b0  20 20 20 20 20 20 20 20  49 74 20 72 65 66 65 72  |        It refer|
000000c0  73 20 74 6f 20 68 6f 77  20 74 68 65 20 6e 65 78  |s to how the nex|
000000d0  74 20 36 20 64 69 67 69  74 73 20 61 72 65 20 65  |t 6 digits are e|
000000e0  6e 63 72 79 70 74 65 64  20 61 73 20 0d 20 20 20  |ncrypted as .   |
000000f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000100  20 20 66 6f 6c 6c 6f 77  73 0d 20 20 20 20 20 20  |  follows.      |
00000110  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 43  |               C|
00000120  4f 4d 42 20 23 20 20 20  20 20 20 20 50 41 54 54  |OMB #       PATT|
00000130  45 52 4e 20 54 4f 20 46  4f 4c 4c 4f 57 0d 20 20  |ERN TO FOLLOW.  |
00000140  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000150  20 20 20 20 20 20 30 20  20 20 20 20 20 20 20 20  |      0         |
00000160  41 20 20 41 20 20 41 20  20 41 20 20 41 20 20 41  |A  A  A  A  A  A|
00000170  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00000180  20 20 20 20 20 20 20 20  20 31 20 20 20 20 20 20  |         1      |
00000190  20 20 20 41 20 20 41 20  20 42 20 20 41 20 20 42  |   A  A  B  A  B|
000001a0  20 20 42 0d 20 20 20 20  20 20 20 20 20 20 20 20  |  B.            |
000001b0  20 20 20 20 20 20 20 20  20 20 20 20 32 20 20 20  |            2   |
000001c0  20 20 20 20 20 20 41 20  20 41 20 20 42 20 20 42  |      A  A  B  B|
000001d0  20 20 41 20 20 42 0d 20  20 20 20 20 20 20 20 20  |  A  B.         |
000001e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 33  |               3|
000001f0  20 20 20 20 20 20 20 20  20 41 20 20 41 20 20 42  |         A  A  B|
00000200  20 20 42 20 20 42 20 20  41 0d 20 20 20 20 20 20  |  B  B  A.      |
00000210  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000220  20 20 34 20 20 20 20 20  20 20 20 20 41 20 20 42  |  4         A  B|
00000230  20 20 41 20 20 41 20 20  42 20 20 42 0d 20 20 20  |  A  A  B  B.   |
00000240  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000250  20 20 20 20 20 35 20 20  20 20 20 20 20 20 20 41  |     5         A|
00000260  20 20 42 20 20 42 20 20  41 20 20 41 20 20 42 0d  |  B  B  A  A  B.|
00000270  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000280  20 20 20 20 20 20 20 20  36 20 20 20 20 20 20 20  |        6       |
00000290  20 20 41 20 20 42 20 20  42 20 20 42 20 20 41 20  |  A  B  B  B  A |
000002a0  20 41 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  | A.             |
000002b0  20 20 20 20 20 20 20 20  20 20 20 37 20 20 20 20  |           7    |
000002c0  20 20 20 20 20 41 20 20  42 20 20 41 20 20 42 20  |     A  B  A  B |
000002d0  20 41 20 20 42 0d 20 20  20 20 20 20 20 20 20 20  | A  B.          |
000002e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 38 20  |              8 |
000002f0  20 20 20 20 20 20 20 20  41 20 20 42 20 20 41 20  |        A  B  A |
00000300  20 42 20 20 42 20 20 41  0d 20 20 20 20 20 20 20  | B  B  A.       |
00000310  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000320  20 39 20 20 20 20 20 20  20 20 20 41 20 20 42 20  | 9         A  B |
00000330  20 42 20 20 41 20 20 42  20 20 41 0d 0d 32 2e 54  | B  A  B  A..2.T|
00000340  68 65 20 73 74 61 72 74  20 62 69 74 2e 54 77 6f  |he start bit.Two|
00000350  20 70 61 72 61 6c 6c 65  6c 20 62 61 72 73 0d 0d  | parallel bars..|
00000360  33 2e 54 68 65 20 66 6f  6c 6c 6f 77 69 6e 67 20  |3.The following |
00000370  36 2e 45 6e 63 72 79 70  74 65 64 20 61 73 20 61  |6.Encrypted as a|
00000380  62 6f 76 65 2c 74 68 65  6e 20 28 74 61 6b 69 6e  |bove,then (takin|
00000390  67 20 27 31 27 20 61 73  20 62 6c 61 63 6b 20 61  |g '1' as black a|
000003a0  6e 64 20 27 30 27 20 61  73 20 0d 20 20 20 20 20  |nd '0' as .     |
000003b0  20 20 20 20 20 20 20 20  20 20 20 20 20 77 68 69  |             whi|
000003c0  74 65 29 20 61 72 65 20  63 6f 6e 76 65 72 74 65  |te) are converte|
000003d0  64 20 6f 6e 74 6f 20 37  20 62 69 74 20 62 69 6e  |d onto 7 bit bin|
000003e0  61 72 79 20 64 69 67 69  74 73 2e 0d 0d 52 45 50  |ary digits...REP|
000003f0  52 45 53 45 4e 54 53 2e  2e 2e 20 20 53 45 54 20  |RESENTS...  SET |
00000400  41 20 20 20 20 20 53 45  54 20 42 20 20 20 20 20  |A     SET B     |
00000410  53 45 54 20 43 0d 20 20  20 20 20 30 20 20 20 20  |SET C.     0    |
00000420  20 20 20 20 20 30 30 30  31 31 30 31 20 20 20 30  |     0001101   0|
00000430  31 30 30 31 31 31 20 20  20 31 31 31 30 30 31 30  |100111   1110010|
00000440  0d 20 20 20 20 20 31 20  20 20 20 20 20 20 20 20  |.     1         |
00000450  30 30 31 31 30 30 31 20  20 20 30 31 31 30 30 31  |0011001   011001|
00000460  31 20 20 20 31 31 30 30  31 31 30 0d 20 20 20 20  |1   1100110.    |
00000470  20 32 20 20 20 20 20 20  20 20 20 30 30 31 30 30  | 2         00100|
00000480  31 31 20 20 20 30 30 31  31 30 31 31 20 20 20 31  |11   0011011   1|
00000490  31 30 31 31 30 30 0d 20  20 20 20 20 33 20 20 20  |101100.     3   |
000004a0  20 20 20 20 20 20 30 31  31 31 31 30 31 20 20 20  |      0111101   |
000004b0  30 31 30 30 30 30 31 20  20 20 31 30 30 30 30 31  |0100001   100001|
000004c0  30 0d 20 20 20 20 20 34  20 20 20 20 20 20 20 20  |0.     4        |
000004d0  20 30 31 30 30 30 31 31  20 20 20 30 30 31 31 31  | 0100011   00111|
000004e0  30 31 20 20 20 31 30 31  31 31 30 30 20 20 4e 6f  |01   1011100  No|
000004f0  74 69 63 65 20 74 68 61  74 20 6e 6f 74 20 43 20  |tice that not C |
00000500  3d 20 41 20 61 6e 64 20  74 68 61 74 0d 20 20 20  |= A and that.   |
00000510  20 20 35 20 20 20 20 20  20 20 20 20 30 31 31 30  |  5         0110|
00000520  30 30 31 20 20 20 30 31  31 31 30 30 31 20 20 20  |001   0111001   |
00000530  31 30 30 31 31 31 30 20  20 72 65 76 65 72 73 65  |1001110  reverse|
00000540  20 6f 66 20 43 20 3d 20  42 0d 20 20 20 20 20 36  | of C = B.     6|
00000550  20 20 20 20 20 20 20 20  20 30 31 30 31 31 31 31  |         0101111|
00000560  20 20 20 30 30 30 30 31  30 31 20 20 20 31 30 31  |   0000101   101|
00000570  30 30 30 30 0d 20 20 20  20 20 37 20 20 20 20 20  |0000.     7     |
00000580  20 20 20 20 30 31 31 31  30 31 31 20 20 20 30 30  |    0111011   00|
00000590  31 30 30 30 31 20 20 20  31 30 30 30 31 30 30 0d  |10001   1000100.|
000005a0  20 20 20 20 20 38 20 20  20 20 20 20 20 20 20 30  |     8         0|
000005b0  31 31 30 31 31 31 20 20  20 30 30 30 31 30 30 31  |110111   0001001|
000005c0  20 20 20 31 30 30 31 30  30 30 0d 20 20 20 20 20  |   1001000.     |
000005d0  39 20 20 20 20 20 20 20  20 20 30 30 30 31 30 31  |9         000101|
000005e0  31 20 20 20 30 30 31 30  31 31 31 20 20 20 31 31  |1   0010111   11|
000005f0  31 30 31 30 30 0d 0d 34  2e 54 68 65 20 67 75 61  |10100..4.The gua|
00000600  72 64 20 62 69 74 2e 54  77 6f 20 70 61 72 61 6c  |rd bit.Two paral|
00000610  6c 65 6c 20 62 61 72 73  0d 0d 35 2e 54 68 65 20  |lel bars..5.The |
00000620  66 6f 6c 6c 6f 77 69 6e  67 20 36 2e 45 6e 63 72  |following 6.Encr|
00000630  79 70 74 65 64 20 69 6e  20 73 65 74 20 43 20 61  |ypted in set C a|
00000640  6c 77 61 79 73 2c 74 68  65 6e 20 28 74 61 6b 69  |lways,then (taki|
00000650  6e 67 20 27 31 27 20 61  73 20 62 6c 61 63 6b 20  |ng '1' as black |
00000660  61 6e 64 20 0d 20 20 20  20 20 20 20 20 20 20 20  |and .           |
00000670  20 20 20 20 20 20 20 77  68 69 74 65 20 61 73 20  |       white as |
00000680  27 30 27 29 20 61 72 65  20 63 6f 6e 76 65 72 74  |'0') are convert|
00000690  65 64 20 6f 6e 74 6f 20  37 20 62 69 74 20 62 69  |ed onto 7 bit bi|
000006a0  6e 61 72 79 20 64 69 67  69 74 73 2e 0d 0d 36 2e  |nary digits...6.|
000006b0  54 68 65 20 65 6e 64 20  62 69 74 2e 54 77 6f 20  |The end bit.Two |
000006c0  70 61 72 61 6c 6c 65 6c  20 62 61 72 73 0d 0d 37  |parallel bars..7|
000006d0  2e 54 68 65 20 63 68 65  63 6b 73 75 6d 2e 46 6f  |.The checksum.Fo|
000006e0  72 20 74 68 65 20 62 61  72 63 6f 64 65 20 31 32  |r the barcode 12|
000006f0  33 34 35 36 37 38 32 30  39 33 43 20 77 68 65 72  |3456782093C wher|
00000700  65 20 43 20 69 73 20 74  68 65 20 63 68 65 63 6b  |e C is the check|
00000710  20 62 69 74 20 74 6f 20  62 65 20 64 65 74 65 72  | bit to be deter|
00000720  6d 69 6e 65 64 20 62 79  20 74 68 65 20 66 6f 6c  |mined by the fol|
00000730  6c 6f 77 69 6e 67 20 63  61 6c 63 75 6c 61 74 69  |lowing calculati|
00000740  6f 6e 0d 31 2e 41 64 64  20 75 70 20 74 68 65 20  |on.1.Add up the |
00000750  61 6c 74 65 72 6e 61 74  65 20 6e 75 6d 62 65 72  |alternate number|
00000760  73 20 73 74 61 72 74 69  6e 67 20 61 74 20 74 68  |s starting at th|
00000770  65 20 31 32 74 68 3a 0d  20 20 5b 33 2b 30 2b 38  |e 12th:.  [3+0+8|
00000780  2b 36 2b 34 2b 32 3d 32  33 5d 0d 32 2e 54 69 6d  |+6+4+2=23].2.Tim|
00000790  65 73 20 28 31 29 20 62  79 20 33 20 3d 3e 20 36  |es (1) by 3 => 6|
000007a0  39 0d 33 2e 41 64 64 20  75 70 20 74 68 65 20 61  |9.3.Add up the a|
000007b0  6c 74 65 72 6e 61 74 65  20 6e 75 6d 62 65 72 73  |lternate numbers|
000007c0  20 73 74 61 72 74 69 6e  67 20 61 74 20 74 68 65  | starting at the|
000007d0  20 31 31 74 68 3a 0d 20  20 5b 39 2b 32 2b 37 2b  | 11th:.  [9+2+7+|
000007e0  35 2b 33 2b 31 3d 32 37  5d 0d 34 2e 41 64 64 20  |5+3+1=27].4.Add |
000007f0  70 61 72 74 73 20 28 32  29 20 61 6e 64 20 28 33  |parts (2) and (3|
00000800  29 20 3d 3e 20 39 36 0d  35 2e 46 69 6e 64 20 74  |) => 96.5.Find t|
00000810  68 65 20 73 6d 61 6c 6c  65 73 74 20 6e 75 6d 62  |he smallest numb|
00000820  65 72 20 6e 65 65 64 65  64 20 74 6f 20 6d 61 6b  |er needed to mak|
00000830  65 20 70 61 72 74 20 28  34 29 20 65 76 65 6e 6c  |e part (4) evenl|
00000840  79 20 64 69 76 69 73 69  62 6c 65 20 62 79 20 74  |y divisible by t|
00000850  65 6e 0d 20 20 5b 31 30  30 2d 39 36 3d 34 20 73  |en.  [100-96=4 s|
00000860  6f 20 43 3d 34 20 61 73  20 31 30 30 78 31 30 20  |o C=4 as 100x10 |
00000870  69 73 20 65 76 65 6e 20  61 6e 64 20 34 20 3c 20  |is even and 4 < |
00000880  31 34 20 77 68 69 63 68  20 77 6f 75 6c 64 20 62  |14 which would b|
00000890  65 20 74 68 65 20 6e 65  78 74 5d 0d 0d 46 52 4f  |e the next]..FRO|
000008a0  4d 2e 2e 2e 0d 52 6f 62  65 72 74 20 53 70 72 6f  |M....Robert Spro|
000008b0  77 73 6f 6e 2e 0d 48 61  70 70 79 20 73 6f 6c 64  |wson..Happy sold|
000008c0  65 72 69 6e 67 21 0d                              |ering!.|
000008c7
F/+BARCD2.m0
F/+BARCD2.m1
F/+BARCD2.m2
F/+BARCD2.m4
F/+BARCD2.m5