I also had one of the card for my z80.
I still keep it :)
Best,
Akira
On 7/5/2022 11:29 PM, Jeff Scheel wrote:
> I'm sure I date myself by loving this, but I do! Thanks, Dylan!!!
> -Jeff
>
> --
> Jeff Scheel (he/him/his)
> Linux Foundation, RISC-V Technical Program Manager
>
>
> On Thu, Jun 30, 2022 at 9:43 PM Dylan McNamee <
dylan....@gmail.com <mailto:
dylan....@gmail.com>> wrote:
>
> When I was first learning assembly one of my favorite type of learning resources were the tri-fold assembly reference cards, as produced for the PDP-10, Motorola 68K, and other CPUs of the era. I decided to create one for the RISC-V, attached. I used it to convert the Rust inline assembly example from x86 to RISC-V:
> (compile with "rustc
rv-asm.rs <
http://rv-asm.rs>")
> *use std::arch::asm;
>
> fn main() {
>
> // Multiply x by 6 using shifts and adds
> let mut x: u64 = 4;
> unsafe {
> asm!(
> "addi {tmp}, {x}, 0",
> "slli {tmp}, {tmp}, 1",
> "slli {x}, {x}, 2",
> "add {x}, {tmp}, {x}",
> x = inout(reg) x,
> tmp = out(reg) _,
> );
> }
> assert_eq!(x, 4 * 6);
> }*
>
> A PDF of the reference card is attached.
>
> best,
> dylan
>
> --
> You received this message because you are subscribed to the Google Groups "RISC-V Developer Board Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
devboard-commun...@riscv.org <mailto:
devboard-commun...@riscv.org>.