Re: WP34s clock program Message #4 Posted by Andrew Nikitin on 8 June 2013, 10:39 p.m., in response to message #2 by anetzer
Here is what my entire time program look like.
I tried to implement some functionality of HP01, which allowed for convenient timestamp arithmetic.
Instruction:
[c] start clock, exit clock to grab current time
XEQ EEX ;; load current time into X
XEQ + ;; add timecode to timecode
XEQ  ;; add timecode to timecode
XEQ * ;; multiply timecode in Y by number in X
XEQ / ;; divide timecode in Y by number in X
XEQ 00 ;; (internal routine) convert both X and Y from timecode to number
Nothing fancy, really.
LBL C
LBL'CLK'
LocR 001
CLx
TIME
x=?.00
BACK 003
STO.00
CL[alpha]
[alpha]TIME
VIEW[alpha]
PSE 09
BACK 009
LBL 00
[>]HR
x<> Y
[>]HR
x<> Y
RTN
LBL 34 ;; XEQ EEX = load current time
TIME
RTN
LBL 75 ;; XEQ + = add timecode to timecode
XEQ 00
+
[>]H.MS
RTN
LBL 65 ;; XEQ  = add timecode to timecode
XEQ 00

[>]H.MS
RTN
LBL 55 ;; XEQ * = multiply timecode in Y by number in X
x<> Y
[>]HR
*
[>]H.MS
RTN
LBL 45 ;; XEQ * = divide timecode in Y by number in X
x<> Y
[>]HR
