6ba7686aea72305972be1486695eabb51ed6c156
[fw/sdcc] / support / regression / ports / z80 / support.asm
1         ;; ****************************************
2         ;; Beginning of module
3         .title  "Test runtime"
4         .module Runtime
5
6         .globl _main
7         .STACK = 0xE000
8
9         .area   _INIT (ABS)
10         .org    0x0
11         jp      0x100
12                                 
13         .org    0x100
14 __init::
15         ;; Beginning of the code
16         DI                      ; Disable interrupts
17         LD      SP,#.STACK
18         ;; Call the main function
19         CALL    _main
20         ld      a, #0
21         out     (1), a
22
23 __putchar::
24         ld      a,l
25         out     (0xff),a
26         ret
27         
28         .org    0x200
29         .area _HOME
30         .area _CODE
31         .area _OVERLAY
32         .area _ISEG
33         .area _BSEG
34         .area _XSEG
35         .area _GSINIT
36         .area _GSFINAL
37         .area _GSINIT
38         .area _CODE
39
40         .area _DATA