uses crt; Function Hex(x:word):string; const h16:array[0..15] of string[1]=('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'); var s:string; begin s:=h16[x div 4096]; x:=x mod 4096; s:=s+h16[x div 256]; x:=x mod 256; s:=s+h16[x div 16]; x:=x mod 16; s:=s+h16[x]; hex:=s; end; var a:byte; b:word; begin clrscr; for a:=0 to 3 do begin b:=mem[$40:9+a*2]*256+mem[$40:8+a*2]; if b>0 then writeln(hex(b),' hex ',b,' ondalik LPT',a+1) else writeln(' Lpt',a+1,' paralel portu yok!'); end; writeln; for a:=0 to 3 do begin b:=mem[$40:1+a*2]*256+mem[$40:a*2]; if b>0 then writeln(hex(b),' hex ',b,' ondalik Seri port COM',a+1) else writeln(' COM',a+1,' seri portu yok!'); end; end.