* device/lib/pic16/libc/string/memcpypgm2ram.c,
* device/lib/pic16/libc/string/memcpyram2ram.c: fixed bug
1568836, thanks
Philipp Krause
* as/mcs51/asmain.c (asmbl, newdot): fixed problems with absolute areas
* as/link/mcs51/lkmem.c (summary2): reverted, do do count abs segments
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4398
4a8a32a2-be11-0410-ad9d-
d568d2c75423
* src/pic16/glue.c (pic16emitMaps),
* src/pic/glue.c (pic14emitMaps): hopefully fixed bug 1568779
* src/pic16/glue.c (pic16emitMaps),
* src/pic/glue.c (pic14emitMaps): hopefully fixed bug 1568779
+ * device/lib/gets.c: fixed bug 1568829,thanks Philipp Krause
+ * device/lib/pic16/libc/string/memcpypgm2ram.c,
+ * device/lib/pic16/libc/string/memcpyram2ram.c: fixed bug 1568836, thanks
+ Philipp Krause
+ * as/mcs51/asmain.c (asmbl, newdot): fixed problems with absolute areas
+ * as/link/mcs51/lkmem.c (summary2): reverted, do do count abs segments
2006-09-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
2006-09-30 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
- if((xp->a_flag & A_CODE) && !(xp->a_flag & A_ABS))
+ if (xp->a_flag & A_CODE)
Paged.End = xp->a_addr + xp->a_size;
}
Paged.End = xp->a_addr + xp->a_size;
}
- else if((xp->a_flag & A_XDATA) && !(xp->a_flag & A_ABS))
+ else if (xp->a_flag & A_XDATA)
p = optsdcc;
if ((c = getnb()) != 0) {
do {
p = optsdcc;
if ((c = getnb()) != 0) {
do {
uaf = 0;
uf = A_CON|A_REL;
if ((c = getnb()) == '(') {
uaf = 0;
uf = A_CON|A_REL;
if ((c = getnb()) == '(') {
case S_ORG:
if (dot.s_area->a_flag & A_ABS) {
outall();
case S_ORG:
if (dot.s_area->a_flag & A_ABS) {
outall();
+ dot.s_area->a_size += dot.s_addr - dot.s_org;
laddr = dot.s_addr = dot.s_org = absexpr();
} else {
err('o');
laddr = dot.s_addr = dot.s_org = absexpr();
} else {
err('o');
}
} else if (oap->a_flag & A_ABS) {
oap->a_addr = dot.s_org;
}
} else if (oap->a_flag & A_ABS) {
oap->a_addr = dot.s_org;
- oap->a_size = dot.s_addr - dot.s_org;
+ oap->a_size += dot.s_addr - dot.s_org;
+ dot.s_addr = dot.s_org = 0;
} else {
oap->a_addr = 0;
oap->a_size = dot.s_addr;
} else {
oap->a_addr = 0;
oap->a_size = dot.s_addr;
// a new overlay starts at 0, no fuzz
dot.s_addr = 0;
fuzz = 0;
// a new overlay starts at 0, no fuzz
dot.s_addr = 0;
fuzz = 0;
+ } else if (nap->a_flag & A_ABS) {
+ // a new absolute starts at org, no fuzz
+ dot.s_addr = dot.s_org;
+ fuzz = 0;
} else {
dot.s_addr = nap->a_size;
fuzz = nap->a_fuzz;
} else {
dot.s_addr = nap->a_size;
fuzz = nap->a_fuzz;
-char * gets(const char *str) {
- char *s=str;
char c;
unsigned int count=0;
char c;
unsigned int count=0;
putchar('\r');
putchar('\n');
*s=0;
putchar('\r');
putchar('\n');
*s=0;
default:
*s++=c;
count++;
default:
*s++=c;
count++;
under the terms of the GNU Library General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
under the terms of the GNU Library General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Library General Public License for more details.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this program; if not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
You should have received a copy of the GNU Library General Public License
along with this program; if not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
In other words, you are welcome to use, share and improve this program.
You are forbidden to forbid anyone else to use, share and improve
In other words, you are welcome to use, share and improve this program.
You are forbidden to forbid anyone else to use, share and improve
- what you give them. Help stamp out software-hoarding!
+ what you give them. Help stamp out software-hoarding!
-------------------------------------------------------------------------*/
#include <string.h>
-------------------------------------------------------------------------*/
#include <string.h>
-__data void *memcpypgm2ram (__data void *dst, void __code *src, size_t acount)
+__data void *memcpypgm2ram (__data void *dst, __code void *src, size_t acount)
- void *ret = dst; /* perhaps ret should be removed, use dst instead */
+ char __code *s = src;
+
/*
* copy from lower addresses to higher addresses
*/
/*
* copy from lower addresses to higher addresses
*/
/*-------------------------------------------------------------------------
/*-------------------------------------------------------------------------
- memcpypgm2ram.c - part of string library functions
+ memcpyram2ram.c - part of string library functions
Written By - Sandeep Dutta . sandeep.dutta@usa.net (1999)
Written By - Sandeep Dutta . sandeep.dutta@usa.net (1999)
under the terms of the GNU Library General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
under the terms of the GNU Library General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Library General Public License for more details.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this program; if not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
You should have received a copy of the GNU Library General Public License
along with this program; if not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
In other words, you are welcome to use, share and improve this program.
You are forbidden to forbid anyone else to use, share and improve
In other words, you are welcome to use, share and improve this program.
You are forbidden to forbid anyone else to use, share and improve
- what you give them. Help stamp out software-hoarding!
+ what you give them. Help stamp out software-hoarding!
-------------------------------------------------------------------------*/
#include <string.h>
-------------------------------------------------------------------------*/
#include <string.h>
-__data void *memcpyram2ram (__data void *dst, __data void *src, size_t acount)
+__data void *memcpyram2ram (__data void *dst, __data void *src, size_t acount)
- void __data *ret = dst; /* perhaps ret should be removed, use dst instead */
char __data *d = dst;
char __data *s = src;
char __data *d = dst;
char __data *s = src;
/*
* copy from lower addresses to higher addresses
*/
/*
* copy from lower addresses to higher addresses
*/