简体   繁体   中英

Execute python script from Assembly

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM