Source file: /~heha/hs/vcall0.zip/VCALL0TC.C

#include <stdio.h>
#include <dos.h>
#include "vcall0.h"
int counter;

unsigned far KernelService(void) {
 return inportb(0x40);	//im Ring 0 abzuarbeiten!
}

void far KernelInterrupt(void) {
 counter++;
}

void main(void) {

 if (!VCall0_Entry) {
  puts("VCall0.386 nicht resident!");
  return;
 }
 printf("Version von VCALL0: %d.%d\n",
   GetVCall0Ver()>>8,
   GetVCall0Ver()&0xFF);
 printf("call0(inportb(0x40)) liefert 0x%X\n",
  (unsigned)Call0(KernelService));
 if (!high_freq(10000,KernelInterrupt)) {
  puts("kein High-Freq heute!");
  return;
 }
 delay(500);	// unter Windows eher eine Zufallsfunktion :-(
 high_freq(0,NULL);
 printf("counter=%d\n",counter);
}
Detected encoding: ASCII (7 bit)2