Compiler bdata misterous code (BUG) ?

A catchall for PSoC3 discussions not captured by the other forums.

Moderator: ericb

Compiler bdata misterous code (BUG) ?

Postby psocExperimenter » Mon Jan 06, 2014 2:03 am

I want to do sth, which is the simplest ever case. Some logic AND and or on uint16.
PSOC3_fan_func.jpg
PSOC3_fan_func.jpg (5.93 KiB) Viewed 2063 times

I found that compiler understands FanFunc as uint8 and produce useless code.
; SOURCE LINE # 281
E MOV FanFunction,#00H
; SOURCE LINE # 282
R MOV A,indx
MOV R6,A
CLR A
MOV A,R6
E ORL FanFunction,A
WHen I change the code to:
FanFunction = 0x00FF;
I get
E MOV FanFunction,#00H
E MOV FanFunction+01H,#0FFH
I have hunders of such assignments in my code, which is not working. How to figure out which is understood Keil's way?
psocExperimenter
Cheese Wheel
Cheese Wheel
 
Posts: 109
Joined: Wed Oct 19, 2011 12:35 am

Re: Compiler bdata misterous code (BUG) ?

Postby psocExperimenter » Mon Jan 06, 2014 2:08 am

Everything is OK.
Keil is smarter than I initially thought.
Sorry
psocExperimenter
Cheese Wheel
Cheese Wheel
 
Posts: 109
Joined: Wed Oct 19, 2011 12:35 am

Re: Compiler bdata misterous code (BUG) ?

Postby bobmarlowe » Mon Jan 06, 2014 2:13 am

Difficult not to comment your last post :mrgreen:


Bob
User avatar
bobmarlowe
The Big Cheese
The Big Cheese
 
Posts: 1490
Joined: Thu Oct 06, 2011 2:03 am
Location: Germany


Return to “%s” PSoC3 General

Who is online

Users browsing this forum: No registered users and 1 guest

cron