[stella] Does this look right? (clock) (fwd)

Subject: [stella] Does this look right? (clock) (fwd)
From: Chris Wilkson - MCD <cwilkson@xxxxxxxxxxxxx>
Date: Wed, 1 Oct 1997 15:33:49 -0700 (PDT)
> 	lda  FRAMES	
> 	cmp  #$3C	;60 frames = 1 second (change to 50 for PAL)
> 	bmi  upfrm
> 	lda  #$00
> 	sta  FRAMES
> 	lda  SECS
> 	cmp  #$32	;60 seconds
> 	bmi  upsec
> 	lda  #$00
> 	sta  SECS
> 	lda  MINS
> 	cmp  #$32	;60 minutes
> 	bmi  upmin
> 	lda  #$00
> 	sta  MINS
> 	lda  HOURS
> 	cmp  #$18	;24 hours
> 	bmi  uphrs
> 	lda  #$00
> 	sta  HOURS
> 	inc  DAYS	;new day
> 	jmp  upfrm

Well, on first glance, I see a lot of LDA #0, STA sequences.  How about
preloading the X reg with a zero and using STX instead?  This would save
the repetive LDA #0 lines.

More suggestions to come...(hopefully)

-Chris


--
Archives updated once/day at http://www.biglist.com/lists/stella/archives/
Unsubscribing and other info at http://www.biglist.com/lists/stella/stella.html

Current Thread