// ASL - Arithmetic Shift Left
Arithmetic Shift Left
// ASL - Arithmetic Shift Left
func (cpu *CPU) op_asl(info *stepInfo) {
	if info.mode == m_Accumulator {
		if cpu.M == 1 {
			cpu.C   = (cpu.RAl >> 7) & 1
			cpu.RAl = (cpu.RAl << 1)        
			cpu.setZN8(cpu.RAl)
		} else {
			cpu.C   = byte(cpu.RA >> 15) & 1
			cpu.RA  = (cpu.RA << 1)
			cpu.setZN16(cpu.RA)
		}
	} else {
		if cpu.M == 1 {
			value  := cpu.cmdRead(info)
			cpu.C   = (value >> 7) & 1
			value   = (value << 1)
			cpu.cmdWrite(info, value)
			cpu.setZN8(value)
		} else {
			value  := cpu.cmdRead16(info)
			cpu.C   = byte(value >> 15) & 1
			value   = (value << 1)
			cpu.cmdWrite16(info, value)
			cpu.setZN16(value)
		}
	}
}
func ( cpu * CPU ) op_asl ( info * stepInfo ) { if info . mode == m_Accumulator { if cpu . M == 1 { cpu . C = ( cpu . RAl >> 7 ) & 1 cpu . RAl = ( cpu . RAl << 1 ) cpu . setZN8 ( cpu . RAl ) } else { cpu . C = byte ( cpu . RA >> 15 ) & 1 cpu . RA = ( cpu . RA << 1 ) cpu . setZN16 ( cpu . RA ) } } else { if cpu . M == 1 { value := cpu . cmdRead ( info ) cpu . C = ( value >> 7 ) & 1 value = ( value << 1 ) cpu . cmdWrite ( info , value ) cpu . setZN8 ( value ) } else { value := cpu . cmdRead16 ( info ) cpu . C = byte ( value >> 15 ) & 1 value = ( value << 1 ) cpu . cmdWrite16 ( info , value ) cpu . setZN16 ( value ) } } }
Arithmetic Shift Left
Arithmetic Shift Left
// or cpu.RAl <<= 1