A REPL for x86-64 assembly language
This is a REPL for assembly language.
Install the gem:
$ gem install asmreplThen start the repl like this:
$ asmreplIf you're on macOS, you'll need to start the repl with sudo.
When the REPL starts, it will display all register values and flags:
…Then you can issue commands and inspect register values. Let's write to the
rax register and inspect its value:
(rip 0x00000001033a4001)> mov rax, 5
=============== REGISTER CHANGES ===============
rax 000000000000000000 => 0x0000000000000005
(rip 0x00000001033a4009)> rax
0x0000000000000005
(rip 0x00000001033a4009)>Now let's write to the rbx register and add the two values:
(rip 0x00000001033a4009)> mov rbx, 3
=============== REGISTER CHANGES ===============
rbx 000000000000000000 => 0x0000000000000003
(rip 0x00000001033a4011)> add rax, rbx
=============== REGISTER CHANGES ===============
rax 0x0000000000000005 => 0x0000000000000008
rflags 0x0000000000000246 => 0x0000000000000202
FLAGS: ["IF"]
(rip 0x00000001033a4015)> rax
0x0000000000000008
(rip 0x00000001033a4015)> rbx
0x0000000000000003
(rip 0x00000001033a4015)>Finally, lets check all values in the CPU:
…No open issues yet, or sync has not completed.