Compiler for 8086 Embedded System
Posted: Tue Jun 27, 2006 10:34 am
Hello,
I am studying Computer Engineering in college and I have recently designed and built an 8086 computer. I have also written an operating system for it in x86 assembly (a little over 3000 lines of code ). I was wondering if anyone knew about what tools I would need to start writing C code for this embedded system.
I have been playing around with Turbo C 2.01 to compile and link the code and a program called turbo-locator to make a ROMable BIN file from the executable.
For example I have been using a simple program called example.c to test this process. Example.c looks something like this:
int main()
{
asm mov AX, 0x1234; //not sure if this is the right syntax, going from the top of my head
return 0;
}
Unfortunately, dis-assembling the BIN file does not contain the inline-asm instruction, nor any instruction that looks like it would do the samething. I can tell that the x86 Reset Address is correctly inserted into the BIN file, however the program code does not look correct.
Does anyone have any information about writing ROMable C code for the 8086?
Thanks a lot,
Mike
P.S. A short video of my computer in action
http://youtube.com/watch?v=bhv8hGZ2fSQ&search=8086
I am studying Computer Engineering in college and I have recently designed and built an 8086 computer. I have also written an operating system for it in x86 assembly (a little over 3000 lines of code ). I was wondering if anyone knew about what tools I would need to start writing C code for this embedded system.
I have been playing around with Turbo C 2.01 to compile and link the code and a program called turbo-locator to make a ROMable BIN file from the executable.
For example I have been using a simple program called example.c to test this process. Example.c looks something like this:
int main()
{
asm mov AX, 0x1234; //not sure if this is the right syntax, going from the top of my head
return 0;
}
Unfortunately, dis-assembling the BIN file does not contain the inline-asm instruction, nor any instruction that looks like it would do the samething. I can tell that the x86 Reset Address is correctly inserted into the BIN file, however the program code does not look correct.
Does anyone have any information about writing ROMable C code for the 8086?
Thanks a lot,
Mike
P.S. A short video of my computer in action
http://youtube.com/watch?v=bhv8hGZ2fSQ&search=8086