Date : Fri, 29 Oct 1999 12:58:36 +0100 (BST)
From : u7c92@... (Christopher)
Subject: Re: I need some advice on using a BBC Master.
Dear everyone,
> 2. How do you make a !BOOT program in BASIC that runs when you press
> shift+break? This would be very handy for running XFer.
Below is a program that allows the !BOOT file, and the program usually
CHAINed by the !BOOT file, to be combined - thus saving a filename in
the disc catalogue. PAGE must be &F00 or higher.
It works by assembling some machine code just below PAGE which sets up
a function key to OLD and RUN the Basic program sitting at PAGE.
When the booting option is set to *RUN (i.e. *OPT4,2) fn key 0 is
inserted into the keyboard buffer (equivalent to *FX138,0,128 in BASIC.)
Save a copy of the program before running. Now type NEW and type in
the BASIC you want as your !BOOT file (a disc menu, for example). When
you want to save, press f0, which will *SAVE the portion of memory
from the start of the m/c below page, to the TOP of the BASIC program.
10 FOR pass=0 TO 2 STEP 2
20 P%=PAGE-&30
30 [ OPT pass
40 LDX #key MOD 256
50 LDY #key DIV 256
60 JSR &FFF7
70 LDA #138
80 LDX #0
90 LDY #128
100 JMP &FFF4 \ *FX138,0,128
110 .key
120 EQUS "KEY0 OLD|MRUN|M"+CHR$13
130 ]
140 NEXT
150
160 OSCLI "KEY0 *SAVE !BOOT "+STR$~(PAGE-&30)+CHR$32+
STR$~TOP+"|M"
********************
Christopher Dewhurst
u7c92@...
29 Scot Hay Road, Silverdale, Newcastle-u-Lyme, Staffs, ST5 6RQ
(O1782) 712554