CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Major bug in PCH V3.203 with 18f6680????

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
apox



Joined: 04 Jul 2004
Posts: 2

View user's profile Send private message

Major bug in PCH V3.203 with 18f6680????
PostPosted: Sun Jul 04, 2004 5:46 pm     Reply with quote

What's wrong with the compiler.

Here is a disassembly.

#use fast_io(A)
1089: set_tris_a( 0x55 );
0010BC 0E55 MOVLW 0x55 // THIS IS WRONG
1090: output_a(val);
0010C0 CB5B MOVFF 0xb5b, 0xf89 // This is CORRECT
1091:
1092: #use fixed_io(a_outputs=PIN_A2, PIN_A3)
1093: set_tris_a( 0x55 );
0010C4 0E55 MOVLW 0x55 // THIS IS WRONG
1094: output_a(val);
0010C8 0EF3 MOVLW 0xf3 // THIS IS WRONG
1095:
1096: #use standard_io(A)
1097: set_tris_a( 0x55 );
0010D0 0E55 MOVLW 0x55 // THIS IS WRONG
1098: output_a(val);
0010D4 0E00 MOVLW 0 // THIS IS WRONG

HELP!!! Am I doing something wrong?

-Craig Beiferman
Guest








It is not a bug
PostPosted: Sun Jul 04, 2004 10:36 pm     Reply with quote

Hi, Craig:

It does not seem to be a bug to me, what you had is
Quote:

1089: set_tris_a( 0x55 );
0010BC 0E55 MOVLW 0x55 // THIS IS WRONG
1090: output_a(val);
0010C0 CB5B MOVFF 0xb5b, 0xf89 // This is CORRECT

well, what is the opcode in 0010BE Shocked ?? a lot of opcodes are missing in your listing ! What's wrong is your disassembler.

Here is my test code and listing, nothing wrong Smile

Code:
MPASM

CCS PCH C Compiler, Version 3.203, 22330

               Filename: C:\YZ_PIC\My_project_Wu\junk.LST

               ROM used: 64 bytes (0%)
                         Largest free fragment is 57344
               RAM used: 5 (0%) at main() level
                         5 (0%) worst case
               Stack:    0 locations

0000 EF51 F008      00001 GOTO   10A2
0000                00002 ....................
0000                00003 .................... #include <18F6680.H>
0000                00004 ....................  //////// Standard Header file for the PIC18F6680 device ////////////////
0000                00005 .................... #device PIC18F6680
0000                00409 .................... #list
0000                00410 ....................
0000                00411 ....................
0000                00412 .................... int8  val;
0000                00413 .................... #byte val = 0xb5b
0000                00414 ....................
0000                00415 .................... #org 0x10a2, 0x1fff
0000                00416 .................... void main()
0000                00417 .................... {
10A2 6AF8           00418 CLRF   FF8
10A4 9ED0           00419 BCF    FD0.7
10A6 6AEA           00420 CLRF   FEA
10A8 6AE9           00421 CLRF   FE9
10AA 50C1           00422 MOVF   FC1,W
10AC 0BC0           00423 ANDLW  C0
10AE 090F           00424 IORLW  0F
10B0 6EC1           00425 MOVWF  FC1
10B2 0E07           00426 MOVLW  07
10B4 6EB4           00427 MOVWF  FB4
0000                00428 ....................    val = 0x35;
10B6 0E35           00429 MOVLW  35
10B8 010B           00430 MOVLB  B
10BA 6F5B           00431 MOVWF  x5B
0000                00432 ....................
0000                00433 ....................    #use fast_io(A)
0000                00434 ....................       set_tris_a( 0x55 );
10BC 0E55           00435 MOVLW  55
10BE 6E92           00436 MOVWF  F92
0000                00437 ....................       output_a(val);
10C0 CB5B FF89      00438 MOVFF  B5B,F89
0000                00439 ....................
0000                00440 ....................    #use fixed_io(a_outputs=PIN_A2, PIN_A3)
0000                00441 ....................       set_tris_a( 0x55 );
10C4 6E92           00442 MOVWF  F92
0000                00443 ....................       output_a(val);
10C6 0EF3           00444 MOVLW  F3
10C8 6E92           00445 MOVWF  F92
10CA CB5B FF89      00446 MOVFF  B5B,F89
0000                00447 ....................
0000                00448 ....................    #use standard_io(A)
0000                00449 ....................       set_tris_a( 0x55 );
10CE 0E55           00450 MOVLW  55
10D0 6E92           00451 MOVWF  F92
0000                00452 ....................       output_a(val);
10D2 0E00           00453 MOVLW  00
10D4 6E92           00454 MOVWF  F92
10D6 CB5B FF89      00455 MOVFF  B5B,F89
0000                00456 ....................
0000                00457 ....................    while ( 1 );
10DA D7FF           00458 BRA    10DA
0000                00459 .................... }
0000                00460 ....................
10DC 0003           0461 SLEEP

to get above listing, you can use ... Options -> File Formats -> Microchip ... then ... View -> C/ASM List

Best wishes
Ttelmah
Guest







Re: Major bug in PCH V3.203 with 18f6680????
PostPosted: Mon Jul 05, 2004 2:59 am     Reply with quote

apox wrote:
What's wrong with the compiler.

Here is a disassembly.

#use fast_io(A)
1089: set_tris_a( 0x55 );
0010BC 0E55 MOVLW 0x55 // THIS IS WRONG
1090: output_a(val);
0010C0 CB5B MOVFF 0xb5b, 0xf89 // This is CORRECT
1091:
1092: #use fixed_io(a_outputs=PIN_A2, PIN_A3)
1093: set_tris_a( 0x55 );
0010C4 0E55 MOVLW 0x55 // THIS IS WRONG
1094: output_a(val);
0010C8 0EF3 MOVLW 0xf3 // THIS IS WRONG
1095:
1096: #use standard_io(A)
1097: set_tris_a( 0x55 );
0010D0 0E55 MOVLW 0x55 // THIS IS WRONG
1098: output_a(val);
0010D4 0E00 MOVLW 0 // THIS IS WRONG

HELP!!! Am I doing something wrong?

-Craig Beiferman

I suspect from the format of your display, that you are using the 'disassembly' listing in MPLAB?. If so, then in some versions, this only displays the first line of the disassembly for instructions like this. Select 'view program memory' instead. Though this does not then give the source instruction text, it'll show the missing lines of code. All the code being generated looks correct, given that the next line is missing (you can see that this is the case, by looking at the assembler addresses).

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group