RISC-V.JS -- Assembler
Type the assembly code below and click
Build
.global _boot .text _boot: /* x0 = 0 0x000 */ /* Test ADDI */ addi x1 , x0, 1000 /* x1 = 1000 0x3E8 */ addi x2 , x1, 2000 /* x2 = 3000 0xBB8 */ addi x3 , x2, -1000 /* x3 = 2000 0x7D0 */ addi x4 , x3, -2000 /* x4 = 0 0x000 */ addi x5 , x4, 1000 /* x5 = 1000 0x3E8 */ la x6, variable addi x6, x6, 4 .data variable: .word 0xdeadbeef
OUTPUT_ARCH( "riscv" ) ENTRY( _start) SECTIONS { . = 0x0; .text.init : { *(.text.init) } . = ALIGN(0x1000); .text : { *(.text) } . = ALIGN(0x1000); .data : { *(.data) } .bss : { *(.bss) } _end = .; }
Build
Console
Waiting for build
Hex Dump
Waiting for build
Download
Objdump Code Disassembly
Waiting for build
Download
See
rvcodecjs
for a per-instruction breakdown of the bits. Copy in any raw assembly instruction from the objdump or hex value from the hex dump.