I searched around quiet awhile for this but I still haven't found an answer so Im sorry if this was answered before so Ill get to it So say we have 23 which is in ecx i want to be able to print it out to the screen as the character or scancode it is.. I thought it would be something with print uhex$() or something along those lines? but it doesnt seem to be printing.. THanks!
Well I guess I could always use wsprintf... is there anything more efficient I could do?
Multiple things. This must be built as a console app.
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
include \masm32\include\masm32rt.inc
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
.data
.code
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
start:
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
mov ebx, 23h
print ustr$(ebx),13,10
print uhex$(ebx),"h",13,10
invoke crt_putchar, ebx
print chr$(13,10)
invoke crt_printf, chr$("%d%c%Xh%c%c%c"), ebx, 10, ebx, 10, ebx, 10
inkey "Press any key to exit..."
exit
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
end start
35
00000023h
#
35
23h
#
Regarding the keyboard scancode to character conversion, a scancode identifies a keyboard key, and while most keys do have a corresponding character, many do not (for example: function keys, cursor control keys, shift keys, etc).
Thanks alot! I went with crt_putchar works great!