	.module sys_time.c
	.area text
_sys_time::
	pshx
	tfr s,x
	leas -4,sp
; // sys_time.c
; #include <stdio.h>
; #include <912d60.h>
; #include "kernel.h"
; 
; 
; // GLOBAL VARIABLES
; static unsigned char abort;
; 
; 
; void sys_time(void) {
; 
; 	 abort = 0;
	clr _abort
; 	 set_task_priority(get_task_id(), 1);
	jsr _get_task_id
	std -2,x
	ldd #1
	std 0,sp
	ldd -2,x
	clra
	jsr _set_task_priority
; 	 //spawn(sys_time_abort());
; 	 INTR_ON();
		cli

L4:
L5:
; 	 
; 	 while (!abort) {
	tst _abort
	beq L4
; 	 
; 	 	   // DISPLAY TIME: hh:mm:ss
; 		   
; 	 }
; 	
; 	 INTR_OFF();
		sei

; 	 
; }
L3:
	tfr x,s
	pulx
	.dbline 0 ; func end
	rts
_sys_time_abort::
; 
; 
; 
; void sys_time_abort(void) {
; 
; 	 INTR_ON();
		cli

; 	 getchar();
	jsr _getchar
; 	 abort = 1;
	ldab #1
	stab _abort
; 	 INTR_OFF();
		sei

; 	 
; 	 
; }
L7:
	.dbline 0 ; func end
	rts
	.area bss
_abort:
	.blkb 1

