Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top