Esempio n. 1
0
        private void StoreGlobals(byte dest, byte value)
        {
            var globalsIdx = ZGlobals.GetGlobalsNumber(dest);

            Log.Write($"-> GLB{globalsIdx:X2} = ({value:X2}), ");
            _globals.Set(globalsIdx, value);
        }
Esempio n. 2
0
        public static byte VariableId(byte dest)
        {
            var variableDestinations = VariableDestination(dest);

            return(variableDestinations == VariableDestinations.Local
                ? (byte)0
                : variableDestinations == VariableDestinations.Variable
                    ? (byte)(dest - 1)
                    : ZGlobals.GetGlobalsNumber(dest));
        }
Esempio n. 3
0
 public VariableManager(IZStack stack, ZGlobals globals)
 {
     _globals = globals;
     _stack   = stack;
 }
Esempio n. 4
0
        private void StoreInGlobals(byte dest, ushort value)
        {
            Log.Write($"-> GLB{ZGlobals.GetGlobalsNumber(dest):X2} ({value:X4}), ");

            _globals.Set(ZGlobals.GetGlobalsNumber(dest), value);
        }