11 - KK Calendar Functions (small)

Post Reply
Peet
Posts: 257
Joined: Tue Sep 29, 2020 12:01 am
Location: Germany

11 - KK Calendar Functions (small)

Post by Peet »

Day of week and days between dates. A very small calendar program with only approx. 100 bytes.
Originally I wrote this program for my Commodore PR100 in 1979 and later ported it to the HP41CV.

Usage:
Display: 1.DATE?
<Day> R/S
<Month> R/S
<Year> R/S
Display: 0:FR 1:SA 2:SU 3:MO 4:TU 5:WE 6:TH
R/S
Display: 2.DATE?
<Day> R/S
<Month> R/S
<Year> R/S
Display: 0:FR 1:SA 2:SU 3:MO 4:TU 5:WE 6:TH
R/S
Display: days between dates

Code: Select all

LBL "KK"
LBL 01
CF 06
CLX
STO 02
"1"
LBL 02
"|-.DATE?"
PROMPT
STOP
1
+
STOP
STO 01
RDN
ENTER
1/X
.7
+
CHS
INT
ST+ 01
12
*
-
30.6
*
INT
RCL 01
365.25
*
INT
+
+ 
ENTER
ENTER
RCL 02
-
STO 02
RDN
7
MOD
"DAY="
ARCL X
PROMPT
FC? 06
GTO 03
"DAYS: "
FIX 0
ARCL 02
FIX 4
PROMPT
GTO 01
LBL 03
SF 06
"2"
GTO 02
END
Attachments
11_KK_Kalender.raw
(105 Bytes) Downloaded 124 times
My programmable calculators - former: CBM PR100, HP41CV, HP28S, HP11C - current: HP48G(256kB), HP35S, Prime, DM41X, DM42
Post Reply