monistode-binutils


Namemonistode-binutils JSON
Version 0.1.10 PyPI version JSON
download
home_page
SummaryA meta-repository for the Monistode binutils.
upload_time2023-12-16 07:55:18
maintainer
docs_urlNone
authorrizerphe
requires_python>=3.11,<4.0
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Monistode Binutils: A Simple Assembly Language Binutils

Monistode Binutils is a toolset created for the purpose of learning and building a basic assembly language assembler, linker and disassembler. This meta-repo serves as the central hub for Monistode Binutils, allowing you to easily access and use the tool.

## Getting Started

You can get started with Monistode Binutils by following these steps:

### Installation

You can install Monistode Binutils using `pipx`, which ensures that it runs in an isolated environment:

```sh
pipx install monistode-binutils
```

### Assembling Code

Once you've installed Monistode Binutils, you can assemble your code using the `mstas` command:

```sh
mstas config.yaml your-assembly-file.s output-file.o
```

Make sure to replace `config.yaml`, `your-assembly-file.s`, and `output-file.o` with the appropriate file names and paths.

### Disassembling Code

You can also disassemble code with the `mstdas` command:

```sh
mstdas config.yaml input-file.o
```

Again, replace `config.yaml` and `input-file.o` with the actual configuration and input file you want to disassemble.

## Example Assembly Language

Here's an example of a simple assembly language that Monistode Binutils supports:

```yaml
opcode_length: 6
opcode_offset: 0
text_byte_length: 6
data_byte_length: 8
text_address_size: 16
data_address_size: 16
commands:
  - mnemonic: yelp
    opcode: !!int 0b1
    arguments:
      - type: padding
        bits: 2
      - type: immediate
        bits: 16
  - mnemonic: jmp
    opcode: !!int 0b10
    arguments:
      - type: padding
        bits: 2
      - type: text_addr
        bits: 16
```

## Example Usage

You can create and assemble an assembly file:

```as
.text

_start:
YELP $512
YELP $2
YELP $43
YELP $17

JMP main + 138

main:
YELP $24
```

After assembly, you can disassemble it to see the machine code:

```
Object file:
Parameters:
  Opcode size: 6
  Text byte: 6
  Data byte: 8
  Text address: 16
  Data address: 16
Sections:
  Name: text
  Size: 24 entries (18 bytes of disk)

  Name: symbol_table
  Size: 2 entries (36 bytes of disk)

  Name: relocation_table
  Size: 1 entries (33 bytes of disk)


.text
    _start:
0000: yelp  $512      # 000001 000000 001000 000000
0004: yelp  $2        # 000001 000000 000000 000010
0008: yelp  $43       # 000001 000000 000000 101011
000c: yelp  $17       # 000001 000000 000000 010001
0010: jmp  main + 138 # 000010 000000 000010 000111
    main:
0014: yelp  $24       # 000001 000000 000000 011000

.symbol_table
      text:00000000        _start
      text:00000014        main

.relocation_table
      text:00000011 + 2bits (16-bit)        text -> main, relative
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "monistode-binutils",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "rizerphe",
    "author_email": "44440399+rizerphe@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/91/4c/fea7e5db0edcb5bb4371ca8c40441779f4973d119e0ce4aaa9980ecab092/monistode_binutils-0.1.10.tar.gz",
    "platform": null,
    "description": "# Monistode Binutils: A Simple Assembly Language Binutils\n\nMonistode Binutils is a toolset created for the purpose of learning and building a basic assembly language assembler, linker and disassembler. This meta-repo serves as the central hub for Monistode Binutils, allowing you to easily access and use the tool.\n\n## Getting Started\n\nYou can get started with Monistode Binutils by following these steps:\n\n### Installation\n\nYou can install Monistode Binutils using `pipx`, which ensures that it runs in an isolated environment:\n\n```sh\npipx install monistode-binutils\n```\n\n### Assembling Code\n\nOnce you've installed Monistode Binutils, you can assemble your code using the `mstas` command:\n\n```sh\nmstas config.yaml your-assembly-file.s output-file.o\n```\n\nMake sure to replace `config.yaml`, `your-assembly-file.s`, and `output-file.o` with the appropriate file names and paths.\n\n### Disassembling Code\n\nYou can also disassemble code with the `mstdas` command:\n\n```sh\nmstdas config.yaml input-file.o\n```\n\nAgain, replace `config.yaml` and `input-file.o` with the actual configuration and input file you want to disassemble.\n\n## Example Assembly Language\n\nHere's an example of a simple assembly language that Monistode Binutils supports:\n\n```yaml\nopcode_length: 6\nopcode_offset: 0\ntext_byte_length: 6\ndata_byte_length: 8\ntext_address_size: 16\ndata_address_size: 16\ncommands:\n  - mnemonic: yelp\n    opcode: !!int 0b1\n    arguments:\n      - type: padding\n        bits: 2\n      - type: immediate\n        bits: 16\n  - mnemonic: jmp\n    opcode: !!int 0b10\n    arguments:\n      - type: padding\n        bits: 2\n      - type: text_addr\n        bits: 16\n```\n\n## Example Usage\n\nYou can create and assemble an assembly file:\n\n```as\n.text\n\n_start:\nYELP $512\nYELP $2\nYELP $43\nYELP $17\n\nJMP main + 138\n\nmain:\nYELP $24\n```\n\nAfter assembly, you can disassemble it to see the machine code:\n\n```\nObject file:\nParameters:\n  Opcode size: 6\n  Text byte: 6\n  Data byte: 8\n  Text address: 16\n  Data address: 16\nSections:\n  Name: text\n  Size: 24 entries (18 bytes of disk)\n\n  Name: symbol_table\n  Size: 2 entries (36 bytes of disk)\n\n  Name: relocation_table\n  Size: 1 entries (33 bytes of disk)\n\n\n.text\n    _start:\n0000: yelp  $512      # 000001 000000 001000 000000\n0004: yelp  $2        # 000001 000000 000000 000010\n0008: yelp  $43       # 000001 000000 000000 101011\n000c: yelp  $17       # 000001 000000 000000 010001\n0010: jmp  main + 138 # 000010 000000 000010 000111\n    main:\n0014: yelp  $24       # 000001 000000 000000 011000\n\n.symbol_table\n      text:00000000        _start\n      text:00000014        main\n\n.relocation_table\n      text:00000011 + 2bits (16-bit)        text -> main, relative\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A meta-repository for the Monistode binutils.",
    "version": "0.1.10",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b80689711f59bdbc1b31f59b0fb226e4a2762e07189bfe7a37a70771ef469836",
                "md5": "08ae63dd10013292c636b392f2a376b0",
                "sha256": "f4a6b14537089530887503f9deb9fa8510013e978c294f933bbbe3e1eb66a4b9"
            },
            "downloads": -1,
            "filename": "monistode_binutils-0.1.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "08ae63dd10013292c636b392f2a376b0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 2201,
            "upload_time": "2023-12-16T07:55:14",
            "upload_time_iso_8601": "2023-12-16T07:55:14.456225Z",
            "url": "https://files.pythonhosted.org/packages/b8/06/89711f59bdbc1b31f59b0fb226e4a2762e07189bfe7a37a70771ef469836/monistode_binutils-0.1.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "914cfea7e5db0edcb5bb4371ca8c40441779f4973d119e0ce4aaa9980ecab092",
                "md5": "e5f561e0f50825f885399d5149471b36",
                "sha256": "c87771d688cc6e5ebe09a3359c68006a2be52c227002993f425b1889214cb342"
            },
            "downloads": -1,
            "filename": "monistode_binutils-0.1.10.tar.gz",
            "has_sig": false,
            "md5_digest": "e5f561e0f50825f885399d5149471b36",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 1857,
            "upload_time": "2023-12-16T07:55:18",
            "upload_time_iso_8601": "2023-12-16T07:55:18.196552Z",
            "url": "https://files.pythonhosted.org/packages/91/4c/fea7e5db0edcb5bb4371ca8c40441779f4973d119e0ce4aaa9980ecab092/monistode_binutils-0.1.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-16 07:55:18",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "monistode-binutils"
}
        
Elapsed time: 0.17059s