Inputting multi-radix multi-digit signed numbers with DOS shows how to do this particular conversion in the answer's code snippets 2a and 2b. You can also learn how to convert from octal and binary.
Don't be misguided by the mention "DOS". Many principles remain the same, and if you're currently clueless it will be a good starting point. You can change the code in accordance with your  needs and skill level. And if that doesn't work out, then you can post a question including the code that you've tried.
Here's an adaptation of the mentioned snippets:
snippet 2a
    ; Hexadecimal
.a: inc   esi             ; Next character
    shl   eax, 4          ; Result = Result * 16
    movzx edx, byte [esi] ; -> DL = {["0","9"],["A","F"]} (NewDigit)
    cmp   dl, "9"
    jbe   .b
    sub   edx, 7
.b: sub   edx, 48
    or    eax, edx        ; Result = Result + NewDigit
    dec   ecx
    jnz   .a
snippet 2b with character validation and overflow detection
    ; Hexadecimal
.a: inc   esi             ; Next character
    movzx edx, byte [esi] ; -> DL = {["0","9"],["A","F"]} (NewDigit) ?
    cmp   dl, "9"
    jbe   .b
    sub   edx, 7
.b: sub   edx, 48
    cmp   dl, 15
    ja    .z              ; Stop if not a digit
    rol   eax, 4          ; Result = Result * 16
    test  al, 15
    jnz   .o              ; Overflow
    or    eax, edx        ; Result = Result + NewDigit
    dec   ecx
    jnz   .a