Skip to content

Commit 5f9b76b

Browse files
committed
Make execution interactive
1 parent 796f9fa commit 5f9b76b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

arm.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ Found a bug? Feel free to raise an issue on https://github.com/coderick14/ARMed
6666
Contributions welcome :)`
6767

6868
func main() {
69-
var err error
69+
var (
70+
err error
71+
choice string
72+
)
7073
helpPtr := flag.Bool("help", false, "Display help")
7174
allPtr := flag.Bool("all", false, "Display all registers after each instruction")
7275
endPtr := flag.Bool("end", false, "Display registers only at end")
@@ -144,8 +147,11 @@ func main() {
144147
return
145148
}
146149
Memory.ShowRegisters(*allPtr)
150+
fmt.Printf("Continue [Y/n]? : ")
151+
fmt.Scanln(&choice)
152+
if choice == "n" {
153+
break;
154+
}
147155
}
148-
149156
}
150-
151157
}

0 commit comments

Comments
 (0)