I've been pulling my hair out for a few days now, and it's time for some professional help. I have to write a short assembly language program that takes one input from the keyboard (any single key), and displays its ascii hex code on the screen. For example, you run the program and it waits for an input from they keyboard. If you type a 0 (zero), it should display 30 on the screen (30 being the ascii hex code for zero). I've come up with several ways to echo the key on the screen, which would be great if that's what I needed to do.
Here's the shortest version of my many incorrect versions:
;set disp mode 02h, erase all pages:
;set page 1:
;position the cursor:
;display the key
I also have versions with int 10h instead of 21h, but I get the same results.
I think it has something to do with moving the hex code from AL to memory, then extracting it as a string and printing the two characters one at a time - but I'm really not sure.