Le 16.03.2013 14:28, Borut Ražem a écrit : > This is probably because the parentheses are used for expressions. In > this case use of square brackets seems more appropriate to me. But I'm > only guessing...
Yes, but it's not hard to test if an expression is itself fully surrounded by parenthesis. A bit tricky, sure, but perfectly doable. > > P.S.: There is an other thing I want to mention here: there were many > attempts to add new targets to sdcc in it's history, but many of them > infamously failed. The problem is that adding a target is not a trivial > job: it requires a huge amount of work which is never finished. Many > developers started to work on new targets but then lost the interest or > didn't have enough time to continue. Such cases cause nothing else but > mess and problems to the whole sdcc project. So, if you have serious > intentions, we can integrate your work directly into the sdcc project. > If not it is better to create a totally separate project and eventually > merge it with the original sdcc if/when it is considered to be stable > enough. In this case your project should keep to be synchronized with > sdcc as much as possible in order to make the (potential) re-merge as > simple as possible. > > Good luck, > Borut Thanks. I understand perfectly, and to be honest it's really hard to be motivated for such a tast because all the motivation is indirect : Writing the compiler port itself is not interesting, it's the thing you will be able to do once you have a working compiler which are interesting. It's hard to keep such an indirect motivation to keep going on. Which is why I said that the only hope to do it seriously would be to do this for my master project, so that I would work full time on the project for the necessary time (up to 6 months). According to Denis Ritchie in his "C programming language" book, a compiler can be ported to another target in less than one month. (I don't know if that's true though). The problem is that the only existing freeware 6502 compiler so far, CC65, is really terrible at generating code. It is very reliable but the code is about 10 times less efficient than hand written assembly code, both speed and bytes-wise, which is not acceptable in most cases. There is no hope to improve it as it's calling convention is terrible (all arguments are passed trough a software stack that needs in average 7 instructions per access), which kills all hope to ever see this compiler do efficient code one day. Their argument is that 256-bytes of stack is not enough, which I completely disagree with. The other alternative than porting SDCC would be to do a radical change based on CC65, and start an unofficial build from there, with a better calling convention (using registers, obviously). However such an unofficial CC65 would be even harder to maintain than a SDCC port. The third solution would be to start an entire compiler suite from scratch, but I don't want to spend months writing code to parse C code, because this is not interesting ^^ Anyway thank you very much for your support. ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user