Metadata-Version: 2.1
Name: pytocpu
Version: 0.1.0
Summary: A Python library for generating x86 machine code.
Author: Scripe
License: MIT
Project-URL: Homepage, https://github.com/Scripe3/pytocpu
Project-URL: Repository, https://github.com/Scripe3/pytocpu
Project-URL: Issues, https://github.com/Scripe3/pytocpu/issues
Keywords: assembler,assembly,machine-code,x86,compiler,binary
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Assemblers
Classifier: Topic :: Software Development :: Code Generators
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# pytocpu

**pytocpu** is a Python library for generating machine code programmatically.

> **Current status:** Alpha (0.1.0)

## Features

* Generate x86 machine code
* Save output as binary (`.bin`) files
* Get machine code as bytes
* Get machine code as hexadecimal text
* Lightweight and easy to use

## Installation

```bash
pip install pytocpu
```

## Example

```python
from pytocpu import X86

asm = X86()

asm.mov("eax", 123)
asm.nop()
asm.ret()

print(asm.hex())
asm.save("program.bin")
```

Output:

```
B8 7B 00 00 00 90 C3
```

## Supported Instructions

* `mov`
* `nop`
* `ret`

More instructions will be added in future releases.

## Roadmap

### Version 0.2.0

* x64 support

### Future

* ARM64 support
* RISC-V support
* More x86 instructions
* Labels and jumps
* Executable generation utilities

## License

MIT License.
