Delphi & Pascal (česká wiki)
{ software.pas Copyright (c) Petr Masopust } { Unit pre hru pyramida.pas } { } { Datum:03.09.2018 http://www.trsek.com } unit software; interface function getwinver:word; function getvolkov:boolean; implementation function getwinver:word; var a:word; begin asm mov ax,4680h int 2fh cmp ax,0 jz @n2 mov ah,16h xor al,al int 2fh cmp al,0 jz @winoff cmp al,80h jnz @winon @winoff: xor ax,ax jmp @konec @winon: cmp al,1 jnz @n1 mov al,2 jmp @konec @n1: cmp al,0ffh jnz @konec mov al,2 jmp @konec @n2: mov al,3 xor ah,ah @konec: xchg al,ah mov a,ax end; getwinver:=a; end; function getvolkov:boolean; var a:byte; begin asm mov ah,2bh xor al,al mov cx,'VC' mov dx,'OM' int 21h mov a,al end; if a = $ff then getvolkov:=false else getvolkov:=true; end; end.