Well, I'd already typed a pageful of guff so might as well post it, though its much quicker to do than to describe
Actually charset is an awkward example as the Intel hex file has two parts. Taking the first part as an example (the second part is done the same way, with its own addresses):
From the hex file we need three things for each part. Where the part starts, where it ends and the length.
Visually reading the hexfile you can see that the first part of showchar is from 0880 to 08C5 - mental note!
Find the code length by subtracting the first address used from the last and
add one which in this case is 46h. (8C5-880+1)
Using
debug.exe that was supplied as part of MSDOS and these days needs to be run under DOSBOX - you'll need to
set the right dos version with (say) "ver set 6 22" in dosbox...
You run debug from the dos prompt with the hex file suffixed:
debug charset.hex
It loads the content of the hex file (both parts) as a binary into memory at the address(es) specified in the hex file,
then replies with its own "
-" prompt.
You can see the code and confirm it looks like the hex file by typing
-d880 (or wherever its loaded)
Debug saves from location 100h (because its CP/M derived) so we need to move the code down to 100h using the M command:
(move from start address, through end address, to destination)
-m880 8C5 100
The code is now down at 100h where it can be saved.
Give the binary a name using the N command:
-ncharset.bin
and set the code length in cx using the R command:
-rcx
-46
then you can write the binary using the W command:
[be careful not to include any numbers here, just a 'W' and press return]
-w
Control/C to exit debug and a dir should show showchar.bin in the current directory.
*or*
Run HxD, drag across the required code, save as bin