#include <linuxmt/config.h>
#include <linuxmt/types.h>
#include <arch/system.h>
#include <linuxmt/sched.h>

void taska();
void taskb();

extern __ptask _reglasttask, _regnexttask;

void main()
{
	__u16 a;
	__pregisters set; 
	int num;

/*	We set the scheduler up as task #0, and this as task #1 */

	setup_arch();
	arch_setuptasks();
	printk("ELKS version 0.00\n\r");
	init_IRQ();
	init_bioscon();
	if (kernel_fork())
		taska();
	if (kernel_fork())
		taskb();
	/* This is the idle task! */
	while (1) {
#asm
b:	mov ax, #0xe42
	int 0x10
#endasm
	schedule();
	};
}

void taska()
{
/* Print 'A' and switch tasks */
	while (1) {
#asm
a:		mov ax, #0xe41
		int 0x10 
#endasm
		schedule();
	};
}

void taskb()
{
while (1) {
#asm
b:	mov ax, #0xe44
	int 0x10
#endasm
	schedule();
  };
}

