2 ; Ullrich von Bassewitz, 2010-11-14
4 ; This module supplies a small BASIC stub program that jumps to the machine
5 ; language code that follows it using SYS.
8 ; The following symbol is used by linker config to force the module
9 ; to get included into the output file
10 .export __EXEHDR__: absolute = 1
15 .word .version ; Line number
17 ; .byte <(((Start / 10000) .mod 10) + '0')
18 .byte <(((Start / 1000) .mod 10) + '0')
19 .byte <(((Start / 100) .mod 10) + '0')
20 .byte <(((Start / 10) .mod 10) + '0')
21 .byte <(((Start / 1) .mod 10) + '0')
22 .byte $00 ; End of BASIC line
23 Next: .word 0 ; BASIC end marker
26 ; If the start address is larger than 4 digits, the header generated above
27 ; will not contain the highest digit. Instead of wasting one more digit that
28 ; is almost never used, check it at link time and generate an error so the
29 ; user knows something is wrong.
31 .assert (Start < 10000), error, "Start address too large for generated BASIC stub"