; Constants const SYS_STACK_START: 0x03fffff0 const BG_FRAMEBUFFER: 0x2000000 const SCREEN_WIDTH: 640 const SCREEN_HEIGHT: 480 ; Globals const FRAMENR: 0x00000000 const SHOWING_LOGO: 0x00000004 org 0xf0000000 entry: mcl ; disable MMU mov rsp, SYS_STACK_START ; set stack pointer mov r0, entry_str call serial_print mov r0, version_str_1 call serial_print mov r0, version_str call serial_print mov r0, version_str_2 call serial_print mov r0, sha_str call serial_print mov r0, version_str_3 call serial_print call show_logo mov r0, booting_str call serial_print halt entry_str: data.str "== Welcome to Xen32OS" data.8 0 ; defines version_str, sha_str #include "data/version.inc" version_str_1: data.str " - version " data.8 0 version_str_2: data.str " (" data.8 0 version_str_3: data.str ") ==" data.8 10 data.8 0 booting_str: data.str "booting..." data.8 10 data.8 0 ; input: ; str: &str0 @ r0 ; returns: ; nothing ; clobbers: ; r0 serial_print: cmp.8 [r0], 0 ifz ret out 0x00000000, [r0] inc r0 jmp serial_print ; input: ; n: u64 @ r0 ; returns ; nothing ; clobbers: ; r0 serial_print_num: cmp r0, 0 ifz jmp serial_print_num_zero call serial_print_num_nonzero ret serial_print_num_nonzero: cmp r0, 0 ifz ret push r0 div r0, 10 call serial_print_num_nonzero pop r0 rem r0, 10 add r0, 48 out 0x00000000, r0 ret serial_print_num_zero: mov r0, serial_print_num_str_zero jmp serial_print ; tail call serial_print_num_str_zero: data.str "0" data.8 0 serial_print_nl: out 0x00000000, 10 ret #include "logo.asm"