]> git.sur5r.net Git - cc65/blob - libsrc/common/_heap.s
Removed unused stuff
[cc65] / libsrc / common / _heap.s
1 ;
2 ; Ullrich von Bassewitz, 03.06.1998
3 ;
4 ; Heap variables and initialization.
5 ;
6
7         .export         __horg, __hptr, __hend, __hfirst, __hlast
8         .constructor    initheap, 24
9         .import         __BSS_RUN__, __BSS_SIZE__, __stksize
10         .importzp       sp
11
12 .data
13
14 __horg:
15         .word   __BSS_RUN__+__BSS_SIZE__        ; Linker calculates this symbol
16 __hptr:
17         .word   __BSS_RUN__+__BSS_SIZE__        ; Dito
18 __hend:
19         .word   __BSS_RUN__+__BSS_SIZE__
20 __hfirst:
21         .word   0
22 __hlast:
23         .word   0
24
25
26 ; Initialization. Will be called from startup!
27
28 .code
29
30 initheap:
31         sec
32         lda     sp
33         sbc     __stksize
34         sta     __hend
35         lda     sp+1
36         sbc     __stksize+1
37         sta     __hend+1
38         rts
39