hi
after removing <arch/zx.h> it works again. the accidental reinstall has no other results. nice.
Yet now i get a 16bit answer aswell ... i do someting wrong with the %d vs %u aperently
meanwhile an other mistery rose after making:
Code: Select all
void zx_time(){
// do the longs need pointers ?? TODO make zx_real_time() or zx_rtime()
unsigned long clock; // /50=
unsigned long clk50; // clk50= clock % 50 ( modulo 50)
unsigned long seconds; // /60=
unsigned long sec60; // sec60= seconds % 60
unsigned long minutes; // /60=
unsigned long min60; // min60= minutes % 60
unsigned long hours; // /24=
unsigned long hor24; // hor24= hours % 24
unsigned long days; // its a 24 bit 'only', days can be char
// modulo MONTH of 28,29,30 or 31 days
clock = FRAMES & 0x00FFFFFF ; //fetch FRAME when needed aka 'now'
clk50 = clock % 50 ;
seconds = clock / 50 ;
sec60 = seconds % 60 ;
minutes= seconds / 60 ;
min60= minutes % 60 ;
hours= minutes / 60 ;
hor24= hours % 24 ;
days = hours / 24 ; // its a 24 bit 'only', days can be char
printf("%lud: %luh: %lum: %lus: %lufr\n", days ,hor24 , min60 , sec60 , clk50 );
//make a string ??
return ;
}
it does NOT print the time
while when i put it just in the middle it DOES:
Code: Select all
case 'T' : // 24bit aka 'time' or 'frames'
unsigned long clock; // /50=
unsigned long clk50; // clk50= clock % 50 ( modulo 50)
unsigned long seconds; // /60=
unsigned long sec60; // sec60= seconds % 60
unsigned long minutes; // /60=
unsigned long min60; // min60= minutes % 60
unsigned long hours; // /24=
unsigned long hor24; // hor24= hours % 24
unsigned long days; // its a 24 bit 'only', days can be char
// modulo MONTH of 28,29,30 or 31 days
clock = FRAMES & 0x00FFFFFF ; //fetch FRAME when needed aka 'now'
clk50 = clock % 50 ;
seconds = clock / 50 ;
sec60 = seconds % 60 ;
minutes= seconds / 60 ;
min60= minutes % 60 ;
hours= minutes / 60 ;
hor24= hours % 24 ;
days = hours / 24 ; // its a 24 bit 'only', days can be char
printf("%6u %8s %3u %s %9lu ", sysadr , sysnm , syslen , systype , clock ) ;
for (f=0 ; f< syslen ; f++ )
{
sysadr2 = sysadr + f ;
syschar = *sysadr2 ;
printf("%4u", syschar );
if (f<syslen-1) printf(",");
}
printf("\n");
//works
printf("%lud: %luh: %lum: %lus: %lufr\n", days ,hor24 , min60 , sec60 , clk50 );
//works NOT
zx_time ;
printf("\n");
break;
www.cborn.nl/c/zxsv05i5.c
www.cborn.nl/c/zxsv05i5.tap