scsi
basic
10REM Turn off alignment exceptions on ARMv7 machines
20DIM code% 256
30P%=code%
40[ OPT 0
50SWI "OS_EnterOS"
60MRC CP15,0,R0,C1,C0,0
70BIC R0,R0,#2
80MCR CP15,0,R0,C1,C0,0
90MSR CPSR_c,#&10
100MOV PC,R14
110]
120CALL code%
*changedynamicarea -ramfssize 32m
*ram
SAVE"RAM::RamDisc0.$.AOff"
10REM Turn on alignment exceptions on ARMv7 machines
70ORR R0,R0,#2
SAVE"RAM::RamDisc0.$.AOn"
*scsi
NEW
10REM Create and save a text file of instructions
20:
30REM Assumes a RAM disc is present
40:
50ONERRORCLOSE#x:REPORT:PRINT" at line ";ERL:END
60READline$
70x=OPENOUT"RAM::RamDisc0.$.HD4Instruct" 
80WHILE line$<>"" 
90BPUT#x,line$
100READline$
110ENDWHILE
120CLOSE#x
130*settype RAM::RamDisc0.$.HD4instruct &fff
140END
150:
1000DATA"        Creating your HardDisc4 boot disc" 
1010DATA"        =================================" 
1020DATA" " 
1030DATA"1. Connect the new device you want to format, and" 
1040DATA"   note its drive number on the icon bar." 
1050DATA"2. Unplug the FAT formatted device you used to get" 
1060DATA"   to this point, if you wish." 
1070DATA"3. To reformat this new device, run HForm from" 
1080DATA"   its shortcut placed on the Pinboard." 
1090DATA"4. In the RAM::RamDisc0.$.HardDisc4 directory" 
1100DATA"   display, click Menu -> Select all."
1110DATA"5. Drag the selection onto the iconbar drive icon" 
1120DATA"   for the newly formatted device." 
1130DATA"6. When copying is complete (i.e. Copying files" 
1140DATA"   window disappears), click Menu -> Dismount on" 
1150DATA"   the iconbar drive icon." 
1160DATA"7. You are now free to restart the machine, which" 
1170DATA"   will boot from the newly installed HardDisc4" 
1180DATA"   !Boot sequence." 
1190DATA"" 
RUN
NEW
10REM Run self-extracting HardDisc4 image
20REM which provides the !Boot sequence and
30REM FileCore formatter
40:
50REM Assumes a RAM disc of minimum size 32MB is present
60:
70*copy SCSI::0.HardDisc4/util RAM::RamDisc0.$.HD4 ~c
80*dismount :0
90*settype RAM::RamDisc0.$.HD4 &ffc
100*key0|m*delete RAM::RamDisc0.$.HD4|m*pin RAM::RamDisc0.$.HardDisc4.Utilities.Caution.!HForm 32 152|m*filer_opendir RAM::RamDisc0.$|m*filer_opendir RAM::RamDisc0.$.HardDisc4|m*filer_run RAM::RamDisc0.$.HD4instruct|m
110*key1|m|m|m|m|m|mREM **********************|mREM *      Finished.     *|mREM *   You may safely   *|mREM * CLOSE this window. *|mREM **********************|m|mQUIT|mshellcli_taskquit|m
120*fx15,0
130*fx138,0,128
140*fx138,0,129
150*ram
160*/ RAM::RamDisc0.$.HD4
RUN