![[About]](e:\os2httpd_1.3.2\htdocs\rexxtipsntricks\about.gif)
![[Toc]](e:\os2httpd_1.3.2\htdocs\rexxtipsntricks\toc.gif)
0.9b (c) 1995 Peter Childs
On Intel processors words and doublewords are saved in the so-called INTEL format (LSB - last signifcant byte first). To use them, you must convert them into the MSB format (MSB - most significant byte first). Before using the following routine, you must convert the value into a hex string (see Get the display resolution for an example).
/* ------------------------------------------------------------------ */ /* function: Convert an WORD or DWORD from LSB format to MSB format */ /* and vice versa */ /* */ /* call: LSB2MSB inputHexString */ /* */ /* where: inputHexstring - input value as hexstring */ /* (e.g. "3412", "78563412") */ /* */ /* output: value in MSB format as hexstring */ /* (e.g. "1234", "12345678") */ /* */ LSB2MSB: PROCEDURE RETURN strip( translate( "12345678", arg(1), "78563412" ) )
Inf-HTML End Run - Successful