Name | APasm JSON |
Version |
1.0.16.1
JSON |
| download |
home_page | None |
Summary | Avalon Python Assembly (APasm) - a library for coding and supporting Assembly in Python |
upload_time | 2025-08-17 13:34:39 |
maintainer | None |
docs_url | None |
author | RandomX |
requires_python | >=3.8 |
license | MIT License
Copyright (c) 2025 RandomX
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
assembly
python
binary
apasm
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# APasm
## What is APasm?
- APasm is a library for coding and supporting Assembly in Python and you can directly interact with pure binary. APasm stands for "Avalon Python Assembly", notice something weird in the word "Avalon"? Its the library main name. APasm lastest version is 1.0. APasm supports basic Assembly instructions such as:
- Instruction | Notes
1. ADD | Basic addition
2. ADC | Add with carry
3. CLI | Clear interrupt flag
4. HLT | Halt CPU
5. JMP | Jump
6. MOV | Move data
7. OR | Bitwise OR
8. PUSH | Segment registers only
9. POP | Segment registers only
## Requirements
- [](https://www.python.org/)
- [](https://www.qemu.org/) (or another emulator)
- [](https://mh-nexus.de/en/hxd/) (optional)
## Example Usage
```python
from APasm import * # or the main loader file name
setah = MOV_imm("ah", 0x0E) # call BIOS print
setal = MOV_imm("al", 0x64) # print "d"
call = BIOSCALL_10h()
total = setah + setal + call
bootloader = total + cli() + hlt() + jmp(-2) + BootPad()
with open("Bootloader.bin", "wb") as f:
f.write(bootloader)
```
## APasm APIs
- APasmEnv - Create an APasm Development Environment(class)
- QEMU - Use Subproccess to test your bootloader in QEMU(class)
## APasmEnv Usage
```python
from APasm import * # or the main loader file name
env = APasmEnv( # your code will be packaged automatically
MOV_imm("ah", 0x0E),
MOV_imm("al", 0x64), # print d
BIOSCALL_10h()
)
env.Push()
# the Push function create a dir named APasmEnv Output and your file will be created right here
# you can edit the dir param to your dir you want
# NOTE: if you don't rename your file to something then the default file name will be Untitled APasm Output File No{rand.randint(0,1000000)} which is generic
# the ClearOutPutDir function will clear APasm output directory or D:/APasmEnv Output/<files>
# CAUTION: ALL FILE INSIDE D:/APasmEnv Output WILL BE UTTERLY DELETED!
```
## QEMU Usage
```python
from AnPasm import *
emulator = QEMU()
emulator.run("D:/myBootloader.bin") # onPath: True. Default Type: qemu-system-x86_64. Default External CMD: -fda. `*aargs` exists purely for passing raw subprocess flags without breaking the API.
emulator.run("D:/myBootloader.bin", onPath=False, QEMUPath="C:/Users/MyUserName/QEMU/<your QEMU type choice>.exe")
```
## License
- [](https://github.com/RandomX42069/APasm/blob/main/LICENSE)
Raw data
{
"_id": null,
"home_page": null,
"name": "APasm",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "assembly, python, binary, apasm",
"author": "RandomX",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/0f/fc/e2d1f268c6141ece6238f49f3b7704635074273577b77a75f2602879c258/apasm-1.0.16.1.tar.gz",
"platform": null,
"description": "# APasm\r\n\r\n## What is APasm?\r\n- APasm is a library for coding and supporting Assembly in Python and you can directly interact with pure binary. APasm stands for \"Avalon Python Assembly\", notice something weird in the word \"Avalon\"? Its the library main name. APasm lastest version is 1.0. APasm supports basic Assembly instructions such as:\r\n- Instruction | Notes \r\n1. ADD | Basic addition \r\n2. ADC | Add with carry \r\n3. CLI | Clear interrupt flag \r\n4. HLT | Halt CPU \r\n5. JMP | Jump \r\n6. MOV | Move data \r\n7. OR | Bitwise OR \r\n8. PUSH | Segment registers only \r\n9. POP | Segment registers only \r\n\r\n## Requirements\r\n- [](https://www.python.org/)\r\n- [](https://www.qemu.org/) (or another emulator)\r\n- [](https://mh-nexus.de/en/hxd/) (optional)\r\n\r\n## Example Usage\r\n```python\r\nfrom APasm import * # or the main loader file name\r\n\r\nsetah = MOV_imm(\"ah\", 0x0E) # call BIOS print\r\nsetal = MOV_imm(\"al\", 0x64) # print \"d\"\r\ncall = BIOSCALL_10h()\r\n\r\ntotal = setah + setal + call\r\nbootloader = total + cli() + hlt() + jmp(-2) + BootPad()\r\n\r\nwith open(\"Bootloader.bin\", \"wb\") as f:\r\n f.write(bootloader)\r\n```\r\n## APasm APIs\r\n- APasmEnv - Create an APasm Development Environment(class)\r\n- QEMU - Use Subproccess to test your bootloader in QEMU(class)\r\n\r\n## APasmEnv Usage\r\n```python\r\nfrom APasm import * # or the main loader file name\r\nenv = APasmEnv( # your code will be packaged automatically\r\n MOV_imm(\"ah\", 0x0E),\r\n MOV_imm(\"al\", 0x64), # print d\r\n BIOSCALL_10h() \r\n)\r\nenv.Push()\r\n# the Push function create a dir named APasmEnv Output and your file will be created right here\r\n# you can edit the dir param to your dir you want\r\n# NOTE: if you don't rename your file to something then the default file name will be Untitled APasm Output File No{rand.randint(0,1000000)} which is generic\r\n\r\n# the ClearOutPutDir function will clear APasm output directory or D:/APasmEnv Output/<files>\r\n# CAUTION: ALL FILE INSIDE D:/APasmEnv Output WILL BE UTTERLY DELETED!\r\n```\r\n\r\n## QEMU Usage\r\n```python\r\nfrom AnPasm import *\r\nemulator = QEMU()\r\nemulator.run(\"D:/myBootloader.bin\") # onPath: True. Default Type: qemu-system-x86_64. Default External CMD: -fda. `*aargs` exists purely for passing raw subprocess flags without breaking the API.\r\nemulator.run(\"D:/myBootloader.bin\", onPath=False, QEMUPath=\"C:/Users/MyUserName/QEMU/<your QEMU type choice>.exe\")\r\n```\r\n\r\n## License\r\n- [](https://github.com/RandomX42069/APasm/blob/main/LICENSE)\r\n \r\n",
"bugtrack_url": null,
"license": "MIT License\r\n \r\n Copyright (c) 2025 RandomX\r\n \r\n Permission is hereby granted, free of charge, to any person obtaining a copy\r\n of this software and associated documentation files (the \"Software\"), to deal\r\n in the Software without restriction, including without limitation the rights\r\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n copies of the Software, and to permit persons to whom the Software is\r\n furnished to do so, subject to the following conditions:\r\n \r\n The above copyright notice and this permission notice shall be included in all\r\n copies or substantial portions of the Software.\r\n \r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n SOFTWARE.\r\n ",
"summary": "Avalon Python Assembly (APasm) - a library for coding and supporting Assembly in Python",
"version": "1.0.16.1",
"project_urls": null,
"split_keywords": [
"assembly",
" python",
" binary",
" apasm"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "50b738604f65d7b19ddd8659652e28a396b24a3e5976a91bdbcd082ebc65c5af",
"md5": "44ddb80dafa45798eacb6894bd519362",
"sha256": "d2425afec8028f77960adbd9703696c81d1bebbce3ca01b4a2d47f01ca1b1966"
},
"downloads": -1,
"filename": "apasm-1.0.16.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "44ddb80dafa45798eacb6894bd519362",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 19515,
"upload_time": "2025-08-17T13:34:37",
"upload_time_iso_8601": "2025-08-17T13:34:37.775144Z",
"url": "https://files.pythonhosted.org/packages/50/b7/38604f65d7b19ddd8659652e28a396b24a3e5976a91bdbcd082ebc65c5af/apasm-1.0.16.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0ffce2d1f268c6141ece6238f49f3b7704635074273577b77a75f2602879c258",
"md5": "0d3a1ecda43c183006bef27749d7d8e2",
"sha256": "d9ae08b271c1f50a548c73e69453aa004d885c8c940228c3da87a6ea2c45003c"
},
"downloads": -1,
"filename": "apasm-1.0.16.1.tar.gz",
"has_sig": false,
"md5_digest": "0d3a1ecda43c183006bef27749d7d8e2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 15413,
"upload_time": "2025-08-17T13:34:39",
"upload_time_iso_8601": "2025-08-17T13:34:39.091930Z",
"url": "https://files.pythonhosted.org/packages/0f/fc/e2d1f268c6141ece6238f49f3b7704635074273577b77a75f2602879c258/apasm-1.0.16.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-17 13:34:39",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "apasm"
}