mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 17:29:50 +00:00
Added a module that contains a small basic stub (SYS header) that starts
machine language code following it. Using this header, machine language programs linked to this stub can be started using RUN. git-svn-id: svn://svn.cc65.org/cc65/trunk@4861 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
e9ce157bb7
commit
62e39780bc
@ -64,6 +64,7 @@ S_OBJS = c_acptr.o \
|
||||
ctype.o \
|
||||
cvline.o \
|
||||
diskcmd.o \
|
||||
exehdr.o \
|
||||
filedes.o \
|
||||
filename.o \
|
||||
filevars.o \
|
||||
|
27
libsrc/cbm/exehdr.s
Normal file
27
libsrc/cbm/exehdr.s
Normal file
@ -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:
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user