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

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

1235710

Comments

  • SapiehaSapieha Posts: 2,964
    edited 2013-04-18 14:11
    Hi Cluso

    Examples of code to transmit

    Blank line that ends with <cr> ends transmition

    To HUB
    
    1570- DB 3E FC 0C DB 3A E8 0C DA 3A D4 0C DB 3C F0 0C
    1580- DA 3C CC 0C 80 72 FF A0 A1 71 BF A0 B0 6F FF 1F
    1590- 45 72 FF A0 83 71 BF A0 B0 6F FF 1F 0D 70 FF A0
    15A0- B2 6F FF 1F 80 72 FF A0 9E 71 BF A0 B0 6F FF 1F
    15B0- 04 46 FF A0 70 72 FF A0 81 71 BF A0 B0 6F FF 1F
    15C0- 6F 47 FF F6 80 72 FF A0 9D 71 BF A0 B0 6F FF 1F
          04 46 FF A0 70 72 FF A0 82 71 BF A0 B0 6F FF 1F
          77 47 FF F6 80 72 FF A0 A0 71 BF A0 B0 6F FF 1F
          05 46 FF A0 78 72 FF A0 03 70 FF A0 B0 6F FF 1F
          7F 47 FF F6 CB 01 00 00 DB 01 00 00 00 10 00 00
          00 10 00 00 C0 72 FF A0 B0 6F FF 1F 0D 70 FF A0
          B2 6F FF 1F E0 72 FF A0 B0 6F FF 1F
    
    To COG:
          
    010- DB 3E FC 0C DB 3A E8 0C DA 3A D4 0C DB 3C F0 0C
    020- DA 3C CC 0C 80 72 FF A0 A1 71 BF A0 B0 6F FF 1F
    030- 45 72 FF A0 83 71 BF A0 B0 6F FF 1F 0D 70 FF A0
    040- B2 6F FF 1F 80 72 FF A0 9E 71 BF A0 B0 6F FF 1F
    050- 04 46 FF A0 70 72 FF A0 81 71 BF A0 B0 6F FF 1F
    060- 6F 47 FF F6 80 72 FF A0 9D 71 BF A0 B0 6F FF 1F
    070- 04 46 FF A0 70 72 FF A0 82 71 BF A0 B0 6F FF 1F
       - 77 47 FF F6 80 72 FF A0 A0 71 BF A0 B0 6F FF 1F
       - 05 46 FF A0 78 72 FF A0 03 70 FF A0 B0 6F FF 1F
       - 7F 47 FF F6 CB 01 00 00 DB 01 00 00 00 10 00 00
       - 00 10 00 00 C0 72 FF A0 B0 6F FF 1F 0D 70 FF A0
       - B2 6F FF 1F E0 72 FF A0 B0 6F FF 1F
    
    
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-18 22:53
    Hi Cluso

    It is possible to modify this " mov lmm_y, #_HEX+5 '\ set hex mode with 8 digits (8=0=default)" LMM mode
    to show in one line that as it look's in example.
    else made one HEX mode more

    COG Value
    120- 00000003
    121- 00008
    122- 0005
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-19 03:55
    Hi Cluso.

    Hi Cluso.

    I remade now Showing Longs as we both have modifing of COG-ram and GoTo XXX.
    So no need for placing initial positions in code to compile.
    
    Question?
    It is possible to instead of:
      1F4- 00 00 00 00 05 00 00 00 90 01 00 00 5C 01 00 00   '...........\....'
    Have that:
      1F4- 00000000    00000005    00000190     0000015C    'Will show it that way
    
    After start:
    
    --------------------------------------------------------
    |Change        and        to show diferent part of COG |
    | COG   IStart     CountL      Last usable  Variables  |
    --------------------------------------------------------
      1F4- 00 00 00 00 05 00 00 00 90 01 00 00 5C 01 00 00   '...........\....'
    
     addr- instr  zcr i cccc dst src -  3 2 1 0  0 1 2 3
      000- 000011 001 1 1111 1D0 00D - 0CFFA00D 0DA0FF0C '....'
      001- 100000 001 0 1111 1D0 1D1 - 80BFA1D1 D1A1BF80 '....'
      002- 111111 001 0 1111 1D0 000 - FCBFA000 00A0BFFC '....'
      003- 100000 001 0 1111 1D0 1D2 - 80BFA1D2 D2A1BF80 '....'
      004- 100001 000 0 1111 1D0 1D2 - 843FA1D2 D2A13F84 '..?.'
    
    == Cluso's P2 Debugger v0.51 ==
    *1f5$7
    *0!
    
    After next round:
    
    --------------------------------------------------------
    |Change        and        to show diferent part of COG |
    | COG   IStart     CountL      Last usable  Variables  |
    --------------------------------------------------------
      1F4- 00 00 00 00 07 00 00 00 90 01 00 00 5C 01 00 00   '...........\....'
      1F4- 00000000    00000005    00000190     0000015C    'Will show it that way
    
     addr- instr  zcr i cccc dst src -  3 2 1 0  0 1 2 3
      000- 000011 001 1 1111 1D0 00D - 0CFFA00D 0DA0FF0C '....'
      001- 100000 001 0 1111 1D0 1D1 - 80BFA1D1 D1A1BF80 '....'
      002- 111111 001 0 1111 1D0 000 - FCBFA000 00A0BFFC '....'
      003- 100000 001 0 1111 1D0 1D2 - 80BFA1D2 D2A1BF80 '....'
      004- 100001 000 0 1111 1D0 1D2 - 843FA1D2 D2A13F84 '..?.'
      005- 000111 000 1 1111 000 190 - 1C7C0190 90017C1C '..|.'
      006- 010000 110 1 0000 1A1 143 - 43434343 43434343 'CCCC'
    
    == Cluso's P2 Debugger v0.51 ==
    *
    
    
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-19 04:10
    Here is the latest installment. There are now changes to make the commands easier/simpler.
    '' RR20130419 0.55 code tidy: now push/pop lmm_y; lmm_y -> lmm_f (function/mode)
    '------------------------------------------------------------------------------------------------
    '' Call parameters (revised definition)...
    ''  lmm_f calling function/mode ( eg: mov lmm_f, #_DEBUG ) (was lmm_y)
    ''  lmm_x typically a value
    ''  lmm_2 typically a count (will become lmm_y later)
    ''  lmm_p typically a pointer to a hub location ( eg: location of a string ) (was sometimes lmm_x)
    '' Return parameters (revised definition)...
    ''  lmm_f calling function/mode ( eg: mov lmm_f, #_DEBUG ) (was lmm_y)
    ''    always returns unchanged (ie: "sticky")
    ''  lmm_x typically a value
    ''    only valid for specific calls - maybe destroyed
    ''  lmm_2 typically a count (will become lmm_y later)
    ''    only valid for specific calls - maybe destroyed    
    ''  lmm_p typically a pointer to a hub location ( eg: location of a string ) (was sometimes lmm_x)
    ''    returns set/unchanged/incremented/destroyed, according to the call function/mode
    '------------------------------------------------------------------------------------------------
        Direct DEBUG commands... prompt "*"
        ===================================
        G<cr>    Return to user program
        0G<cr>    Goto cog address $0 (restart without initialisation)
        xxxG<cr>    Goto cog address $xxx
        xxxxxM<cr>     Display (DUMP CODE) COG/HUB long
        xxxxxL<cr>    Display (DUMP LIST) COG/HUB 4 longs
        xxxxx-hh hh hh hh ... hh<cr> stores byte(s) at hub
        xxxxx-hhhh hhhh ... hhhh<cr> stores word(s) at hub
        xxxxx-hhhhhhhh ... hhhhhhhh<cr> stores long(s) at cog/hub
        Ctl-Q<cr>     passes control to the Rom Monitor.
        where xxxxx = cog/hub address, cog <$1FF else hub.
        where G/g, M/m, L/l can be upper/lower case.
    
    The following commands are not currently working...
              <cr> Display (repeat DUMP CODE/LIST) from next address.
    

    LSD_055.spin
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-19 04:13
    Hi Cluso.

    Thanks
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-19 04:32
    Sapieha wrote: »
    Hi Cluso.

    Hi Cluso.

    I remade now Showing Longs as we both have modifing of COG-ram and GoTo XXX.
    So no need for placing initial positions in code to compile.
    
    Question?
    It is possible to instead of:
      1F4- 00 00 00 00 05 00 00 00 90 01 00 00 5C 01 00 00   '...........\....'
    Have that:
      1F4- 00000000    00000005    00000190     0000015C    'Will show it that way
    
    After start:
    
    --------------------------------------------------------
    |Change        and        to show diferent part of COG |
    | COG   IStart     CountL      Last usable  Variables  |
    --------------------------------------------------------
      1F4- 00 00 00 00 05 00 00 00 90 01 00 00 5C 01 00 00   '...........\....'
    
     addr- instr  zcr i cccc dst src -  3 2 1 0  0 1 2 3
      000- 000011 001 1 1111 1D0 00D - 0CFFA00D 0DA0FF0C '....'
      001- 100000 001 0 1111 1D0 1D1 - 80BFA1D1 D1A1BF80 '....'
      002- 111111 001 0 1111 1D0 000 - FCBFA000 00A0BFFC '....'
      003- 100000 001 0 1111 1D0 1D2 - 80BFA1D2 D2A1BF80 '....'
      004- 100001 000 0 1111 1D0 1D2 - 843FA1D2 D2A13F84 '..?.'
    
    == Cluso's P2 Debugger v0.51 ==
    *1f5$7
    *0!
    
    After next round:
    
    --------------------------------------------------------
    |Change        and        to show diferent part of COG |
    | COG   IStart     CountL      Last usable  Variables  |
    --------------------------------------------------------
      1F4- 00 00 00 00 07 00 00 00 90 01 00 00 5C 01 00 00   '...........\....'
      1F4- 00000000    00000005    00000190     0000015C    'Will show it that way
    
     addr- instr  zcr i cccc dst src -  3 2 1 0  0 1 2 3
      000- 000011 001 1 1111 1D0 00D - 0CFFA00D 0DA0FF0C '....'
      001- 100000 001 0 1111 1D0 1D1 - 80BFA1D1 D1A1BF80 '....'
      002- 111111 001 0 1111 1D0 000 - FCBFA000 00A0BFFC '....'
      003- 100000 001 0 1111 1D0 1D2 - 80BFA1D2 D2A1BF80 '....'
      004- 100001 000 0 1111 1D0 1D2 - 843FA1D2 D2A13F84 '..?.'
      005- 000111 000 1 1111 000 190 - 1C7C0190 90017C1C '..|.'
      006- 010000 110 1 0000 1A1 143 - 43434343 43434343 'CCCC'
    
    == Cluso's P2 Debugger v0.51 ==
    *
    
    
    I am not sure what you are asking?
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-19 05:04
    Hi Cluso.

    Possibility to display DUMP in that manner with 4 " " betwen
    Without ASCII at end.
      1F4- 00000000    00000005    00000190     0000015C    'Will show it that way
    
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-19 05:10
    Hi Cluso.

    It is for Showing VARIABLES in real manner.
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-19 05:39
    Hi Cluso:

    Now it show it in that way
    --------------------------------------------------------
    | COG  RANPNT      CURRNT      STKGOS      STKINP      |
    | COG  LOPVAR      LOPINC      LOPLMT      LOPLN       |
    | COG  LOPPT       TXTUNF      VARBGN      STKLMT      |
    | COG  BUFFER      LimitL      NumLimit    _NumStringH |
    --------------------------------------------------------
      16F- 00 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00   '................'
      173- 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00   '................'
      177- 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00   '................'
      17B- 00 00 00 00 FF FF 00 00 CC CC CC 0C 00 00 00 00   '................'
    
    I will display it in that way:
    --------------------------------------------------------
    | COG  RANPNT      CURRNT      STKGOS      STKINP      |
    | COG  LOPVAR      LOPINC      LOPLMT      LOPLN       |
    | COG  LOPPT       TXTUNF      VARBGN      STKLMT      |
    | COG  BUFFER      LimitL      NumLimit    _NumStringH |
    --------------------------------------------------------
      1xx- 00000000    00000001    00000001     00000001
      1xx- 00000001    00000001    00000001     00000001
      1xx- 00000001    00000001    00000001     00000001
      1xx- 00000000    0000FFFF    0CCCCCCC     00000000
    
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-19 06:08
    Hi Cluso.

    This don't function as wanted.
    == Cluso's P2 Debugger v0.55 ==
    *0-00 00 01 ee 00 00 12 00
    *0g
    
      000- 00 00 00 00 00 00 00 00 01 00 00 00 EE 00 00 00   '................'
      004- 00 00 00 00 00 00 00 00 12 00 00 00 00 00 00 00   '................'
    

    It need sample 4 bytes in one Long ---- NOT place every one in separate one
    And it need sample them in same order as PNut show it

    Else it don't function as automated CUT and paste from PNut

    Ps. If it is <4 fill to long
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-19 10:08
    Hi Cluso..

    It is any possibility to JUMP to:
         0G<cr>                Goto cog address $0 (restart without initialisation)
       xxxG<cr>                Goto cog address $xxx
    
    .
    By Debuger CALL
    Variable_G.<cr>

    Variable = Address to JUMP to

    Need that for repetitive GoTo on pushing KEY
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-19 14:00
    Ah, now I understand. I was getting confused with your headings.
    Sapieha wrote: »
    Hi Cluso:

    Now it show it in that way
    --------------------------------------------------------
    | COG  RANPNT      CURRNT      STKGOS      STKINP      |
    | COG  LOPVAR      LOPINC      LOPLMT      LOPLN       |
    | COG  LOPPT       TXTUNF      VARBGN      STKLMT      |
    | COG  BUFFER      LimitL      NumLimit    _NumStringH |
    --------------------------------------------------------
      16F- 00 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00   '................'
      173- 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00   '................'
      177- 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00   '................'
      17B- 00 00 00 00 FF FF 00 00 CC CC CC 0C 00 00 00 00   '................'
    
    I will display it in that way:
    --------------------------------------------------------
    | COG  RANPNT      CURRNT      STKGOS      STKINP      |
    | COG  LOPVAR      LOPINC      LOPLMT      LOPLN       |
    | COG  LOPPT       TXTUNF      VARBGN      STKLMT      |
    | COG  BUFFER      LimitL      NumLimit    _NumStringH |
    --------------------------------------------------------
      1xx- 00000000    00000001    00000001     00000001
      1xx- 00000001    00000001    00000001     00000001
      1xx- 00000001    00000001    00000001     00000001
      1xx- 00000000    0000FFFF    0CCCCCCC     00000000
    
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-19 14:05
    I am not sure what you mean here?
    Sapieha wrote: »
    Hi Cluso.

    This don't function as wanted.
    == Cluso's P2 Debugger v0.55 ==
    *0-00 00 01 ee 00 00 12 00
    *0g
    
      000- 00 00 00 00 00 00 00 00 01 00 00 00 EE 00 00 00   '................'
      004- 00 00 00 00 00 00 00 00 12 00 00 00 00 00 00 00   '................'
    

    It need sample 4 bytes in one Long ---- NOT place every one in separate one
    And it need sample them in same order as PNut show it

    Else it don't function as automated CUT and paste from PNut

    Ps. If it is <4 fill to long
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-19 14:09
    Currently the _DEBUG call passes control to my LMM program.

    Are you asking for a similar "G"oto command as a call? (this is what I think you want)
    Sapieha wrote: »
    Hi Cluso..

    It is any possibility to JUMP to:
         0G<cr>                Goto cog address $0 (restart without initialisation)
       xxxG<cr>                Goto cog address $xxx
    
    .
    By Debuger CALL
    Variable_G.<cr>

    Variable = Address to JUMP to

    Need that for repetitive GoTo on pushing KEY
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-19 14:46
    Hi Cluso

    I think You are correct.

    Here is how I will use it.

    1. Input xxx variable by xxx- zzz
    2. Wait for KEY's
    2. read KEY's
    3. if KEY 1 return
    4 if KEY 2 GoTo xxx
    5 Return
    Cluso99 wrote: »
    Currently the _DEBUG call passes control to my LMM program.

    Are you asking for a similar "G"oto command as a call? (this is what I think you want)
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-19 14:54
    Hi Cluso.
    1E8- 3D 3D 3D 20 43 4F 47 20 4C 4D 4D 20 3D 3D 3D 3D   === COG LMM ====
    1E9- 04 E8 FF 80 04 E8 FF 80 F4 DB BF 08 04 E8 FF 80   ................
    1EA- 00 00 00 00 00 00 00 00 EA 01 7C 1C 00 00 00 00   ..........|.....
    1EB- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
    1EC- 14 18 00 00 E4 18 00 00 00 00 00 00 00 00 00 00   ................
    1ED- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
    1EE- A4 18 00 00 00 00 00 00 08 02 00 00 00 00 00 00   ................
    1FF- 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25   %%%%%%%%%%%%%%%%
    
    

    I will input that code to LONG's one line at time
    And it need be placed in LONG's so it will be executable
       3 2 1 0
      0CFF960D - bytes placering
    
    1E8- 3D 3D 3D 20 43 4F 47 20 4C 4D 4D 20 3D 3D 3D 3D 
    1E9- 04 E8 FF 80 04 E8 FF 80 F4 DB BF 08 04 E8 FF 80
    1EA- 00 00 00 00 00 00 00 00 EA 01 7C 1C 00 00 00 00
    1EB- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    1EC- 14 18 00 00 E4 18 00 00 00 00 00 00 00 00 00 00
    1ED- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    1EE- A4 18 00 00 00 00 00 00 08 02 00 00 00 00 00 00
    1FF- 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
    
    

    Cluso99 wrote: »
    I am not sure what you mean here?
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-19 15:48
    The next revision will...
    • use Q<cr> to "Q"uit to the Rom Monitor (was Ctl-Q<cr>)
    • change the _DUMP call as shown below
    {{-----
    _HubDump
    ' On Entry:
            lmm_f   = #_DUMP [+options]                     '   mode
            lmm_x   = -unused-                              '   -unused-
            lmm_2   = count (otional)                       '   'n' lines if _COUNT specified
            lmm_p   = address                               '   cog/hub ptr
    ' Call Format:
    '              'FCALL   SP++, @_HubDump                 ' \                     < call: dump a line >
                     wrlong  lmm_pc, lmm_sp                 ' | PUSH PC
                     add     lmm_sp, #4                     ' | SP++
                     rdlong  lmm_pc, lmm_pc                 ' | CALL...
                     long    @_HubDump                      ' / ...PC = ADDR
    ' On Return:
            lmm_f   = -same-                                '   mode (unchanged)
            lmm_x   = -invalid-                             '   
            lmm_2   = -invalid-                             '   
            lmm_p   = next-address                          '   cog/hub ptr
    ' Uses: 
            lmm_ctr, lmm_ptr, lmm_ptr2, lmm_ptr3, lmm_mode
    -----}}
    
    ''        _DUMP         = 3 << 5        ' dump a line (1/4 longs)   from cog/hub
    ''          _COG        = 1 << 4        ' 1=cog, 0=hub  \\ only used...
    ''          _HUB        = 0 << 4        ' 1=cog, 0=hub  // ...internally
    ''          _COUNT      = 1 << 3        ' 1= use lmm_2 to display 'n' lines (counter)
    ''          _HDG        = 1 << 2        ' 1=display heading for opcode format
    ''          _MON        = 00            ' \ Format 0:   4 longs, rom "MON"itor format
    ''          _SMON       = 01            ' |        1:   4 longs, "S"hort rom "MON"itor format (no ascii)
    ''          _CODE       = 10            ' |        2:   1 long,  code format
    ''          _LONG       = 11            ' /        3:   4 longs, xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx (Sapieha)
    
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-19 16:14
    Hi Cluso.

    Changed -- looks function.

    Have You any examples on new functions usage?
    Cluso99 wrote: »
    The next revision will...
    • use Q<cr> to "Q"uit to the Rom Monitor (was Ctl-Q<cr>)
    • change the _DUMP call as shown below
    {{-----
    _HubDump
    ' On Entry:
            lmm_f   = #_DUMP [+options]                     '   mode
            lmm_x   = -unused-                              '   -unused-
            lmm_2   = count (otional)                       '   'n' lines if _COUNT specified
            lmm_p   = address                               '   cog/hub ptr
    ' Call Format:
    '              'FCALL   SP++, @_HubDump                 ' \                     < call: dump a line >
                     wrlong  lmm_pc, lmm_sp                 ' | PUSH PC
                     add     lmm_sp, #4                     ' | SP++
                     rdlong  lmm_pc, lmm_pc                 ' | CALL...
                     long    @_HubDump                      ' / ...PC = ADDR
    ' On Return:
            lmm_f   = -same-                                '   mode (unchanged)
            lmm_x   = -invalid-                             '   
            lmm_2   = -invalid-                             '   
            lmm_p   = next-address                          '   cog/hub ptr
    ' Uses: 
            lmm_ctr, lmm_ptr, lmm_ptr2, lmm_ptr3, lmm_mode
    -----}}
    
    ''        _DUMP         = 3 << 5        ' dump a line (1/4 longs)   from cog/hub
    ''          _COG        = 1 << 4        ' 1=cog, 0=hub  \\ only used...
    ''          _HUB        = 0 << 4        ' 1=cog, 0=hub  // ...internally
    ''          _COUNT      = 1 << 3        ' 1= use lmm_2 to display 'n' lines (counter)
    ''          _HDG        = 1 << 2        ' 1=display heading for opcode format
    ''          _MON        = 00            ' \ Format 0:   4 longs, rom "MON"itor format
    ''          _SMON       = 01            ' |        1:   4 longs, "S"hort rom "MON"itor format (no ascii)
    ''          _CODE       = 10            ' |        2:   1 long,  code format
    ''          _LONG       = 11            ' /        3:   4 longs, xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx (Sapieha)
    
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-19 16:34
    Hi Cluso.

    I merged it.

    Used.
            mov     lmm_F, #_DUMP+_COG+_LONG            '\ set dump mode (from COG)
    
    
    but it show:
    
      1F1- 000000 000 0 0000 000 000 - 00000000 - 00 00 00 00  '....'
    
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-19 18:42
    I am still coding/testing it, so no it does not work yet ;)
    Sapieha wrote: »
    Hi Cluso.

    I merged it.

    Used.
            mov     lmm_F, #_DUMP+_COG+_LONG            '\ set dump mode (from COG)
    
    
    but it show:
    
      1F1- 000000 000 0 0000 000 000 - 00000000 - 00 00 00 00  '....'
    
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-20 02:46
    Hi Cluso.

    It is how I work. And what I will that type of load longs

    Look in ZIP file.
    Unzip in any DIR and run

    1. Start "PNut Start LSD_055" by dual push left mouse button.
    2. Mark and copy by ctrl-C HEX code attached.
    3. activate "PNut Start LSD_055" and in time mouse pointer are in its window push RIGHT mouse button.

    4. That if function will load COG with that HEX blob.



    000- 0D A4 FF 0C D3 A5 BF 80 00 A4 BF FC 9B 01 7C 1C
    010- 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43
    020- 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43
    030- 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43
    040- 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43
    050- 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43



    Ps. same for ASCII but that it be placed as TEXT --- ABCDEFGH
    >
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-20 04:19
    Didn't finish tonight, so hopefully in the morning.
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-20 04:44
    Thanks for info
    Cluso99 wrote: »
    Didn't finish tonight, so hopefully in the morning.
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-20 21:30
    Here is changes as per post #138 except lmm_2 is lmm_c.
    A single <cr> in debug mode does not currently work.
    Sapieha, note that your 4 long output puts 4 spaces on the end also. Is this a problem?

    There are examples of the new modes for DUMP in the main user code. eg _COUNT, _HDG

    LSD_057.spin
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-20 22:46
    Hi Cluso.

    Much to test --->

    THANKS

    1. Part of test's

    As You can see from litle dump I attached it still dont function as wanted

    As You can see line witrh address $000 inputs correctly but not line's after

    == Cluso's P2 Debugger v0.57 ==
    *000- 0D A4 FF 0C D3 A5 BF 80 00 A4 BF FC 9B 01 7C 1C
    ?*010- 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43
    ?*020- 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43
    ?*030- 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43
    ?*040- 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43
    ?*050- 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43
    ?*0- 0d a4 ff 0c d3 a5 bf 80 00 a4 bf fc 9b 01 7c 1c
    ?*0l
    000- 0D BE FC 0C 60 BE BC 80 00 BE BC FC 0D E2 FC A0 '....`...........'
    *010- 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43
    ?*

    2. Part of test's

    Function as desired BUT I can't find how I shall show that from COG

    addr- ----0--- ----1--- ----2--- ----3---
    01000- 0CFCC60D 80BCC664 FCBCC600 A0FFCA0D
    01010- 1FFFC7DE A0FFC880 A0BFCA5E 1FFFC7DC
    01020- A0FFCA37 1FFFC7DE A0FFCA38 1FFFC7DE

    Cluso99 wrote: »
    Here is changes as per post #138 except lmm_2 is lmm_c.
    A single <cr> in debug mode does not currently work.
    Sapieha, note that your 4 long output puts 4 spaces on the end also. Is this a problem?

    There are examples of the new modes for DUMP in the main user code. eg _COUNT, _HDG

    LSD_057.spin
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-20 23:37
    Hi Cluso.

    Forget this patr of previous post

    2. Part of test's

    Found it HOW ---- clever
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-21 01:00
    Thanks Sapieha. Do you like the repeat and heading options? Makes life simple to the caller.

    As for your part 1 I have not really looked into the debug section yet - was concentrating of getting the dump working properly. But how do you feed this in to the debugger? Could it be too fast? Do you know what my code is failing on?
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-21 02:01
    Hi Cluso.

    Look in next post.

    In zip file You can find any TXT file.

    To that: I use Windows CUT by ctrl-C from that TXT file.

    Then PASTE it in DEBUGER window by pushing RHGHT mouse button.
    In this zip file You can find lang_en shortcut that starts DEBUGER with all needed option's SET For that PASTE option


    Cluso99 wrote: »
    Thanks Sapieha. Do you like the repeat and heading options? Makes life simple to the caller.

    As for your part 1 I have not really looked into the debug section yet - was concentrating of getting the dump working properly. But how do you feed this in to the debugger? Could it be too fast? Do you know what my code is failing on?
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-21 02:12
    Hi Cluso.

    It is NOT complete YET --- But maybe give You some ideas.

    I attach Version I work on That can be possible have AUTOSTART from FLASH.

    And it is why I need that HEX input to.
    And if possible STRINGS that can be CUT and paste LIKE !!

    2000$Any STRING cut from TXT file.

    INPUT end's only if else NUL (Maybe 3xNUL-$0D) string entered ---> That give PASTE of any text to Starting position $2000.

    But You need test for $0A in end of every line and if present skip IT in both on HEX and TXT mode

    That are good for tests of all type of CHARACTER based interpreter's
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-21 04:08
    Below are changes that should be in the next release (tomorrow?)...
    They are changes to the calling convention. lmm_p will now be used when address pointers are given/returned.
    ' CALLING CONVENTION...
    '-----------------------------------------------------------------------------------------------------
      CALL                        lmm_f             lmm_x             lmm_c             lmm_p
    '-----------------------------------------------------------------------------------------------------
      LmmTx                       not-used          char(s)/???       not-used          not-used
      LmmRx                       not-used          ???/char          not-used          not-used
      LmmFn  (see below...)         
    '-----------------------------------------------------------------------------------------------------
    lmm_f                                           lmm_x             lmm_c             lmm_p             
    '-----------------------------------------------------------------------------------------------------
    _ASCII                                          char              ???                ???
    _HEX[+_REV][+_SP][+n]                           byte/wd/long/???  ???                ???
    _DUMP[+_COUNT][+_HDG][+_MON/SMON/CODE/LONG]     ???               count/???          addr/addr++
    _TXSTRING                                       ???               ???                addr/???
    _RXSTRING[_+ECHO][+_PROMPT]                     [prompt]/???      ???/count          [addr]/addr
    _DEBUG                                          ???               ???                ???
    _MONITOR                                        ???               ???                ???
    '-----------------------------------------------------------------------------------------------------
    key:      not-used = returns unchanged; ???/??? = not-used on input/invalid on return
    '-----------------------------------------------------------------------------------------------------
    
Sign In or Register to comment.