?login_element?
?pathlinks? – Rev 1668
Rev 1634 |
Blame |
Compare with Previous |
Last modification |
View Log
| Download
#include <stdio.h>
#include <string.h>
#include <intrz80.h>
#include <stdlib.h>
#include <oscalls.h>
unsigned char *p;
void error(void)
{
printf("Usage: sleep.com delay \r\n");
printf("Delay in range from 0 to 32000 ms with step of 50ms\r\n");
printf("If delay = 0 then program waiting for keypress\r\n");
}
C_task main(int argc, char *argv[])
{
unsigned int counter;
long start, finish;
unsigned char key;
os_initstdio();
if (argc == 2)
{
p = argv[1];
if (counter > 32000)
{
counter = 0;
}
if (counter == 0)
{
do
{
key = _low_level_get();
} while (key == 0);
}
counter = counter / 20;
if (counter < 1)
{
counter = 1;
}
finish = start + counter;
while (start < finish)
{
YIELD();
}
}
error();
// return 0;
}