Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theobori/i686-kit
🐧 Tools to manage some kernel features (Intel syntax only)
https://github.com/theobori/i686-kit
assembly font gdt i686 module osdev
Last synced: 30 days ago
JSON representation
🐧 Tools to manage some kernel features (Intel syntax only)
- Host: GitHub
- URL: https://github.com/theobori/i686-kit
- Owner: theobori
- License: mit
- Created: 2022-11-28T03:00:46.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-19T15:11:28.000Z (8 months ago)
- Last Synced: 2024-11-12T04:13:01.340Z (3 months ago)
- Topics: assembly, font, gdt, i686, module, osdev
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# i686 toolkit
## How to build and run ?
1. Install the dependencies
- Python >=3.11.0
2. You can just run the scripts in `scripts/`.
3. You can use install the Python module.```bash
python setup.py install
```## Usage example
#### Build and dump/save a GDT
```python
from ostools.gdt import Gdt
from ostools.gdt import GdtEntry
from ostools.gdt import GdtAccessByte
from ostools.gdt import GdtFlags
from ostools.gdt import CpuPrivilevela = Gdt() \
.add_entry(
GdtEntry("gdt_code")
.set_access_byte(
GdtAccessByte(0x9a)
)
.set_flags(GdtFlags())
) \
.add_entry(
GdtEntry("gdt_data")
.set_access_byte(
GdtAccessByte()
.set_p(True)
.set_dpl(CpuPrivilevel.RING0)
.set_s(True)
.set_rw(True)
)
.set_flags(0xcf)
) \
.add_end() \
.add_descriptor() \
.dump_asm() # or .save_asm("test.asm")
```#### Convert a Linux PC Screen Font to x86 assembly data
```python
from ostools.psf import Psfa = Psf("ter-v32n.psf") \
.parse() \
.save_asm("test.asm")
```## Scripts
The directory `scripts/` contains scripts intended to do metaprogramming. Most of them concern the 32 bits interrupts.