Juniper-systems Allegro DOS Manual Manual de usuario Pagina 240

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 274
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 239
Page 8-6 Software Developer's Guide for DOS
Allegro Get Keystroke Function (Allegro_Getch())
The following function can be used to put the Allegro to sleep while
waiting for a keystroke.
char Allegro_Getch(void)
{
while(!kbhit()) // do sleep function until key is pressed
{
_asm
{
push ax
push bx
mov ax, 2F19h
mov bl, 10000000b //load regs for sleep call
int 10h //call sleep function
pop bx
pop ax
}
}
return(getch());
}
Allegro CPU Busy Function (Allegro_CpuBusy)
This function overrides the Power Manager and causes the CPU to enter
a high power state. It remains in this state until the Allegro_CpuDone
function is called. It is used to temporarily speed up the CPU when data
needs to be processed rapidly.
void Allegro_CpuBusy (void)
{
_asm
{
push ax
push bx
mov ax, 2E0Bh
mov bl, 0 // setup regs for function call
int 10h // call cpu busy function
pop bx
pop ax
}
}
Vista de pagina 239
1 2 ... 235 236 237 238 239 240 241 242 243 244 245 ... 273 274

Comentarios a estos manuales

Sin comentarios