By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,917 Members | 1,335 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,917 IT Pros & Developers. It's quick & easy.

I need C complier.

P: n/a
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.

Jun 20 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"Quas.co.ua" <qu**@supermail.com.ua> wrote in message
news:44***************@supermail.com.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.
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.

Jun 20 '06 #2

P: n/a
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/
Jun 20 '06 #3

P: n/a
Dann Corbit wrote:

"Quas.co.ua" <qu**@supermail.com.ua> wrote in message
news:44***************@supermail.com.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.
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.

Jun 20 '06 #4

P: n/a
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.

Jun 20 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.