Mask lower nibble in Assembly -masm 8086

Mask lower nibble in Assembly -masm 8086

org 100h
.stack 100h
.data
var DB 0FFh
.code
;Initilization of data Segment
mov ax,@DATA
mov DS,ax
;Bit masking of Lower nibble to 0
mov al,var
and al,0F0h
mov var,al
;to terminate program
mov ah,4ch
int 21h
ret

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s