000- 00 00 BC 5C 00 00 BC 60 00 00 BC 64 00 00 BC 68 ...\...`...d...h
010- 00 00 BC 6C 00 00 BC 70 00 00 BC 74 00 00 BC 78 ...l...p...t...x
020- 00 00 BC 7C 00 00 BC 80 00 00 00 00 00 00 00 00 ...|............
030- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
040- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
050- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
060- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
070- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
080- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
090- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7C 1C ..............|.
0A0- 00 00 00 00 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D ....============
0B0- 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D ================
0C0- 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D 3D ================
.
'' RR20130427 0.70 structure change using stack; remove ASCII mode
'' replaced _HubHex & _HubNibble with new _HubHex routine
'' modify calling structure for LmmTx,LmmRx,LmmFun
'' remove use of lmm_v
'' Note: lmm_w is only for internal use and is destroyed on returns from calls
'' Tidy _HubTx, _HubTxString, _HubHex, _HubRx, _HubRxString
Sapieha: I have not yet looked at or included your changes. I will do that for the next release.
Parameters are now being saved for the man routines. Now I can look into LIST etc to ensure the values are saved between calls.
It is now possible to do
mov lmm_x, #"*"
call LmmTx
call LmmTx
to display **.
'' RR20130427 0.70 structure change using stack; remove ASCII mode
'' replaced _HubHex & _HubNibble with new _HubHex routine
'' modify calling structure for LmmTx,LmmRx,LmmFun
'' remove use of lmm_v
'' Note: lmm_w is only for internal use and is destroyed on returns from calls
'' Tidy _HubTx, _HubTxString, _HubHex, _HubRx, _HubRxString
Sapieha: I have not yet looked at or included your changes. I will do that for the next release.
Parameters are now being saved for the man routines. Now I can look into LIST etc to ensure the values are saved between calls.
It is now possible to do
mov lmm_x, #"*"
call LmmTx
call LmmTx
to display **.
Need this Variables be in same order and correct in this place:
''-------[ 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 (never saved - only immediate use between calls)
lmm_mode long 0 ' saved in LIST
lmm_p2 long 0 ' typically a 2nd address
lmm_bittime long _bitrate ' bit rate for baud
'------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------------------------------
I_Start long $0 '' IStart
I_countL long 5 '' (@I_End - @I_Start+1) ''IEnd - IStart
Vars_PL long LMM_Pos '' ??? Have same position as BYTE "INDA"
Vars_C long 8 ' ??? hub address to LIST (executes as "NOP")
BYTE "INDA" ''\ Important that 2 BYTE fill position's
BYTE "INDB" ''/ are in this place
I need move 2 of them above MY ones As I need to BASIC 2 extra variables that can give me place holders without disturbing LMM:
So it look's that way:
''-----------------------------------------------------------------------------------------------
I_Start long $0 '' IStart
I_countL long 5 '' (@I_End - @I_Start+1) ''IEnd - IStart
Vars_PL long LMM_Pos '' ??? Have same position as BYTE "INDA"
Vars_C long 8 ' ??? hub address to LIST (executes as "NOP")
'
lmm_bittime long _bitrate ' bit rate for baud
lmm_mode long 0 ' saved in LIST
'
BYTE "INDA" ''\ Important that 2 BYTE fill position's
BYTE "INDB" ''/ are in this place
Sapieha,
Thanks. I just downloaded 071_c3. Presume this is the latest and contains all mods done in the previous c1 & c2.
It is great that you work on it overnight (for me).
I will look shortly and comment.
It will be ",[cc]V[n]" --->
[n]-- = 0 else omited for System info.
[n]--- = 1 User defined Strings and Variables space
[.cc] = Count of Variables to display
Sapieha,
Thanks. I just downloaded 071_c3. Presume this is the latest and contains all mods done in the previous c1 & c2.
It is great that you work on it overnight (for me).
I will look shortly and comment.
Sapieha:
Here is v0.72 with your changes. Please note I have not taken all the mods...
I use the double braces and double quotes for comments as I am trying to use the recommended documentation method for Phil's (PhiPi) autodocumenter.
I use single quoted names like 'addr' to mean that it is an address, where "addr" is a literal meaning the characters addr.
You will see in the Help strings, I have made any double <cr> put the second on it's own line so it is easier to see what it looks like.
I have the version string at the end. What this does, is that when a help message is displayed, the version follows it automatically (because of missing 0 terminator on the help string. This way I can also output the version on it's own.
I have a separate string to mention "type '?<cr>' for help". I intend to have the debugger output this when it does not understand, rather than just "?" as I do now. Otherwise it's not necessary to display this message - it is pretty common for "?" to mean help.
I used that "addr" so NotePad have not problems with colour - so no problem for me
And all other that quotation changes was for that --- So no problem for me
Sapieha:
Here is v0.72 with your changes. Please note I have not taken all the mods...
I use the double braces and double quotes for comments as I am trying to use the recommended documentation method for Phil's (PhiPi) autodocumenter.
I use single quoted names like 'addr' to mean that it is an address, where "addr" is a literal meaning the characters addr.
You will see in the Help strings, I have made any double <cr> put the second on it's own line so it is easier to see what it looks like.
I have the version string at the end. What this does, is that when a help message is displayed, the version follows it automatically (because of missing 0 terminator on the help string. This way I can also output the version on it's own. I have a separate string to mention "type '?<cr>' for help". I intend to have the debugger output this when it does not understand, rather than just "?" as I do now. Otherwise it's not necessary to display this message - it is pretty common for "?" to mean help.
Even without them --- XXXXX.YYYYYLx --- don't function as desired
With that command --- [,cc] need be calculated from xxxxxxx.yyyyyyy else use straight definite addresses
':nothex
':notdec
'*** Sorry Sapieha - I think this is causing me problems - need to discuss
'*** ----------------------------------------
'*** Cluso without this Single "L" command dont show in repetitive use what is desired.
'*** NO problem for me -- I can always enable it
'
Sapieha, pleased it works for you. I am doing a ParseCommand (taking it out of the current Debug section) being a parse command line routine. Then I should be able to keep the previously entered values as the defaults. So, a single <cr> should repeat the last command, with the address(es) incremented each time. Once this is complete, it will simplify the command decoding.
Therefore, if I enter...
xxxxx,5L<cr>
then 5 lines will be displayed from location xxxxx, and the xxxxx address will be incremented.
Then if I enter
<cr>
this should be equivalent to
xxxxx,5L<cr>
where xxxxx has been incremented by the amount displayed by the 5 lines.
And
,3L<cr>
should display 3 lines from xxxxx incremented by the last display.
How does this look for a revised help (with future commands included)...
------------- Help -----------------------------------------------------------
[[#]xxxxxxxx][.yyyyy][,[h]ccccc]z[m]<cr> <-- command format
-----1----- ---2-- -----3--- 4 5 --6- <-- parameter no.
...where...
1: # xx xx xx xx = is an immediate byte/word/long value (spaces optional)
# xxxxxxxx = is stored as a long (spaces mean little endian order)
xxxxx = is from address (hex) where <$200 is in cog, else hub
2: . yyyyy = is to address (hex) where <$200 is in cog, else hub
3: , h ccccc = is (hex) count (or length)
, ccccc = is (decimal) count (or length)
4: z = is (single char) command ( ? - G L M P Q V )
5: m = is (single char) command modifier (command specific)
6: <cr> = is <enter> key
.
? HELP: Show this text
- STORE: to {addr1} the following {byte(s)}|{word(s)}|{long(s)}
G GOTO: Goto cog {addr1} (if {addr1} omitted, return to user program)
COGINIT {addr1}:{par2} for COGID {m5}
{m5} omitted = this cog; 0..7 = cog 0..7; * = next avail cog
L LIST: from cog/hub {addr1} to {addr2}
from cog/hub {addr1} for {count3}|{length3}
L = L0 = bytes + ascii; L1 = bytes; L2 = code; L3 = long
M MOVE: from cog/hub {addr1} to cog/hub {addr2} for {Count3}|{length3}
FILL {immediate1} to cog/hub {addr2} for {count3}|{length3}
P PORT: Show port status
Q QUIT: Quit user program and run the Rom Monitor
V VARS: Show the variables (special for Sapieha)
------------------------------------------------------------------------------
I have almost rewritten the LIST command and the ParseCommand sections. There a still a number of gremlims and MOVE & STORE do NOT work at all.
However, the DEBUG mode works for LIST, and a few others. For example, try the following...
*0,4L<cr>
(lists=displays 4 lines of cog from $000 in monitor format) then..
<cr>
just continues the display of cog memory.
1000,4L3<cr>
(lists=displays 4 lines of hub memory from 1000 in quad long format), and...
<cr>
just continues.
?<cr>
displays a list of commands
BTW I had a quick try at preparing it for the P1 and so far so good.
V0.80 attached.
Debug Input (Store) now works to input from the command line (can be pasted from pnut ctl-L listing or from rom monitor output or from List output)
Extra V commands thanks to Sapieha.
The debug prompt is "*" and these are the input/store examples...
*0-12345678 90abcdef<cr>
will store $1234567 at cog $000 and $90abcdef at cog $001
*10- 11 22 33 44 55667788<cr>
will store $44332211 at cog $010 and $55667788 at cog $011
*1000- 11 22 33 44 5566 778899AA<cr>
will store bytes $11 $22 $33 $44 at hub $1000 and words $5566 $7788 at hub $1004 and long $99AABBCC at hub $1008
Now included is a simple disassembler which works for both cog and hub memory. Below is a sample output. The preceding character to the opcode is an indication that other instructions share this opcode and will be used by me to extend the disassembly later.
Comments
Look on this.
Copy and paste this:
For me it give only first LINE correct in COG
But input correct to HUB
I found what is problem!
With copy and paste --- Address are:
It needs be translated in any way to:
Tested by edit address --- And function correct:
Attachment:
1. With Cleaned portion of USER area code.
2. Cleaned descriptions to my part of variables above LMM.
3. Cleaned HELP text
Sapieha: I have not yet looked at or included your changes. I will do that for the next release.
Parameters are now being saved for the man routines. Now I can look into LIST etc to ensure the values are saved between calls.
It is now possible to do
mov lmm_x, #"*"
call LmmTx
call LmmTx
to display **.
LSD_070.spin
Nice - Thanks
Need this Variables be in same order and correct in this place:
I need move 2 of them above MY ones As I need to BASIC 2 extra variables that can give me place holders without disturbing LMM:
So it look's that way:
I moved that variables in my Candidate version --- All function correctly.
If it is - OK -- Can we have them in this place?
Thanks
In my Candidate version I added one more command.
"V"
Display USER Custom variables.
But have some work to before I can post code.
Sapieha: I have tried to tidy up the user program demo area and the variables/strings. I hope that this is what you are after as well.
Thanks.
I on my end made much changes to to user area --- So I will look in Yours code and merge with my changes.
Attached "LSD_071_c1.spin" with Yours and my cleaning in code.
Most recent "LSD_071_c3.spin"
Added "V" command ---- Have some more work on it ---- BUT not in HUB_LMM space only user.
So it is clean to You to work on other things
Look in "?" command by type it -- to see changes.
Previous post updated with Latest Candidate file.
Thanks. I just downloaded 071_c3. Presume this is the latest and contains all mods done in the previous c1 & c2.
It is great that you work on it overnight (for me).
I will look shortly and comment.
Yes -- It is most recent.
BUT I work more on "V" command.
It will be ",[cc]V[n]" --->
[n]-- = 0 else omited for System info.
[n]--- = 1 User defined Strings and Variables space
[.cc] = Count of Variables to display
Here is v0.72 with your changes. Please note I have not taken all the mods...
I use the double braces and double quotes for comments as I am trying to use the recommended documentation method for Phil's (PhiPi) autodocumenter.
I use single quoted names like 'addr' to mean that it is an address, where "addr" is a literal meaning the characters addr.
You will see in the Help strings, I have made any double <cr> put the second on it's own line so it is easier to see what it looks like.
I have the version string at the end. What this does, is that when a help message is displayed, the version follows it automatically (because of missing 0 terminator on the help string. This way I can also output the version on it's own.
I have a separate string to mention "type '?<cr>' for help". I intend to have the debugger output this when it does not understand, rather than just "?" as I do now. Otherwise it's not necessary to display this message - it is pretty common for "?" to mean help.
Thanks again for your input
LSD_072.spin
Sapieha: can you please see the notes in the history re _ParseHex and _ParseDec. Thanks.
LSD_073.spin
Look nice -- Thanks
I used that "addr" so NotePad have not problems with colour - so no problem for me
And all other that quotation changes was for that --- So no problem for me
That will be nice.
Even without them --- XXXXX.YYYYYLx --- don't function as desired
With that command --- [,cc] need be calculated from xxxxxxx.yyyyyyy else use straight definite addresses
Therefore, if I enter...
xxxxx,5L<cr>
then 5 lines will be displayed from location xxxxx, and the xxxxx address will be incremented.
Then if I enter
<cr>
this should be equivalent to
xxxxx,5L<cr>
where xxxxx has been incremented by the amount displayed by the 5 lines.
And
,3L<cr>
should display 3 lines from xxxxx incremented by the last display.
LSD_073_c.spin to look on V command.
Will look on it.
I'm next clear to post "LSD_073_c3.spin"
Much changes.
So You need look at entire code
Candidate "LSD_073_c3.spin" in attachment.
Much changes.
So You need look at entire code.
Added Yours Help strings that You can enable so see how it looks
Added one more mode to V command.
Attached most recent candidate revision
Ps.
Now V command mostly complete ---- One thing You can help me is that mode.--->
1000,4v To change Initiall address and counter
I have almost rewritten the LIST command and the ParseCommand sections. There a still a number of gremlims and MOVE & STORE do NOT work at all.
However, the DEBUG mode works for LIST, and a few others. For example, try the following...
BTW I had a quick try at preparing it for the P1 and so far so good.
LSD_077.spin
LSD_078.spin
Debug Input (Store) now works to input from the command line (can be pasted from pnut ctl-L listing or from rom monitor output or from List output)
Extra V commands thanks to Sapieha.
The debug prompt is "*" and these are the input/store examples...
LSD_080.spin
Now included is a simple disassembler which works for both cog and hub memory. Below is a sample output. The preceding character to the opcode is an indication that other instructions share this opcode and will be used by me to extend the disassembly later.
LSD_082.spin