Printing hex from dx with nasm
问题 I actually want to print the content of the dx register with nasm. Thereby the content is a 16 bit hex digit such as 0x12AB. Therefore I've first implemented a function which is able to print a string: print_string: pusha mov ah, 0xe print_character: mov al, [bx] inc bx or al, al jz print_done int 0x10 jmp print_character print_done: popa ret You can use this function in this way: mov bx, MSG call print_string MSG: db 'Test',0 Now i want to have a function, which converts the hex to a string,