From a75f4a1496e9a42347a859af14f9f627d4a54e9c Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 16 Jul 2023 11:59:30 -0700 Subject: [PATCH] (datetime.tal) Added numeric display of date --- projects/examples/devices/datetime.tal | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/projects/examples/devices/datetime.tal b/projects/examples/devices/datetime.tal index e29320c..38adb05 100644 --- a/projects/examples/devices/datetime.tal +++ b/projects/examples/devices/datetime.tal @@ -6,16 +6,25 @@ |0100 @on-reset ( -> ) - - #0a18 DEO - - #0a18 DEO + + #0a .Console/write DEO + + #0a .Console/write DEO + + #0a .Console/write DEO - #0a18 DEO + #0a .Console/write DEO #800f DEO BRK -@ ( -- ) +@ ( -- ) + .DateTime/year DEI2k + [ LIT "- ] .Console/write DEO + INC INC DEIk INC + [ LIT "- ] .Console/write DEO + INC DEI ! + +@ ( -- ) ;dict/date [ LIT2 00 -DateTime/dotw ] DEI #20 SFT ;week-txt ADD2 [ LIT2 20 ", ] #18 DEO @@ -27,13 +36,13 @@ #18 DEO .DateTime/year DEI2 ! -@ ( -- ) +@ ( -- ) ;dict/time .DateTime/hour DEIk [ LIT2 ": 18 ] DEO INC DEIk [ LIT2 ": 18 ] DEO - DEI ! + INC DEI ! @ ( str* -- ) &w ( -- )