From 448bf813a965158420a1cd4a1958628d73d68b7a Mon Sep 17 00:00:00 2001 From: tecodev Date: Fri, 28 Oct 2005 09:42:56 +0000 Subject: [PATCH] * device/include/pic/p16f_common.inc: added common declarations * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3918 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 5 +++ device/include/pic/p16f_common.inc | 70 ++++++++++++++++++++++++++++++ src/pic/ralloc.c | 2 +- 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 device/include/pic/p16f_common.inc diff --git a/ChangeLog b/ChangeLog index 494ed1b2..bf0303dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-10-28 Raphael Neider + + * device/include/pic/p16f_common.inc: added common declarations + * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha + 2005-10-27 Maarten Brock * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found, diff --git a/device/include/pic/p16f_common.inc b/device/include/pic/p16f_common.inc new file mode 100644 index 00000000..6f0b03f4 --- /dev/null +++ b/device/include/pic/p16f_common.inc @@ -0,0 +1,70 @@ +; ----------------------------------------------- +; p16f_common.inc - definitions common to all 14 bit PIC devices +; +; Copyright (C) 2005 by Raphael Neider +; +; This file is part of the SDCC/pic14 library. +; This file is licensed under the terms of the LGPL, see LGPL +; for details. +; +; $Id$ + + extern STK00 + extern STK01 + extern STK02 + extern STK03 + extern STK04 + extern STK05 + extern STK06 + extern STK07 + extern STK08 + extern STK09 + extern STK10 + extern STK11 + extern STK12 + extern STK13 + extern STK14 + +; ----------------------------------------------- +; --- PIC14 special function registers +; ----------------------------------------------- + +INDF EQU 0x0000 +TMR0 EQU 0x0001 +PCL EQU 0x0002 +STATUS EQU 0x0003 +FSR EQU 0x0004 +PORTA EQU 0x0005 +PORTB EQU 0x0006 +; unimplemented EQU 0x0007 +EEDATA EQU 0x0008 +EEADR EQU 0x0009 +PCLATH EQU 0x000a +INTCON EQU 0x000b + +; INDF EQU 0x0080 +OPTION_REG EQU 0x0081 +; PCL EQU 0x0082 +; STATUS EQU 0x0083 +; FSR EQU 0x0084 +TRISA EQU 0x0085 +TRISB EQU 0x0086 +; unimplemented EQU 0x0087 +EECON1 EQU 0x0088 +EECON2 EQU 0x0089 +; PCLATH EQU 0x008a +; INTCON EQU 0x008b + +; ----------------------------------------------- +; --- useful symbolic constants +; ----------------------------------------------- + +C EQU 0 +DC EQU 1 +Z EQU 2 +nPD EQU 3 +nTO EQU 4 +RP0 EQU 5 +RP1 EQU 6 ; possibly unimplemented +IRP EQU 7 ; possibly unimplemented + diff --git a/src/pic/ralloc.c b/src/pic/ralloc.c index 5e385a07..65e14e03 100644 --- a/src/pic/ralloc.c +++ b/src/pic/ralloc.c @@ -484,7 +484,7 @@ void initStack(int base_address, int size) for(i = 0; iaddress = base_address; // Pseudo stack needs a fixed location that can be known by all modules -- 2.47.2