summaryrefslogtreecommitdiffstats
path: root/sw/z80/crt0.s.old
blob: f3bf8e85ad2b307674ef366c5f934dd8eadf455d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
    .module crt0
    .globl  _main

    .area _HEADER (ABS)
;; reset vector
    .org 0x0000 
    jp    init
    
    .org 0x0100

init:
;; Stack at the top of memory.
    ld    sp,#0xffff                

    ;; initialise global variables
    call gsinit
    call _main
    jp   _exit

    ;; Ordering of segments for the linker.
    .area _HOME
    .area _CODE
    .area     _GSINIT
    .area     _GSFINAL

    .area _DATA
    .area     _BSS
    .area     _HEAP

    .area     _CODE
__clock::
    ret
    
_exit::
    ret
    
    .area     _GSINIT

gsinit::    

.area _GSFINAL
    ret