Shop OBEX P1 Docs P2 Docs Learn Events
LMM P2 Debugger - Uses Serial Tx & Rx for debugging single cog programs - Page 7 — Parallax Forums

LMM P2 Debugger - Uses Serial Tx & Rx for debugging single cog programs

1457910

Comments

  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 02:03
    Ps.

    You can place it in that position - BUT as You maybe see I use some more LONG's after Yours and before END of COG - 8 Longs
    It is why I fixed it to position I use

    long "C"[$1D8-$]
    $1D4 + 16 byte identifier (maybe removed to save space)

    Currently I am using 19 longs although I am hoping to reduce this to 16 longs. Would it help if I started the LmmFun at cog $1E0 for the time being???
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 02:14
    Hi Cluso.

    I use that 4 longs after COG_LMM to that.

    1. Part 1
    --------------------------------------------------------
    |Change        and        to show diferent part of COG |
    | COG   IStart    List_Count   Var_s_Start   Var_Count |
    --------------------------------------------------------
      1F0- 00000000    0000000A    000001E4    00000008
     .
    
    .
    4 Long's after it are 2 spare ones
    And 2 placeholder for INDA, INDB

    I remade now Yours DUMP to use --->

    1. Part 1 as counter of Longs to show in dump.
    *0.10l
    
     addr-  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
      000- 02 00 04 E0 1C 00 7C 1C 00 00 00 00 00 00 7C 1C  '......|.......|.'
      004- A0 20 FC 0C A0 20 E8 0C A0 40 F0 0C 00 80 BC 1C  '. ... ...@......'
      008- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  '................'
      00C- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  '................'
    *0l
    
     addr-  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
      000- 02 00 04 E0 1C 00 7C 1C 00 00 00 00 00 00 7C 1C  '......|.......|.'
      004- A0 20 FC 0C A0 20 E8 0C A0 40 F0 0C 00 80 BC 1C  '. ... ...@......'
      008- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  '................'
      00C- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  '................'
      010- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  '................'
      014- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  '................'
      018- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  '................'
      01C- DB 3E FC 0C DB 3A E8 0C DA 3A D4 0C DB 3C F0 0C  '.>...:...:...<..'
      020- DA 3C CC 0C 80 C8 FF A0 44 CE BF A0 DC C7 FF 1F  '.<......D.......'
      024- 63 C8 FF A0 F0 CF FF A0 DC C7 FF 1F 80 C8 FF A0  'c...............'
     .
    

    So I dont use Yours ";" parameter in Dump comand only xxxx,yyyyL

    If xxxxL ---- It use Counter in --- 1. Part 1
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 02:33
    Ps. to previous post.
    '' now check if "," follows... 000000000000000000 Removed 00000000000000000000000000000000000000000000000000000000000000000
    ''
    :cmd03
    ''    I_countL     = My Lines count                '   
            mov    lmm_c, I_countL            ' save 'count'
            mov    lmm_f, #_COUNT+_HDG        ' set 'count' option
    
    

    It is change in Yours ":cmd03" --- I made to use my own Counter
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-23 03:04
    Ok, I understand some of what you are saying. I will start the my 16 longs at $1E0 beginning with LmmFun. For now I also need an extra 3 longs so I will place them before $1E0, so at $1DD and if I need a few more (temporary) I will go backwards from that. This way I can put your $1F0-1F7 in my code for you to make it easier for you.

    I will look at putting in the cmd03 bits in, but commented out, so its easy for you to enable.

    I will drop out the identifier in cog ram. No need for it any more.

    I will post an update shortly and you can comment on what I've done.
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 03:26
    Hi Cluso.


    I made on more Change.

    L<cr> dump now last address used with xxxL ---

    My Variables after LMM: --->
    .
    lmm_bittime     long    _bitrate                        ' bit rate for baud
    ''----------------------------------- 0_Dump Help Variables -------------------------------------------
            long    LMM_Pos-1
    '                            long    LMM_Pos
    'LMM_Pos        org    $
    Showp_        org    $
    ''                $1F2
    I_Start        long    0                    ''IStart
    I_countL    Long    10                    ''(@I_End - @I_Start+1)    ''IEnd - IStart
    Vars_PL        long    Vars_P                    ''Have same position as     BYTE    "INDA"
    Vars_C        long    8                    ' hub address to dump (executes as "NOP")
            long    0            ''Spare Long's
    count           long    5
            BYTE    "INDA"
            BYTE    "INDB"
    .
    
    .
    .
    Change in:
    >
    :nothex
            MOV    lmm_x, I_Start            '' 0000000000 --- I_Start --- Variable that I have after Yours COG_LMM 
    '           'JFWD    @_HubReturn            ' \            <jump fwd>
             rdlong     lmm_pc, lmm_pc            ' | JUMP...
             long     @_HubReturn            ' / ...PC = ADDR    <returns to calling routine>
    .
    
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 03:52
    Hi Cluso.

    It function now for me. If Yo will I can send all changes.
    --------------------------------------------------------
    |You can Change values by enter _ 1F8-F _ 1F8-XXXXXXXX |
    |$1F8  PINA        PINB        PINC        PIND        |
    |$1FC  DIRA        DIRB        DIRC        DIRD        |
    --------------------------------------------------------
      1F4- 00000000    00000000    1C7C0000    42444E49
      1F8- FFFFFFFE    FFFFF000    0FFFFFFF    00000000
      1FC- E0000000    00000000    04000000    00000000
    
     addr- instr  zcr i cccc dst src -  3 2 1 0 -  0  1  2  3
      000- 111000 000 0 0001 000 000 - E0040002 - 02 00 04 E0  '....'
      001- 000111 000 1 1111 000 000 - 1C7C001C - 1C 00 7C 1C  '..|.'
      002- 000000 000 0 0000 000 000 - 00000000 - 00 00 00 00  '....'
      003- 000111 000 1 1111 000 000 - 1C7C0000 - 00 00 7C 1C  '..|.'
    
    == Cluso's P2 Debugger v0.61 ==
    *l
    
     addr-  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
      000- 02 00 04 E0 1C 00 7C 1C 00 00 00 00 00 00 7C 1C  '......|.......|.'
      004- A0 20 FC 0C A0 20 E8 0C A0 40 F0 0C 00 80 BC 1C  '. ... ...@......'
      008- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  '................'
      00C- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  '................'
    *10l
    
     addr-  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
      010- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  '................'
      014- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  '................'
      018- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  '................'
      01C- DB 3E FC 0C DB 3A E8 0C DA 3A D4 0C DB 3C F0 0C  '.>...:...:...<..'
    *l
    
     addr-  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
      010- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  '................'
      014- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  '................'
      018- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  '................'
      01C- DB 3E FC 0C DB 3A E8 0C DA 3A D4 0C DB 3C F0 0C  '.>...:...:...<..'
    *
    

    It uses MY 2 variables after LMM


    --- I_Start ---- I_countL
    --------------------------------------------------------
    |Change        and        to show diferent part of COG |
    | COG  [B][COLOR=#ff0000] t[/COLOR][COLOR=#ff0000]IStar[/COLOR][/B]    [B][COLOR=#0000ff]List_Count[/COLOR][/B]   Var_s_Start   Var_Count |
    --------------------------------------------------------
      1F0- [B][COLOR=#ff0000]00000000[/COLOR][/B]    [B][COLOR=#0000ff]00000004[/COLOR][/B]    000001E4    00000008
    .
    
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-23 04:06
    Sapieha,
    Here is what I have now. I see you added another. But is this what you are after???
    BTW I have changed command M to L = List. I will change the call to _LIST instead of _DUMP later as well to be consistent.

    LSD_062.spin
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 04:58
    Hi Cluso.

    Thanks.

    NEXT correct.
    But it don't function as wanted with FIT else RES
    So I now work on version that will be corect with Yours new variables

    Cluso99 wrote: »
    Sapieha,
    Here is what I have now. I see you added another. But is this what you are after???
    BTW I have changed command M to L = List. I will change the call to _LIST instead of _DUMP later as well to be consistent.

    LSD_062.spin
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 05:44
    Hi Cluso.


    '-------------------------------------------------------
    ''================================================================================================
    ''################################################################################################
    ''
    ''    COG LMM hard coded to        $1D4 + 16 byte identifier     (maybe removed to save space)
    ''
            long    "C"[$1D8-$-10]            ''Hard coded COG LMM Extra Variables -------- 
    ''    If You NEED add some more longs Change "C"[$1D8-$-10-X_longs]
    ''===============================================================================================
    LMM_Pos ---------------- Show Start of used area (LMM_Pos - 1 = USER Code area in Longs
    ''===============================================================================================
    strptr_version    long    @_str_vers            ' hub address of version string
    strptr_code    long    @_str_hcode            ' hub address of code header string
    strptr_long    long    @_str_hlong            ' hub address of code header string
    strptr_msg1    long    @_str_msg1            ' hub address of message1
    
    'count        long    I_countL    '' Moved to one of free longs Space after MY variables
    wait            long    0
    delay500ns    long    _xinfreq /2            ' 0.5 sec
    delay5s        long    _xinfreq * 5                    ' 5 sec
    temp            long    $1A2B3C4D
    temp2           long    "1" + "2"<<8 + $0D<<16          ' Tx "12",<cr> and skips B3=0
    '------------------------------------------------------------------------------
    
    ''================================================================================================
    ''################################################################################################
    ''
    ''    COG LMM hard coded to        $1D4 + 16 byte identifier     (maybe removed to save space)
    ''
            long    "C"[$1D9-$]            ''Hard coded COG LMM position -------- Chj filler for cog size
    ''
                    byte    "=== COG LMM ===="              ' 16 byte identifier     (maybe removed to save space)
    ''
    ''########### the above "=== COG LMM ====" may be deleted to save space ##########################
    ''=======[ Cog LMM execution unit & parameter(s) ]=============================
    ''
    '' Currently 18 longs.    Calls save & restore Z & C flags
    
    ''-------[ LMM workareas ]------------------------------
    '' These are additional workareas and may not be required in a later revision...
    lmm_v           long    0                               ' workarea value
    lmm_bittime     long    _bitrate                        ' bit rate for baud
    
    ''-------[ LMM entry points ]---------------------------
    LmmFun          add     lmm_pc, #4                      ' inc PC (skips _LmmRx jump instr)
    LmmRx           add     lmm_pc, #4                      ' inc PC (skips _LmmTx jump instr)
    LmmTx                                                   '
    ''-------[ LMM execution loop ]-------------------------
    LmmLoop         rdlong  lmm_opcode, lmm_pc              ' rdlong        (read LMM hub instr into OPCODE using PC)
                    add     lmm_pc, #4                      ' PC++          (inc PC to next LMM hub instr)
    lmm_op2         nop                                     ' rdlong delay  (optional 2nd instruction execution)
    lmm_opcode      nop                                     ' rdlong result (execute the LMM hub instr)
                    jmp     #LmmLoop                        ' loop
    ''-------[ LMM return address ]-------------------------
    LmmFun_ret
    LmmRx_ret
    LmmTx_ret    nop                                     ' stores user cog return addr + Z & C flags (11 bits)
    ''-------[ LMM parameters ]-----------------------------
    lmm_f           long    0                               ' parameter passed to      LMM routine (function options; returns unchanged)
    lmm_x           long    0                               ' parameter passed to/from LMM routine (typically a value)
    lmm_c        long    0                ' parameter passed to/from LMM routine (typically a count)
    lmm_p        long    0                ' parameter passed to/from LMM routine (typically a hub pointer)
    ''-------[ LMM workareas ]------------------------------
    '  Following are workareas used by the LMM routines. Later, some of these may be shifted to hub or stack to save cog space.
    lmm_pc          long    @_LmmCogReturn + 4              ' LMM PC (program counter)
    lmm_sp          long    @_hub_stack                     ' LMM SP (stack pointer)
    lmm_w           long    0                               ' workarea for LMM_call
    lmm_mode        long    0                               ' saved in dump
    '------------------------------------------------------------------------------
    
    
    ''###############################################################################################
    ''# The following is required by Sapieha for his testing - it may be removed            #
    ''###############################################################################################
            long    LMM_Pos
    '        fit    $1F0   ------------- Dont function ---------------------
    Vars_P        org    $                ' 
    '' --------------------------------------------------------
    '' |Change        and        to show diferent part of COG |
    '' | COG   IStart    List_Count   Var_s_Start   Var_Count |
    '' --------------------------------------------------------
    ''   1F0- 00000000    0000000A    000001E4    00000008
    ''-----------------------------------------------------------------------------------------------
    I_Start        long    0                ''IStart
    I_countL       long    5                ''(@I_End - @I_Start+1)    ''IEnd - IStart
    Vars_PL        long    Vars_P                        ''Have same position as     BYTE    "INDA"
    Vars_C         long    8                            ' hub address to dump (executes as "NOP")
                   long    0                        ''Spare Long
    count          long    I_countL
                   BYTE    "INDA"        ''Important that 2 BYTE fill position's are in this place
                   BYTE    "INDB"        '' I tested both with FIT and RES and it NOT function
    ''-----------------------------------------------------------------------------------------------
    '        res    1   ------------- Dont function ---------------------
    '        fit    $1F8    ------------- Dont function ---------------------                ' The P2 registers
                    byte    "== $1F8 CODE ==="        ' Place holders for $1F6 (COG I/O registers) Don't remove
                    byte    "== $1FC CODE ==="        ' Place holders for $1F7 (COG I/O registers) Don't remove
    ''###############################################################################################
    
    ''===============================================================================================
    
    

    .
    With that remove this as it is not longer used
    ''00000000000------------------------ To place before Instruction's to Show ---------------------
    IStart
    ''00000000000------------------------------------------------------------------------------------
    'the following is a 0.5 sec delay mechanism only (allows PST to start)
                    getcnt  wait
                    add     wait,delay500ns
                    waitcnt wait,0
                    add     wait,delay5s
                    add     wait,delay5s
    ''11111111111----------------------- To place after last Instruction to Show ---------------------
    IEnd
    ''11111111111------------------------------------------------------------------------------------
    
    
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 06:15
    Hi Cluso.

    Minor update to previous post
    '-------------------------------------------------------
    Rom_Monitor
            mov    lmm_f, #_MONITOR        '\ set rom monitor mode
            call    #LmmFun        wz,wc        '/
    '-------------------------------------------------------
    temp            long    $1A2B3C4D
    temp2           long    "1" + "2"<<8 + $0D<<16          ' Tx "12",<cr> and skips B3=0
    'count        long    I_countL    '' --------- Moved to one of free longs Space after MY variables
    wait            long    0
    delay500ns    long    _xinfreq /2            ' 0.5 sec
    delay5s        long    _xinfreq * 5                    ' 5 sec
    ''================================================================================================
    ''################################################################################################
    ''
    ''    COG LMM hard coded to        $1D4 + 16 byte identifier     (maybe removed to save space)
    ''
            long    "C"[$1D9-$-5]            ''Hard coded COG LMM Extra Variables -------- 
    ''    If You NEED add some more longs Change "C"[$1D8-$-5-X_longs]
    ''                byte    "=== COG LMM ===="              ' 16 byte identifier     (Removed)
    ''===============================================================================================
    LMM_Pos
    strptr_version    long    @_str_vers            ' hub address of version string
    strptr_code    long    @_str_hcode            ' hub address of code header string
    strptr_long    long    @_str_hlong            ' hub address of code header string
    strptr_msg1    long    @_str_msg1            ' hub address of message1
    
    '------------------------------------------------------------------------------
    
    ''================================================================================================
    ''################################################################################################
    ''
    ''    COG LMM hard coded to        $1D4 + 16 byte identifier     (maybe removed to save space)
    ''
            long    "C"[$1D9-$-1]            ''Hard coded COG LMM position -------- Chj filler for cog size
    ''
    ''                byte    "==="              ' 4 byte identifier     (maybe removed to save space)
    ''
    ''########### the above "=== COG LMM ====" may be deleted to save space ##########################
    ''=======[ Cog LMM execution unit & parameter(s) ]=============================
    ''
    '' Currently 18 longs.    Calls save & restore Z & C flags
    
    ''-------[ LMM workareas ]------------------------------
    '' These are additional workareas and may not be required in a later revision...
    lmm_v           long    0                               ' workarea value
    lmm_bittime     long    _bitrate                        ' bit rate for baud
    
    ''-------[ LMM entry points ]---------------------------
    LmmFun          add     lmm_pc, #4                      ' inc PC (skips _LmmRx jump instr)
    LmmRx           add     lmm_pc, #4                      ' inc PC (skips _LmmTx jump instr)
    LmmTx                                                   '
    ''-------[ LMM execution loop ]-------------------------
    LmmLoop         rdlong  lmm_opcode, lmm_pc              ' rdlong        (read LMM hub instr into OPCODE using PC)
                    add     lmm_pc, #4                      ' PC++          (inc PC to next LMM hub instr)
    lmm_op2         nop                                     ' rdlong delay  (optional 2nd instruction execution)
    lmm_opcode      nop                                     ' rdlong result (execute the LMM hub instr)
                    jmp     #LmmLoop                        ' loop
    ''-------[ LMM return address ]-------------------------
    LmmFun_ret
    LmmRx_ret
    LmmTx_ret    nop                                     ' stores user cog return addr + Z & C flags (11 bits)
    ''-------[ LMM parameters ]-----------------------------
    lmm_f           long    0                               ' parameter passed to      LMM routine (function options; returns unchanged)
    lmm_x           long    0                               ' parameter passed to/from LMM routine (typically a value)
    lmm_c        long    0                ' parameter passed to/from LMM routine (typically a count)
    lmm_p        long    0                ' parameter passed to/from LMM routine (typically a hub pointer)
    ''-------[ LMM workareas ]------------------------------
    '  Following are workareas used by the LMM routines. Later, some of these may be shifted to hub or stack to save cog space.
    lmm_pc          long    @_LmmCogReturn + 4              ' LMM PC (program counter)
    lmm_sp          long    @_hub_stack                     ' LMM SP (stack pointer)
    lmm_w           long    0                               ' workarea for LMM_call
    lmm_mode        long    0                               ' saved in dump
    '------------------------------------------------------------------------------
    
    
    ''###############################################################################################
    ''# The following is required by Sapieha for his testing - it may be removed            #
    ''###############################################################################################
            long    LMM_Pos
    '        fit    $1F0   ------------- Dont function ---------------------
    Vars_P        org    $                ' 
    '' --------------------------------------------------------
    '' |Change        and        to show diferent part of COG |
    '' | COG   IStart    List_Count   Var_s_Start   Var_Count |
    '' --------------------------------------------------------
    ''   1F0- 00000000    0000000A    000001E4    00000008
    ''-----------------------------------------------------------------------------------------------
    I_Start        long    $0                ''IStart
    I_countL    long    5                ''(@I_End - @I_Start+1)    ''IEnd - IStart
    Vars_PL        long    Vars_P                        ''Have same position as     BYTE    "INDA"
    Vars_C        long    8                            ' hub address to dump (executes as "NOP")
            long    0                        ''Spare Long
    count        long    I_countL
            BYTE    "INDA"        ''Important that 2 BYTE fill position's are in this place
            BYTE    "INDB"        '' I tested both with FIT and RES and it NOT function
    ''-----------------------------------------------------------------------------------------------
    '        res    1
    '        fit    $1F8                ' The P2 registers
                    byte    "== $1F8 CODE ==="        ' Place holders for $1F6 (COG I/O registers) Don't remove
                    byte    "== $1FC CODE ==="        ' Place holders for $1F7 (COG I/O registers) Don't remove
    ''###############################################################################################
    
    .
    
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 06:49
    Hi Cluso

    With LMM in COG mods I posted in previous 2 thread's

    ([ Be aware that no other form of specify place for COG_LMM don't function correctly])

    It is all Mods needed in lmm code LIST code
    For that MODE to function.

     1.
     
     ''-----------------------------------------------------------------------------------------------------------------------------------------
        xxxxxM[n]<cr>            Display (DUMP) from cog/hub ----- (Counter of lines to display programed in -- I_countL    Long    10)
    
        xxxxx[.yyyyy]M[n]<cr>        Display (DUMP) from cog/hub
                            xxxxx is 'from addr' 
                            yyyyy is optional 'to addr'
                            n     is optional n=1/2/3 for smon/code/long else mon
    ''-----------------------------------------------------------------------------------------------------------------------------------------
    
     
     2.
             cmp    lmm_c, #0        wz    ' z if = $0 --- If Not addres entered init with LAST address
    ''--------------
        if_z    MOV    lmm_x, I_Start            '' 0000 --- I_Start --- Variable that I have after Yours COG_LMM 
    :nothex2
    
     3.
    :cmd10
    ' command ?
            mov    lmm_c, I_countL            ' save    '---- 88888 ---- 'count'
            cmp    lmm_w, #"G"        wz    ' z if "G"
    
     4.
    '' now check if "," follows... 000000000000000000 Removed 000000000000000000000
    ''
    :cmd03
    ''    I_countL     = My Lines count                '   
            mov    lmm_c, I_countL            ' save 'count'
            mov    lmm_f, #_COUNT+_HDG        ' set 'count' option
    
     5.
    
     On entry -- If not any other addres specified by that command ----- xxxxx[.yyyyy]M[n]<cr>
     ':start        mov    lmm_x, #0
    :start        mov    lmm_x, I_Start            '  preset addr=0
    
    :again
    
     6.
    
    :cmd_M
            MOV    I_Start,lmm_x
            or    lmm_f, #_DUMP+_MON        ' set dump mode
    
     7.
            
    :cmd_L
            MOV    I_Start,lmm_x
            or    lmm_f, #_DUMP+_MON        ' set dump mode
    
    
    
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-04-23 07:57
    Ray,

    Very nice and useful tool. I am certain it will be very handy for my experiments :)
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 08:29
    Hi Cluso.

    Now after all test's.
    Function correctly and place all LMM longs in correct place with special REGISTER's uninitialised.

    As You can see I moved out that longs from PROTECTED area as them are not necessary in that place.

    'count is moved to one of spare longs after My Variables
    '-------------------------------------------------------
    [B][COLOR=#ffa500]temp            [/COLOR][/B]long    $1A2B3C4D
    [COLOR=#ffa500][B]temp2           [/B][/COLOR]long    "1" + "2"<<8 + $0D<<16          ' Tx "12",<cr> and skips B3=0
    '[B][COLOR=#ff0000]count        [/COLOR][/B]long    I_countL    '' --------- [B]Moved [/B]to one of free longs Space after MY variables
    [B][COLOR=#ffa500]wait            [/COLOR][/B]long    0
    [COLOR=#ffa500][B]delay500ns    [/B][/COLOR]long    _xinfreq /2            ' 0.5 sec
    [COLOR=#ffa500][B]delay5s        [/B][/COLOR]long    _xinfreq * 5                    ' 5 sec
    ''================================================================================================
    ''################################################################################################
    ''
    ''    COG LMM hard coded to        $1DA + 16 byte identifier     (maybe removed to save space)
    ''
            long    "C"[$1DA-$-5]            ''Hard coded COG LMM Extra Variables -------- 
    ''    If You NEED add some more longs Change "C"[$1D8-$-5-X_longs]
    ''                byte    "=== COG LMM ===="              ' 16 byte identifier     (Removed)
    ''===============================================================================================
    LMM_Pos
    strptr_version    long    @_str_vers            ' hub address of version string
    strptr_code    long    @_str_hcode            ' hub address of code header string
    strptr_long    long    @_str_hlong            ' hub address of code header string
    strptr_msg1    long    @_str_msg1            ' hub address of message1
    
    '------------------------------------------------------------------------------
    
    ''================================================================================================
    ''################################################################################################
    ''
    ''    COG LMM hard coded to        $1D4 + 16 byte identifier     (maybe removed to save space)
    ''
            long    "C"[$1DA-$-1]            ''Hard coded COG LMM position -------- Chj filler for cog size
    ''
    ''                byte    "==="              ' 4 byte identifier     (maybe removed to save space)
    ''
    ''########### the above "=== COG LMM ====" may be deleted to save space ##########################
    ''=======[ Cog LMM execution unit & parameter(s) ]=============================
    ''
    '' Currently 18 longs.    Calls save & restore Z & C flags
    
    ''-------[ LMM workareas ]------------------------------
    '' These are additional workareas and may not be required in a later revision...
    lmm_v           long    0                               ' workarea value
    lmm_bittime     long    _bitrate                        ' bit rate for baud
    
    ''-------[ LMM entry points ]---------------------------
    LmmFun          add     lmm_pc, #4                      ' inc PC (skips _LmmRx jump instr)
    LmmRx           add     lmm_pc, #4                      ' inc PC (skips _LmmTx jump instr)
    LmmTx                                                   '
    ''-------[ LMM execution loop ]-------------------------
    LmmLoop         rdlong  lmm_opcode, lmm_pc              ' rdlong        (read LMM hub instr into OPCODE using PC)
                    add     lmm_pc, #4                      ' PC++          (inc PC to next LMM hub instr)
    lmm_op2         nop                                     ' rdlong delay  (optional 2nd instruction execution)
    lmm_opcode      nop                                     ' rdlong result (execute the LMM hub instr)
                    jmp     #LmmLoop                        ' loop
    ''-------[ LMM return address ]-------------------------
    LmmFun_ret
    LmmRx_ret
    LmmTx_ret    nop                                     ' stores user cog return addr + Z & C flags (11 bits)
    ''-------[ LMM parameters ]-----------------------------
    lmm_f           long    0                               ' parameter passed to      LMM routine (function options; returns unchanged)
    lmm_x           long    0                               ' parameter passed to/from LMM routine (typically a value)
    lmm_c        long    0                ' parameter passed to/from LMM routine (typically a count)
    lmm_p        long    0                ' parameter passed to/from LMM routine (typically a hub pointer)
    ''-------[ LMM workareas ]------------------------------
    '  Following are workareas used by the LMM routines. Later, some of these may be shifted to hub or stack to save cog space.
    lmm_pc          long    @_LmmCogReturn + 4              ' LMM PC (program counter)
    lmm_sp          long    @_hub_stack                     ' LMM SP (stack pointer)
    lmm_w           long    0                               ' workarea for LMM_call
    lmm_mode        long    0                               ' saved in dump
    '------------------------------------------------------------------------------
    
    
    ''###############################################################################################
    ''# The following is required by Sapieha for his testing - it may be removed            #
    ''###############################################################################################
            long    LMM_Pos
    '        fit    $1F0   ------------- Dont function ---------------------
    Vars_P        org    $                ' 
    '' --------------------------------------------------------
    '' |Change        and        to show diferent part of COG |
    '' | COG   IStart    List_Count   Var_s_Start   Var_Count |
    '' --------------------------------------------------------
    ''   1F0- 00000000    0000000A    000001E4    00000008
    ''-----------------------------------------------------------------------------------------------
    I_Start        long    $0                ''IStart
    I_countL    long    5                ''(@I_End - @I_Start+1)    ''IEnd - IStart
    Vars_PL        long    Vars_P                        ''Have same position as     BYTE    "INDA"
    Vars_C        long    8                            ' hub address to dump (executes as "NOP")
            long    0                        ''Spare Long
    [COLOR=#ff0000][B]count[/B][/COLOR]        long    I_countL
            BYTE    "INDA"        ''Important that 2 BYTE fill position's are in this place
            BYTE    "INDB"        '' I tested both with FIT and RES and it NOT function
    ''-----------------------------------------------------------------------------------------------
    '        res    1
    '        fit    $1F8                ' The P2 registers
                    byte    "== $1F8 CODE ==="        ' Place holders for $1F6 (COG I/O registers) Don't remove
                    byte    "== $1FC CODE ==="        ' Place holders for $1F7 (COG I/O registers) Don't remove
    ''###############################################################################################
            byte    "%"[(_HUB_BASE-(_COG_BASE+_COG_SIZE))-16]  ' filler to _HUB_BASE
    
    ''===============================================================================================
    
    DAT
    ''=======[ Hub Resident LMM Routines ]==$01800=================================
                    org     0                               ' used for label calcs
    _HubResident    
    
    
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 09:21
    Hi Cluso.

    Send Modified SPIN file.

    Look in List commands description WHAT modes are supported.

    It was to much changes to send as separate parts.

    --- Both that List and LMM placement in FIXED position ---- Tested and function correctly


    Edit:

    Attachment updated -- Removed some minor errors on LIST command.
    And edited some HDG string's
    for modes look in:

    ''
    List modes suported
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 09:32
    Hi.

    Small addition(correction) to supported LIST modes.
    ''-----------------------------------------------------------------------------------------------------------------------------------------
    ''----------------------------- List modes suported ---------------------------------------------------------------------------------------
    ''-----------------------------------------------------------------------------------------------------------------------------------------
        xxxxxL[n]<cr>              Display (DUMP) from cog/hub ----- (Counter of lines to display programed in -- I_countL    Long    10)
        xxxxx [,cc]L[n]<cr>        Display (DUMP) from cog/hub ----- (Counter of lines to display programed in -- I_countL    Long    10)
              [,cc]                (Autochanges Counter of lines to display programed in -- I_countL    Long    4_initialy)
             L[n]            Repeat List of last addres and counter
        xxxxx[.yyyyy]L[n]<cr>        Display (DUMP) from cog/hub
                            xxxxx is 'from addr' 
                            yyyyy is optional 'to addr'
                            cc    is optional 'New Lines counter'
                            n     is optional n=1/2/3 for smon/code/long else mon
    ''-----------------------------------------------------------------------------------------------------------------------------------------
    
    
    
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 10:04
    Hi Cluso.

    Screen dump for LIST modes and LMM part placement

    List and LMM placement.jpg
    1024 x 513 - 148K
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 13:13
    Hi Cluso.

    Now only this shall function before I can made -- FLASH -- version of Debugger.

    If possible entire line with skip of TEXT part

    000- 0D 40 FC 0C 21 40 BC 80 00 40 BC FC DB 3E FC 0C '.@..!@...@...>..'

    PNut version

    Part toskip
    000- 0D 40 FC 0C 21 40 BC 80 00 40 BC FC DB 3E FC 0C .@..!@...@...>..
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-23 14:29
    Ray,

    Very nice and useful tool. I am certain it will be very handy for my experiments :)
    Thanks Bill.
    I need this to debug my version of the spin interpreter for P2. I am just going to port it without any changes required for existing P1 spin code (well mostly none as there probably will be some gotchas).
    I also had a quick shot at running it on the P1 yesterday - only need to make it work with FDX.
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-23 14:40
    Sapieha,
    I will take a look at your reposted file shortly and incorporate it. Thanks for posting the file.

    Yes, I can skip the ascii bits on loading hub/cog. I have thought about the problem of loading cog memory with the byte structure of both my byte outputs from cog and pnut output. I think that if the load is being done to cog, then I should get a whole long first (whether it is in byte/word/long mode), and then copy to cog. This will resolve your problem and makes sense to users too.

    I will change _DUMP to _LIST shortly as well, to keep consistency.

    I think I will do M for move next...
    xxxxx.yyyyy,ccMz<cr>
    where xxxxx = from cog/hub address; yyyyy = to cog/hub address; cc = decimal count; z = "B"/"W"/"L"
    To accommodate fill/clear, just set the first location (byte/word/long) and then move for a "length-1"
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 15:33
    Hi Cluso.

    Thanks

    In one of my previous post I posted that example.

    Look at entire Code I posted --- If possible don't Remove: only rename to new version this ---- LSD_0xx_c

    This parts. As I use them in p2load dos window CUT from edited code and PASTE in p2load window.
    ( I never type more that necessary )
    ''################################################################################################
    ''##                                                ##
    ''##    ------    Used for  CUT  and  PASTE  in Debuger window ------ After <Ctrl-L twice in PNut    ##
    ''##                                                ##
    ''##        p2load -b 115200 -v -s LSD_062_c.obj -h -T                    ##
    ''##                                                ##
    ''############# the following is example code and may be deleted #################################
    
    

    In code LSD_062_c.spin -- You will find all info that I have be thinking You need.

    For MOVE if possible use same conventions as I use in DUMP for xxxxx and cc.

    Cluso99 wrote: »
    Sapieha,
    I will take a look at your reposted file shortly and incorporate it. Thanks for posting the file.

    Yes, I can skip the ascii bits on loading hub/cog. I have thought about the problem of loading cog memory with the byte structure of both my byte outputs from cog and pnut output. I think that if the load is being done to cog, then I should get a whole long first (whether it is in byte/word/long mode), and then copy to cog. This will resolve your problem and makes sense to users too.

    I will change _DUMP to _LIST shortly as well, to keep consistency.

    I think I will do M for move next...
    xxxxx.yyyyy,ccMz<cr>
    where xxxxx = from cog/hub address; yyyyy = to cog/hub address; cc = decimal count; z = "B"/"W"/"L"
    To accommodate fill/clear, just set the first location (byte/word/long) and then move for a "length-1"
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 15:43
    Ps to previous post.

    Cluso if needed You have still 2 free LONG's betwen Yours LMM variables and my ones
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-23 16:01
    Sapieha,
    ''================================================================================================
    ''################################################################################################
    ''
    '' COG LMM hard coded to  $1D4 + 16 byte identifier  (maybe removed to save space)
    ''
    '  long    "C"[$1DA-$-1]   ''Hard coded COG LMM position -------- Chj filler for cog size
      long    "C"[$1E0-$-3]   ''Hard coded COG LMM position -------- Chj filler for cog size
    ''
    ''                byte    "==="              ' 4 byte identifier  (maybe removed to save space)
    ''
    ''########### the above "=== COG LMM ====" may be deleted to save space ##########################
    ''=======[ Cog LMM execution unit & parameter(s) ]=============================
    ''
    '' Currently 18 longs. Calls save & restore Z & C flags
    ''-------[ LMM workareas ]------------------------------
    '' Additional internal workareas (may not be required in a later revision)
    lmm_v           long    0                               ' workarea value
    lmm_bittime     long    _bitrate                        ' bit rate for baud
    ''-------[ LMM entry points ]---------------------------
    LmmFun          add     lmm_pc, #4                      ' inc PC (skips _LmmRx jump instr)
    LmmRx           add     lmm_pc, #4                      ' inc PC (skips _LmmTx jump instr)
    LmmTx                                                   '
    ''-------[ LMM execution loop ]-------------------------
    LmmLoop         rdlong  lmm_opcode, lmm_pc              ' rdlong        (read LMM hub instr into OPCODE using PC)
                    add     lmm_pc, #4                      ' PC++          (inc PC to next LMM hub instr)
    lmm_op2         nop                                     ' rdlong delay  (optional 2nd instruction execution)
    lmm_opcode      nop                                     ' rdlong result (execute the LMM hub instr)
                    jmp     #LmmLoop                        ' loop
    ''-------[ LMM return address ]-------------------------
    LmmFun_ret
    LmmRx_ret
    LmmTx_ret nop                                     ' stores user cog return addr + Z & C flags (11 bits)
    ''-------[ LMM parameters ]-----------------------------
    lmm_f           long    0                               ' parameter passed to      LMM routine (function options; returns unchanged)
    lmm_x           long    0                               ' parameter passed to/from LMM routine (typically a value)
    lmm_c  long 0    ' parameter passed to/from LMM routine (typically a count)
    lmm_p  long 0    ' parameter passed to/from LMM routine (typically a hub pointer)
    ''-------[ LMM workareas ]------------------------------
    '  Internal workareas used by the LMM routines. 
    lmm_pc          long    @_LmmCogReturn + 4              ' LMM PC (program counter)
    lmm_sp          long    @_hub_stack                     ' LMM SP (stack pointer)
    lmm_w           long    0                               ' workarea for LMM_call
    lmm_mode        long    0                               ' saved in dump
    '------------------------------------------------------------------------------
    
    ''###############################################################################################
    ''# The following is required by Sapieha for his testing - it may be removed   #
    ''###############################################################################################
      long LMM_Pos
      long    0               ''Spare Long
    count  long 0  'I_countL
    ''' --------------------------------------------------------
    Vars_P  org $    ' 
    '' --------------------------------------------------------
    '' |Change        and        to show diferent part of COG |
    '' | COG   IStart    List_Count   Var_s_Start   Var_Count |
    '' --------------------------------------------------------
    ''   1F0- 00000000    0000000A    000001E4    00000008
    ''-----------------------------------------------------------------------------------------------
    I_Start  long $0    ''IStart
    I_countL long 5    ''(@I_End - @I_Start+1)    ''IEnd - IStart
    Vars_PL  long Vars_P                     ''Have same position as     BYTE    "INDA"
    Vars_C  long 8                      ' hub address to dump (executes as "NOP")
    '  long    0               ''Spare Long
    '  long    0               ''Spare Long
    '  long    0               ''Spare Long
    '  long    0               ''Spare Long
      BYTE "INDA"  ''Important that 2 BYTE fill position's are in this place
      BYTE "INDB"  '' I tested both with FIT and RES and it NOT function
    ''-----------------------------------------------------------------------------------------------
    '  res 1
    '  fit $1F8    ' The P2 registers
                    byte    "== $1F8 CODE ==="  ' Place holders for $1F6 (COG I/O registers) Don't remove
                    byte    "== $1FC CODE ==="  ' Place holders for $1F7 (COG I/O registers) Don't remove
    ''###############################################################################################
      byte    "%"[(_HUB_BASE-(_COG_BASE+_COG_SIZE))-16]  ' filler to _HUB_BASE
    ''===============================================================================================
    
    The above fills the entire cog space and allows for the P2 registers $1F8-$1FF,
    Maybe we can simplify this a little - combine my extra 2 registers and the two spare together?
    So, I can move these
    ''=======[ Cog LMM execution unit & parameter(s) ]=============================
    ''
    '' Calls save & restore Z & C flags
    '' Currently 16+4=20 longs. (2 longs used further down)
    ''-------[ LMM entry points ]---------------------------
    LmmFun          add     lmm_pc, #4                      ' inc PC (skips _LmmRx jump instr)
    LmmRx           add     lmm_pc, #4                      ' inc PC (skips _LmmTx jump instr)
    LmmTx                                                   '
    ''-------[ LMM execution loop ]-------------------------
    LmmLoop         rdlong  lmm_opcode, lmm_pc              ' rdlong        (read LMM hub instr into OPCODE using PC)
                    add     lmm_pc, #4                      ' PC++          (inc PC to next LMM hub instr)
    lmm_op2         nop                                     ' rdlong delay  (optional 2nd instruction execution)
    lmm_opcode      nop                                     ' rdlong result (execute the LMM hub instr)
                    jmp     #LmmLoop                        ' loop
    ''-------[ LMM return address ]-------------------------
    LmmFun_ret
    LmmRx_ret
    LmmTx_ret nop                                     ' stores user cog return addr + Z & C flags (11 bits)
    ''-------[ LMM parameters ]-----------------------------
    lmm_f           long    0                               ' parameter passed to      LMM routine (function options; returns unchanged)
    lmm_x           long    0                               ' parameter passed to/from LMM routine (typically a value)
    lmm_c  long 0    ' parameter passed to/from LMM routine (typically a count)
    lmm_p  long 0    ' parameter passed to/from LMM routine (typically a hub pointer)
    ''-------[ LMM workareas ]------------------------------
    '  Internal workareas used by the LMM routines. 
    lmm_pc          long    @_LmmCogReturn + 4              ' LMM PC (program counter)
    lmm_sp          long    @_hub_stack                     ' LMM SP (stack pointer)
    lmm_w           long    0                               ' workarea for LMM_call
    lmm_mode        long    0                               ' saved in dump
    '------------------------------------------------------------------------------
    ''-------[ LMM workareas ]------------------------------
    '' Additional internal workareas (may not be required in a later revision)
    lmm_v           long    0                               ' workarea value
    lmm_bittime     long    _bitrate                        ' bit rate for baud
    lmm_spare1   long 0
    lmm_spare2   long 0
    ''===============================================================================================
    
    ''###############################################################################################
    ''# The following is required by Sapieha for his testing - it may be removed   #
    ''###############################################################################################
      long LMM_Pos
      long    0               ''Spare Long
    count  long 0  'I_countL
    ''' --------------------------------------------------------
    Vars_P  org $    ' 
    '' --------------------------------------------------------
    '' |Change        and        to show diferent part of COG |
    '' | COG   IStart    List_Count   Var_s_Start   Var_Count |
    '' --------------------------------------------------------
    ''   1F0- 00000000    0000000A    000001E4    00000008
    ''-----------------------------------------------------------------------------------------------
    I_Start  long $0    ''IStart
    I_countL long 5    ''(@I_End - @I_Start+1)    ''IEnd - IStart
    Vars_PL  long Vars_P                     ''Have same position as     BYTE    "INDA"
    Vars_C  long 8                      ' hub address to dump (executes as "NOP")
    
    spare1  long  0
    spare2  long  0
    
      BYTE "INDA"  ''Important that 2 BYTE fill position's are in this place
      BYTE "INDB"  '' I tested both with FIT and RES and it DOES NOT function
    ''-----------------------------------------------------------------------------------------------
                    byte    "== $1F8 CODE ==="  ' Place holders for $1F6 (COG I/O registers) Don't remove
                    byte    "== $1FC CODE ==="  ' Place holders for $1F7 (COG I/O registers) Don't remove
    ''###############################################################################################
    
    Can you chat on msn?
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-23 16:21
    Sapieha,
    What am I missing here?
    There should be 2 longs between Vars_c and the byte "INDA" & "INDB" longs???
    Could the long LMM_Pos & count go here???
    ''###############################################################################################
    ''# The following is required by Sapieha for his testing - it may be removed   #
    ''###############################################################################################
      long LMM_Pos
      long    0               ''Spare Long
    count  long 0  'I_countL
    ''' --------------------------------------------------------
    Vars_P  org $    ' 
    '' --------------------------------------------------------
    '' |Change        and        to show diferent part of COG |
    '' | COG   IStart    List_Count   Var_s_Start   Var_Count |
    '' --------------------------------------------------------
    ''   1F0- 00000000    0000000A    000001E4    00000008
    ''-----------------------------------------------------------------------------------------------
    I_Start  long $0    ''IStart
    I_countL long 5    ''(@I_End - @I_Start+1)    ''IEnd - IStart
    Vars_PL  long Vars_P                     ''Have same position as     BYTE    "INDA"
    Vars_C  long 8                      ' hub address to dump (executes as "NOP")
    '  long    0               ''Spare Long
    '  long    0               ''Spare Long
    '  long    0               ''Spare Long
    '  long    0               ''Spare Long
      BYTE "INDA"    '' Important that 2 BYTE fill position's are in this place
      BYTE "INDB"    '' Sapieha tested both with FIT and RES and DOES NOT function
    ''-----------------------------------------------------------------------------------------------
    '  fit $1F8    ' The P2 registers
                    byte    "== $1F8 CODE ==="  ' Place holders for $1F6 (COG I/O registers) Don't remove
                    byte    "== $1FC CODE ==="  ' Place holders for $1F7 (COG I/O registers) Don't remove
    ''###############################################################################################
    
    becomes...
    ''###############################################################################################
    ''# The following is required by Sapieha for his testing - it may be removed   #
    ''#    Uses cog $1F0-$1FF ($1F8-$1FF are placeholders for the registers)    #
    ''###############################################################################################
    ''  FIT  $1F0    'fit does not work!
    '' --------------------------------------------------------
    '' |Change        and        to show diferent part of COG |
    '' | COG   IStart    List_Count   Var_s_Start   Var_Count |
    '' --------------------------------------------------------
    ''   1F0- 00000000    0000000A    000001E4    00000008
    Vars_P        org       $                               ' 
    I_Start       long      $0                      '' IStart
    I_countL      long      5                       '' (@I_End - @I_Start+1)    ''IEnd - IStart
    Vars_PL       long      Vars_P                  '' Have same position as BYTE "INDA" ???
    Vars_C        long      8                       '' hub address to dump (executes as "NOP") ???
    what          long      LMM_Pos                 '' where is this used???
    count         long      0                       '' I_countL
                  BYTE      "INDA"                  '' Important that 2 BYTE fill position's are in this place
                  BYTE      "INDB"                  '' FIT and RES and DO NOT function
                  byte      "== $1F8 CODE ==="      '' Place holders for $1F8 (COG I/O registers) Don't remove
                  byte      "== $1FC CODE ==="      '' Place holders for $1FC (COG I/O registers) Don't remove
    ''###############################################################################################
    
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 16:53
    I don't longer have MSN.

    I chat on E-MAIL page in Google - Them ahve inbuild CHAT.

    As I write in previous post --- It is still 2 free long's ---- BUT don't move my Variables -- That will disturb my entire (Future) work

    Use instead positions I marked in code section: But in same position

    Move LMM_Pos this to place I mark in code section
    1. part 1
    
    Yors Part
    [B]..........[/B]
    [B]..........[/B]
    [B]..........[/B]
    lmm_mode        long    0                               ' saved in dump
    '------------------------------------------------------------------------------
                    [COLOR=#00ff00][B]long    [/B][/COLOR][COLOR=#ff0000][B]LMM_Pos[/B][/COLOR]                        ''Spare Long
                    [B][COLOR=#00ff00]long    [/COLOR][/B]0                              ''Spare Long
    
    count           long    0        'I_countL
    
    
    2. part 2
     ''##################################################################################################
     ''#      The following is required by Sapieha for use in [B]FLASH[/B] - it can't [B][COLOR=#ff0000]NOT [/COLOR][/B]be Moved - removed    #
     ''##################################################################################################
    
      I_Start  long $0    ''IStart
      I_countL long 5    ''(@I_End - @I_Start+1)    ''IEnd - IStart 
      Vars_PL  long [B][COLOR=#ff0000]LMM_Pos[/COLOR][/B]                     ''Have same position as     BYTE    "INDA" 
      Vars_C   long 8                      ' hub address to dump (executes as "NOP") ' 
                BYTE    "INDA"        ''Important that 2 BYTE fill position's are in this place
                BYTE    "INDB"        '' I tested both with FIT and RES and it NOT function
    ''-----------------------------------------------------------------------------------------------
    ''-----------------------------------------------------------------------------------------------
                    byte    "== $1F8 CODE ==="        ' Place holders for $1F6 (COG I/O registers) Don't remove
                    byte    "== $1FC CODE ==="        ' Place holders for $1F7 (COG I/O registers) Don't remove
    ''###############################################################################################
    
    
    
    long    0               ''Spare Long '  
    long    0               ''Spare Long ' 
    long    0               ''Spare Long       [B][COLOR=#ff8c00]REMOVE[/COLOR][/B] this 4 lines I forgot that '  
    long    0               ''Spare Long 
    
    
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 17:30
    Ps. to previous post.

    Cluso -- I don't think You need that: I forgot Remove that lines.


    I_countL long 5 <--- is only temporary value for first start

    Next time You use [,cc] in L command it will hold that value to next use of [,cc]
    I_countL long 5    ''[B](@I_End - @I_Start+1)[/B]    ''IEnd - IStar
    
    
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-23 18:02
    Sapieha,
    So your Part2 starts at $1F2 and not at $1F0 ???

    And in Part 1, what are these for??
    long LMM_Pos ''Spare Long
    long 0 ''Spare Long

    count long 0 'I_countL


    Are the 2 longs really spare because you have one with a value of LMM_Pos in it???

    So therefore, are youreally starting at $1F1 ???
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-23 18:12
    Cluso99 wrote: »
    Sapieha,
    So your Part2 starts at $1F2 and not at $1F0 ??? ............ <
    Start of My variables -- uses $1F2, $1F3, $1F4, $1F5 (1F6,1F7 = INDA, INDB)

    And in Part 1, what are these for??
    long 0 ''Spare Long .............. <
    2 free longs If You need for Yours use
    long 0 ''Spare Long

    count long 0 'I_countL .............. '<
    itis Yours count variable You had in other place in code (uses as TEMP counter)


    Are the 2 longs really spare because you have one with a value of LMM_Pos in it???

    So therefore, are youreally starting at $1F1 ???
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-23 18:45
    Thanks Sapieha.
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-23 21:11
    Sapieha,
    Here is v0.63 that incorporates your code.
    However, I am unsure about your modifications to the L command. I need to think some more on this as it removes some flexibility that I require.
    Perhaps I can put in an M4 command specifically for you?

    Others:
    I suggest for now, until I make Sapieha's code easily removed, I suggest you try v0.62 a few posts back.

    LSD_064.spin
Sign In or Register to comment.