Example #1
0
    public static int memoryReadShort(int address)
    {
        int lout = CRunTime.memoryReadShortUnsigned(address);

        /* Sign-extend */
        if ((lout & (1 << 15)) != 0)
        {
            return((int)(lout | 0xffff0000));
        }

        return(lout);
    }