diff options
Diffstat (limited to 'website-initramfs/progs')
| -rw-r--r-- | website-initramfs/progs/init.S | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/website-initramfs/progs/init.S b/website-initramfs/progs/init.S index 8693bda..82bd079 100644 --- a/website-initramfs/progs/init.S +++ b/website-initramfs/progs/init.S @@ -1,4 +1,32 @@ +#define SERIAL_PORT 0x70000000 +#define SYS_EXIT 60 + .global _start -.text +.section .rodata +message: + .ascii "=====================\n" + .ascii "Hello everyone!\n" + .ascii "i'm nat, a physics student + hobby kernel dev\n" + .ascii "this is my website\n" + .ascii "it's a very big wip at the moment so please excuse the dust\n" + .ascii "if you would like to contact me, please email me@nwlee.tech with PGP\n" + .ascii "my public key is availale on openpgp keyservers and has a fingerprint of 6E66AD372BC7297B4DDC6260B840FDD90C082232\n" + .ascii "thanks for visiting!\n" + .asciz "=====================\n" + +.section .text _start: + la t0, message + li t1, SERIAL_PORT + mv s1, zero + +1: + lbu s0, 0(t0) + beq s0, s1, 2f + sb s0, 0(t1) + addi t0, t0, 1 + j 1b +2: + li a7, SYS_EXIT + mv a0, zero ecall |
