gpt4 book ai didi

python - 从 Assembly 执行 python 脚本

转载 作者:太空宇宙 更新时间:2023-11-03 17:24:01 25 4
gpt4 key购买 nike

我计划使用Python从头开始制作一个操作系统。但是我只知道如何通过 Assembly 编写。

<小时/>

我是否仍然可以在 Assembly 中编写内核,将其转换为二进制文件并在启动期间执行 Python 脚本?

我希望这是有道理的

最佳答案

我认为您会对这个项目感兴趣:

https://github.com/Maratyszcza/PeachPy

来自 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.

关于python - 从 Assembly 执行 python 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32813241/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com