softint.pas 387 B

12345678910111213141516171819202122232425
  1. { Executes a real mode software interrupt
  2. Exactly the interrupt call to get the DOS version.
  3. get DOS version Int 21h / function 30h
  4. Input:
  5. AH = $30
  6. AL = $1
  7. Return:
  8. AL = major version number
  9. AH = minor version number
  10. }
  11. uses
  12. go32;
  13. var
  14. r : trealregs;
  15. begin
  16. r.ah := $30;
  17. r.al := $01;
  18. realintr($21, r);
  19. Writeln('DOS v', r.al,'.',r.ah, ' detected');
  20. end.