Creating a !BOOT file
-
- Posts: 20
- Joined: Wed Nov 28, 2012 1:09 pm
- Contact:
Creating a !BOOT file
I've run around the internet like a headless chicken for a while now and have yet to find any instructions on how to create a !BOOT file on disk. The only bit of information I've found states its a bit of machine code. Whether thats true or not is up for debate.
Anyone in the know?
Thanks!
-Ben
Anyone in the know?
Thanks!
-Ben
Re: Creating a !BOOT file
From memory...
!BOOT files are often just text files. If your DFS has the *BUILD command, you can run this to create the file:
Then write the text to go in the file. Press ESCAPE after writing the last line.
Make the disk bootable by typing:
!BOOT files are often just text files. If your DFS has the *BUILD command, you can run this to create the file:
Code: Select all
*BUILD !BOOT
Make the disk bootable by typing:
Code: Select all
*OPT 4,3
Re: Creating a !BOOT file
on my elk running ap3 ADFS, i format a new disk using the *EFORM utility and set the boot option to *OPT 4,3 as David said - this causes the system to look for a !BOOT file that can be automatically *EXECed upon <SHIFT><BREAK>
then i just write a simple basic prog such as CHAIN "whatever my actual prog is" and save it as !BOOT on the disk
Stuart
then i just write a simple basic prog such as CHAIN "whatever my actual prog is" and save it as !BOOT on the disk
Stuart

-
- Posts: 20
- Joined: Wed Nov 28, 2012 1:09 pm
- Contact:
Re: Creating a !BOOT file
Using Acorn DFS in BeebEm works fine. 
Hopefully I'll get my real been back this afternoon so I can try and use it on there. I'm not sure what DFS it has as it suffered from magic smoke before I had a chance to fully explore it.

Hopefully I'll get my real been back this afternoon so I can try and use it on there. I'm not sure what DFS it has as it suffered from magic smoke before I had a chance to fully explore it.
Re: Creating a !BOOT file
BBC floppy "boot" is set with "*OPT4" command:benanderson89 wrote:I've run around the internet like a headless chicken for a while now and have yet to find any instructions on how to create a !BOOT file on disk. The only bit of information I've found states its a bit of machine code. Whether thats true or not is up for debate.
Anyone in the know?
Thanks!
-Ben
*OPT 4,0 --> no boot
*OPT 4,1 --> *LOAD !BOOT
*OPT 4,2 --> *RUN !BOOT
*OPT 4,3 --> *EXEC !BOOT
If you use "3" (*EXEC) then !BOOT merely needs to be a text file. This can be built with the *BUILD command
eg
*BUILD !BOOT
CHAIN "MENU
<ESCAPE>
*OPT 4 3
Now when you shift+break with this floppy in the machine will read the !BOOT file and run the commands in it as if you had typed them in; in this case it will then CHAIN "MENU" but you can make it do almost anything you can type in.
(If you had set "2" - *RUN - then the !BOOT file needs to be a binary executable)
Rgds
Stephen
Stephen
Re: Creating a !BOOT file
Is there a way to edit a boot file within BASIC?
- SimonSideburns
- Posts: 580
- Joined: Mon Aug 26, 2013 9:09 pm
- Location: Purbrook, Hampshire
- Contact:
Re: Creating a !BOOT file
Not easily, unless you want to use the BASIC OPENIN, OPENUP, CLOSE etc. commands and write yourself a text file editor.
Install a ROM such as VIEW and you can load that to edit your !BOOT file.
Just remember kids, Beeb spelled backwards is Beeb!
- BeebMaster
- Posts: 3852
- Joined: Sun Aug 02, 2009 5:59 pm
- Location: Lost in the BeebVault!
- Contact:
Re: Creating a !BOOT file
On a Master you can use the built-in Editor with *EDIT !BOOT.
To look at the contents of a !Boot text file you can use *TYPE !BOOT and then if it's a short file and some simple changes are needed *BUILD !BOOT will start again from scratch, and you can copy and amend from the saved copy displayed with *TYPE to make a new !Boot.
*APPEND !BOOT will add further lines to the end of the current file.
To look at the contents of a !Boot text file you can use *TYPE !BOOT and then if it's a short file and some simple changes are needed *BUILD !BOOT will start again from scratch, and you can copy and amend from the saved copy displayed with *TYPE to make a new !Boot.
*APPEND !BOOT will add further lines to the end of the current file.
- flaxcottage
- Posts: 4391
- Joined: Thu Dec 13, 2012 8:46 pm
- Location: Derbyshire
- Contact:
Re: Creating a !BOOT file
One thing to watch out for when EXECing a !BOOT file is that the file is left open when the BASIC program CHAINs. Mostly this will not be an issue unless the program does a lot of data file accessing. BASIC can only have 5 simultaneous files open at one time and will crash due to the !BOOT file still being left open.
CLOSE#0 as the first line of the BASIC program will stop all that nonsense.
CLOSE#0 as the first line of the BASIC program will stop all that nonsense.

- SimonSideburns
- Posts: 580
- Joined: Mon Aug 26, 2013 9:09 pm
- Location: Purbrook, Hampshire
- Contact:
Re: Creating a !BOOT file
That's quite logical and a sensible thing to bear in mind, especially if your own program needs a number of files open itself. Easy to forget though so I'm glad it has been mentioned here.flaxcottage wrote: ↑Mon May 11, 2020 8:35 pmOne thing to watch out for when EXECing a !BOOT file is that the file is left open when the BASIC program CHAINs. Mostly this will not be an issue unless the program does a lot of data file accessing. BASIC can only have 5 simultaneous files open at one time and will crash due to the !BOOT file still being left open.
CLOSE#0 as the first line of the BASIC program will stop all that nonsense.![]()
Just remember kids, Beeb spelled backwards is Beeb!
- SimonSideburns
- Posts: 580
- Joined: Mon Aug 26, 2013 9:09 pm
- Location: Purbrook, Hampshire
- Contact:
Re: Creating a !BOOT file
No, that wouldn't work. *OPT 4,3 needs a plain text file to execute, in the same way as *EXEC !BOOT would.
Just remember kids, Beeb spelled backwards is Beeb!
Re: Creating a !BOOT file
You can also use something liketo generate an !BOOT file from BASIC.
Code: Select all
10*SPOOL!BOOT
20PRINT"CHAIN""PROG"""
30*SPOOL
40*OPT4,3
Re: Creating a !BOOT file
Not true, BASIC will let you open as many files as you want, BASIC imposes *NO* limitations on any filing system, and *NO* application should impose its beliefs of the functionality of the systems it calls. "Ooooo, *I* never call OSWORD 3, therefore I'm going to ban *YOU* from ever calling OSWORD 3."flaxcottage wrote: ↑Mon May 11, 2020 8:35 pmOne thing to watch out for when EXECing a !BOOT file is that the file is left open when the BASIC program CHAINs. Mostly this will not be an issue unless the program does a lot of data file accessing. BASIC can only have 5 simultaneous files open at one time and will crash due to the !BOOT file still being left open.
*DFS* has a maximum of five open files. ADFS has a maximum of eight, NFS five, ANFS 13, TAPE 2, ROMFS 1, HADFS 5, HOSTS 16, IEEEFS 32, ......
Code: Select all
$ bbcbasic
PDP11 BBC BASIC IV Version 0.32
(C) Copyright J.G.Harston 1989,2005-2020
>_
Re: Creating a !BOOT file
Very good thank you.julie_m wrote: ↑Thu May 14, 2020 4:21 pmYou can also use something liketo generate an !BOOT file from BASIC.Code: Select all
10*SPOOL!BOOT 20PRINT"CHAIN""PROG""" 30*SPOOL 40*OPT4,3