Metadata-Version: 2.1
Name: assembler-interpreter
Version: 0.1.0
Summary: Interprets programs in assembly language
Author-email: Vlad Gavrilov <gavrilov.rostov@gmail.com>
License: MIT License
        
        Copyright (c) 2022 Vlad Gavrilov
        
        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.
        
Project-URL: Homepage, https://github.com/vlad-gavrilov/assembler-interpreter
Project-URL: Bug Tracker, https://github.com/vlad-gavrilov/assembler-interpreter/issues
Keywords: assembler,interpreter,cli
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# Assembler interpreter

## Usage

```bash
asmint --help
```

```text
usage: asmint [-h] [-l] [-p] [-r] path

Assembler interpreter

positional arguments:
  path             the path to the program to be executed

optional arguments:
  -h, --help       show this help message and exit
  -l, --labels     show labels
  -p, --program    show prepared program
  -r, --registers  show register values
```

## Example

A program named **factorial.txt**:

```text
mov   a, 5
mov   b, a
mov   c, a
call  proc_fact
call  print
end

proc_fact:
    dec   b
    mul   c, b
    cmp   b, 1
    jne   proc_fact
    ret

print:
    msg   a, '! = ', c ; output text
    ret
```

Calling the utility:

```bash
asmint factorial.txt
```

Program output:

```text
Output:  5! = 120
```

## External links
This project was inspired by [this](https://www.codewars.com/kata/58e61f3d8ff24f774400002c) CodeWars kata
