* Changed the way that Atmos programs are started.
- Put a BASIC-language stub at the beginning. - Removed the Autostart flag. Those changes make it easy to give command-line arguments to a program. * Made the Atmos configure file accept a special symbol definition on ld65's command line. We can use "__RAMEND__" to increase the amount of RAM that's available to programs.
This commit is contained in:
24
libsrc/atmos/bashdr.s
Normal file
24
libsrc/atmos/bashdr.s
Normal file
@@ -0,0 +1,24 @@
|
||||
;
|
||||
; 2010-11-14, Ullrich von Bassewitz
|
||||
; 2014-09-06, Greg King
|
||||
;
|
||||
; This module supplies a small BASIC stub program that uses CALL
|
||||
; to jump to the machine-language code that follows it.
|
||||
;
|
||||
|
||||
; The following symbol is used by the linker config. file
|
||||
; to force this module to be included into the output file.
|
||||
.export __BASHDR__:abs = 1
|
||||
|
||||
|
||||
.segment "BASHDR"
|
||||
|
||||
.addr Next
|
||||
.word .version ; Line number
|
||||
.byte $BF,'#' ; CALL token, mark number as hexadecimal
|
||||
.byte <(Start >> 8 ) + '0' + (Start >> 8 > $09) * $07
|
||||
.byte <(Start >> 4 & $0F) + '0' + (Start >> 4 & $0F > $09) * $07
|
||||
.byte <(Start & $0F) + '0' + (Start & $0F > $09) * $07
|
||||
.byte $00 ; End of BASIC line
|
||||
Next: .addr $0000 ; BASIC program end marker
|
||||
Start:
|
||||
Reference in New Issue
Block a user