* Boot executable file loader coded by Fox/Taquart * Reads file from ATR prepared with X-BOOT. * Professional version - can load file under ROM. * Interrupts and ROM are disabled when running loaded program. opt h- org $480 bufr equ $400 128-byte buffer tp equ $43 Temporary byte vc equ $44 Start and end vectors (4 bytes) * Boot code boot dta b(0,1),a(boot,$e477) Boot header mva #0 $22f Make screen blank... mva #$52 $2c8 ... and pink ;) lda 20 Wait for VBLK cmp:req 20 mwa #rts $2e0 Set default run vector dta b({lda a:0}) Skip two bytes secrts sec Return with error rts rts mva:pha >rts $2e3 Set init address... mva:pha boot+$80 Exactly 128 bytes should be used * X-BOOT adds this block at the end of loaded file * It changes jmp ($2e2) to jmp ($2e0) opt h+ org init+1 dta l($2e0) end