## Copyright (C) 2020 deesix <deesix@tuta.io>
## Copyright (C) 2020 Sanne Wouda
## This file is part of stage0.
##
## stage0 is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## stage0 is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with stage0.  If not, see <http://www.gnu.org/licenses/>.

:_start
	INIT_SP
	LDR_X0_[SP]
	ADD_X1_SP_8
	SET_BP_FROM_SP
	PUSH_X0
	PUSH_X1
	SET_X1_TO_2
	ADD_X0_X1_X0
	SET_X1_TO_8
	MUL_X0_X1_X0
	ADD_X0_BP_X0
	PUSH_X0

	LOAD_W16_AHEAD
	SKIP_32_DATA
	&FUNCTION_main
	BLR_X16
	SET_X8_TO_SYS_EXIT
	SYSCALL
