1

I am planning on making an OS from scratch using Python. However I only know how to make it by writing in Assembly.


Is it possible for me to still write the kernel in Assembly, convert it to a binary and during boot execute the Python script?

I hope this made sense

1 Answer 1

1

I think you would be interested in this project:

https://github.com/Maratyszcza/PeachPy

A comment from LtU:

PeachPy is a Python framework for writing high-performance assembly kernels.

PeachPy aims to simplify writing optimized assembly kernels while preserving all optimization opportunities of traditional assembly.

You can use the same code to generate assembly for Windows, Unix, and Golang assembly. The library handles the various ABIs automatically. I haven't seen >this cool project before.

Among the cool features is the ability to invoke the generated assembly as regular Python functions. Nice.

Sign up to request clarification or add additional context in comments.

1 Comment

Perfect!! That was what I was looking for - glad you understood my question.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.