Okay, so first we're going to load the graphic file. Note it can be in a subdirectory within the directory as well so it doesn't have to be in the exact same as your source files. In fact, most people tend to make a "Media" folder and keep all their graphics and media files in that. We'll keep it in the same folder for now though.
To load the image we just use the code:
Load Image Filename, ImageNumber
You will want to replace Filename with the filename of your graphic and imagenumber with any positive number. For instance:
Load Image "a.bmp", 1
Now with that image loaded we can use the following command to paste it to the screen:
Sprite SpriteNumber, XPosition, YPosition, ImageNumber
We've already determined the ImageNumber as 1 from our previous line, and you've already written the code to find the X and Y positions so that just leaves the SpriteNumber which can be anything you like. We'll use 1 again.
Sprite 1, letterX, letterY, 1
Put that line in your loop in place of "text letterX, letterY, letter$" and it will work. Full source code attached. Hope this helps.
"Computers are useless they can only give you answers."