Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- *
- * Info file for 6ix9ine.hex
- *
- * it should run the code below
- *
- * with the commands...
- *
- * ~$ (name of rvsim.exe)
- * >RISCV load /x 0x50 6ix9ine.hex
- * >RISCV run /x 0x50 2
- *
- * the assembler is intended to put 69 in register 1
- * and the put 69 in memory space 0x69
- *
- */
- encoded assembler:
- ADDI x1 x0 69
- SD x1 69(x0)
- breakdown:
- I = 69 RS1 = 0 f3 RD = 1 opcode
- ADDI x1 x0 69 : 000001000101 | 00000 | 000 | 00001 | 0100011 |
- raw bin: 0b00000100010100000000000010100011
- raw hex: 0x045000A3
- (high7)I = 2 rs2 rs1 f3 (low5)I=5 opcode
- SD x1 69(x0) : 0000010 | 00000 | 00001 | 010 | 00101 | 0100011 |
- raw bin: 0b00000100000000001010001010100011
- raw hex: 0x0400A2A3
- command to produce:
- ~$ echo -n -e \\x04\\x50\\x00\\xa3\\x04\\x00\\xa2\\xa3 >> 6ix9ine.hex
- ~$ echo 'note to self: in the future replace that hex string with a prebuilt file'
- ~$ od -t x1 6ix9ine.bin >> 6ix9ine.hex
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement