- [ASM/AXE | SNIPPET] Get time and Get date from the 84+ RTC
- 21 Jan 2015 11:23:44 am
- Last edited by Muessigb on 21 Jan 2015 03:15:03 pm; edited 7 times in total
Time
This code snippet copies the time into L1;
Order: Seconds, Minutes, Hours
Assembly:
Code:
Axe:
Code:
Date
This code snippet copies the time into L1;
Order: Day, Month, (Year?)
Assembly:
Code:
Axe:
Code:
Licence
Name me in the credits or the readme if you want. I'd be happy if you do so, but its really optional. The code is without any warranty. Use it at your own risk.
This code snippet copies the time into L1;
Order: Seconds, Minutes, Hours
Assembly:
Code:
#include "ti83plus.inc"
bcall($515B) ; TI-OS getTime function (stores on the floating point stack)
bcall(_PopRealO1) ; Pop a real from the FPS to OP1
bcall(_ConvOP1) ; Convert OP1 to DE registers (and A LSB)
ld (saveSScreen),de ; Load the contents of DE into {L1}
bcall(_PopRealO1) ; Pop a real from the FPS to OP1
bcall(_ConvOP1) ; Convert OP1 to DE registers (and A LSB)
ld (saveSScreen + 1),de ; Load the contents of DE into {L1}
bcall(_PopRealO1) ; Pop a real from the FPS to OP1
bcall(_ConvOP1) ; Convert OP1 to DE registers (and A LSB)
ld (saveSScreen + 2),de ; Load the contents of DE into {L1}
Axe:
Code:
Asm(EF5B51EF9043EFEF4AED53EC86EF9043EFEF4AED53ED86EF9043EFEF4AED53EE86)
Date
This code snippet copies the time into L1;
Order: Day, Month, (Year?)
Assembly:
Code:
#include "ti83plus.inc"
bcall($514F) ; TI-OS getDate function (stores on the floating point stack)
bcall(_PopRealO1) ; Pop a real from the FPS to OP1
bcall(_ConvOP1) ; Convert OP1 to DE registers (and A LSB)
ld (saveSScreen),de ; Load the contents of DE into {L1}
bcall(_PopRealO1) ; Pop a real from the FPS to OP1
bcall(_ConvOP1) ; Convert OP1 to DE registers (and A LSB)
ld (saveSScreen + 1),de ; Load the contents of DE into {L1}
bcall(_PopRealO1) ; Pop a real from the FPS to OP1
bcall(_ConvOP1) ; Convert OP1 to DE registers (and A LSB)
ld (saveSScreen + 2),de ; Load the contents of DE into {L1}
Axe:
Code:
Asm(EF4F51EF9043EFEF4AED53EC86EF9043EFEF4AED53ED86EF9043EFEF4AED53EE86)
Licence
Name me in the credits or the readme if you want. I'd be happy if you do so, but its really optional. The code is without any warranty. Use it at your own risk.