Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 20, 2024, 06:08:04 06:08


Login with username, password and session length


Pages: [1]
Print
Author Topic: Proton + and Proteus error "no source line at adress in PC="  (Read 12271 times)
0 Members and 1 Guest are viewing this topic.
albertodg2
Newbie
*
Offline Offline

Posts: 19

Thank You
-Given: 1
-Receive: 2


WWW
« on: January 25, 2008, 07:55:19 07:55 »


     Hello:
      I want to run a program in PROTON + or the same with PIC BASIC PROTEUS
      Using  .BAS to debug and the two gives me "no source address line at PC = xxx"
      Anyone know how to fix it
      Thanks
Logged

Kabron
Active Member
***
Offline Offline

Posts: 196

Thank You
-Given: 63
-Receive: 139



« Reply #1 on: January 25, 2008, 08:57:54 08:57 »

Do a single step...
Logged
zuisti
Senior Member
****
Offline Offline

Posts: 409

Thank You
-Given: 242
-Receive: 780


« Reply #2 on: January 25, 2008, 09:59:38 09:59 »

      I want to run a program in PROTON + or the same with PIC BASIC PROTEUS
      Using  .BAS to debug and the two gives me "no source address line at PC = xxx"

Hi,

The program counter PC (while the prog is paused) points to the next executable asm instr.
But not all asm instructions correspond exactly to a source line, especially if you use a high level
language like Proton Basic. The compiler's output may contain many intern (hidden) routines.
Study the Proton's LST and ASM output files, the LST contains these routines but the ASM not.
And ... switch to the dissassembly window to see these things: right click on the source window
and choose it!

Hope this helps
zuisti
Logged
Ahmad_k
SCG Moderator
Hero Member
*****
Offline Offline

Posts: 747

Thank You
-Given: 169
-Receive: 1289



« Reply #3 on: January 25, 2008, 02:14:53 14:14 »

     Hello:
      I want to run a program in PROTON + or the same with PIC BASIC PROTEUS
      Using  .BAS to debug and the two gives me "no source address line at PC = xxx"
      Anyone know how to fix it
      Thanks

Which version you use ? if it 2.13 you must put the label "F1_EOF:" before the END
Logged
albertodg2
Newbie
*
Offline Offline

Posts: 19

Thank You
-Given: 1
-Receive: 2


WWW
« Reply #4 on: January 25, 2008, 05:09:20 17:09 »

Kabron:
   
         Error gives me running in proteus 6.7 Debug>> START / Restart Debugging
         It appears the source code of the program, and to implement step by step
         I have to give twice per instruction and then short.
         
    Suisti: you do not understand
   
   
   
    Ahmad_k:
            Proton 3.2.5.5, F1_eof: in Proton gives me the same mistake.
           
            Thanks
Logged

Faros
Senior Member
****
Offline Offline

Posts: 254

Thank You
-Given: 141
-Receive: 178


« Reply #5 on: January 26, 2008, 09:06:51 09:06 »

@albertodg2

zuisti for sure Understood it just fine … it seems that you don’t read !!!

Do you think that he has made 138 posts and has received 78 “thank you” for not understanding!!! … Please revise his posts and if you find that you have been answered by an experienced member (and you should find that easily)  … then you own him an apology … or don’t expect future help from anyone … not only zuisti


« Last Edit: January 26, 2008, 09:36:01 09:36 by Faros » Logged
Ahmad_k
SCG Moderator
Hero Member
*****
Offline Offline

Posts: 747

Thank You
-Given: 169
-Receive: 1289



« Reply #6 on: January 26, 2008, 04:53:07 16:53 »

     Hello:
      I want to run a program in PROTON + or the same with PIC BASIC PROTEUS
      Using  .BAS to debug and the two gives me "no source address line at PC = xxx"
      Anyone know how to fix it
      Thanks

Maybe you didnt connect the MCLR pin. Check your design. it will be easier if you attach your file.
Logged
Cynetron
Newbie
*
Offline Offline

Posts: 25

Thank You
-Given: 25
-Receive: 31


« Reply #7 on: February 01, 2008, 10:55:14 22:55 »

This is not error. if you use software interrupt in your code when simulating with proteus proteus couldnt show progress because no source address line in bas file. If you want to see source you must hardware interrupt.

Some registers will change in hardware interrupt for resolve this problem you must use this macros;
Code:
'------------------------------------------------------------------------------------------------------
' Macro to save the compiler's SYSTEM variables and selected SFR registers
SYSTEM_SAVE MACRO-
ASM-
; Context SAVE the essential registers
movff STATUS,_RAM_END ; Save the STATUS register
movff WREG,_RAM_END - 1 ; Save the WREG
movff BSR,_RAM_END - 2 ; Save the bank select register
movff FSR0L,_RAM_END - 3 ; Save low byte of FSR0
movff FSR0H,_RAM_END - 4 ; Save high byte of FSR0
movff FSR1L,_RAM_END - 5 ; Save low byte of FSR1
movff FSR1H,_RAM_END - 6 ; Save high byte of FSR1
movff FSR2L,_RAM_END - 7 ; Save low byte of FSR2
movff FSR2H,_RAM_END - 8 ; Save high byte of FSR2
movff PRODL,_RAM_END - 9 ; Save the multiply registers
movff PRODH,_RAM_END - 10 ; These require saving because the compiler uses them regularly.
movff TBLPTRL,_RAM_END - 11 ; Save the Table Pointer registers
movff TBLPTRH,_RAM_END - 12 ; These require saving because the compiler uses them regularly.
movff TABLAT,_RAM_END - 13 ; Save the code memory access register

; Save the compiler's SYSTEM variables
lfsr 0,_RAM_END - 14 ; Point FSR0 to the next available piece of memory in high RAM
lfsr 1,_SYSTEM_VARIABLE_COUNT - 1 ; Point FSR1 to the end of the SYSTEM variables in Access RAM
movlw _SYSTEM_VARIABLE_COUNT ; Form a loop for the amount of system variables used
movff POSTDEC1,POSTDEC0 ; Move the compiler's SYSTEM variables from Access RAM into high memory
decfsz WREG,F ; Decrement and skip if zero the variable counter
bra $ - 6 ; Keep placing variables until all done
VARIABLE _RAM_POINTER = (_RAM_END - 14) - _SYSTEM_VARIABLE_COUNT ; Point to the finishing point of the variable save
movlb 0 ; Reset Bank
ENDASM-
ENDM
'------------------------------------------------------------------------------------------------------
' Macro to restore the compiler's SYSTEM variables and selected SFR registers
SYSTEM_RESTORE MACRO-
ASM-
; Restore the compiler's SYSTEM variables
lfsr 0,_RAM_END - 14 ; Point FSR0 to the start of the system variables stored in high memory
lfsr 1,_SYSTEM_VARIABLE_COUNT - 1 ; Point FSR1 to the end of the SYSTEM variables in Access RAM
movlw _SYSTEM_VARIABLE_COUNT ; Form a loop for the amount of system variables used
movff POSTDEC0,POSTDEC1 ; Move the compiler's SYSTEM variables from high memory into Access RAM
decfsz WREG,F ; Decrement and skip if zero the variable counter
bra $ - 6 ; Keep placing variables until all done

; Context RESTORE the essential registers and exit the interrupt
movff _RAM_END - 13,TABLAT ; Restore the TABLAT register
movff _RAM_END - 12,TBLPTRH ; Restore high byte of TBLPTR
movff _RAM_END - 11,TBLPTRL ; Restore low byte of TBLPTR
movff _RAM_END - 10,PRODH ; Restore high byte of PROD
movff _RAM_END - 9,PRODL ; Restore low byte of PROD
movff _RAM_END - 8,FSR2H ; Restore high byte of FSR2
movff _RAM_END - 7,FSR2L ; Restore low byte of FSR2
movff _RAM_END - 6,FSR1H ; Restore high byte of FSR1
movff _RAM_END - 5,FSR1L ; Restore low byte of FSR1
movff _RAM_END - 4,FSR0H ; Restore high byte of FSR0
movff _RAM_END - 3,FSR0L ; Restore low byte of FSR0
movff _RAM_END - 2,BSR ; Restore the bank select register
movff _RAM_END - 1,WREG ; Restore the WREG
movff _RAM_END,STATUS ; Restore the STATUS register
movlb 0 ; Reset Bank
ENDASM-
ENDM
'------------------------------------------------------------------------------------------------------
Logged
Cynetron
Newbie
*
Offline Offline

Posts: 25

Thank You
-Given: 25
-Receive: 31


« Reply #8 on: February 01, 2008, 11:28:23 23:28 »

Sorry i forgot how can you use Smiley

use as context_save context_restore
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC