public static RequireParamCountMinMax ( List |
||
param | List |
|
min | int | |
max | int | |
Результат | void |
private List <ushort> AssembleJSR(List <string> param, OpcodeFlag opcodeFlag, ParserState state) { if (opcodeFlag.HasFlag(OpcodeFlag.FarJump)) { Guard.RequireParamCountMinMax(param, 1, 2); // allow two params for immediate far jump. return(state.Parser.AssembleJMI(0x01B9, param[0], param.Count == 2 ? param[1] : null, state)); } Guard.RequireParamCountExact(param, 1); return(state.Parser.AssembleJMI(0x00B9, param[0], null, state)); }
private List <ushort> AssembleJMP(List <string> param, OpcodeFlag opcodeFlag, ParserState state) { Guard.RequireOpcodeFlag(opcodeFlag, new[] { OpcodeFlag.BitWidth16 }); if (opcodeFlag.HasFlag(OpcodeFlag.FarJump)) { Guard.RequireParamCountMinMax(param, 1, 2); return(state.Parser.AssembleJMI(0x01B8, param[0], param.Count == 2 ? param[1] : null, state)); } Guard.RequireParamCountExact(param, 1); return(state.Parser.AssembleJMI(0x00B8, param[0], null, state)); }
private List <ushort> AssemblePOP(List <string> param, OpcodeFlag opcodeFlag, ParserState state) { Guard.RequireParamCountMinMax(param, 1, 13); Guard.RequireOpcodeFlag(opcodeFlag, new[] { OpcodeFlag.BitWidth16 }); return(state.Parser.AssembleSTK(0x00B2, param, true)); }
private List <ushort> AssembleCLF(List <string> param, OpcodeFlag opcodeFlag, ParserState state) { Guard.RequireParamCountMinMax(param, 1, 4); Guard.RequireOpcodeFlag(opcodeFlag, new[] { OpcodeFlag.BitWidth16 }); return(state.Parser.AssembleFLG(0x00AF, param)); }