Hi Biterider!
If you have made a table of strings, then is easy to access directly:align ALIGN_CODE
ProcName proc xErrCode:XWORD
mov xdx, offset UefiErrTable
.if xErrCode > 0
mov xax, xErrCode
and xax, 0FFh
.if eax > UefiErrTableCount
mov xax, $OfsCStr("Unknown error")
ret
.else
mov xcx, sizeof(DOM)
mul xcx
add xdx, xax
.endif
.endif
mov xax, [xdx].DOM.pString
ret
ProcName endp
HSE