]> git.gag.com Git - fw/sdcc/blob - src/mcs51/main.c
Added initial stack direction support. Didnt convert xstack but are
[fw/sdcc] / src / mcs51 / main.c
1 /** @file main.c
2     mcs51 specific general functions.
3
4     Note that mlh prepended _mcs51_ on the static functions.  Makes
5     it easier to set a breakpoint using the debugger.
6 */
7 #include "common.h"
8 #include "main.h"
9 #include "ralloc.h"
10
11
12 void mcs51_assignRegisters (eBBlock **ebbs, int count);
13
14 static bool _mcs51_parseOptions(int *pargc, char **argv)
15 {
16     return FALSE;
17 }
18
19 static void _mcs51_finaliseOptions(void)
20 {
21 }
22
23 static void _mcs51_setDefaultOptions(void)
24 {    
25 }
26
27 static const char *_mcs51_getRegName(struct regs *reg)
28 {
29     if (reg)
30         return reg->name;
31     return "err";
32 }
33
34 /* Globals */
35 PORT mcs51_port = {
36     "mcs51",
37     "MCU 8051",                 /* Target name */
38     {   
39         "asx8051",              /* Assembler executable name */
40         "-plosgffc",            /* Options with debug */
41         "-plosgff",             /* Options without debug */
42         FALSE                   /* TRUE if the assembler requires an output name */
43     },
44     {
45         "aslink",               /* Linker executable name */
46     },
47     {
48         /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
49         1, 1, 2, 4, 1, 2, 3, 1, 4, 4
50     },
51     {
52         "XSEG    (XDATA)",
53         "STACK   (DATA)",
54         "CSEG    (CODE)",
55         "DSEG    (DATA)",
56         "ISEG    (DATA)",
57         "XSEG    (XDATA)",
58         "BSEG    (BIT)",
59         "RSEG    (DATA)",
60         "GSINIT  (CODE)",
61         "OSEG    (OVR,DATA)"
62     },
63     { 
64         +1, 1, 4, 1, 1
65     },
66     /* mcs51 has an 8 bit mul */
67     {
68         1
69     },
70     _mcs51_parseOptions,
71     _mcs51_finaliseOptions,
72     _mcs51_setDefaultOptions,
73     mcs51_assignRegisters,
74     _mcs51_getRegName
75 };