RSS
Facebook
Twitter

Friday, May 06, 2011

assembly : DATA TRANSFER 8 dan 16 BIT

mov dest_operand, source_operand


dest_operand dapat berupa register
variabel
lokasi memori*


source_operand dapat berupa register
variabel
lokasi memori*
integer


* = jika salah satu operand sudah bertipe lokasi memori, maka operand lain tidak boleh bertipe sama
DATA TRANSFER 8 BIT

mov al, 80
mov bl, ch
mov [150], dl


DATA TRANSFER 16 BIT

mov ax, 80 = mov ax, 0080

mov bx, 1234 = mov bh, 12
mov bl, 34
mov cx, dx = mov ch, dh
mov cl, dl
mov [150], ax = mov [150], al
mov [151], ah
mov ax, [120] = mov al, [120]
mov ah, [121]


XCHG 8 Bit

XCHG AL, AH

XCHG 16 Bit

XCHG [150],AX

0 komentar: