code: def _cast(ins):
      
      # Signed and unsigned types are the same in the Z80
      tA = ins.quad[2]  # From TypeA
      tB = ins.quad[3]  # To TypeB
  
      YY_TYPES[tA]  # Type sizes
      xsB = sB = YY_TYPES[tB]  # Type sizes
  
      output = []
      if tA in ('u8', 'i8'):
          output.extend(_8bit_oper(ins.quad[4]))
      elif tA in ('u16', 'i16'):
          output.extend(_16bit_oper(ins.quad[4]))
      elif tA in ('u32', 'i32'):
          output.extend(_32bit_oper(ins.quad[4]))
      elif tA == 'f16':
          output.extend(_f16_oper(ins.quad[4]))
      elif tA == 'f':
          output.extend(_float_oper(ins.quad[4]))
      else:
          raise errors.GenericError(
              'Internal error: invalid typecast from %s to %s' % (tA, tB))
  
      if tB in ('u8', 'i8'):  # It was a byte
          output.extend(to_byte(tA))
      elif tB in ('u16', 'i16'):
          output.extend(to_word(tA))
      elif tB in ('u32', 'i32'):
          output.extend(to_long(tA))
      elif tB == 'f16':
          output.extend(to_fixed(tA))
      elif tB == 'f':
          output.extend(to_float(tA))
  
      xsB += sB % 2  # make it even (round up)
  
      if xsB > 4:
          output.extend(_fpush())
      else:
          if xsB > 2:
              output.append('push de')  # Fixed or 32 bit Integer
  
          if sB > 1:
              output.append('push hl')  # 16 bit Integer
          else:
              output.append('push af')  # 8 bit Integer
  
      return output
docs: Convert data from typeA to typeB (only numeric data types)