Advertisement
Guest User

Read SDX time from CC65

a guest
Sep 1st, 2014
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. void timedate(TimeDate *td)
  2. {
  3.   struct regs r;
  4.   assert(td!=NULL);
  5.   r.pc = 0x703; // KERNEL
  6.   r.y = 100;    // GETTD
  7.   _sys(&r);     // Do Kernel Call.
  8.  
  9.   td->day     = *(byte*) 0x77B;
  10.   td->month   = *(byte*) 0x77C;
  11.   td->year    = *(byte*) 0x77D;
  12.   td->hours   = *(byte*) 0x77E;
  13.   td->minutes = *(byte*) 0x77F;
  14.   td->seconds = *(byte*) 0x780;
  15.  
  16.   return;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement