1 1 ;--------------------------------------------------------
2 2 ; File Created by SDCC : FreeWare ANSI-C Compiler
3 3 ; Version 2.1.9Ga Sun Jan 16 17:31:28 2000
5 5 ;--------------------------------------------------------
7 7 ;--------------------------------------------------------
8 8 ; publics variables in this module
9 9 ;--------------------------------------------------------
11 11 ;--------------------------------------------------------
12 12 ; special function registers
13 13 ;--------------------------------------------------------
14 14 ;--------------------------------------------------------
15 15 ; special function bits
16 16 ;--------------------------------------------------------
17 17 ;--------------------------------------------------------
18 18 ; internal ram data
19 19 ;--------------------------------------------------------
21 21 ;--------------------------------------------------------
22 22 ; overlayable items in internal ram
23 23 ;--------------------------------------------------------
24 24 .area OSEG (OVR,DATA)
25 25 ;--------------------------------------------------------
26 26 ; indirectly addressable internal ram data
27 27 ;--------------------------------------------------------
29 29 ;--------------------------------------------------------
31 31 ;--------------------------------------------------------
33 33 ;--------------------------------------------------------
34 34 ; external ram data
35 35 ;--------------------------------------------------------
37 37 ;--------------------------------------------------------
38 38 ; global & static initialisations
39 39 ;--------------------------------------------------------
40 40 .area GSINIT (CODE)
41 41 ;--------------------------------------------------------
43 43 ;--------------------------------------------------------
45 0000 45 G$_gptrget$0$0 ==.
47 47 ; -----------------------------------------
48 48 ; function _gptrget
49 49 ; -----------------------------------------
60 60 ; save values passed
62 0001 C0 E0 62 push acc
64 64 ; depending on the pointer type
67 0005 60 0D 67 jz 00001$
69 0008 60 0F 69 jz 00002$
71 000B 60 0F 71 jz 00003$
73 000E 60 10 73 jz 00004$
75 75 ; any other value for type
77 0010 74 FF 77 mov a,#0xff
78 0012 80 0F 78 sjmp 00005$
80 80 ; Pointer to data space
83 0014 A8 82 83 mov r0,dpl ; use only low order address
85 0017 80 0A 85 sjmp 00005$
87 87 ; pointer to xternal data
90 0019 E0 90 movx a,@dptr
91 001A 80 07 91 sjmp 00005$
93 93 ; pointer to code area
97 001D 93 97 movc a,@a+dptr
98 001E 80 03 98 sjmp 00005$
100 100 ; pointer to xternal stack
103 0020 A8 82 103 mov r0,dpl
104 0022 E2 104 movx a,@r0
106 106 ; restore and return
110 0024 D0 E0 110 pop acc
113 0027 113 C$_gptrget.c$83$1$1 ==.
114 0027 114 XG$_gptrget$0$0 ==.
116 116 .area CSEG (CODE)