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.
Hi Sapieha
Thanks for your input and doing the help message. I see you have added some more overnight (for me).
I am not sure about a "P" command. I know we can do this using the "-" input command. Would you like to explain some more?
I still have to fix...
* Terminate the input line if the single quote is reached (the ascii portion)
* Input mode: Add double quoted ascii characters
* Input mode (for cog only): If input in hex pairs, grab 4 pairs for a long and place in cog. It will need to be reversed.
* Add "M" move command: I have partially done this.
Do you think there is any use for permitting the users program to send a string to the debugger in "DEBUG" mode so that the debugger will execute the string as if it were a user input???
I have leds on P10,12,14,16,18,20,22,24 on my DE0. They work fine with your P command. Beware, you cannot read the PINS and do an AND/OR and write them back as they read what is actually on the PINS and not what has been written to the output register of PINS.
Yes, I had updated the help text. But I have not yet looked at you latest _c2 post.
L is not working correctly - I need to see what you are overriding but have not had time yet.
Postedit: I see you sorted the P command nicely. I have now updated the _str_hlong in my next rev. I have not looked at your demo section comments properly.
I have leds on P10,12,14,16,18,20,22,24 on my DE0. They work fine with your P command. Beware, you cannot read the PINS and do an AND/OR and write them back as they read what is actually on the PINS and not what has been written to the output register of PINS.
Yes, I had updated the help text. But I have not yet looked at you latest _c2 post.
L is not working correctly - I need to see what you are overriding but have not had time yet.
Postedit: I see you sorted the P command nicely. I have now updated the _str_hlong in my next rev. I have not looked at your demo section comments properly.
:cmd19
..======================================================================================
' cmp lmm_x, #$1FF wz,wc ' z|c if =<$1FF = cog mode?
' get Long Header type 2
' if_a rdlong lmm_w, lmm_p ' read a long (hub)
' MOV Variable,_str_hlong
' get Long Header type 1
' if_be rdlong lmm_op2, lmm_pc '\ store the following instr in lmm_op2
' MOV Variable,_str_hlong2
''======================================================================================
Ps. post edit.
User code that can be commented out starts one <TAB> (column) to right so it is simple for USER to see what is not needed for DEBUGGER to function
Sapieha,
What are you using to edit the source? pnut doesnt have the same editting features to add/remove a column like proptool. And oonce you load into proptool the formatting gets messed..
I noticed in your move problem above that you didnot have a count. IIRC i have not checked this error.
I amthinking to use the same format with G to do a coginit
xxxxx.yyyyy,cG<cr> where xxxxx is the hub start, yyyyy is the par, and c is the cog
xxxxx.yyyyyG<cr> for this cog
xxxxx.yyyyy,G<cr> for next avail cog
I amthinking to use the same format with G to do a coginit
xxxxx.yyyyy,cG<cr> where xxxxx is the hub start, yyyyy is the par, and c is the cog
xxxxx.yyyyyG<cr> for this cog
xxxxx.yyyyyG<cr> for next avail cog
Forget it --- It was my editing problem
Function correctly
''
REGISTER INSTRUCTIONS
inda indb pina pinb pinc pind dira dirb dirc dird ptra ptrb
spa spb spx cnt lfsr ctra ctrb frq phs sin cos mulll mullh
dac0 dac1 dac2 dac3 ptr par ram pc0 pc1 pc2 pc3 d acca accb
cordic vid pix xfr ser s ddddddddd ddnnnnnnn dnnnnnnnn
dddnnnnnn dddddddnn ddnnddddd nnnnnnnnn aaaaaaaaa bbbbbbbbb
ttttttttt iiiiiiiii wddddssss sssssssss n___nnnn_nnnnnnnnn
cccc c z y x d.b zc1 zc0 zcn zcr z00 z01 z11 n11 nnnn phsa
phsb frqa frqb sina sinb cosa cosb bbaa ptrx %w_dddd_ssss dd
''
DIRECTIVE INSTRUCTIONS
# n code codeend question answer example bit dat con p8x32a
mnemonic machine operand operation flags bytes words longs
quads msb lsb examples dir pin
''
DIRECTIVE OPERAND
long res quad task single multi tasking tasks inter
same read write xi xo index scale four
''
EXT INSTRUCTIONS
z c pc clut hub stack cog
Ps. post edited:
To have NotePad++ recognize SPIN --- You need in ConfigLanguage --> Assembly -- add bottom left in usercode "spin"
I will download Notepad++ shortly. It looks like a nice program.
I have just downloaded your latest 067_c and will see what you have done and work on it today while you sleep.
Thanks again for your assistance.
I will download Notepad++ shortly. It looks like a nice program.
I have just downloaded your latest 067_c and will see what you have done and work on it today while you sleep.
Thanks again for your assistance.
V0.68
Input command "-" is terminated when a single quote is detected (ascii)
There are a few internal code tidies.
Sapieha: I have not brought in your demo code as yet.
V0.68
Input command "-" is terminated when a single quote is detected (ascii)
There are a few internal code tidies.
Sapieha: I have not brought in your demo code as yet.
Comments
Look's good
Thanks
Next problem.
Run code I post in attachment.
Part 1 code function for me
But Can You help me with this Part ?
Is it to that I will have routine I posted in previous post question on.
? on command line shall show that
Thanks for doing the help string. Here is the command "?"<cr>
That is all I copied from your file - I didn't look elsewhere.
LSD_065.spin
Thanks.
Nice You like it and cleaned it up.
In attachment are version Candidate --- With cleaned up HELP text and Cleaned USER space
.
Can we remade it so it becomes "P" command:
Minor change to this string:
Replaces previous one in "LSD_065_c.spin"
Thanks for your input and doing the help message. I see you have added some more overnight (for me).
I am not sure about a "P" command. I know we can do this using the "-" input command. Would you like to explain some more?
I still have to fix...
* Terminate the input line if the single quote is reached (the ascii portion)
* Input mode: Add double quoted ascii characters
* Input mode (for cog only): If input in hex pairs, grab 4 pairs for a long and place in cog. It will need to be reversed.
* Add "M" move command: I have partially done this.
Do you think there is any use for permitting the users program to send a string to the debugger in "DEBUG" mode so that the debugger will execute the string as if it were a user input???
Thanks again!
Fixes introduced bug in the demo section for HEX. Some code tidyup, etc.
Places Sapieha's demo code and my demo code in sections that can be commented out using double braces.
I note the "." operator is now not working in LIST mode.
LSD_066.spin
Look's good.
But I see You don't added/edited this part:
http://forums.parallax.com/showthread.php/146688-LMM_SerialDebug-Simple-Serial-Tx-amp-Rx-for-debugging-single-cog-programs?p=1179595&viewfull=1#post1179595
I added That "P" command.
Look in "?" for help.
But I have some problems in this "cmd_P" with using "lmm_c" vartiable --- Can You look what I have for problem ?.
Post attachment are "LSD_066_candidate"
I found all my problems taht I posted on in previous post.
Look in USER area code -- I cleaned this to and made some INFO's for You.
Attached NEW "LSD_066_candidate 2" SPIN file
Attachment updated.
Attachment updated one more time:
If You add any command to LSD --- can You add its syntax to HELP strings "_str_help"
Here is v0.67
It fixes your P command, and adds the M command.
I have leds on P10,12,14,16,18,20,22,24 on my DE0. They work fine with your P command. Beware, you cannot read the PINS and do an AND/OR and write them back as they read what is actually on the PINS and not what has been written to the output register of PINS.
Yes, I had updated the help text. But I have not yet looked at you latest _c2 post.
L is not working correctly - I need to see what you are overriding but have not had time yet.
LSD_067.spin
Postedit: I see you sorted the P command nicely. I have now updated the _str_hlong in my next rev. I have not looked at your demo section comments properly.
Thanks.
Will look on it
Can You help me with that.
I will show 2 types of LONGs HEADER. I think I add it in correct place but have problem how to change them
I think It works as desired.
It calculate its own counter !!!
As this command NOT need Counter value:
Ps. post edited
I tested now --- You are correct --- This command don't work as desired
Have problems with "M" command
Sorry
It was maybe my problem -- I made some changes to file before test.
NEED more tests.
Ps. Reloaded from forum Yours orginal file and if function correctly
Post NEW "LSD_067_c.spin" candidate file
Changes in SYSTEM text's and USER area
Ps. post edit.
User code that can be commented out starts one <TAB> (column) to right so it is simple for USER to see what is not needed for DEBUGGER to function
What are you using to edit the source? pnut doesnt have the same editting features to add/remove a column like proptool. And oonce you load into proptool the formatting gets messed..
I noticed in your move problem above that you didnot have a count. IIRC i have not checked this error.
I amthinking to use the same format with G to do a coginit
xxxxx.yyyyy,cG<cr> where xxxxx is the hub start, yyyyy is the par, and c is the cog
xxxxx.yyyyyG<cr> for this cog
xxxxx.yyyyy,G<cr> for next avail cog
xxxxx.yyyyy,cG<cr>
Maybe move "c" after "G"
xxxxx.yyyyyG[c]<cr>
Forget it --- It was my editing problem
Function correctly
I use this Program for edit my code.
With pointing by mouse in starting line and draw it down You can add ant character to start of that lines.
''___NotePad++ config_____________ http://notepad-plus-plus.org/ ____
This is part for copy and paste in Config assembly language to have all PASM instructions coloured
In Assembler config Language Copy Block´s to theirs User configurations windows
''
CPU INSTRUCTIONS
reps setinda getptra jmptask settask setptra addspa
incmod setptrb djnz getptrb max clkset setcog coginit
cogid cogstop getp popbr setport decod5 cfgpins setdacs
rdbyte setbc wrbyte setspa popar cmpr chkspa subspa pushar
fixinda notb addptrb subr getcnt passcnt setpc getspb getspa
chkspb setspb subcnt pushb setctra getcosa jmp muxc waitcnt
wrlong rdlong rdbytec wrword rdword rdwordc rdlongc wrquad rdquad rdquadc
clrp waitpne waitpeq addptra rev subptra subptrb
cachex gettops setquad setquaz notp popb reta retb retad
retbd addspb subspb pushbr calla callb calld callad callbd getspd
movd locknew lockret lockset lockclr setinda setindb setinds
fixinda fixindb fixinds chkspd sndser rcvser getmull getmulh
getdivq getdivr getsqrt getqx getqy getqz polctra polctrb
polvid repd getpix jmpd retd waitvid synctra synctrb
rcfast rcslow pll xtal setmap mac maca macb scl enc jmpret
mins maxs min movi jmpretd andn muxnc muxz muxnz addabs subabs
sumc sumnc sumz sumnz absneg negc negnc negz negnz cmpsx addx
subx adds subs addsx subsx cmpsub decmod ijz ijzd ijnz ijnzd
djz djzd djnzd tjz tjnz tjzd tjnzd setpora setporb setporc setpord
getnp offp setpnc setpz setpnz setxfr setser setxch setvid
setvidy setvidi setvidq cfgdac0 cfgdac1 cfgdac2 cfgdac3
cfgdacs setdac0 setdac1 setdac2 setdac3 setpix setpixu setpixv
setpixz setpixr setpixg setpixb setpixa getphsa getphza getsina
getphsb getphzb getcosb getsinb setwava setfrqa setphsa addphsa
subphsa capctra setctrb setwavb setfrqb setphsb addphsb subphsb
capctrb setskip nopx setzc popzc pushzc setbnz setbz setbnc clrb
isob seussr seussf splitw mergew grybin bingry decpat incpat
zercnt onecnt blmask decod2 decod3 decod4 fitacca fitaccb fitaccs
setacca setaccb getacca getaccb clracca clraccb clraccs getlfsr
setf movf jpd jnpd qsincos qarctan qrotate setmulu setmula setmulb
setdivu setdiva setdivb setsqrh setsqrl setqi setqz qlog qexp fit cmpcnt b
setp pusha mul tasksw taskswd jp jnp chkptra chkptrb popa sar setb
''
MATCH INSTRUCTIONS
if_z if_be if_nc if_c if_nz wc wz wr nr if_always if_never
if_e if_ne if_a if_b if_ae if_c_eq_z if_c_ne_z if_c_and_z
if_c_and_nz if_nc_and_z if_nc_and_nz if_c_or_z if_c_or_nz
if_nc_or_z if_nc_or_nz if_z_eq_c if_z_ne_c if_z_and_c
if_z_and_nc if_nz_and_c if_nz_and_nc if_z_or_c if_z_or_nc
if_nz_or_c if_nz_or_nc cond nz nc
''
REGISTER INSTRUCTIONS
inda indb pina pinb pinc pind dira dirb dirc dird ptra ptrb
spa spb spx cnt lfsr ctra ctrb frq phs sin cos mulll mullh
dac0 dac1 dac2 dac3 ptr par ram pc0 pc1 pc2 pc3 d acca accb
cordic vid pix xfr ser s ddddddddd ddnnnnnnn dnnnnnnnn
dddnnnnnn dddddddnn ddnnddddd nnnnnnnnn aaaaaaaaa bbbbbbbbb
ttttttttt iiiiiiiii wddddssss sssssssss n___nnnn_nnnnnnnnn
cccc c z y x d.b zc1 zc0 zcn zcr z00 z01 z11 n11 nnnn phsa
phsb frqa frqb sina sinb cosa cosb bbaa ptrx %w_dddd_ssss dd
''
DIRECTIVE INSTRUCTIONS
# n code codeend question answer example bit dat con p8x32a
mnemonic machine operand operation flags bytes words longs
quads msb lsb examples dir pin
''
DIRECTIVE OPERAND
long res quad task single multi tasking tasks inter
same read write xi xo index scale four
''
EXT INSTRUCTIONS
z c pc clut hub stack cog
Ps. post edited:
To have NotePad++ recognize SPIN --- You need in ConfigLanguage --> Assembly -- add bottom left in usercode "spin"
Posted in attachment PDF how it looks in coloured form on My screen
Ps PDF updated with some colouring changes
I have just downloaded your latest 067_c and will see what you have done and work on it today while you sleep.
Thanks again for your assistance.
Look even in PDF to it.
It has some minor changes
Input command "-" is terminated when a single quote is detected (ascii)
There are a few internal code tidies.
Sapieha: I have not brought in your demo code as yet.
LSD_068.spin
One thing --- PNut don't place single quote before Garbage text!
So I think it need even COUNT ASCII 16x2 to find start of garbage
Forget previous post.
Tested CUT and paste from PNut --- FUNCTION
THANKS
The input command "-" now takes 4 hex bytes as a long input (reversed) and places them into the cog address correctly.
LSD_069.spin
NICE - Thanks.
Function as desired