home *** CD-ROM | disk | FTP | other *** search
- (* ------------------------------------------------------ *)
- (* SCANINFO.PAS *)
- (* (c) 1988, 1989 K.F.Wienecke & TOOLBOX *)
- (* ------------------------------------------------------ *)
- PROGRAM ScanInfo;
-
- USES Crt, Dos;
-
- TYPE string5 = STRING[5];
- string16 = STRING[16];
-
- VAR regs : Registers;
- digit_string : string16;
-
- FUNCTION HexVal(number : WORD; positions : BYTE) : string5;
- VAR count : BYTE;
- help_string : string5;
- BEGIN
- help_string := '';
- FOR count := 1 TO positions DO BEGIN
- Insert(digit_string[(number MOD 16)+1], help_string, 1);
- number := number SHR 4;
- END;
- HexVal := '$' + help_string;
- END;
-
- BEGIN
- ClrScr;
- digit_string := '0123456789ABCDEF';
- Write('Ende mit [ESC]');
- WITH regs DO
- REPEAT
- ah := $10;
- Intr($16, regs);
- GotoXY(1,6);
- WriteLn('ax =', hexval(ax, 4):6, #$0A);
- WriteLn('ah =', hexval(ah, 2):6, #$0A);
- WriteLn('al =', hexval(al, 2):6, #$0A#$0A);
- Write ('ASCII = ', chr(al));
- UNTIL ax = $011B;
- ClrScr;
- END.
- (* ------------------------------------------------------ *)
- (* Ende von SCANINFO.PAS *)
-