Origin of Assembly Table


Results 1 to 6 of 6

Threaded View

  1. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi, Matt

    You have two solutions ...Using PBP ...


    1) Use a Lookup table ... PBP will care of all the adresses.

    2) Using an assembler retrieve table

    Code:
    	
    peekcode ( 850 + sampled ), delay		' 881 = 850 + 31 !!!
    
    .
    .
    
    END
    
    '*****************************************************************************
    'Fading_Table
    '*****************************************************************************
    '         			 0   1   2   3   4   5   6   7   8   9  
    '
    Pokecode @881,		             24, 27, 29, 32, 35, 38, 41, 44, 47,_	'  30
             			 50, 54, 57, 60, 64, 68, 71, 75, 79, 83,_	'  40
             			 87, 91, 96,100,104,109,113,118,123,127,_	'  50
             			132,137,142,147,153,158,163,169,174,180,_	'  60
             			186,191,197,203,209,212,217,245,250,  1,_	'  70
             			  7, 13, 21, 30, 39, 48, 57, 24, 25, 26,_	'  80
             			 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,_	'  90
             			 37, 38, 39, 40, 41, 43, 44, 45, 46, 48,_	' 100
             			 49, 50, 52, 53, 54, 56, 57, 59, 60, 62,_	' 110
             			 63, 65, 67, 68, 70, 72, 73, 75, 77, 79,_	' 120
             			 81, 83, 84, 86, 88, 90, 92, 94, 97, 99,_	' 130
             			101,103,105,107,110,112,114,117,119,122,_	' 140
             			124,126,129,132,134,137,139,142,145,148,_	' 150
             			150,153,156,159,162,165,168,172,176,180	        ' 160
    		     	     
     END
    Note, for me , the " sampled " value was from 31 to ... a lot !!!

    Here , the best is to compile @ first using the Highest adresses of the Prog memory, to see where the program ends, and then shift the table adress to lower adresses.

    Here, I have 140 values, so, first compile has been made with Pokecode @ 860 ( leaving little room for the END statement ! - was a 12F675 )

    The MPLAB Program window, here is a GREAT help ...


    some months after that ... I've added as much program lines as possible ... this explains my table is @ the very top memory adresses available. ( 1022/1024 lines occupied ...)

    Alain
    Last edited by Acetronics2; - 8th February 2010 at 12:44.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Lookup Table
    By yasser hassani in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 11th March 2008, 10:38
  2. Assembly Guru : Question
    By Archangel in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 20th May 2007, 03:51
  3. PIC 18F452 Table Pointer/ Table Read
    By sougata in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 14th March 2006, 03:07
  4. Writing to a table.
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 24th December 2005, 16:20
  5. How do you do this in Assembly
    By ice in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 10th May 2005, 06:47

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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