Support Forum

Please or Register to create posts and topics.

Time and Date

Hi,

Date & time is only accessible via dot commands .date and .time in Spectrum Next.

I want to use the date & time in my program in ZX Basic, is there any solution?

Thanks,

Paolo

Hello there is a NextZXOS API that can handle this

IDE_RTC ($01cc)
Query the real-time-clock module
IN: -
OUT(s): Fc=1
BC=date, in MS-DOS format
DE=time, in MS-DOS format
H=secs to 1-second precision (time in DE only provides 2-sec precision)
L=100ths of second (or $ff if not supported by RTC module)
OUT(f): Fc=0, real-time-clock module not present
Register status on return:
......../.. same
AFBCDEHL/IX different
NOTE:
This call returns the results provided by the RTC.SYS loadable module.

https://gitlab.com/thesmog358/tbblue/-/blob/master/docs/nextzxos/NextZXOS_and_esxDOS_APIs.pdf

Its not yet been implemented into NextBuild so you will need to do this yourself, or wait until I implmented it as a function (which should happen very soon)

 

 

dbolli has reacted to this post.
dbolli

Hi,

Great news.

I'll wait for new version 🙂

Paolo