8051 microcontroller

Status
Not open for further replies.

ramanuja

New Member
hi everybody

can anybody tell, how DIV instruction in 8051 affects the overflow flag?
i know overflow may occur during multiplication, but how is it possible in division operation?

regards
ramanuja
 
Last edited:
Hi..

ramanuja said:
hi everybody

can anybody tell, how DIV instruction in 8051 affects the overflow flag?
i know overflow may occur during multiplication, but how is it possible in division operation?

What i feel is that.. it doens not affect the overflow flag.. might be overflowing due to other reasons..

Hey note.. if you are using a compiler called 'keil' or 'raisonance' then overflowing may mean other thing also..

till then check page number 23 of this manual and download that also ..

https://www.electro-tech-online.com/custompdfs/2007/09/at_c51ism.pdf

Regards,

Simran..
 
From the 8051 Instruction Set Manual

The overflow and carry flags are cleared, except if B = 0, then overflow is set and carry is cleared.

Compilers have absolutely NO effect on the behavior of the hardware. It is what it is, and there is nothing you can do about it.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…