Program to check whether a 4th bit of a byte is 1, Store FFh if 1, else store 00 in


20. Program to check whether a 4th bit of a byte is 1, Store FFh if 1, else store 00 in :

the same location
mov dptr,#9000h
movx a,@dptr ;move data from external memory location to a
jnb 0e3h,down ;jump to location down, if 4th bit of a is set
inc dptr ;increment dptr
mov a,#0ffh ;move 0ffh to a
movx @dptr,a ;move data from a to external memory location
sjmp last ;jump to location last
down:mov a,#0h ;move 00 to a
inc dptr ;increment dptr
movx @dptr,a ; move data from a to external memory location
last:sjmp last
end


Web Statistics