I need C complier.

Discussion in 'C Programming' started by Quas.co.ua, Jun 20, 2006.

  1. Quas.co.ua

    Quas.co.ua Guest

    Hello all.

    I need your help.
    I need C compler to make demo of some technologie.

    This C compiler I need to write program
    which after run will be located in one segment of memory
    and it generates another code an write it into another (second) segment.
    And after some fragment of code is generated program from first segment
    runnes just generated code from second segment which may return in first
    serment.
    After code in first segment may change code in second segment and again run it,
    and vice versa

    Code in first sergment must be compiled from:
    1) C source code (I may not write such on assembler),
    2) must be loaded with operation system,
    3) and will not be changed dynamically.

    Code in second segment may not be loaded from file but generated and changed
    dynamically.

    This C compiler should:
    1) out 8086 code
    2) allow assembler parts
    3) be not a cross-compiler (should be runable under target OS best of all DOS;
    Bruce Evans' C compiler works under Linux if not only tell me how, pls.)
    4) should support intrrupt calls and handling.

    Also it was good if such compiler did not obligate legal restrictions
    on usage of its output.

    Do I have an alternetive to design my own C-compiler and entire OS?
    Please advice or may me clear what can I do.

    Thank you.

    --Quas

    P.S. Why do I need to do that shortly it looks such:
    1) Many years ago I used computer with 8-bit processor i8080.
    2) I analized execution of code and invented some principles automatical
    manipulation with machine code,
    called particularly for execution of code made for some hardware on another.
    3) Untill that computer went broken I did not try that on practice.
    4) Today I want write emulator of that obsolete computer on x86 with
    technological principles I invented or as people told in newsgroups I was not
    first who invented it.
    Quas.co.ua, Jun 20, 2006
    #1
    1. Advertising

  2. Quas.co.ua

    Dann Corbit Guest

    "Quas.co.ua" <> wrote in message
    news:...
    > Hello all.
    >
    > I need your help.
    > I need C compler to make demo of some technologie.
    >
    > This C compiler I need to write program
    > which after run will be located in one segment of memory
    > and it generates another code an write it into another (second) segment.
    > And after some fragment of code is generated program from first segment
    > runnes just generated code from second segment which may return in first
    > serment.
    > After code in first segment may change code in second segment and again
    > run it,
    > and vice versa
    >
    > Code in first sergment must be compiled from:
    > 1) C source code (I may not write such on assembler),
    > 2) must be loaded with operation system,
    > 3) and will not be changed dynamically.
    >
    > Code in second segment may not be loaded from file but generated and
    > changed
    > dynamically.
    >
    > This C compiler should:
    > 1) out 8086 code
    > 2) allow assembler parts
    > 3) be not a cross-compiler (should be runable under target OS best of all
    > DOS;
    > Bruce Evans' C compiler works under Linux if not only tell me how, pls.)
    > 4) should support intrrupt calls and handling.
    >
    > Also it was good if such compiler did not obligate legal restrictions
    > on usage of its output.
    >
    > Do I have an alternetive to design my own C-compiler and entire OS?
    > Please advice or may me clear what can I do.
    >
    > Thank you.


    Your question is actually several questions.
    Your problem is actually several problems.

    There are several open source C compilers available (GCC being the most
    famous). But exactly where something goes into memory is not a function of
    the compiler so much as it is a function of linker and loader.

    If you just want to create an emulator/simulator, then look at the SIMH
    project:
    http://simh.trailing-edge.com/

    Absolutely for sure, it will be a lot easier than what you are thinking
    about and do a better job too, if you make an emulator with that code base
    as a starting point.

    > --Quas
    >
    > P.S. Why do I need to do that shortly it looks such:
    > 1) Many years ago I used computer with 8-bit processor i8080.
    > 2) I analized execution of code and invented some principles automatical
    > manipulation with machine code,
    > called particularly for execution of code made for some hardware on
    > another.
    > 3) Untill that computer went broken I did not try that on practice.
    > 4) Today I want write emulator of that obsolete computer on x86 with
    > technological principles I invented or as people told in newsgroups I was
    > not
    > first who invented it.
    >
    Dann Corbit, Jun 20, 2006
    #2
    1. Advertising

  3. On Tue, 20 Jun 2006 22:11:37 +0300, Quas.co.ua wrote:
    > Hello all.
    >
    > I need your help.
    > I need C compler to make demo of some technologie.
    >
    > This C compiler I need to write program which after run will be located in
    > one segment of memory and it generates another code an write it into
    > another (second) segment. And after some fragment of code is generated
    > program from first segment runnes just generated code from second segment
    > which may return in first serment.
    > After code in first segment may change code in second segment and again
    > run it, and vice versa
    >
    > Code in first sergment must be compiled from: 1) C source code (I may not
    > write such on assembler), 2) must be loaded with operation system, 3) and
    > will not be changed dynamically.
    >
    > Code in second segment may not be loaded from file but generated and
    > changed dynamically.
    >

    <snip>

    If this doesn't provide all that you actually need, it's probably the
    best starting point:

    http://fabrice.bellard.free.fr/tcc/
    William Ahern, Jun 20, 2006
    #3
  4. Quas.co.ua

    Quas.co.ua Guest

    Dann Corbit wrote:
    >
    > "Quas.co.ua" <> wrote in message
    > news:...
    > > Hello all.
    > >
    > > I need your help.
    > > I need C compler to make demo of some technologie.
    > >
    > > This C compiler I need to write program
    > > which after run will be located in one segment of memory
    > > and it generates another code an write it into another (second) segment.
    > > And after some fragment of code is generated program from first segment
    > > runnes just generated code from second segment which may return in first
    > > serment.
    > > After code in first segment may change code in second segment and again
    > > run it,
    > > and vice versa
    > >
    > > Code in first sergment must be compiled from:
    > > 1) C source code (I may not write such on assembler),
    > > 2) must be loaded with operation system,
    > > 3) and will not be changed dynamically.
    > >
    > > Code in second segment may not be loaded from file but generated and
    > > changed
    > > dynamically.
    > >
    > > This C compiler should:
    > > 1) out 8086 code
    > > 2) allow assembler parts
    > > 3) be not a cross-compiler (should be runable under target OS best of all
    > > DOS;
    > > Bruce Evans' C compiler works under Linux if not only tell me how, pls.)
    > > 4) should support intrrupt calls and handling.
    > >
    > > Also it was good if such compiler did not obligate legal restrictions
    > > on usage of its output.
    > >
    > > Do I have an alternetive to design my own C-compiler and entire OS?
    > > Please advice or may me clear what can I do.
    > >
    > > Thank you.

    >
    > Your question is actually several questions.
    > Your problem is actually several problems.


    several probalems with several questions are several tasks together.

    >
    > There are several open source C compilers available (GCC being the most
    > famous). But exactly where something goes into memory is not a function of
    > the compiler so much as it is a function of linker and loader.


    But it deals with out code of compiler, and what must be compiled replaces
    funtionality of linker and loader and some unique together.

    >
    > If you just want to create an emulator/simulator, then look at the SIMH
    > project:
    > http://simh.trailing-edge.com/
    >
    > Absolutely for sure, it will be a lot easier than what you are thinking
    > about and do a better job too, if you make an emulator with that code base
    > as a starting point.


    I do not guess with above link emulator you'll be able to run x86 code on
    processor
    like Crusoe to fulfil positions of "new principle of personal computer
    performance calculation/measurment". :)

    >
    > > --Quas
    > >
    > > P.S. Why do I need to do that shortly it looks such:
    > > 1) Many years ago I used computer with 8-bit processor i8080.
    > > 2) I analized execution of code and invented some principles automatical
    > > manipulation with machine code,
    > > called particularly for execution of code made for some hardware on
    > > another.
    > > 3) Untill that computer went broken I did not try that on practice.
    > > 4) Today I want write emulator of that obsolete computer on x86 with
    > > technological principles I invented or as people told in newsgroups I was
    > > not
    > > first who invented it.
    > >
    Quas.co.ua, Jun 20, 2006
    #4
  5. Quas.co.ua

    Quas.co.ua Guest

    William Ahern wrote:
    >
    > On Tue, 20 Jun 2006 22:11:37 +0300, Quas.co.ua wrote:
    > > Hello all.
    > >
    > > I need your help.
    > > I need C compler to make demo of some technologie.
    > >
    > > This C compiler I need to write program which after run will be located in
    > > one segment of memory and it generates another code an write it into
    > > another (second) segment. And after some fragment of code is generated
    > > program from first segment runnes just generated code from second segment
    > > which may return in first serment.
    > > After code in first segment may change code in second segment and again
    > > run it, and vice versa
    > >
    > > Code in first sergment must be compiled from: 1) C source code (I may not
    > > write such on assembler), 2) must be loaded with operation system, 3) and
    > > will not be changed dynamically.
    > >
    > > Code in second segment may not be loaded from file but generated and
    > > changed dynamically.
    > >

    > <snip>
    >
    > If this doesn't provide all that you actually need, it's probably the
    > best starting point:
    >
    > http://fabrice.bellard.free.fr/tcc/

    I'll check it out.
    Quas.co.ua, Jun 20, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. whizkid
    Replies:
    1
    Views:
    937
    Tom Verbeure
    Nov 3, 2004
  2. Robert
    Replies:
    6
    Views:
    2,634
    Jim Michaels
    Feb 3, 2006
  3. Roy Yao
    Replies:
    4
    Views:
    370
    Roy Yao
    Aug 21, 2003
  4. Ygn
    Replies:
    3
    Views:
    356
    Jeff Flinn
    Jan 21, 2004
  5. Balaji
    Replies:
    3
    Views:
    10,074
Loading...

Share This Page