I am following the Baking Pi Raspberry Pi ASM OS tutorial here, and I thought that it would be cool if I could create a compiler/runner for like, BASIC or a language I create. I don't have the skill yet to create something like that, so hopefully I can get an answer that will help point me down the right path.

My question is, can I (I'm guessing with a bit of work, nothings free/easy when it comes to low-level programming) get my ASM OS (that I created following the the tutorial, following the tut word-for-word) to run programs that run on the Raspberry Pi in Raspbian? Like a Python or BASIC interpreter or a simple text editor?

It should work, I'm thinking, because I'm still using the same architecture (still the same ARM SOC) as what runs Raspbian, so shouldn't the same programs work, even if I'm not using the same OS?

I'm thinking that I would have to create a program/system file that allows me to load a C/C++/C#/etc. program into memory and execute it, but I'm very new to this low-level programming world so I don't where or what to look for.

  • 2
    "so shouldn't the same programs work, even if I'm not using the same OS" -> Not a chance. I wouldn't approach coding an OS with something general purpose in mind, it will take you years and years. This would be a big thesis project for a team of PhD students.
    – goldilocks
    Commented Sep 24, 2013 at 9:31
  • 1
    I kinda figured. Oh well, this project goes the back burner for rainy days. :( Commented Sep 24, 2013 at 13:34

1 Answer 1


Unfortunately things are not as easy as you described. All the applications you gave as an example (a compiler, an editor, an interpreter, etc) are quite complicated and they are not only doing computation but also interact quite heavily with the OS. They need a way to use files, interact with user (like keyboard input, screen output), expect a concept of "process", etc. All this is very OS dependent.

Think of it this way - if it was so simple, would it be so hard to run for example Windows applications on Linux (providing they both run on x86 architecture)? What you would like to do is even more complicated than that since when porting some application from one OS to the other, you already has OS. In your case, what you have is really far from being even simple OS.

What you can do is to provide C language (or in fact any other language) runtime that will allow running programs written in this language. But keep in mind that while it may be easy to write runtime environment, porting libraries, even standard ones, may be extremely difficult.

That being said, you can find a lot of useful information on dwelch67 github, you may want to take a look at DexOS and see what you can find on bare metal section of raspberrypi forum.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.