Skip to main content

No project description provided

Project description

ASMpy is a python backend for nasm or yasm. It makes easy to writing operating systems.

I renamed these instructions:

jmp - jump mov - move hlt - halt int - interrupt cmp - compare

And added functions:

mkboot - alias for “times 510-($-$$) db 0” and “dw 0xAA55” (makes bootloader) printchar - prints a one symbol printchar_f - prints a one symbol without “mov AH, 0x0e” (before it you must call initvideo()) initvideo - alias for “mov AH, 0x0e” (tty mode) printtext - prints a text printtext_f - same as printtext

cmd - is a buffer

Example:

import asmpy

asmpy.printtext(“Hello world!!!”); asmpy.mkboot()

open(“hello_world.asm”,”w”).write(asmpy.cmd)

And you get a hello_world.asm file. Compile it with nasm or yasm:

nasm hello_world.asm

Run your program with qemu:

qemu-system-x86_64 hello_world

You get a Hello world on BIOS!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asmpy-1.0.1.tar.gz (2.0 kB view details)

Uploaded Source

File details

Details for the file asmpy-1.0.1.tar.gz.

File metadata

  • Download URL: asmpy-1.0.1.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.8

File hashes

Hashes for asmpy-1.0.1.tar.gz
Algorithm Hash digest
SHA256 99ab5f00ed049a5a9f3fdaa2e70e80db57b16249a843086d500826809990114a
MD5 d2efe894c0b6e267d5a06d669a656a42
BLAKE2b-256 86c9da45fbc50062523b250c21ec4d8594c11d452f2676bd6f4b0db385d7c3a6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page