***************************************************
* Program: START.BIN                              *
* Author: Marcelo Teixeira Silveira               *
* Home-Page: http://www.eng.uerj.br/~marcelo/msx  *
***************************************************


   10 EXTROM:	EQU  &H015F
   20 RDCLK:	EQU  &H01F5
   30 		ORG  &HC000
   40 		LD   HL,&HD000		; Place to save start time
   50 		LD   D,5		; 5 and 4 = hours
   60 		CALL GCLK		; 
   70 		INC  HL			; Next position
   80 		LD   D,3		; 3 and 2 = minutes
   90 		CALL GCLK		; 
  100 		INC  HL			; 
  110 		LD   D,1		; 1 and 0 = seconds
  120 GCLK:	LD   IX,RDCLK		; Routine to get pair of numbers
  130 		LD   C,D		; Load the second part of number
  140 		CALL EXTROM		; Load from clock
  150 		LD   B,4		; 
  160 SH1:	SLA  A			; Gives it a 4 bit shift to left 0N -> N0
  170 		DJNZ SH1		;
  180 		LD   B,A		; Save it on B
  190 		DEC  C			; Takes now the first part of number
  200 		CALL EXTROM		; From clock
  210 		OR   B			; Mix numbers
  220 		LD   (HL),A		; Save it on memory
  230 		RET 
