|
-
Mar 1st, 2001, 09:06 PM
#1
Thread Starter
Hyperactive Member
I know it's possible to make a program that compiles things into .exe's but does anyone know how to do this? If so, can you send me some source please? Thanks.
[vbcode]
' comment
Rem remark
[/vbcode]
-
Mar 1st, 2001, 09:14 PM
#2
Frenzied Member
I think it would be a lot of source code. You need to know the assembly language for the machine your compiler will run on, and you need to establish how a C (or C++) statement is represented in assembly instructions. You compile the C code down to assembly, then assemble the assembly code to binary machine code.
It's far more complicated than that when it comes to optimisations though. You also need error checking to make sure it's valid code.
Harry.
"From one thing, know ten thousand things."
-
Mar 1st, 2001, 09:32 PM
#3
1. Yes a compiler can be made with any language and any compiler.
2. I found some very good text on how to make one in pascal, and it was actually kind of easy to follow, but i dont have it anymore sorry. If i can find it, ill give you the link.
-
Mar 2nd, 2001, 01:06 PM
#4
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|