1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-05 21:29:03 +00:00
cc65/libsrc/atmos/bashdr.s
Greg King 09e50d433d * 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.
2014-11-09 06:32:11 -05:00

25 lines
868 B
ArmAsm

;
; 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: