* 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>
xp=areap;
while (xp)
{
- if((xp->a_flag & A_CODE) && !(xp->a_flag & A_ABS))
+ if (xp->a_flag & A_CODE)
{
if(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)
{
if(xp->a_size)
{
lmode = SLIST;
break;
- case S_OPTSDCC:
+ case S_OPTSDCC:
p = optsdcc;
if ((c = getnb()) != 0) {
do {
break;
case S_DAREA:
- getid(id, -1);
+ getid(id, -1);
uaf = 0;
uf = A_CON|A_REL;
if ((c = getnb()) == '(') {
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');
}
} 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;
// 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;
#include <stdio.h>
-char * gets(const char *str) {
- char *s=str;
+char * gets(char *s) {
char c;
unsigned int count=0;
putchar('\r');
putchar('\n');
*s=0;
- return str;
+ return s;
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.
-
+
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.
-
+
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>
-__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 __data *d = dst;
- char *s = src;
-
+ char __code *s = src;
+
/*
* copy from lower addresses to higher addresses
*/
*d++ = *s++;
}
- return(ret);
+ return(dst);
}
/*-------------------------------------------------------------------------
- memcpypgm2ram.c - part of string library functions
+ memcpyram2ram.c - part of string library functions
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.
-
+
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.
-
+
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>
-__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;
-
+
/*
* copy from lower addresses to higher addresses
*/
*d++ = *s++;
}
- return(ret);
+ return(dst);
}