I need C complier.

Q

Quas.co.ua

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.
 
D

Dann Corbit

Quas.co.ua said:
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.
 
W

William Ahern

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/
 
Q

Quas.co.ua

Dann said:
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". :)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top