Hobby Programming Language
Posted: Tue Dec 11, 2012 7:47 pm
Hello everyone!
I got interested in OS development some time ago, primarily tinkering in assembly language. More recently, I've found myself experimenting with compiler design, a topic that may very well have eclipsed my interest in operating systems (heresy around here, I'm sure ). I thought writing a tiny, low-level language (in some respects, a high-level assembly given that it's not portable) that compiles to x86 assembly code would be a fun project, and I'd like to share the product of my work thus far with you. If anyone has any questions, suggestions, or finds a use for it in a separate project, I'd love to hear about it!
Some features of the language (dubbed "U"):
* Simple syntax - This is largely due to it being a hobby project, but this could make it a good candidate for teaching the basics of how compilers and assembly code work. It also lacks some of C's idiosyncrasies (header files, etc).
* Compiles to 16-bit Intel x86 assembly code - The output can be read by a human (again, potentially good for learners) and doesn't require knowledge of a linker (executables are, of course, created with an assembler like NASM or FASM).
* Inline assembly - the language makes incorporating assembly code into the main program flow quite simple (since I'm not shooting for portability)
You can download the source and documentation, here:
https://github.com/upcrob/u-programming-language
Again, questions/comments are welcome (just post below). I can't promise I'll have time to implement features if they get requested, but I'm open to hearing about them. Keep in mind, I'm not trying to create any sort of "C killer" - if you're writing production code or an OS that needs to exit real mode, this language isn't for you. Nonetheless, I'd love to see it used in a small OS project like MikeOS, but we'll see what happens.
Have fun!
I got interested in OS development some time ago, primarily tinkering in assembly language. More recently, I've found myself experimenting with compiler design, a topic that may very well have eclipsed my interest in operating systems (heresy around here, I'm sure ). I thought writing a tiny, low-level language (in some respects, a high-level assembly given that it's not portable) that compiles to x86 assembly code would be a fun project, and I'd like to share the product of my work thus far with you. If anyone has any questions, suggestions, or finds a use for it in a separate project, I'd love to hear about it!
Some features of the language (dubbed "U"):
* Simple syntax - This is largely due to it being a hobby project, but this could make it a good candidate for teaching the basics of how compilers and assembly code work. It also lacks some of C's idiosyncrasies (header files, etc).
* Compiles to 16-bit Intel x86 assembly code - The output can be read by a human (again, potentially good for learners) and doesn't require knowledge of a linker (executables are, of course, created with an assembler like NASM or FASM).
* Inline assembly - the language makes incorporating assembly code into the main program flow quite simple (since I'm not shooting for portability)
You can download the source and documentation, here:
https://github.com/upcrob/u-programming-language
Again, questions/comments are welcome (just post below). I can't promise I'll have time to implement features if they get requested, but I'm open to hearing about them. Keep in mind, I'm not trying to create any sort of "C killer" - if you're writing production code or an OS that needs to exit real mode, this language isn't for you. Nonetheless, I'd love to see it used in a small OS project like MikeOS, but we'll see what happens.
Have fun!