# \[Pre-RFC #2\]: Inline assembly

**URL:** <https://internals.rust-lang.org/t/pre-rfc-2-inline-assembly/11310>\
**Category:** language design\
**Created:** [November 17, 2019, 11:17pm UTC](https://internals.rust-lang.org/t/pre-rfc-2-inline-assembly/11310 "2019-11-17T23:17:59Z")\
**Posts on this page:** 1\
**Showing post:** 102

<div class="post-metadata">

**Author:** ![Zoxc](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/zoxc/32/4000_2.png) [@Zoxc](https://internals.rust-lang.org/u/Zoxc)\
**Post date:** [November 26, 2019, 7:23am UTC](https://internals.rust-lang.org/t/pre-rfc-2-inline-assembly/11310/102 "2019-11-26T07:23:26Z")

</div>

I much prefer a solution which does not require the use of string literals like [what I proposed here](https://internals.rust-lang.org/t/inline-assembly-syntax/239/5).

Not using string literals allows embedding Rust code directly in the assembly, which can be convenient. Letting inline assembly return value makes thing feel very Rust-like too, here's an example:

```rust
let val = asm {
	inw {reg => return}, {const = 0x40 + PORT_OFFSET}
};

```

I'm not a fan of Unix-style mesh together words like `inlateout` and those don't really fit with the naming conventions of Rust either.

---

_[View the full topic](https://internals.rust-lang.org/t/pre-rfc-2-inline-assembly/11310)._
