Jump to content
  • 0

How do you read the system time on the computer?


CptPatriot
 Share

Question

I found that TI$ seems to run fast on the emulator, and I remember reading that there was a call to the system clock. Now, https://github.com/commanderx16/x16-docs/blob/master/Commander X16 Programmer's Reference Guide.md#clock looks like the info but now that I have this info, I'm not sure how to read it. Will I need a ML subroutine to use this information?

 

Edited by CptPatriot
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

It seems like you should not need ML routine to use these functions.  To set the time should just require poking the desired values in the in-memory registers(memory locations $02,$03, etc) and then making a SYS $FF4D call to the function.  Similarly, a SYS $FF50 should allow you to read the values from the registers.   Unfortunately it looks like the RTC may not be implemented in the emulator(hopefully I am wrong on this),  so test does not be possible.

 

 

Link to comment
Share on other sites

  • 0
  • Administrators

TI$ and DA$ are BASIC frontends to these exact functions, so you should rather use them.

If the time is too fast, that's surprising. If your computer is too slow for real-time emulation, time will run too slowly (which is expected and correct), but it shouldn't be too fast.

Can you measure it, and a file a bug on GitHub against the emulator?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use