int main (void) { char playing; while (1) { init_timer(&data[6], &data[0]); init_power(); set_lcd_segment(0x3020); refresh_display(); play_system_sound(0x4003, 1); wait_release(); wait_press(); play_system_sound(0x4003, 0); do { get_sound_playing_flag(0x700c, &playing); } while (playing); clear_display(); refresh_display(); shutdown_timer(); shutdown_power(); } return 0; }
int main (void) { long i; init_timer(&data[6], &data[0]); init_power(); play_system_sound(0x4003, 1); clear_display(); for (i = -5; i <= 5; i++) { set_lcd_number(LCD_SIGNED, i % 5, LCD_DECIMAL_0); refresh_display(); wait_release(); wait_press(); } for (i = -5; i <= 5; i++) { set_lcd_number(LCD_SIGNED, i % -5, LCD_DECIMAL_0); refresh_display(); wait_release(); wait_press(); } shutdown_timer(); return 0; }
int main (void) { char playing; init_timer(&async, &dispatch[0]); init_power(); set_lcd_segment(0x3020); refresh_display(); play_system_sound(0x4003, 1); do { get_sound_playing_flag(0x700c, &playing); } while (playing); shutdown_timer(); return 0; }
void play_sound(int num) { if (strlen(sound[num].file)==0) return; if (!(pfnMciPlayFile) || (strcmp(sound[num].file,BEEP)==0)) { DosBeep(200,200); return; } if (isdigit((int)(*sound[num].file))) play_system_sound(sound[num].file); else { char buf[MAXSTR]; buf[0] = '\042'; strcpy(buf+1, sound[num].file); strcat(buf, "\042"); if ((*pfnMciPlayFile)(hwnd_frame, (PSZ)buf, 0, 0, 0)) DosBeep(200,200); } }
int main (void) { char playing; short count = -10; int count2 = 0; int sound = 0; int i, j; unsigned char op = 0; char code; while (1) { init_timer(&data[6], &data[0]); init_power(); play_system_sound(0x4003, 1); #if 1 init_buttons(); clear_display(); #endif #if 0 *((volatile void **)0xfda2) = motor_control; while (1); #endif #if 0 while (1) { for (j = 0; j < 100; j++) { percent=j; set_lcd_number(0x3001, j, 0x3002); refresh_display(); for (i = 0; i < 1000; i++); } } #endif #if 0 while (1) { int i; *((short *)0xc000) = 0x0; #if 0 count2 += *((short *)0xfb7f); #endif for (i = 0; i < 1000; i++) { count++; } } #endif #if 0 while (1) { set_lcd_number(0x3017, count, 0x3002); refresh_display(); count ++; #if 1 wait_release(); wait_press(); #endif } #endif #if 1 count = 1; while (1) { set_lcd_number(0x301f, count, 0x3002); refresh_display(); count ++; wait_release(); wait_press(); } #endif #if 0 set_lcd_number(0x301f, 0xffff, 0x3002); refresh_display(); wait_release(); wait_press(); break; #endif #if 0 play_system_sound(0x4003, 0); do { get_sound_playing_flag(0x700c, &playing); } while (playing); clear_display(); refresh_display(); shutdown_power(); #endif } return 0; }