[Coco] More optimizations for the CMOC compiler
Kip Koon
computerdoc at sc.rr.com
Mon Aug 10 02:28:39 EDT 2015
Hi Pierre,
I downloaded cmoc v0.1.12 and when I compiled it with gcc, I got the same error message as before so at your suggestion. I changed
#if defined(__unix) || (defined(__APPLE__) && defined(TARGET_OS_MAC)) #include <unistd.h> #endif
to just
#include <unistd.h>
which did not compile either. Then I tried adding
#include <sys/select.h>
Immediately after it and that DID compile! Whoo-Hoo! So now I ran
cmoc
to see if I got an input file error which I did. Then I ran
cmoc -h
and the cmoc command help information displayed. Short of compiling an actual C program, I think cmoc is running beautifully on Cygwin 64-bits! I'll play with some C programs and see what happens. That you for helping me get cmoc to compile. I'll be glad to help you with any cygwin users. Personally, I think Cygwin is great! Whenever I install Cygwin, I always install everything so I don't have to be concerned with missing any needed programs. That's my first suggestion to any Cygwin user. Eventually, I'd like to see CMOC become a full ANSI C 6809 Cross-Compiler! No rush though. I know this is a labor of love and a big project. Thank you for wanting to provide this C to 6809 machine code cross-compiler to the Coco Community. We've been needing a good C to 6809 machine code cross-compiler.
One suggestion though. If I remember correctly, Motorola S-Records is not a binary output file option. Could you add that feature. When I finally get my Kipper SBC running, any monitor program I choose to run will expect 6809 binary programs to be in Motorola S-Record format. I would it appreciate very much if you could add this needed feature. Anyone in the Motorola world expects to get binary files in Motorola S-Record format. Outside of that, I have no further ideas at this time. Well, I'll let you get back to developing CMOC! Take care my friend.
Kip Koon
computerdoc at sc.rr.com
http://www.cocopedia.com/wiki/index.php/Kip_Koon
> -----Original Message-----
> From: Coco [mailto:coco-bounces at maltedmedia.com] On Behalf Of Pierre Sarrazin
> Sent: Sunday, August 09, 2015 2:25 PM
> To: CoCoList for Color Computer Enthusiasts
> Subject: Re: [Coco] More optimizations for the CMOC compiler
>
> Hi Kip,
>
> Dixit Kip Koon (2015-08-09 00:34):
> > Hi Pierre,
> > I just tried to compile CMOC and received the following messages.
> >
> > main.cc: In function ‘Byte getcharifavail()’:
> > main.cc:91:57: error: ‘select’ was not declared in this scope
> > if (select(STDIN_FILENO + 1, &readset, NULL, NULL, NULL) <= 0)
> >
> > What am I doing wrong? I'm running Cygwin x64.
>
> An #include statement is missing to declare select() on a Cygwin system. At the top of src/usim-0.91-cmoc/main.cc, you could try
> changing this:
>
> #if defined(__unix) || (defined(__APPLE__) && defined(TARGET_OS_MAC)) #include <unistd.h> #endif
>
> to just #include <unistd.h>. If that doesn't work, try adding #include <sys/select.h>.
>
> If that still does not compile, replace the contents of getcharifavail() with "return 0;", as a workaround, because you don't need USim
> anyway: it's just there to run CMOC's self-tests.
>
> > If there are any specific tests you would like me to do as you further
> > develop your C Cross-Computer, just let me know. I would like be a
> > tester for CMOC.
>
> For starters, you can help me support Cygwin. That will be useful to those who are not in a position to run CMOC under GNU/Linux.
> (Please tell me which alternative above worked for you: I'll integrate it in the next version.)
>
> Aside from that, just have fun writing C programs for the CoCo, and report any bugs or usability issues to me, and I'll be glad to check
> them out.
>
> My hope is that CMOC will help more people publish practical programs for the CoCo, like games, utilities, etc. That will be the true
> measure of CMOC's usefulness.
>
> > You may have to "hold my hand" as I learn the language so I can do the
> > tests like you wish though. Thanks for writing this compiler.
> > I'm sure I will enjoy using it once I get over the learning curve.
> > :) Take care my friend.
>
> You're welcome!
>
> By the way, I've already published CMOC 0.1.12, after receiving bug reports from a user:
>
> http://sarrazip.com/dev/cmoc.html
>
> --
> Pierre Sarrazin <sarrazip @ sarrazip . com>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list