Initial import of ViperOS
This commit is contained in:
BIN
disk/EFI/BOOT/bootx64.efi
Normal file
BIN
disk/EFI/BOOT/bootx64.efi
Normal file
Binary file not shown.
33
disk/app/helloworld.asm
Normal file
33
disk/app/helloworld.asm
Normal file
@@ -0,0 +1,33 @@
|
||||
BITS 64
|
||||
|
||||
%define SYSCALL_CREATE_WINDOW 1
|
||||
%define SYSCALL_DRAW_TEXT 2
|
||||
%define SYSCALL_EXIT 3
|
||||
|
||||
section .text
|
||||
global _start
|
||||
|
||||
_start:
|
||||
lea rbx, [rel win_title]
|
||||
mov rax, SYSCALL_CREATE_WINDOW
|
||||
mov rbx, 100
|
||||
mov rcx, 80
|
||||
mov r10, 300
|
||||
int 0x80
|
||||
|
||||
mov r12, rax
|
||||
|
||||
lea r10, [rel hello_text]
|
||||
mov rax, SYSCALL_DRAW_TEXT
|
||||
mov rbx, r12
|
||||
mov rcx, 20
|
||||
mov rdx, 30
|
||||
int 0x80
|
||||
|
||||
mov rax, SYSCALL_EXIT
|
||||
xor rbx, rbx
|
||||
int 0x80
|
||||
|
||||
section .data
|
||||
win_title: db "Hello World App", 0
|
||||
hello_text: db "Hello World!", 0
|
||||
Reference in New Issue
Block a user