## Command assemble ##

If you have installed [`keystone`](http://www.keystone-engine.org/), then `gef` will provide
a convenient command to assemble native instructions directly to opcodes of the
architecture you are currently debugging.

Call it via `assemble` or its alias `asm`:

```
gef➤ asm [INSTRUCTION [; INSTRUCTION ...]]
```

![gef-assemble](https://i.imgur.com/ShuPF6h.png)

Using the `-l LOCATION` option, `gef` will write the assembly code generated by
`keystone` directly to the memory location specified. This makes it extremely
convenient to simply overwrite opcodes.

![gef-assemble-overwrite](https://i.imgur.com/CvJv36q.png)
