From c2b6385523c0a5adce5b4559958b74ab2761119a Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Sun, 27 Mar 2022 22:10:20 +0200 Subject: [PATCH] version 2.0.0a3 --- riscemu/__init__.py | 2 +- riscemu/__main__.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/riscemu/__init__.py b/riscemu/__init__.py index 013d75e..0e6d850 100644 --- a/riscemu/__init__.py +++ b/riscemu/__init__.py @@ -25,4 +25,4 @@ from .parser import tokenize, parse_tokens, AssemblyFileLoader __author__ = "Anton Lydike " __copyright__ = "Copyright 2022 Anton Lydike" -__version__ = '2.0.0a2' +__version__ = '2.0.0a3' diff --git a/riscemu/__main__.py b/riscemu/__main__.py index 96ac45e..cc62114 100644 --- a/riscemu/__main__.py +++ b/riscemu/__main__.py @@ -5,7 +5,7 @@ SPDX-License-Identifier: MIT This file holds the logic for starting the emulator from the CLI """ -from riscemu import RiscemuBaseException +from riscemu import RiscemuBaseException, __copyright__, __version__ from riscemu.CPU import UserModeCPU if __name__ == '__main__': @@ -18,6 +18,12 @@ if __name__ == '__main__': all_ins_names = list(InstructionSetDict.keys()) + if '--version' in sys.argv: + print("riscemu version {}\n{}\n\nAvailable ISA: {}".format( + __version__, __copyright__, + ", ".join(InstructionSetDict.keys()) + )) + sys.exit() class OptionStringAction(argparse.Action): def __init__(self, option_strings, dest, keys=None, omit_empty=False, **kwargs):