JavaScript application transpiled from Scheme language source code to fast WebAssembly. The RV32IM model is supported. Read readme.scm for implementation details about the assembler.
When Run is clicked the source code is assembled and then executed by the simulator. A listing of the assembled source code followed by execution of the code is produced. The 32 registers are dumped after the execution of an exit ecall. On the order of ten million instructions are executed in about a second. The linux style getchar, putchar and exit ecalls are supported. See the first "cat.s" example for how to use them.
The risc-v machine has the following particulars. The memory space is from address 0 to 0x6000000. the first 4k bytes are ROM the rest being RAM. The start address for code and heap is at 0x100000. The stack pointer in register x2 is set to 0xffff8 and grows downward toward the ROM.
Complete source code for the assembler here.