print changes
This commit is contained in:
+2
-2
@@ -8,7 +8,7 @@ def prompt_int(message: str, lo: int, hi: int) -> int:
|
|||||||
try:
|
try:
|
||||||
value = int(raw)
|
value = int(raw)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
print("Please enter a whole number.")
|
print("Please enter a number.")
|
||||||
continue
|
continue
|
||||||
if lo <= value <= hi:
|
if lo <= value <= hi:
|
||||||
return value
|
return value
|
||||||
@@ -24,7 +24,7 @@ def main() -> None:
|
|||||||
|
|
||||||
print("\nR registers are indexed 0–7; bits within each register are 0–7.")
|
print("\nR registers are indexed 0–7; bits within each register are 0–7.")
|
||||||
reg = prompt_int("Which R register do you want to inspect? (0–7): ", 0, 7)
|
reg = prompt_int("Which R register do you want to inspect? (0–7): ", 0, 7)
|
||||||
bit = prompt_int("Which bit of that register? (0–7): ", 0, 7)
|
bit = prompt_int("Which bit of that register? (0–7): ", 0, 7)
|
||||||
|
|
||||||
print(f"\nRunning {steps} step(s), watching R[{reg}][{bit}]")
|
print(f"\nRunning {steps} step(s), watching R[{reg}][{bit}]")
|
||||||
print("-" * 50)
|
print("-" * 50)
|
||||||
|
|||||||
Reference in New Issue
Block a user