// This may look like C code, but it is really -*- Asm -*-
/*
 *  smoke16/src16/hello.s - Prints a traditional greeting and exits.
 *  $Revision: 1.26 $
 *  Copyright 1997, Benjamin Sittler
 *
 *  This program 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 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program 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 this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 */

#include <smoke16/asm.h>
	.rdata
LC0:	.zstring "Hello, world. Go suck pond water."
LC1:	.zstring "puts(LC0) failed"

	.text
	.align 1
	FUNCTION(_main)
	mov LC0, %a0
	call _puts
	cmp %a0, %0
	bl main1
	mov %0, %a0
main0:	RET
main1:  mov LC1, %a0
	call _perror
	mov %0, %a0
	add 1, %a0
	b main0
