Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 03, 2016, 12:32:26 12:32


Login with username, password and session length


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

Posts: 21

Thank You
-Given: 1
-Receive: 2


« on: January 25, 2008, 08:55:19 08: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: 178

Thank You
-Given: 40
-Receive: 93



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

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

Posts: 371

Thank You
-Given: 219
-Receive: 567


« Reply #2 on: January 25, 2008, 10:59:38 10: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: 604

Thank You
-Given: 111
-Receive: 1059



« Reply #3 on: January 25, 2008, 03:14:53 15: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: 21

Thank You
-Given: 1
-Receive: 2


« Reply #4 on: January 25, 2008, 06:09:20 18: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: 253

Thank You
-Given: 125
-Receive: 178


« Reply #5 on: January 26, 2008, 10:06:51 10: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, 10:36:01 10:36 by Faros » Logged
Ahmad_k
SCG Moderator
Hero Member
*****
Offline Offline

Posts: 604

Thank You
-Given: 111
-Receive: 1059



« Reply #6 on: January 26, 2008, 05:53:07 17: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
*
 Muted
Offline Offline

Posts: 24

Thank You
-Given: 21
-Receive: 30


« Reply #7 on: February 01, 2008, 11:55:14 23: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
*
 Muted
Offline Offline

Posts: 24

Thank You
-Given: 21
-Receive: 30


« Reply #8 on: February 02, 2008, 12:28:23 00: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