public virtual void SetLabel(int absoluteAddr, string name)
 {
     if (_label == null)
         _label = new ZLabel(name, new ZAddress(absoluteAddr));
     else if (_label.TargetAddress == null)
     {
         _label.TargetAddress = new ZAddress(absoluteAddr);
         _label.Name = name;
     }
     else
     {
         _label.TargetAddress.Absolute = absoluteAddr;
         _label.Name = name;
     }
 }
예제 #2
0
 /// <summary>
 /// Creates a new instance of a ZOperand with <see cref="ZLabel"/> as value.
 /// </summary>
 /// <param name="value">The value as ZLabel.</param>
 public ZOperand(ZLabel value)
 {
     _value = value;
     _subComponents.Add(value);
     _operandType = OperandTypeKind.LargeConstant;
 }
예제 #3
0
 /// <summary>
 /// Creates a new instance of a ZInstructionBr. Check the complete table of opcodes for valid values.
 /// </summary>
 /// <param name="name">The Inform name for the used opcode. It is used for debugging purposes only, so you COULD leave this empty or null.</param>
 /// <param name="opcodeNumer">The opcode number.</param>
 /// <param name="opcodeType">The opcode type.</param>
 /// <param name="branch">The branch label.</param>
 /// <param name="operands">The operands to use.</param>
 public ZInstructionBr(string name, byte opcodeNumber, OpcodeTypeKind opcodeType, ZLabel branch, params ZOperand[] operands)
     : base(name, opcodeNumber, opcodeType, operands)
 {
     _branch = branch;
     _subComponents.Add(branch);
 }