Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GetIt Reference Guide - syntax: ch_asc2(<expc>, [<positionn>]) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Syntax: CH_ASC2(<expC>, [<positionN>])

Returns two byte unsigned starting at specified string position.

Example

* display unsigned integer contained in bytes 4-5 of String
? CH_ASC2(String,4)

Notes

If position is omitted, the first byte (1) is assumed.

The integer is assumed to be stored in standard low-high format.

To convert an unsigned to a signed integer, use the following UDF:

     FUNCTION signedint
     PARAMETER unsigned
     RETURN IIF(unsigned < 2^15,unsigned,2^15-unsigned)

E.g.,

     SIGNEDINT(ASC2(String,4))

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson