0% found this document useful (0 votes)
56 views1 page

Prog 4

Uploaded by

api-3705912
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views1 page

Prog 4

Uploaded by

api-3705912
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

##################################################

#########################

Bit Manipulation

##################################################
#########################

.aseg bits,data
.org 30h
num1 .dsb 1
.aseg mycode,code
.org 1fh
jmp addr2
.org 2fh
jmp addr1
.rseg adi,code
mov num1,#10101101b
mov acc,num1
clr acc.0 ;clear 0th bit of acc
setb acc.2 ;set 2nd bit of acc
addr: cpl acc.6 ;complement 6th bit of acc
jb acc.5,1fh
addr2: cpl acc.4 ;complement 4th bit of acc
jb acc.4,2fh
addr1: mov psw,#00h
mov r0,num1
finish: nop
.end

You might also like