14 >>>>

Source code for hack.pas

program hexhack;
{This program was designed for Turbo Pascal, if it doesn't}
{work on your version of pascal, remove the uses crt; and clrscr; commands}
{Program to convert a number into it's file hexadecimal equivalent}

uses crt;

var
number, {Number user enters}
n1, {hex number range 1 (0-255)}
n2, {hex number range 2 (256-65280)}
n3, {hex number range 3 (65536-16711680)}
n4, {hex number range 4 (16777216-4278190080)}
n1a, {n1 remainder}
n2a, {n2 remainder}
n3a, {n3 remainder}
n4a, {n4 remainder}
num, {number for procedure hexit to convert}
sixteen10, {the left hex char}
lessixteen:longint; {the right hex char}
hx:string[2]; {the total hex char}

procedure hexit;
{procedure to convert the number in num into hex format}
begin
hx:='';
sixteen10:=num div 16; {seperate the base 16 "10"s field}
lessixteen:=num mod 16; {seperate the base 16 "1"'s field}

{convert the base 16 "10"s field into hex character}
case sixteen10 of
0 : hx:='0';
1 : hx:='1';
2 : hx:='2';
3 : hx:='3';
4 : hx:='4';
5 : hx:='5';
6 : hx:='6';
7 : hx:='7';
8 : hx:='8';
9 : hx:='9';
10 : hx:='A';
11 : hx:='B';
12 : hx:='C';
13 : hx:='D';
14 : hx:='E';
15 : hx:='F';
else
end;