summaryrefslogtreecommitdiff
path: root/builtin_exit.asm
blob: 74594e19d8e7f3ea0840ac8d27ed985fe92b404c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
%ifndef _BUILTIN_EXIT_ASM
%define _BUILTIN_EXIT_ASM

builtin_exit:
	push bp
	mov bp, sp

	push .msg_fmt
	call printf
	add sp, 2 * 1

	add sp, 2	; cleanup previous call address

	jmp terminal
	.msg_fmt db 'exiting...\n', 0

%endif