Initial revision
[fw/sdcc] / device / lib / large / _gptrput.asm
1 ;--------------------------------------------------------
2 ; File Created by SDCC : FreeWare ANSI-C Compiler
3 ; Version 2.1.9Ga Sun Jan 16 17:31:28 2000
4
5 ;--------------------------------------------------------
6         .module _gptrput
7 ;--------------------------------------------------------
8 ; publics variables in this module
9 ;--------------------------------------------------------
10         .globl __gptrput
11 ;--------------------------------------------------------
12 ; special function registers
13 ;--------------------------------------------------------
14 ;--------------------------------------------------------
15 ; special function bits 
16 ;--------------------------------------------------------
17 ;--------------------------------------------------------
18 ; internal ram data
19 ;--------------------------------------------------------
20         .area   DSEG    (DATA)
21 ;--------------------------------------------------------
22 ; overlayable items in internal ram 
23 ;--------------------------------------------------------
24         .area   OSEG    (OVR,DATA)
25 ;--------------------------------------------------------
26 ; indirectly addressable internal ram data
27 ;--------------------------------------------------------
28         .area   ISEG    (DATA)
29 ;--------------------------------------------------------
30 ; bit data
31 ;--------------------------------------------------------
32         .area   BSEG    (BIT)
33 ;--------------------------------------------------------
34 ; external ram data
35 ;--------------------------------------------------------
36         .area   XSEG    (XDATA)
37 ;--------------------------------------------------------
38 ; global & static initialisations
39 ;--------------------------------------------------------
40         .area GSINIT (CODE)
41 ;--------------------------------------------------------
42 ; code
43 ;--------------------------------------------------------
44         .area CSEG (CODE)
45         G$_gptrput$0$0 ==.
46 ;       _gptrput.c 26
47 ;       -----------------------------------------
48 ;        function _gptrput
49 ;       -----------------------------------------
50 __gptrput:
51         ar2 = 0x02
52         ar3 = 0x03
53         ar4 = 0x04
54         ar5 = 0x05
55         ar6 = 0x06
56         ar7 = 0x07
57         ar0 = 0x00
58         ar1 = 0x01
59 ;       _gptrput.c 72
60                 xch      a,r0
61                 push     acc
62                 xch      a,r0
63                 push     acc
64             ;
65             ;   depending on the pointer type
66             ;
67                 mov     a,b
68                 jz      00001$
69                 dec     a
70                 jz      00002$
71                 dec     a
72                 jz      00003$
73                 dec     a
74                 jz      00004$
75                 pop     acc
76                 sjmp    00005$
77 ;
78 ;       store into near space
79 ;       
80  00001$:
81                 pop     acc
82                 mov     r0,dpl
83                 mov     @r0,a
84                 sjmp    00005$
85  00002$:
86                 pop     acc
87                 movx    @dptr,a
88                 sjmp    00005$
89  00003$:
90                 pop     acc    ; do nothing
91                 sjmp    00005$
92  00004$:
93                 pop     acc
94                 mov     r0,dpl
95                 movx    @r0,a
96  00005$:
97                 xch     a,r0
98                 pop     acc
99                 xch     a,r0
100 00101$:
101         C$_gptrput.c$73$1$1 ==.
102         XG$_gptrput$0$0 ==.
103         ret
104         .area   CSEG    (CODE)