@section text ::__subvar re+rh 1 rl :::main_static_vers_str rh,rl 2 rl ::main_static_vers_str rh,rl(i) :main_static_vers_str rh,rl call :tty_print_str //fs test stuff //make a new process //it'll use 29 256-word blocks of memory ::__subvar re+rh 0 rl 2 rh,rl(i) 238 rh,rl call :process_create //save PID for later ::__subvar re+rh 3 rl rh,rl(i) a rh,rl b ::main_pid re+rh+rl a rh,rl(i) b rh,rl //print PID ::main_pid re+rh rh,:main_pid a 48 b 0 flags ::__subvar re+rh add rh,0 call :tty_putch //put the process's base memory address >> 8 into __subvar,2 ::__subvar re+rh rh,1 b 2 rl rh,rl(i) a a rh,rl b rh,rl(i) //copy program_blob ::__subvar re+rh 1 rl :::romfs_blob rh,rl(i) ::romfs_blob rh,rl 3 rl 2 rh,rl(i) 238 rh,rl call :mem_copy_blk ::__subvar re+rh 1 rl :::main_static_copied_str rh,rl 2 rl ::main_static_copied_str rh,rl(i) :main_static_copied_str rh,rl call :tty_print_str //run it ::main_pid re+rh+rl rh,rl(i) a rh,rl b ::__subvar re+rh 0 rl a rh,rl(i) b rh,rl call :process_enter ::__subvar re+rh 3 rl :::main_static_error_str rh,rl 4 rl ::main_static_error_str rh,rl(i) :main_static_error_str rh,rl call :fault_fatal .main_static_copied_str ds "copied" dw 10 dw 0 .main_static_error_str ds "error" dw 10 dw 0 @section bss .main_test_ch dw 0 .main_pid dl 0 @section rodata .main_static_vers_str ds "kernel v1 dev" dw 10 dw 0