34 lines
552 B
NASM
34 lines
552 B
NASM
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
|