/
Upper and Lower Byte Exchanges : SWAP, SWAPP

Upper and Lower Byte Exchanges : SWAP, SWAPP

명령

사용 가능 영역

스텝수

플래그

M

X

Y

K

L

F

T

C

S

Z

D

@D

정수

에러

제로

캐리

SWAP

SWAPP

D

-

-

-

-

2

-

-

 

 

D

데이터를 저장할 영역

에러(F110)

영역이 @D로 지정된 경우 영역 초과가 발생하면 SET

 

SWAP

SWAP

  • D영역 데이터를 상위 바이트와 하위바이트를 바꾸어 다시 D영역에 저장합니다.

 

프로그램 예

  • 입력신호 X0001가 ON 되었을 때 Y0000의 상위 8비트와 하위 8비트를 바꾸어 다시 저장하는 프로그램

 

 

 

 

 

Related content

데이터전송명령
데이터전송명령
More like this
16 and 32 Bit Data Exchange : XCH, XCHP, DXCH, DXCHP
16 and 32 Bit Data Exchange : XCH, XCHP, DXCH, DXCHP
More like this
Bit Data Transfer : BITMOV, BITMOVP
Bit Data Transfer : BITMOV, BITMOVP
More like this
POSCTRL
More like this
16 Bit and 32 Bit Data Transfer : MOV, MOVP, DMOV, DMOVP
16 Bit and 32 Bit Data Transfer : MOV, MOVP, DMOV, DMOVP
More like this
SWAP
More like this