~poptart/riscv-business

ref: 9962ec0bea4094cc56a581c768dd85cc43b2c7aa riscv-business/doc/a1_0xcafebabe.s -rw-r--r-- 350 bytes
9962ec0b — terrorbyte No nulls! 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.section .text
.globl _start
_start:
	li a0,0x0
	li a2,16
	# without using the li pseudo instruction load a1 with 0xcafebabe
	lui a1,0x33
	addi a1,a1,-1029
	slli a1,a1,0xe
	addi a1,a1,-1346
	ret
	#li a7, 64              # 64 is the __NR_write syscall 
	#ecall
	#li a0, 0x0
	#li a7, 93
	#ecall

.section .rodata
msg:
	    .string "Hello MWR Labs\n\0"