; int prnthex(int X) { ; X = X & 0xF ; ; if (X<10) ; return X + '0' ; ; else ; return X + ('A'-10) ; ; } [section .text USE32] [section .text] [BITS 32] align 4 GLOBAL prnthex prnthex: push dword ebp mov dword ebp, esp ;;;; OOPS The finally six statements were dropped on ;;;; the floor and now need to be rearranged! add dword eax, +48 and dword eax, +15 cmp dword eax, +9 jg near $prhex jmp $prret mov dword eax, [ebp+8] ;;;; This is the end of the six out-of-order statements $prhex: add dword eax, +55 $prret: pop dword ebp ret