Home » CEEFAX disks » telesoftware4.adl » 15-01-88/B\OSB10
15-01-88/B\OSB10
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 » CEEFAX disks » telesoftware4.adl |
Filename: | 15-01-88/B\OSB10 |
Read OK: | ✔ |
File size: | 058C bytes |
Load address: | FFFF1900 |
Exec address: | FFFF8023 |
File contents
10REM OSBITS Module B/osb10 20REM Errors 30REM Version 1.1 1.2.87 40 50*KEY1MO.3|M|NL.|M 60 70osbyte=&FFF4 80oswrch=&FFEE 90osrdch=&FFE0 100 110DIM code% 120 120 130FOR pass%=0 TO 3 STEP 3 140P%=code% 150[OPT pass% 160 170.input_character 180 190JSR osrdch \ Take in the next character 200CMP #27 \ Check for an ESCAPE 210BNE not_escape 220 230\ ESCAPE error routine. This acknowledges the ESCAPE using 240\ OSBYTE 126 and enters the default routine with error number 250\ 17 and a suitable message as below. 260 270LDA #126 280JSR osbyte 290 300BRK 310OPT FNEQUB(17) 320OPT FNEQUS("You have pressed the ESCAPE key") 330OPT FNEQUB(0) 340 350.not_escape 360 370\ This code sieves out anything not a number and branches 380\ to the error routine at not_number 390 400CMP #ASC"0" 410BCC not_number 420CMP #ASC"9"+1 430BCS not_number 440JSR oswrch 450JMP input_character 460 470.not_number 480 490BRK 500OPT FNEQUB(255) \ Error number 510OPT FNEQUS("You have not input a number") 520OPT FNEQUB(0) 530 540] 550NEXT 560CALL code% 570END 580 590**** EQUate a Byte **** 600DEF FNEQUB(N%) 610?P%=N% MOD 256 620IF (pass% AND 3) = 3 THEN PRINT ~?P% 630P%=P%+1 640=pass% 650 660**** EQUate a String **** 670DEF FNEQUS(N$) 680LOCAL N% 690WIDTH 40 700FOR N%=1 TO LEN(N$) 710K%=ASC(MID$(N$,N%,1)) 720P%?(N%-1)=K% 730IF (pass% AND 3) = 3 THEN PRINT ~P%?(N%-1); 740NEXT 750IF (pass% AND 3) = 3 THEN PRINT 760P%=P%+LEN(N$) 770WIDTH 0 780=pass%
� OSBITS Module B/osb10 � Errors � Version 1.1 1.2.87 ( 2*KEY1MO.3|M|NL.|M < Fosbyte=&FFF4 Poswrch=&FFEE Zosrdch=&FFE0 d n� code% 120 x �� pass%=0 � 3 � 3 �P%=code% �[OPT pass% � �.input_character � �=JSR osrdch \ Take in the next character �6CMP #27 \ Check for an ESCAPE �BNE not_escape � �@\ ESCAPE error routine. This acknowledges the ESCAPE using �B\ OSBYTE 126 and enters the default routine with error number �*\ 17 and a suitable message as below. LDA #126 JSR osbyte " ,BRK 6OPT �EQUB(17) @1OPT �EQUS("You have pressed the ESCAPE key") JOPT �EQUB(0) T ^.not_escape h r>\ This code sieves out anything not a number and branches |)\ to the error routine at not_number � � CMP #�"0" �BCC not_number �CMP #�"9"+1 �BCS not_number �JSR oswrch �JMP input_character � �.not_number � �BRK �.OPT �EQUB(255) \ Error number �-OPT �EQUS("You have not input a number") OPT �EQUB(0) ] &� 0� code% :� D N**** EQUate a Byte **** X� �EQUB(N%) b?P%=N% � 256 l� (pass% � 3) = 3 � � ~?P% vP%=P%+1 � =pass% � �**** EQUate a String **** �� �EQUS(N$) �� N% �� 40 �� N%=1 � �(N$) �K%=�(�N$,N%,1)) �P%?(N%-1)=K% �%� (pass% � 3) = 3 � � ~P%?(N%-1); �� �� (pass% � 3) = 3 � � �P%=P%+�(N$) � 0 =pass% �
00000000 0d 00 0a 1b f4 20 4f 53 42 49 54 53 20 4d 6f 64 |..... OSBITS Mod| 00000010 75 6c 65 20 42 2f 6f 73 62 31 30 0d 00 14 0c f4 |ule B/osb10.....| 00000020 20 45 72 72 6f 72 73 0d 00 1e 19 f4 20 56 65 72 | Errors..... Ver| 00000030 73 69 6f 6e 20 31 2e 31 20 20 31 2e 32 2e 38 37 |sion 1.1 1.2.87| 00000040 0d 00 28 05 20 0d 00 32 15 2a 4b 45 59 31 4d 4f |..(. ..2.*KEY1MO| 00000050 2e 33 7c 4d 7c 4e 4c 2e 7c 4d 0d 00 3c 05 20 0d |.3|M|NL.|M..<. .| 00000060 00 46 10 6f 73 62 79 74 65 3d 26 46 46 46 34 0d |.F.osbyte=&FFF4.| 00000070 00 50 10 6f 73 77 72 63 68 3d 26 46 46 45 45 0d |.P.oswrch=&FFEE.| 00000080 00 5a 10 6f 73 72 64 63 68 3d 26 46 46 45 30 0d |.Z.osrdch=&FFE0.| 00000090 00 64 05 20 0d 00 6e 0f de 20 63 6f 64 65 25 20 |.d. ..n.. code% | 000000a0 31 32 30 0d 00 78 05 20 0d 00 82 15 e3 20 70 61 |120..x. ..... pa| 000000b0 73 73 25 3d 30 20 b8 20 33 20 88 20 33 0d 00 8c |ss%=0 . 3 . 3...| 000000c0 0c 50 25 3d 63 6f 64 65 25 0d 00 96 0e 5b 4f 50 |.P%=code%....[OP| 000000d0 54 20 70 61 73 73 25 0d 00 a0 05 20 0d 00 aa 14 |T pass%.... ....| 000000e0 2e 69 6e 70 75 74 5f 63 68 61 72 61 63 74 65 72 |.input_character| 000000f0 0d 00 b4 05 20 0d 00 be 3d 4a 53 52 20 6f 73 72 |.... ...=JSR osr| 00000100 64 63 68 20 20 20 20 20 20 20 20 20 20 20 20 20 |dch | 00000110 20 20 20 20 20 20 5c 20 54 61 6b 65 20 69 6e 20 | \ Take in | 00000120 74 68 65 20 6e 65 78 74 20 63 68 61 72 61 63 74 |the next charact| 00000130 65 72 0d 00 c8 36 43 4d 50 20 23 32 37 20 20 20 |er...6CMP #27 | 00000140 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000150 20 20 20 5c 20 43 68 65 63 6b 20 66 6f 72 20 61 | \ Check for a| 00000160 6e 20 45 53 43 41 50 45 0d 00 d2 12 42 4e 45 20 |n ESCAPE....BNE | 00000170 6e 6f 74 5f 65 73 63 61 70 65 0d 00 dc 05 20 0d |not_escape.... .| 00000180 00 e6 40 5c 20 20 45 53 43 41 50 45 20 65 72 72 |..@\ ESCAPE err| 00000190 6f 72 20 72 6f 75 74 69 6e 65 2e 20 20 54 68 69 |or routine. Thi| 000001a0 73 20 61 63 6b 6e 6f 77 6c 65 64 67 65 73 20 74 |s acknowledges t| 000001b0 68 65 20 45 53 43 41 50 45 20 75 73 69 6e 67 0d |he ESCAPE using.| 000001c0 00 f0 42 5c 20 20 4f 53 42 59 54 45 20 31 32 36 |..B\ OSBYTE 126| 000001d0 20 61 6e 64 20 65 6e 74 65 72 73 20 74 68 65 20 | and enters the | 000001e0 64 65 66 61 75 6c 74 20 72 6f 75 74 69 6e 65 20 |default routine | 000001f0 77 69 74 68 20 65 72 72 6f 72 20 6e 75 6d 62 65 |with error numbe| 00000200 72 0d 00 fa 2a 5c 20 20 31 37 20 61 6e 64 20 61 |r...*\ 17 and a| 00000210 20 73 75 69 74 61 62 6c 65 20 6d 65 73 73 61 67 | suitable messag| 00000220 65 20 61 73 20 62 65 6c 6f 77 2e 0d 01 04 05 20 |e as below..... | 00000230 0d 01 0e 0c 4c 44 41 20 23 31 32 36 0d 01 18 0e |....LDA #126....| 00000240 4a 53 52 20 6f 73 62 79 74 65 0d 01 22 05 20 0d |JSR osbyte..". .| 00000250 01 2c 07 42 52 4b 0d 01 36 12 4f 50 54 20 20 a4 |.,.BRK..6.OPT .| 00000260 45 51 55 42 28 31 37 29 0d 01 40 31 4f 50 54 20 |EQUB(17)..@1OPT | 00000270 20 a4 45 51 55 53 28 22 59 6f 75 20 68 61 76 65 | .EQUS("You have| 00000280 20 70 72 65 73 73 65 64 20 74 68 65 20 45 53 43 | pressed the ESC| 00000290 41 50 45 20 6b 65 79 22 29 0d 01 4a 11 4f 50 54 |APE key")..J.OPT| 000002a0 20 20 a4 45 51 55 42 28 30 29 0d 01 54 05 20 0d | .EQUB(0)..T. .| 000002b0 01 5e 0f 2e 6e 6f 74 5f 65 73 63 61 70 65 0d 01 |.^..not_escape..| 000002c0 68 05 20 0d 01 72 3e 5c 20 20 54 68 69 73 20 63 |h. ..r>\ This c| 000002d0 6f 64 65 20 73 69 65 76 65 73 20 6f 75 74 20 61 |ode sieves out a| 000002e0 6e 79 74 68 69 6e 67 20 6e 6f 74 20 61 20 6e 75 |nything not a nu| 000002f0 6d 62 65 72 20 61 6e 64 20 62 72 61 6e 63 68 65 |mber and branche| 00000300 73 0d 01 7c 29 5c 20 20 74 6f 20 74 68 65 20 65 |s..|)\ to the e| 00000310 72 72 6f 72 20 72 6f 75 74 69 6e 65 20 61 74 20 |rror routine at | 00000320 6e 6f 74 5f 6e 75 6d 62 65 72 0d 01 86 05 20 0d |not_number.... .| 00000330 01 90 0d 43 4d 50 20 23 97 22 30 22 0d 01 9a 12 |...CMP #."0"....| 00000340 42 43 43 20 6e 6f 74 5f 6e 75 6d 62 65 72 0d 01 |BCC not_number..| 00000350 a4 0f 43 4d 50 20 23 97 22 39 22 2b 31 0d 01 ae |..CMP #."9"+1...| 00000360 12 42 43 53 20 6e 6f 74 5f 6e 75 6d 62 65 72 0d |.BCS not_number.| 00000370 01 b8 0e 4a 53 52 20 6f 73 77 72 63 68 0d 01 c2 |...JSR oswrch...| 00000380 17 4a 4d 50 20 69 6e 70 75 74 5f 63 68 61 72 61 |.JMP input_chara| 00000390 63 74 65 72 0d 01 cc 05 20 0d 01 d6 0f 2e 6e 6f |cter.... .....no| 000003a0 74 5f 6e 75 6d 62 65 72 0d 01 e0 05 20 0d 01 ea |t_number.... ...| 000003b0 07 42 52 4b 0d 01 f4 2e 4f 50 54 20 20 a4 45 51 |.BRK....OPT .EQ| 000003c0 55 42 28 32 35 35 29 20 20 20 20 20 20 20 20 20 |UB(255) | 000003d0 20 20 20 20 5c 20 45 72 72 6f 72 20 6e 75 6d 62 | \ Error numb| 000003e0 65 72 0d 01 fe 2d 4f 50 54 20 20 a4 45 51 55 53 |er...-OPT .EQUS| 000003f0 28 22 59 6f 75 20 68 61 76 65 20 6e 6f 74 20 69 |("You have not i| 00000400 6e 70 75 74 20 61 20 6e 75 6d 62 65 72 22 29 0d |nput a number").| 00000410 02 08 11 4f 50 54 20 20 a4 45 51 55 42 28 30 29 |...OPT .EQUB(0)| 00000420 0d 02 12 05 20 0d 02 1c 05 5d 0d 02 26 05 ed 0d |.... ....]..&...| 00000430 02 30 0b d6 20 63 6f 64 65 25 0d 02 3a 05 e0 0d |.0.. code%..:...| 00000440 02 44 05 20 0d 02 4e 1b 2a 2a 2a 2a 20 45 51 55 |.D. ..N.**** EQU| 00000450 61 74 65 20 61 20 42 79 74 65 20 2a 2a 2a 2a 0d |ate a Byte ****.| 00000460 02 58 0f dd 20 a4 45 51 55 42 28 4e 25 29 0d 02 |.X.. .EQUB(N%)..| 00000470 62 10 3f 50 25 3d 4e 25 20 83 20 32 35 36 0d 02 |b.?P%=N% . 256..| 00000480 6c 1e e7 20 28 70 61 73 73 25 20 80 20 33 29 20 |l.. (pass% . 3) | 00000490 3d 20 33 20 8c 20 f1 20 7e 3f 50 25 0d 02 76 0b |= 3 . . ~?P%..v.| 000004a0 50 25 3d 50 25 2b 31 0d 02 80 0a 3d 70 61 73 73 |P%=P%+1....=pass| 000004b0 25 0d 02 8a 05 20 0d 02 94 1d 2a 2a 2a 2a 20 45 |%.... ....**** E| 000004c0 51 55 61 74 65 20 61 20 53 74 72 69 6e 67 20 2a |QUate a String *| 000004d0 2a 2a 2a 0d 02 9e 0f dd 20 a4 45 51 55 53 28 4e |***..... .EQUS(N| 000004e0 24 29 0d 02 a8 08 ea 20 4e 25 0d 02 b2 08 fe 20 |$)..... N%..... | 000004f0 34 30 0d 02 bc 12 e3 20 4e 25 3d 31 20 b8 20 a9 |40..... N%=1 . .| 00000500 28 4e 24 29 0d 02 c6 13 4b 25 3d 97 28 c1 4e 24 |(N$)....K%=.(.N$| 00000510 2c 4e 25 2c 31 29 29 0d 02 d0 10 50 25 3f 28 4e |,N%,1))....P%?(N| 00000520 25 2d 31 29 3d 4b 25 0d 02 da 25 e7 20 28 70 61 |%-1)=K%...%. (pa| 00000530 73 73 25 20 80 20 33 29 20 3d 20 33 20 8c 20 f1 |ss% . 3) = 3 . .| 00000540 20 7e 50 25 3f 28 4e 25 2d 31 29 3b 0d 02 e4 05 | ~P%?(N%-1);....| 00000550 ed 0d 02 ee 19 e7 20 28 70 61 73 73 25 20 80 20 |...... (pass% . | 00000560 33 29 20 3d 20 33 20 8c 20 f1 0d 02 f8 0f 50 25 |3) = 3 . .....P%| 00000570 3d 50 25 2b a9 28 4e 24 29 0d 03 02 07 fe 20 30 |=P%+.(N$)..... 0| 00000580 0d 03 0c 0a 3d 70 61 73 73 25 0d ff |....=pass%..| 0000058c