OpenCores
URL https://opencores.org/ocsvn/tv80/tv80/trunk

Subversion Repositories tv80

[/] [tv80/] [branches/] [restruc1/] [tests/] [bintr_crt0.asm] - Blame information for rev 114

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 32 ghutchis
        ;; Generic crt0.s for a Z80
2
        .module bintr_crt0
3
        .globl  _main
4
        .globl  _isr
5
 
6
        .area _HEADER (ABS)
7
        ;; Reset vector
8
        .org    0
9
        jp      init
10
 
11
        .org    0x08
12
        reti
13
        .org    0x10
14
        reti
15
        .org    0x18
16
        reti
17
        .org    0x20
18
        reti
19
        .org    0x28
20
        reti
21
        .org    0x30
22
        reti
23
        .org    0x38
24
        di
25
        call _isr
26
        ei
27
        reti
28
 
29
        .org    0x100
30
init:
31
        ;; Stack at the top of memory.
32
        ld      sp,#0xffff
33
 
34
    ;; enable interrupts
35
        im      1
36
        ei
37
 
38
        ;; Initialise global variables
39
        call    _main
40
        jp      _exit
41
 
42
        ;; Ordering of segments for the linker.
43
        .area   _HOME
44
        .area   _CODE
45
        .area   _GSINIT
46
        .area   _GSFINAL
47
 
48
        .area   _DATA
49
        .area   _BSS
50
        .area   _HEAP
51
 
52
        .area   _CODE
53
__clock::
54
        ld      a,#2
55
        rst     0x08
56
        ret
57
 
58
_exit::
59
        ;; Exit - special code to the emulator
60
        ld      a,#0
61
        rst     0x08
62
1$:
63
        halt
64
        jr      1$
65
 
66
        .area   _GSINIT
67
gsinit::
68
 
69
        .area   _GSFINAL
70
        ret

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.