diff --git a/libsrc/cbm/Makefile b/libsrc/cbm/Makefile index a012eb3ee..a650381df 100644 --- a/libsrc/cbm/Makefile +++ b/libsrc/cbm/Makefile @@ -64,6 +64,7 @@ S_OBJS = c_acptr.o \ ctype.o \ cvline.o \ diskcmd.o \ + exehdr.o \ filedes.o \ filename.o \ filevars.o \ diff --git a/libsrc/cbm/exehdr.s b/libsrc/cbm/exehdr.s new file mode 100644 index 000000000..541d2e583 --- /dev/null +++ b/libsrc/cbm/exehdr.s @@ -0,0 +1,27 @@ +; +; Ullrich von Bassewitz, 2010-11-14 +; +; This module supplies a small BASIC stub program that jumps to the machine +; language code that follows it using SYS. +; + + ; The following symbol is used by linker config to force the module + ; to get included into the output file + .export __EXEHDR__: absolute = 1 + +.segment "EXEHDR" + + .addr Next + .word .version ; Line number + .byte $9E ; SYS token + .byte <(((Start / 1000) .mod 10) + '0') + .byte <(((Start / 100) .mod 10) + '0') + .byte <(((Start / 10) .mod 10) + '0') + .byte <(((Start / 1) .mod 10) + '0') + .byte $00 ; End of BASIC line +Next: .word 0 ; BASIC end marker +Start: + + + +