]> git.sur5r.net Git - cc65/blob - libsrc/atmos/bashdr.s
Merge pull request #504 from jedeoric/master
[cc65] / libsrc / atmos / bashdr.s
1 ;
2 ; 2010-11-14, Ullrich von Bassewitz
3 ; 2016-03-17, Greg King
4 ;
5 ; This module supplies a small BASIC stub program that uses CALL
6 ; to jump to the machine-language code that follows it.
7 ;
8
9         ; The following symbol is used by the linker config. file
10         ; to force this module to be included into the output file.
11         .export __BASHDR__:abs = 1
12
13
14 .segment        "BASHDR"
15
16         .addr   Next
17         .word   .version        ; Line number
18         .byte   $BF,'#'         ; CALL token, mark number as hexadecimal
19         .byte   <(Start >> 8      ) + '0' + (Start >> 8       > $09) * $07
20         .byte   <(Start >> 4 & $0F) + '0' + (Start >> 4 & $0F > $09) * $07
21         .byte   <(Start      & $0F) + '0' + (Start      & $0F > $09) * $07
22         .byte   $00             ; End of BASIC line
23 Next:   .addr   $0000           ; BASIC program end marker
24 Start:
25
26 ; ------------------------------------------------------------------------
27
28 ; This padding is needed by a bug in the ROM.
29 ; (The CLOAD command starts BASIC's variables table on top of the last byte
30 ; that was loaded [instead of at the next address].)
31
32 .segment        "BASTAIL"
33
34         .byte   0