New upload: IRClock

All aspects of programming on the Commander X16.
Post Reply
User avatar
JimmyDansbo
Posts: 476
Joined: Sun Apr 26, 2020 8:10 pm
Location: Denmark
Contact:

New upload: IRClock

Post by JimmyDansbo »



IRClock


View File





IRClock shows a digital clock in the upper right corner of the screen. This way it is possible to keep an eye on the clock even while being productive on the Commander X16.



The program copies it self into golden RAM, starting at $0400 and takes up a total of 195 bytes. After initialization, the program does not need any of the memory usually used for BASIC and can be overwritten.



When the program is running, the current hour, minute and second can be poked into addresses $400, $401 and $402 respectively.



The values must be BCD encoded which essentially means, just poke them in as hexadecimal values i.e. 11:04 would be poke'd in like this:




Quote




POKE $400,$11



POKE $401,$04





Result is immediately visible.



Souce can be found here:



https://github.com/JimmyDansbo/cx16stuff/blob/master/irclock.asm







 

Visit my Github repo
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
Post Reply