Home » Recent acquisitions » Acorn tapes » tape045b_acorn_acorn_user_1985_04_electron.wav » FORUM1

FORUM1

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 » Recent acquisitions » Acorn tapes » tape045b_acorn_acorn_user_1985_04_electron.wav
Filename: FORUM1
Read OK:
File size: 0399 bytes
Load address: FFFF1900
Exec address: FFFF1900
Duplicates

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

File contents
   10REM Trap Break/Reset with ON ERROR
   20REM by Chris Davies 
   30REM for BBC and Electron
   40REM (c) Acorn User April 1985
   50:
   60oldvec=&70
   70errvec=&202
   80osbyte=&FFF4
   90P%=&900
  100[
  110\ Restore error vector
  120\ to Basic's ON ERROR
  130LDA oldvec
  140STA errvec
  150LDA oldvec+1
  160STA errvec+1
  170\
  180\ initialise ROMs
  190LDA #143
  200LDX #1
  210LDY #&E
  220JSR osbyte
  230LDX #2
  240JSR osbyte 
  250LDX #3
  260LDY #&FF
  270JSR osbyte
  280\
  290\ create error 100 (Break) 
  300BRK
  310]
  320$P%=CHR$(100)+"BREAK"+CHR$(0) 
  330:
  340REM Point Break vector to
  350REM Machine code patch - JMP &900
  360*FX 247,76
  370*FX 248,0
  380*FX 249,9
  390count=1
  400:
  410ON ERROR PROCerror
  420:
  430REM Save Basic error vector
  440?&70=?&202:?&71=?&203
  450:
  460REPEAT
  470count=count+0.5
  480UNTIL FALSE
  490END
  500:
  510DEF PROCerror
  520REPORT:PRINT" at line ";ERL
  530:
  540REM Escape stops program
  550IF ERL=17 A%=247:X%=0:Y%=0:CALL osbyte:END
  560REM also removes patch - *FX247,0
  570IF ERL=100 PRINT"Press RETURN";:REPEAT UNTIL GET=13:PRINT
  580ENDPROC

$� Trap Break/Reset with ON ERROR
� by Chris Davies 
� for BBC and Electron
(� (c) Acorn User April 1985
2:
<oldvec=&70
Ferrvec=&202
Posbyte=&FFF4
ZP%=&900
d[
n\ Restore error vector
x\ to Basic's � �
�LDA oldvec
�STA errvec
�LDA oldvec+1
�STA errvec+1
�\
�\ initialise ROMs
�LDA #143
�
LDX #1
�LDY #&E
�JSR osbyte
�
LDX #2
�JSR osbyte 
�
LDX #3
LDY #&FF
JSR osbyte
\
"\ create error 100 (Break) 
,BRK
6]
@$P%=�(100)+"BREAK"+�(0) 
J:
T� Point Break vector to
^#� Machine code patch - JMP &900
h*FX 247,76
r
*FX 248,0
|
*FX 249,9
�count=1
�:
�� � �error
�:
�� Save Basic error vector
�?&70=?&202:?&71=?&203
�:
��
�count=count+0.5
�� �
��
�:
�� �error
�:�" at line ";�
:
� Escape stops program
&&� �=17 A%=247:X%=0:Y%=0:� osbyte:�
0#� also removes patch - *FX247,0
:'� �=100 �"Press RETURN";:� � �=13:�
D�
�
00000000  0d 00 0a 24 f4 20 54 72  61 70 20 42 72 65 61 6b  |...$. Trap Break|
00000010  2f 52 65 73 65 74 20 77  69 74 68 20 4f 4e 20 45  |/Reset with ON E|
00000020  52 52 4f 52 0d 00 14 16  f4 20 62 79 20 43 68 72  |RROR..... by Chr|
00000030  69 73 20 44 61 76 69 65  73 20 0d 00 1e 1a f4 20  |is Davies ..... |
00000040  66 6f 72 20 42 42 43 20  61 6e 64 20 45 6c 65 63  |for BBC and Elec|
00000050  74 72 6f 6e 0d 00 28 1f  f4 20 28 63 29 20 41 63  |tron..(.. (c) Ac|
00000060  6f 72 6e 20 55 73 65 72  20 41 70 72 69 6c 20 31  |orn User April 1|
00000070  39 38 35 0d 00 32 05 3a  0d 00 3c 0e 6f 6c 64 76  |985..2.:..<.oldv|
00000080  65 63 3d 26 37 30 0d 00  46 0f 65 72 72 76 65 63  |ec=&70..F.errvec|
00000090  3d 26 32 30 32 0d 00 50  10 6f 73 62 79 74 65 3d  |=&202..P.osbyte=|
000000a0  26 46 46 46 34 0d 00 5a  0b 50 25 3d 26 39 30 30  |&FFF4..Z.P%=&900|
000000b0  0d 00 64 05 5b 0d 00 6e  1a 5c 20 52 65 73 74 6f  |..d.[..n.\ Resto|
000000c0  72 65 20 65 72 72 6f 72  20 76 65 63 74 6f 72 0d  |re error vector.|
000000d0  00 78 14 5c 20 74 6f 20  42 61 73 69 63 27 73 20  |.x.\ to Basic's |
000000e0  ee 20 85 0d 00 82 0e 4c  44 41 20 6f 6c 64 76 65  |. .....LDA oldve|
000000f0  63 0d 00 8c 0e 53 54 41  20 65 72 72 76 65 63 0d  |c....STA errvec.|
00000100  00 96 10 4c 44 41 20 6f  6c 64 76 65 63 2b 31 0d  |...LDA oldvec+1.|
00000110  00 a0 10 53 54 41 20 65  72 72 76 65 63 2b 31 0d  |...STA errvec+1.|
00000120  00 aa 05 5c 0d 00 b4 15  5c 20 69 6e 69 74 69 61  |...\....\ initia|
00000130  6c 69 73 65 20 52 4f 4d  73 0d 00 be 0c 4c 44 41  |lise ROMs....LDA|
00000140  20 23 31 34 33 0d 00 c8  0a 4c 44 58 20 23 31 0d  | #143....LDX #1.|
00000150  00 d2 0b 4c 44 59 20 23  26 45 0d 00 dc 0e 4a 53  |...LDY #&E....JS|
00000160  52 20 6f 73 62 79 74 65  0d 00 e6 0a 4c 44 58 20  |R osbyte....LDX |
00000170  23 32 0d 00 f0 0f 4a 53  52 20 6f 73 62 79 74 65  |#2....JSR osbyte|
00000180  20 0d 00 fa 0a 4c 44 58  20 23 33 0d 01 04 0c 4c  | ....LDX #3....L|
00000190  44 59 20 23 26 46 46 0d  01 0e 0e 4a 53 52 20 6f  |DY #&FF....JSR o|
000001a0  73 62 79 74 65 0d 01 18  05 5c 0d 01 22 1f 5c 20  |sbyte....\..".\ |
000001b0  63 72 65 61 74 65 20 65  72 72 6f 72 20 31 30 30  |create error 100|
000001c0  20 28 42 72 65 61 6b 29  20 0d 01 2c 07 42 52 4b  | (Break) ..,.BRK|
000001d0  0d 01 36 05 5d 0d 01 40  1c 24 50 25 3d bd 28 31  |..6.]..@.$P%=.(1|
000001e0  30 30 29 2b 22 42 52 45  41 4b 22 2b bd 28 30 29  |00)+"BREAK"+.(0)|
000001f0  20 0d 01 4a 05 3a 0d 01  54 1b f4 20 50 6f 69 6e  | ..J.:..T.. Poin|
00000200  74 20 42 72 65 61 6b 20  76 65 63 74 6f 72 20 74  |t Break vector t|
00000210  6f 0d 01 5e 23 f4 20 4d  61 63 68 69 6e 65 20 63  |o..^#. Machine c|
00000220  6f 64 65 20 70 61 74 63  68 20 2d 20 4a 4d 50 20  |ode patch - JMP |
00000230  26 39 30 30 0d 01 68 0e  2a 46 58 20 32 34 37 2c  |&900..h.*FX 247,|
00000240  37 36 0d 01 72 0d 2a 46  58 20 32 34 38 2c 30 0d  |76..r.*FX 248,0.|
00000250  01 7c 0d 2a 46 58 20 32  34 39 2c 39 0d 01 86 0b  |.|.*FX 249,9....|
00000260  63 6f 75 6e 74 3d 31 0d  01 90 05 3a 0d 01 9a 0e  |count=1....:....|
00000270  ee 20 85 20 f2 65 72 72  6f 72 0d 01 a4 05 3a 0d  |. . .error....:.|
00000280  01 ae 1d f4 20 53 61 76  65 20 42 61 73 69 63 20  |.... Save Basic |
00000290  65 72 72 6f 72 20 76 65  63 74 6f 72 0d 01 b8 19  |error vector....|
000002a0  3f 26 37 30 3d 3f 26 32  30 32 3a 3f 26 37 31 3d  |?&70=?&202:?&71=|
000002b0  3f 26 32 30 33 0d 01 c2  05 3a 0d 01 cc 05 f5 0d  |?&203....:......|
000002c0  01 d6 13 63 6f 75 6e 74  3d 63 6f 75 6e 74 2b 30  |...count=count+0|
000002d0  2e 35 0d 01 e0 07 fd 20  a3 0d 01 ea 05 e0 0d 01  |.5..... ........|
000002e0  f4 05 3a 0d 01 fe 0c dd  20 f2 65 72 72 6f 72 0d  |..:..... .error.|
000002f0  02 08 14 f6 3a f1 22 20  61 74 20 6c 69 6e 65 20  |....:." at line |
00000300  22 3b 9e 0d 02 12 05 3a  0d 02 1c 1a f4 20 45 73  |";.....:..... Es|
00000310  63 61 70 65 20 73 74 6f  70 73 20 70 72 6f 67 72  |cape stops progr|
00000320  61 6d 0d 02 26 26 e7 20  9e 3d 31 37 20 41 25 3d  |am..&&. .=17 A%=|
00000330  32 34 37 3a 58 25 3d 30  3a 59 25 3d 30 3a d6 20  |247:X%=0:Y%=0:. |
00000340  6f 73 62 79 74 65 3a e0  0d 02 30 23 f4 20 61 6c  |osbyte:...0#. al|
00000350  73 6f 20 72 65 6d 6f 76  65 73 20 70 61 74 63 68  |so removes patch|
00000360  20 2d 20 2a 46 58 32 34  37 2c 30 0d 02 3a 27 e7  | - *FX247,0..:'.|
00000370  20 9e 3d 31 30 30 20 f1  22 50 72 65 73 73 20 52  | .=100 ."Press R|
00000380  45 54 55 52 4e 22 3b 3a  f5 20 fd 20 a5 3d 31 33  |ETURN";:. . .=13|
00000390  3a f1 0d 02 44 05 e1 0d  ff                       |:...D....|
00000399
FORUM1.m0
FORUM1.m1
FORUM1.m2
FORUM1.m4
FORUM1.m5