You can use AsciiValueToString from PrintLib.
Deric Cole
Sr. Customer Engineer
Phoenix Technologies Ltd.
From: sushma s [mailto:sushma.bharadw...@gmail.com]
Sent: Sunday, September 14, 2014 11:45 PM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] converting UNIT32 value to ASCII format
Hello,
I am trying to convert a UINT32 value into ASCII format in my UEFI driver.
I used the below method. We use EBC compiler for compiling my driver sources.
char hex[5];
int i;
unsigned int src= 0x43313031;
for(i = 0; i<4;i++)
{
hex[i] = src>>(64-(i+1)*8);
}
hex[i] = '\0';
The same code when compiled in gcc compiler gives output, C101.
The same code when used in my driver, gives blank output.
Please let us know if there is any UEFI library function to achieve this
conversion.
Regards,
Sushma.S
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel