From 330dbcbe3a1f53488c1abf11ac638849bfc8ff98 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Thu, 25 May 2023 12:04:39 -0700 Subject: [PATCH] Housekeeping --- cli/arvelie/arvelie.tal | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/cli/arvelie/arvelie.tal b/cli/arvelie/arvelie.tal index c9b62a3..2fe4e30 100644 --- a/cli/arvelie/arvelie.tal +++ b/cli/arvelie/arvelie.tal @@ -94,24 +94,22 @@ JMP2r NIP NIP JMP2r - &m 1f 1c 1f 1e 1f 1e 1f 1f 1e 1f 1e 1f + &m [ 1f 1c 1f 1e 1f 1e 1f 1f 1e 1f 1e 1f ] @is-leap-year ( year* -- bool ) - ( leap year if perfectly divisible by 400 ) DUP2 #0190 ( MOD2 ) DIV2k MUL2 SUB2 #0000 EQU2 ?&leap - ( not a leap year if divisible by 100 ) - ( but not divisible by 400 ) + ( not a leap year if divisible by 100, but not divisible by 400 ) DUP2 #0064 ( MOD2 ) DIV2k MUL2 SUB2 #0000 EQU2 ?¬-leap - ( leap year if not divisible by 100 ) - ( but divisible by 4 ) - DUP2 #0003 AND2 #0000 EQU2 ?&leap - ( all other years are not leap years ) - ¬-leap - POP2 #00 - + ( leap year if not divisible by 100, but divisible by 4 ) + #0003 AND2 #0000 EQU2 +JMP2r + ¬-leap + POP2 #00 +JMP2r + &leap + POP2 #01 JMP2r -&leap POP2 #01 JMP2r @print-greg ( doty* year* -- )