Interprets programs in assembly language
Project description
Assembler interpreter
Usage
asmint --help
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:
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:
asmint factorial.txt
Program output:
Output: 5! = 120
External links
This project was inspired by this CodeWars kata
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for assembler-interpreter-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 710995092cffa9d32867c5ec32679d8a48571c22ebbc5b30c6f9d54dd36ff110 |
|
MD5 | 36e475d1b7aa3c39e33db8e4774388f2 |
|
BLAKE2b-256 | 79943d5bd81c8b2f24d9bc50b2e7f09021066479ea061e8ad9e16896f696db2d |
Close
Hashes for assembler_interpreter-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b74fdb8986c4de1d585a2896e1922329286a3f4ecb85479a74722b079444a3b |
|
MD5 | ae489e05bb14801ca53f66ee46c6ebf8 |
|
BLAKE2b-256 | beade295401c6e0b7f6a6dea6c91596091f437645a9426236c5207267ce1b6b1 |