outport.pas 370 B

12345678910111213141516171819
  1. { example for : outport*()
  2. I/O access
  3. }
  4. { This example demonstrates the use of the outport functions.
  5. It simply turns the PC's internal speaker on for 50 ms and off again.
  6. }
  7. uses crt,
  8. go32;
  9. begin
  10. { turn on speaker }
  11. outportb($61, $ff);
  12. { wait a little bit }
  13. delay(50);
  14. { turn it off again }
  15. outportb($61, $0);
  16. end.