1 ; /*-------------------------------------------------------------------------
3 ; crtxstack.asm :- C run-time: setup xstack
5 ; This library is free software; you can redistribute it and/or modify it
6 ; under the terms of the GNU Library General Public License as published by the
7 ; Free Software Foundation; either version 2, or (at your option) any
10 ; This library is distributed in the hope that it will be useful,
11 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ; GNU Library General Public License for more details.
15 ; You should have received a copy of the GNU Library General Public License
16 ; along with this program; if not, write to the Free Software
17 ; Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 ; In other words, you are welcome to use, share and improve this program.
20 ; You are forbidden to forbid anyone else to use, share and improve
21 ; what you give them. Help stamp out software-hoarding!
22 ; -------------------------------------------------------------------------*/
34 .globl __start__xstack
41 ; Need to initialize in GSINIT1 in case the user's __sdcc_external_startup
44 mov __XPAGE,#(__start__xstack >> 8)
45 mov _spx,#__start__xstack
49 ; Need to initialize in GSINIT5 because __mcs51_genXINIT modifies __XPAGE
50 ; and __mcs51_genRAMCLEAR modifies _spx.
52 mov __XPAGE,#(__start__xstack >> 8)
53 mov _spx,#__start__xstack