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 CCS Technical Support

Disassembly lising

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







Disassembly lising
PostPosted: Wed Nov 15, 2006 4:47 am     Reply with quote

I am using MPLAB 7.50.00.00 with version 4.0.0.206 of the pch compiler.
The problem I get is that the code in the listing file is not in location order.
The problem this causes is that when a breakpoint is place in the 'c' file the 'c' code line does not allways line up with the actual code line in the disassembly file and so the break is placed elswhere in code
eg
Code:
   //***********************************************
   COLDstart:
   //***********************************************
   disable_interrupts(GLOBAL);                                   // 4 disable the interrupts.
   //
   // Minor intialisation
   minor_init();                                     // 4+
   // Turns on Line reversal (if CLI) and RX interrupts

sleep_port_state();



The disassembly listing is as follows:
Code:
105:                  //***********************************************
106:                  COLDstart:
107:                  //***********************************************
108:                  disable_interrupts(GLOBAL);                                   // 4 disable the interrupts.
  2A42    9CF2     BCF 0xff2, 0x6, ACCESS
  2A44    9EF2     BCF 0xff2, 0x7, ACCESS
  2A46    BEF2     BTFSC 0xff2, 0x7, ACCESS
  2A48    D7FD     BRA 0x2a44
109:                  //
  26CA    062D     DECF 0x2d, F, ACCESS
110:                  // Minor intialisation
  26CC    522D     MOVF 0x2d, F, ACCESS
  26CE    E102     BNZ 0x26d4
  26D0    D002     BRA 0x26d6
111:                  minor_init();                                     // 4+
  26D2    D001     BRA 0x26d6
  26D4    D7D4     BRA 0x267e
  2A4A    EFA5     GOTO 0xb4a
112:                  // Turns on Line reversal (if CLI) and RX interrupts
113:               
114:               sleep_port_state();
  2A4E    ECB5     CALL 0xb6a, 0


When I put a break at minor_init(); in the source code the break appears at the line after minor_init(); at
Code:

  26D2    D001     BRA 0x26d6

in the disassembly listing but the actual call to minor_init(); is two lines lower at
Code:

  2A4A    EFA5     GOTO 0xb4a

so when I run the program is never breaks at the correct time.

This is the first time I've used CCS with MPLAB and it may be something simple causing it but it's causing a nightmare to debug.

Does anyone know the soluiton to this.

Regards
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Nov 15, 2006 12:55 pm     Reply with quote

http://www.ccsinfo.com/forum/viewtopic.php?t=28808&highlight=disassembly
micro_joe



Joined: 20 Dec 2004
Posts: 10
Location: Berks. UK

View user's profile Send private message

PostPosted: Thu Nov 16, 2006 3:03 am     Reply with quote

Hi,
I have been using the disassembly listing but it's 70,000 lines long. (it's a port from an ST6 assembler application)

The real problem is that the listing is not in code location order ie it seems to have odd bits of code mixed in. If I could fix this then there would not be any problems.

Regards
micro_joe (formerly posted as Guest1)
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