Classic Computer Magazine Archive ANTIC VOL. 5, NO. 1 / MAY 1986

Instant hexadecimal/decimal translation

HEX CONVERTER

by BRUCE BRIGDEN

Here's a short BASIC program that quickly converts decimal numbers to hexadecimal--and vice versa. Hex Converter works on all 8-bit computers of any memory size, with disk or cassette.

Type it in, check it with TYPO II, and SAVE a copy. When you RUN the program, a colorful screen appears prompting you to choose a conversion from hex to decimal, or decimal to hex. Press [H] or [D], then type in your number (without $ for hex) and press [RETURN] for an instant conversion. Press [ESC] at any time to switch conversion direction.

Hex Converter can handle very large numbers-up to 20 characters in hex and 4.3 billion for decimal. That should be high enough for addresses even in the megabyte Ataris on the horizon!

Listing:HEXCON.BAS Download