Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape19b_acorn_eu_1991_february.wav » ISBN

ISBN

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 tapes » Electron_User » Electron_User_tape19b_acorn_eu_1991_february.wav
Filename: ISBN
Read OK:
File size: 01D3 bytes
Load address: FFFF1900
Exec address: FFFF8023
Duplicates

There are 2 duplicate copies of this file in the archive:

File contents
    0 REM Int. Std. Book Number Check
   10 REM by Jon Millington
   20 REM (c) The Micro User
   30 MODE 7
   40 REPEAT
   50 REPEAT
   60 INPUT'"Enter ISBN (no spaces) "A$
   70 UNTIL LEN A$=10
   80 T=0
   90 FOR N=2 TO 10
  100 H=ASC MID$(A$,11-N,1)-48
  110 IF H<0 OR H>9 THEN T=600
  120 T=T+N*H
  130 NEXT N
  140 IF T>500 THEN 50
  150 T=(11-T MOD 11) MOD 11
  160 R=ASC RIGHT$(A$,1)-48
  170 IF T<10 AND R=T THEN N=0
  180 IF T=10 AND R=40 THEN N=0
  190 IF N=0 PRINT'"ISBN is OK":GOTO 50
  200 PRINT'"Wrong ISBN. ";
  210 PRINT "Check digit should be ";
  220 IF T=10 PRINT "X" ELSE PRINT;T
  230 UNTIL FALSE
" � Int. Std. Book Number Check

 � by Jon Millington
 � (c) The Micro User
 � 7
( �
2 �
<" �'"Enter ISBN (no spaces) "A$
F � � A$=10
P T=0
Z � N=2 � 10
d H=� �A$,11-N,1)-48
n � H<0 � H>9 � T=600
x T=T+N*H
� � N
� � T>500 � �Tr@
� T=(11-T � 11) � 11
� R=� �A$,1)-48
� � T<10 � R=T � N=0
� � T=10 � R=40 � N=0
�  � N=0 �'"ISBN is OK":� �Tr@
� �'"Wrong ISBN. ";
�  � "Check digit should be ";
� � T=10 � "X" � �;T
� � �
�
00000000  0d 00 00 22 20 f4 20 49  6e 74 2e 20 53 74 64 2e  |..." . Int. Std.|
00000010  20 42 6f 6f 6b 20 4e 75  6d 62 65 72 20 43 68 65  | Book Number Che|
00000020  63 6b 0d 00 0a 18 20 f4  20 62 79 20 4a 6f 6e 20  |ck.... . by Jon |
00000030  4d 69 6c 6c 69 6e 67 74  6f 6e 0d 00 14 19 20 f4  |Millington.... .|
00000040  20 28 63 29 20 54 68 65  20 4d 69 63 72 6f 20 55  | (c) The Micro U|
00000050  73 65 72 0d 00 1e 08 20  eb 20 37 0d 00 28 06 20  |ser.... . 7..(. |
00000060  f5 0d 00 32 06 20 f5 0d  00 3c 22 20 e8 27 22 45  |...2. ...<" .'"E|
00000070  6e 74 65 72 20 49 53 42  4e 20 28 6e 6f 20 73 70  |nter ISBN (no sp|
00000080  61 63 65 73 29 20 22 41  24 0d 00 46 0e 20 fd 20  |aces) "A$..F. . |
00000090  a9 20 41 24 3d 31 30 0d  00 50 08 20 54 3d 30 0d  |. A$=10..P. T=0.|
000000a0  00 5a 0f 20 e3 20 4e 3d  32 20 b8 20 31 30 0d 00  |.Z. . N=2 . 10..|
000000b0  64 17 20 48 3d 97 20 c1  41 24 2c 31 31 2d 4e 2c  |d. H=. .A$,11-N,|
000000c0  31 29 2d 34 38 0d 00 6e  18 20 e7 20 48 3c 30 20  |1)-48..n. . H<0 |
000000d0  84 20 48 3e 39 20 8c 20  54 3d 36 30 30 0d 00 78  |. H>9 . T=600..x|
000000e0  0c 20 54 3d 54 2b 4e 2a  48 0d 00 82 08 20 ed 20  |. T=T+N*H.... . |
000000f0  4e 0d 00 8c 13 20 e7 20  54 3e 35 30 30 20 8c 20  |N.... . T>500 . |
00000100  8d 54 72 40 0d 00 96 17  20 54 3d 28 31 31 2d 54  |.Tr@.... T=(11-T|
00000110  20 83 20 31 31 29 20 83  20 31 31 0d 00 a0 12 20  | . 11) . 11.... |
00000120  52 3d 97 20 c2 41 24 2c  31 29 2d 34 38 0d 00 aa  |R=. .A$,1)-48...|
00000130  17 20 e7 20 54 3c 31 30  20 80 20 52 3d 54 20 8c  |. . T<10 . R=T .|
00000140  20 4e 3d 30 0d 00 b4 18  20 e7 20 54 3d 31 30 20  | N=0.... . T=10 |
00000150  80 20 52 3d 34 30 20 8c  20 4e 3d 30 0d 00 be 20  |. R=40 . N=0... |
00000160  20 e7 20 4e 3d 30 20 f1  27 22 49 53 42 4e 20 69  | . N=0 .'"ISBN i|
00000170  73 20 4f 4b 22 3a e5 20  8d 54 72 40 0d 00 c8 16  |s OK":. .Tr@....|
00000180  20 f1 27 22 57 72 6f 6e  67 20 49 53 42 4e 2e 20  | .'"Wrong ISBN. |
00000190  22 3b 0d 00 d2 20 20 f1  20 22 43 68 65 63 6b 20  |";...  . "Check |
000001a0  64 69 67 69 74 20 73 68  6f 75 6c 64 20 62 65 20  |digit should be |
000001b0  22 3b 0d 00 dc 17 20 e7  20 54 3d 31 30 20 f1 20  |";.... . T=10 . |
000001c0  22 58 22 20 8b 20 f1 3b  54 0d 00 e6 08 20 fd 20  |"X" . .;T.... . |
000001d0  a3 0d ff                                          |...|
000001d3
ISBN.m0
ISBN.m1
ISBN.m2
ISBN.m4
ISBN.m5