1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-03 06:29:36 +00:00

added sleep() implementation

git-svn-id: svn://svn.cc65.org/cc65/trunk@2324 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
izydorst 2003-08-15 19:24:20 +00:00
parent b499757ee4
commit bc6dadb3db
2 changed files with 24 additions and 1 deletions

View File

@ -10,7 +10,7 @@
%.o: %.s
@$(AS) -o $@ $(AFLAGS) $<
C_OBJS = _afailed.o abort.o perror.o
C_OBJS = _afailed.o abort.o perror.o sleep.o
S_OBJS = copydata.o memcpy.o memset.o zerobss.o
all: $(C_OBJS) $(S_OBJS)

View File

@ -0,0 +1,23 @@
/*
* sleep.c
*
* Maciej 'YTM/Elysium' Witkowiak, 15.08.2003
*
*/
#include <geos.h>
unsigned __fastcall__ sleep (unsigned wait)
{
char typ;
if ( (get_tv()) & TV_NTSC ) {
typ = 60;
} else {
typ = 50;
}
Sleep(wait*typ);
return 0;
}