muta...@gmail.com wrote:   
   > On Sunday, January 30, 2022 at 11:24:46 AM UTC+11, anti...@math.uni.wroc.pl   
   wrote:   
   >   
   > > > With modifications that I am willing to make, my   
   > > > FAT processing code and my memory manager   
   > > > were able to be compiled, meaning PDOS-generic   
   > > > could be built, which is my main interest.   
   > > >   
   > > > What features do you think are lacking in SubC?   
   >   
   > > First few that I checked:   
   > > - macros with parameters   
   >   
   > I run "pdcc -E" (also public domain, ships with PDOS)   
   > as a step prior to executing SubC, so I don't care about   
   > preprocessor limitations in SubC as #line is the only   
   > thing it ever sees.   
   >   
   > > - structs that contain other structs as members   
   > > - returning structs by value (compiler accepts this but generates   
   > > code which can not work)   
   > > - intializing structures within function   
   > > - initializing structure containing array   
   > > - passing structure by value as argument of function   
   > > - two dimensional arrays   
   >   
   > I haven't had a need for any of that stuff in my OS-related   
   > code so far, and can presumably work around it if I do. Or   
   > I may be able to modify SubC myself, as I have bought   
   > Nil's book and am studying the code. Some of it was too   
   > difficult for me to understand though, so I'm hoping no   
   > problem occurs there. I have noticed that I'm not very good   
   > with algorithms. Most code that I have written hasn't   
   > involved complex algorithms. And so far I haven't been able   
   > to find anyone willing to modify SubC even if I pay them.   
      
   Well, compiler algorithms were hard to invent. But now   
   they are described in books and it is not hard to   
   reproduce algorithm from a book.   
      
   Concerning SubC, it looks like rather bad start for   
   a full C compiler. There are design decisions that   
   make it more complex than necessary simultanously   
   limiting what it can do. In particular using two symbol   
   tables and acumulator model for code generation.   
      
   OTOH first Google hit on SubC is:   
      
   https://github.com/DoctorWkt/SubC   
      
   where a guy at the end is doing some modifications   
   to SubC...   
      
   --   
    Waldek Hebisch   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|