-#else
-
-void
-_gptrget (char *gptr) _naked
-{
-/* This is the old version with pointers up to 16 bits. */
-
- gptr; /* hush the compiler */
-
- _asm
- ;
- ; depending on the pointer type acc. to SDCCsymt.h
- ;
- mov a,b ; 2
- jz 00001$ ; 0 near ; 2
- dec a ; 1
- jz 00002$ ; 1 far ; 2
- dec a ; 1
- jz 00003$ ; 2 code ; 2
- dec a ; 1
- jz 00004$ ; 3 pdata ; 2
- dec a ; 4 skip generic pointer ; 1
- dec a ; 1
- jz 00001$ ; 5 idata ; 2
- ;
- ; any other value for type
- ; return xFF
- mov a,#0xff ; 2
- ret ; 1
- ;
- ; Pointer to data space
- ;
- 00001$:
- push ar0 ; 2
- ;
- mov r0,dpl ; use only low order address ; 2
- mov a,@r0 ; 1
- ;
- pop ar0 ; 2
- ;
- ret ; 1
- ;
- ; pointer to xternal data
- ;
- 00002$:
- movx a,@dptr ; 1
- ret ; 1
-;
-; pointer to code area
-;
- 00003$:
- ; clr a is already 0
- movc a,@a+dptr ; 1
- ret ; 1
-;
-; pointer to xternal stack or pdata
-;
- 00004$:
-#if USE_PDATA_PAGING_REGISTER
- mov dph,__XPAGE ; __XPAGE (usually p2) holds high byte for pdata access
- movx a,@dptr
-#else
- push ar0 ; 2
- mov r0,dpl ; 2
- movx a,@r0 ; 1
- pop ar0 ; 2
-#endif
- ret ; 1
- ;===
- ;40 bytes
- _endasm ;
-}