Previous Next Contents Index
The initialise system routine

THE '"AUTO*" FILE' UFIA
The following 22 bytes form the UFIA of the autoload file, which is loaded right
after the system file, except when "RUN boot" was given.

0536 AUTO_UFIA  DEFB 1                   Drive 1
0537            DEFB 0
0538            DEFB 0
0539            DEFB "D"                 Device "D"
053A            DEFB 1                   Dir. entry for BASIC file.
053B            DEFM "AUTO*     "        Name of autoload file.
0545            DEFB 0                   File type is BASIC.
0546            DEFW 65535               Max. length.
0548            DEFW 65535
054A            DEFW 65535

THE 'DO NOT LOAD AUTOLOAD FILE' EXTENSION
When the system file was loaded by giving "RUN boot" the autoload file isn't loaded.

054C BOOT       DEFM "BOOT"

THE 'LOAD AUTOLOAD FILE' ROUTINE
This routine loads the autoload file, if wanted, after loading the system file.

0550 LOAD_AUTO  LD   A,%00010001         Drive 1 and DISCiPLE active.
0552            OUT  (31),A              Activate.
0554            LD   (#1DDA),A           Set current control port state.
0557            LD   A,#44               Signal 'System loaded'.
0559            LD   (#1DE4),A
055C            XOR  A
055D            LD   (#1ACF),A           Clear FLAGS3.
0560            LD   IX,#054C            Point to "BOOT".
0564            LD   B,4                 Four characters.
0566 RUN_BOOT?  RST  #28,NEXT_C_RAM      Fetch next character.
0567            AND  #DF                 Drop lower case bit.
0569            CP   (IX+0)              Compare it to "BOOT". Jump if one of
056C            JR   NZ,#0576,JUST_RUN   the characters doesn't match.
056E            INC  IX                  Next character of "BOOT".
0570            DJNZ #0566,RUN_BOOT?     Repeat for the next character.
0572            RST  #28,NEXT_C_RAM      All characters match, so don't load
0573            JP   #0419,END           autoload file. Just return to Spectrum.

0576 JUST_RUN   RST  #10,CALBAS          Clear the whole display.
0577            DEFW #0DAF,CL_ALL
0579            CALL #0460,TAKE_PRTR     If necessary takeover the "P" channel.
057C            CALL #19BE,MSG_3         Print DOS copyright message.
057F            CALL #0476,INIT_PRTR     If necessary initialize printer.
0582            LD   IX,#0536            Point to autoload file ufia.
0586            CALL #1539,HXFER         Transfer UFIA to DFCA.
0589            LD   A,#08               Search for a file with specified name and
058B            CALL #2993,JSCAN_CAT     type.
058E            JP   NZ,#2948,REP_20     "O.K. GDOS 3" if no autoload file found.
0591            CALL #09E2,SIGN_LOAD     Signal 'loading'.
0594            JP   #0E28,LD_VF_MR1     Load the file.
Previous Next Contents Index