Asm...Endasm


+ Reply to Thread
Results 1 to 4 of 4

Thread: Asm...Endasm

  1. #1
    Join Date
    Apr 2007
    Posts
    2

    Default Asm...Endasm

    I'm getting an "Undefined symbol EPROM2" error when trying to compile this code. Should I just ignore it or is there another way of jumping out of the assembly code?

    Main:
    pin5 = 1 'Output on GP2/pin5
    Pause msec
    If pin2=0 then Frequp
    If pin3=0 then Freqdown

    Asm
    btfss GPIO.1
    goto EPROM2 ;Checks for Eeprom button
    Endasm

    Goto Main
    Eprom2:
    High LED
    Write 0,msec.BYTE0 'Write current msec value into EEprom
    Write 1,msec.BYTE1
    Goto Main
    Last edited by Socal; - 18th April 2007 at 04:02.

  2. #2
    Join Date
    Apr 2007
    Posts
    53

    Default

    Quote Originally Posted by Socal View Post
    I'm getting an "Undefined symbol EPROM2" error when trying to compile this code. Should I just ignore it or is there another way of jumping out of the assembly code?

    Main:
    pin5 = 1 'Output on GP2/pin5
    Pause msec
    If pin2=0 then Frequp
    If pin3=0 then Freqdown

    Asm
    btfss GPIO.1
    goto EPROM2 ;Checks for Eeprom button
    Endasm

    Goto Main
    Eprom2:
    High LED
    Write 0,msec.BYTE0 'Write current msec value into EEprom
    Write 1,msec.BYTE1
    Goto Main

    You need to add an underscore before the label etc. when you use assembly.

    Your line:
    goto EPROM2 ;Checks for Eeprom button

    needs to be:
    goto _EPROM2 ;Checks for Eeprom button


    Andy

  3. #3
    Join Date
    Apr 2007
    Posts
    2

    Default

    Quote Originally Posted by Andy Wood View Post
    You need to add an underscore before the label etc. when you use assembly.

    Your line:
    goto EPROM2 ;Checks for Eeprom button

    needs to be:
    goto _EPROM2 ;Checks for Eeprom button


    Andy
    Yeah, that fixed it, thanks!

  4. #4
    Join Date
    Apr 2007
    Posts
    53

    Default

    Quote Originally Posted by Socal View Post
    Yeah, that fixed it, thanks!
    Excellent! I have been caught by that one before!

    Andy

Similar Threads

  1. PBP, ASM and LST files
    By HenrikOlsson in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th January 2010, 14:43
  2. ASM help
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 21st October 2009, 04:08
  3. Problem using ASM instruction
    By ewandeur in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd April 2008, 16:26
  4. question about how to implement ASM and ENDASM
    By karenhornby in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th March 2008, 10:21
  5. Making PBP code more modular
    By forgie in forum General
    Replies: 30
    Last Post: - 25th October 2005, 17:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts