💾 Archived View for blitter.com › OLGA › MUSIC › RESOURCES › DOS_TAB_UTILS › TABPLAY › SOURCES › TIM… captured on 2024-08-18 at 19:38:38.

View Raw

More Information

⬅️ Previous capture (2022-06-12)

-=-=-=-=-=-=-

#include <dos.h>
#include <bios.h>
#include <conio.h>

#define timer_irq 0x8
#define timer0 0x40
#define timer1 0x41
#define timer2 0x42
#define timermode 0x43
#define timerconst 1193180L
#define timer0def 18.2067597
#define kbcntl 0x61
#define new_int8 1

static float tick_per_ms = 0.0182068;
static float ms_per_tick = 54.9246551;
static float freq_td = 18.2067597;
static unsigned char flag_td = 0;
static void interrupt(*old_td) (void);

volatile int counter_td;
volatile int counter_reset;
volatile unsigned long int ticks_td;

char *get_sys_time(void);
void interrupt new_td(void);
void init_td(unsigned int);
void end_td(void);
unsigned long time_td(unsigned long, unsigned long);
void delay_td(unsigned int);
void sound_td(int, int);

extern volatile unsigned long int ticks_td;