Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

In BASCOM 51 the DA A instruction is working wrong.Instead of adding 6 its adding 66.

Status
Not open for further replies.

subish_1087

Newbie level 4
Joined
Feb 24, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,305
In BASCOM 51 the DA A instruction is working wrong.Instead of adding 6 its adding 66.Is there any other way to do decimal adjusting a hex value
 

i checked tat. even if cy flag is reset ,66 is added
 

What numbers cause the problem? Have you tried it with assembler?

Keith

---------- Post added at 08:22 ---------- Previous post was at 08:18 ----------

Also, look at the AC - auxiliary carry flag (usually called half carry)
 

$asm
mov a,#h'09
add a,#h'01
da a
loop1:
sjmp loop1
$end asm
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top