I noticed that some of this pasted code above is using number "1" followed by zero instead of lower case letter "L" zero for the label. Be careful what you type into the code. It could be crashing if you are doing a jump to #10 (ten), instead of "L" zero..
Hello everyone, this week I got my P2-ES board. I have installed the full TAQOZ on the SD card and it runs wonderfully.
I programmed my last lines in Forth 30 years ago, but the learning curve is fast.
Now I need your help. I want to do some experiments with DDS / Goertzel functions.
I would like to translate Chips DDS / Goertzel demo program from the Parallax Propeller 2 Documentation with TIA and start it with coginit in cog # 1.
Is that possible? How are local variables created in TIA?
Or can I create a pasm.bin file with Pnut and load it from the SD card into a new cog with TAQOZ easyfile?
TIA has some rudimentary labels at present that mimic local labels except .l0 and l0 are different "words". I have added handling symbolic labels but I haven't fully implemented them yet although they resolve forward references etc. I only need an hour or two to put some finishing touches to it. Since it's interactive single pass it doesn't list the resolved forward reference although I am sure I could "relist" it if I wanted to, especially when I have TED, the screen editor running and TAQOZ can support stand-alone development.
I will get back to you on this next week, but I know I already tried something similar with being able to take demo forum code straight into TIA.
Glad to see you are playing with TIA but it does need some more work under the hood yet although it is mostly there. I have to add checks for the shortform implied destination operations, the ones where it normally takes source and destination but you can just give it the source and imply that it should use that for destination also. At present just use the full form of as "rev a,a" rather than the shortform.
As for DROP it is still the same Forth DROP. To jump to DROP at present you can:
jmp #@DROP
The @ is interpreted as "find the address of <word>". The reason AT isn't working the same way is due to the deferred execution mode that allows the action word to precede the parameters.
I have to revisit TIA at some point and add those little extras. I normally like to have the absolute address though and write this as "#\@DROP".
Totally disregard what I said before about shortform ops. My bad. I just had a look and that single destination is all that is required. However I did see something strange in the source code, it was doing a SWAP when it didn't have to. You can either load in TIA again or patch what you have.
To patch it just do this:
ASSEMBLER
AT NOP AT DOP 2+ W!
TAQOZ# ON LISTING --- ok
TAQOZ# 56 := SCL --- ok
TAQOZ# 57 := SDA --- ok
TAQOZ# code ASM.TX16
( word -- )
086E6 FD60_4069 rev a
086EA F044_4010 shr a,#16
086EE FC24_4039 wypin a,#SDA
086F2 FC2C_4038 wypin #32,#SCL
086F6 FD9F_797D jmp #@DROP
--- ok end
Jurop, thanks for that confirmation. I also notice that P2ASM.FTH from the dropbox TAQOZ/Forth directory does not recompile for me under Parallax P2 TAQOZ RELOADED sIDE V2.7 'CHIP' Prop_Ver G 200MHz 201123-1000, so maybe more is amiss. I get:-
TAQOZ# IFDEF P2ASM FORGET P2ASM } --- ok
TAQOZ# TAQOZ --- Parallax P2 TAQOZ RELOADED sIDE V2.7 'CHIP' Prop_Ver G 200MHz 201123-1000
841 error in TIA: at EOL THEN 1 flags SET? 0= UNTIL error
@bob_g4bby said:
Jurop, thanks for that confirmation. I also notice that P2ASM.FTH from the dropbox TAQOZ/Forth directory does not recompile for me under Parallax P2 TAQOZ RELOADED sIDE V2.7 'CHIP' Prop_Ver G 200MHz 201123-1000, so maybe more is amiss. I get:-
TAQOZ# IFDEF P2ASM FORGET P2ASM } --- ok
TAQOZ# TAQOZ --- Parallax P2 TAQOZ RELOADED sIDE V2.7 'CHIP' Prop_Ver G 200MHz 201123-1000
841 error in TIA: at EOL THEN 1 flags SET? 0= UNTIL error
With new forum software, you can create code blocks by putting three successive backtick / backquote characters (below ESC key usually) before and after the code:
TAQOZ# IFDEF *P2ASM* FORGET *P2ASM* } --- ok
TAQOZ# TAQOZ --- Parallax P2 *TAQOZ RELOADED sIDE* V2.7 'CHIP' Prop_Ver G 200MHz 201123-1000
841 error in TIA: at EOL THEN 1 flags SET? 0= UNTIL *error*
Sounds like a version mismatch. I will update all the files on PCloud shortly along with a new binary. I can also make the assembler automatically turn the listing on if it is being interactively assembled.
TonyB, thanks for the code block hint, but how do you stop it mangling your line formats?
Peter, OK on the version mismatch - fyi Extend.fth and File.fth did not recompile either.
I updated all the files bar the binary not long ago. You always have the option of loading in taqoz.spin2 which is the output of the preprocessor or the .bin from p2asm.
How are you loading the source files in onto the board? In Linux I just use the "s" script I have for loading the source files without any line delays since it gets loaded into RAM first and then inputs and compiles from there.
Actually "s" is just a shortcut for ascii-xfr -sn Forth/$1.FTH > /dev/ttyUSB$2 where I type ./s EXTEND 0 for instance while minicom is open and connected.
have a P2 EVAL board rev C bought about two weeks ago. It boots up Taqoz ROM fine.
Downloaded the P2 Dropbox
Formatted a Sandisk 32Gb set to '64k'
Loaded just the file _BOOT_P2.BIX onto the SDcard from the dropbox TAQOZ/binaries folder
Loaded the SDcard into the P2 Eval and reset the P2
That reports...
þBOOTING.... CARD: SANDISK SD SD32G REV$85 #3200344782 DATE:2021/1
KERNEL Parallax P2 *TAQOZ RELOADED sIDE* V2.7 'CHIP' Prop_Ver G 200MHz 201123-1000
MODULES:
1754 *SED* TAQOZ SIMPLE TEXT EDITOR 210202-2130
1566 *TEXT* VGA BMP TEXT 190800-0000
1184 *BMV* BMV VIDEO PLAYER 190800-0000
780 *WAVE* WAVE AUDIO FILE PLAYER 190800-0000
430 *BMP* BMP FILE VIEWER 190800-0000
1998 *MEDIA* TAQOZ INTERACTIVE MEDIA - AUDIO, TEXT, IMAGE & VIDEO DRIVERS 210125-0050
4878 *P2ASM* TAQOZ INTERACTIVE ASSEMBLER for the PARALLAX P2 - 210124-1200
2358 *DISK* SD DISK REPORTING & FORMATTING TOOLS 190800-0000
4944 *FILE* TAQOZ FAT32 FILE SYSTEM for SD CARD plus VIRTUAL MEMORY 210128-0830
1616 *SPIRAM* LY68L6400 8MB SPI RAM ACCESS 191020-0000
1766 *DECOMPILER* A decompiler for TAQOZ 190825-0000
822 *UBI2C* EFM8UB3 I2C COMMANDS 210118-0000
620 *RTC* RV-3028 RTC DATE and TIME 190800-0000
884 *SMARTPINS* SMARTPIN FUNCTIONS and drive modes 190800-0000
400 *P2CLOCK* P2 CLOCK CONTROL 190800-0000
2578 *ANSI* ANSI TERMINAL SUPPORT 200410-0000
418 *EXTEND* Primary kernel extensions for TAQOZ 210128-0830
5760 *SPIFLASH*
MEMORY MAP
CODE: 0A826 43,046 bytes
WORDS: 1BD5E 16,921 bytes
DATA: 01F61 1,479 bytes
ROOM: 70,968 bytes
HARDWARE
PCB P2
CLOCK IN 20.000000MHZ
DEVICES
SD CARD 31 GB SANDISK SD SD32G REV$85 #3200344782 DATE:2021/1
I2C DEVICES
STATS cpufreq: 200MHz systicks: 1,051
-------------------------------------------------------------------------------
TAQOZ#
Send file P2ASM.FTH from dropbox folder TAQOZ/Forth to the P2.
That results in:-
TAQOZ# IFDEF *P2ASM* FORGET *P2ASM* } --- ok
TAQOZ# TAQOZ --- Parallax P2 *TAQOZ RELOADED sIDE* V2.7 'CHIP' Prop_Ver G 200MHz 201123-1000
841 error in TIA: at EOL THEN 1 flags SET? 0= UNTIL *error*
-------------------------------------------------------------------------------
TAQOZ#
The above assumes a lot, have I guessed wrong?
Have others successfully used TAQOZ Reloaded on P2 EVAL board - I can compile many other files from the dropbox, but notably not P2ASM, EXTEND and FILE?
Mm, But if EXTEND.FTH fails to recompile completely, then that leaves the system in an unusable state. Here's me loading EXTEND.FTH after executing COLD:-
TAQOZ# COLD --- ok
TAQOZ# x
þ *Cold start*
-------------------------------------------------------------------------------
Parallax P2 *TAQOZ RELOADED sIDE* V2.7 'CHIP' Prop_Ver G 200MHz 201123-1000
-------------------------------------------------------------------------------
TAQOZ# $60000 FL TAQOZ ( Primary kernel extensions ) --- Parallax P2 *TAQOZ RELOADED sIDE* V2.7 'CHIP' Prop_Ver G 200MHz 201123-1000
385 error in WORDS at +EXIT THEN *error*
-------------------------------------------------------------------------------
TAQOZ#
The same result occurs if reset is pressed alone (no COLD command)
Yet many other files load just fine - I can run LIFE.FTH for instance on Tera Term.
I'm guessing here but maybe Peter has made some changes to the kernel too that affect some .FTH files that depend on these changes. I'm away from my board at the moment and can't test it right now but another approach would be to review the kernel source and check if the files that don't compile make use of something that is missing or changed within the kernel source. I think he's the best person to give you a competent and accurate advice.
BTW, I experienced a similar issue when playing with an early SED version a while back that was eventually resolved.
Yes, there could well be a common point of failure in those files. Loads of other TAQOZ features to explore meantime. I've been thinking about the worth of making a TAQOZ v2.7 word glossary, built on top of the the TAQOZ ROM glossary - the reason for doing all that work would be to learn a lot more of the more obscure words. The other thing I want to get going with is a bunch of dsp words, written in assembler, aimed at software radio. However, they can always be prototyped in forth first. I want to use the PC as signal source and results display, using the free LabView 'Community Edition'. (Create signal - download to TAQOZ, TAQOZ crunches signal, uploads to PC, PC graphs, verifies or whatever the results)
I haven't updated the binary yet so you should load taqoz.spin2 or taqoz.bin and then talk to TAQOZ and load EXTEND, FILE, P2ASM, MEDIA etc.
I see the binary you are using reports 201123-1000 so it is too old now. I thought I had a newer one. Where did you download it from?
ErNa - sorry, I will check the emails. I have only started to check everything yesterday. Busy week driving out west through floodwaters for family.
I went to the 'P2 Links for where to obtain Tools & Sample/Test Code (reference only)' to find your Taqoz entry. I took the link to your 'MY P2 DROPBOX'. Downloaded the lot.
I then opened folder TAQOZ/binaries and used _BOOT_P2.BIX. I'll try the spin or bin file route, thank you.
On Windows, using the Propeller Tool 2.5.3 downloaded today, I can load Taqoz spin file. When attempting to compile that, it fails at line 5143, the line starts with a ; which isn't recognised. I replaced that with '
The code will then compile - the debug window reports:-
@bob_g4bby - that ; seemed to assemble fine with p2asm but I will check the windows environment for compatibility. BTW, the ; seems to be accepted as a symbol and the line was compiled, so just removed the symbol and it will work. I have edited the console.twc file to remove that offended ; which wasn't meant to be there or as a comment either.
033b8 execs ' EXECUTE CODE from user input (append an EXIT first)
033b8 33d10085 word _WORD,EOL+ex,COMPW
033be 22e41860 ; word w+EXIT,COMPW
' execute wordcodes from beginning
For now, I loaded TAQOZ.BIN using ERSmiths' flexprop tool. The kernel v2.8 boots and is responsive and Extend, File and P2ASM all compile fine.
Hope all is well with the family, Peter. Sorry to hear about the flooding. We're just coming into Spring and our covid lockdown is easing, so was legally able to have a first spin out in the little three wheeler. Unseasonably warm for the last few days - the ladies are busy spreading compost and planting seeds and seedlings in the garden. Lots of netting and canes deployed
Is it worth me starting a 'Taqoz Bites' article on inline assembly techniques? If others would like to contribute I can set it up on Google docs.
My aim is to make a software defined HF radio in Taqoz, so want to go on to write dsp words to work on IQ data arrays.
Cheers, Bob
@bob_g4bby - stable enough for me to use in my media module? Yes. Mature enough? I doubt it
This is the listing from the subroutine that renders the text font. It's not 100% as I need to do more with processing labels and expressions. I can see that I could add a macro for copying and running code from cog memory too. I chose to make an automatic augs when I do a # too and conditionals and effects can be anywhere on the line so " wz mov a,a ret" is quite valid, why not?
The listing turns on automatically when assembling this interactively but is suppressed somewhat during block load.
TAQOZ# code VCH8A
0BD52 FD64_2828 setq #20 ' copy into cogmod memory
0BD56 FF00_005E rdlong @COGMOD,#PC 12 + ' read longs into cog
0BD5A FB07_9762
0BD5E FD80_01CB jmp #\@COGMOD ' and run it there
' this section is loaded and run in cog memory '
0BD62 F603_F024 mov PTRA,b
0BD66 F600_4823 mov b,a
0BD6A F044_4808 shr b,#8 ' b = pen, a = paper'
0BD6E FF00_0006 rdlong r2,#_hp ' _hpixels
0BD72 FB04_255C
0BD76 F184_2406 sub r2,#6
0BD7A F604_2207 mov r1,#7
0BD7E FAC0_1E25 .l1 rdbyte xx,c ' read in next font char
0BD82 FCDC_0605 rep #3,#5
0BD86 F054_1E01 shr xx,#1 wc
0BD8A CC44_4961 if_c wrbyte b,ptra++ ' PEN PIXEL
0BD8E 3C44_4761 if_nc wrbyte a,ptra++ ' PAPER PIXEL
0BD92 FC44_4761 wrbyte a,ptra++ ' + BLANK COLUMN
0BD96 F103_F012 add PTRA,r2 ' next line
0BD9A F104_4A01 add c,#1
0BD9E 0B6C_23F7 _ret_ djnz r1,#l1
--- ok end
Comments
Thanks, I've corrected mine.
I programmed my last lines in Forth 30 years ago, but the learning curve is fast.
Now I need your help. I want to do some experiments with DDS / Goertzel functions.
I would like to translate Chips DDS / Goertzel demo program from the Parallax Propeller 2 Documentation with TIA and start it with coginit in cog # 1.
Is that possible? How are local variables created in TIA?
Or can I create a pasm.bin file with Pnut and load it from the SD card into a new cog with TAQOZ easyfile?
I will get back to you on this next week, but I know I already tried something similar with being able to take demo forum code straight into TIA.
And how to clean up the stack and the end?
DROP ist not working
jmp #AT DROP crash TAQOZ
Uwe
As for DROP it is still the same Forth DROP. To jump to DROP at present you can: The @ is interpreted as "find the address of <word>". The reason AT isn't working the same way is due to the deferred execution mode that allows the action word to precede the parameters.
I have to revisit TIA at some point and add those little extras. I normally like to have the absolute address though and write this as "#\@DROP".
jmp #@DROP works good.
but rev a,a works not.
Now I get an Stack mismatch!
To patch it just do this:
Uwe
A minor issue with Tera Term in Windows: When assembling:-
code DEMO
sub a,#10 wcz
mov a,#10
ret rczl a
end
I expected to see:-
TAQOZ# code DEMO
072F8 F19C_400A sub a,#10 wcz
072FC F604_4000 mov a,#0
07300 0D60_406B ret rczl a
--- ok end
TAQOZ#
But I only get:-
TAQOZ# code DEMO
< 3 blank lines>
--- ok
TAQOZ#
Anyone got a fix for that, please, is it a Tera Term setting?
The same here with minicom on Linux so I suspect that's an issue with last TAQOZ version. No time right now to have a look at the code, though
Jurop, thanks for that confirmation. I also notice that P2ASM.FTH from the dropbox TAQOZ/Forth directory does not recompile for me under Parallax P2 TAQOZ RELOADED sIDE V2.7 'CHIP' Prop_Ver G 200MHz 201123-1000, so maybe more is amiss. I get:-
TAQOZ# IFDEF P2ASM FORGET P2ASM } --- ok
TAQOZ# TAQOZ --- Parallax P2 TAQOZ RELOADED sIDE V2.7 'CHIP' Prop_Ver G 200MHz 201123-1000
841 error in TIA: at EOL THEN 1 flags SET? 0= UNTIL error
With new forum software, you can create code blocks by putting three successive backtick / backquote characters (below ESC key usually) before and after the code:
https://www.computerhope.com/jargon/b/backquot.htm
Sounds like a version mismatch. I will update all the files on PCloud shortly along with a new binary. I can also make the assembler automatically turn the listing on if it is being interactively assembled.
TonyB, thanks for the code block hint, but how do you stop it mangling your line formats?
Peter, OK on the version mismatch - fyi Extend.fth and File.fth did not recompile either.
If you're referring to tabs, code blocks now use a tab size of 4, not 8. I use Metapad as my text editor and changing tabs temporarily to 4 is easy.
The assembler has been updated to produce a listing automatically unless it is being processed via a TAQOZ
END method.OK Peter, thanks for that. Recompiling the new P2ASM fails - so will wait until the new binary is done. No hurry.
I updated all the files bar the binary not long ago. You always have the option of loading in taqoz.spin2 which is the output of the preprocessor or the .bin from p2asm.
How are you loading the source files in onto the board? In Linux I just use the "s" script I have for loading the source files without any line delays since it gets loaded into RAM first and then inputs and compiles from there.
Actually "s" is just a shortcut for
ascii-xfr -sn Forth/$1.FTH > /dev/ttyUSB$2
where I type./s EXTEND 0
for instance while minicom is open and connected.As I see, you are watching here now and then: did you check your emails or PM lately ;-) There is some need here in EU
I just repeated the TAQOZ Reloaded installation:-
The above assumes a lot, have I guessed wrong?
Have others successfully used TAQOZ Reloaded on P2 EVAL board - I can compile many other files from the dropbox, but notably not P2ASM, EXTEND and FILE?
Try running COLD after a reboot and then load EXTEND and FILE and then P2ASM in that order. Post the outcome.
Mm, But if EXTEND.FTH fails to recompile completely, then that leaves the system in an unusable state. Here's me loading EXTEND.FTH after executing COLD:-
The same result occurs if reset is pressed alone (no COLD command)
Yet many other files load just fine - I can run LIFE.FTH for instance on Tera Term.
I'm guessing here but maybe Peter has made some changes to the kernel too that affect some .FTH files that depend on these changes. I'm away from my board at the moment and can't test it right now but another approach would be to review the kernel source and check if the files that don't compile make use of something that is missing or changed within the kernel source. I think he's the best person to give you a competent and accurate advice.
BTW, I experienced a similar issue when playing with an early SED version a while back that was eventually resolved.
Yes, there could well be a common point of failure in those files. Loads of other TAQOZ features to explore meantime. I've been thinking about the worth of making a TAQOZ v2.7 word glossary, built on top of the the TAQOZ ROM glossary - the reason for doing all that work would be to learn a lot more of the more obscure words. The other thing I want to get going with is a bunch of dsp words, written in assembler, aimed at software radio. However, they can always be prototyped in forth first. I want to use the PC as signal source and results display, using the free LabView 'Community Edition'. (Create signal - download to TAQOZ, TAQOZ crunches signal, uploads to PC, PC graphs, verifies or whatever the results)
I haven't updated the binary yet so you should load taqoz.spin2 or taqoz.bin and then talk to TAQOZ and load EXTEND, FILE, P2ASM, MEDIA etc.
I see the binary you are using reports
201123-1000
so it is too old now. I thought I had a newer one. Where did you download it from?ErNa - sorry, I will check the emails. I have only started to check everything yesterday. Busy week driving out west through floodwaters for family.
Where did you download it from?
I went to the 'P2 Links for where to obtain Tools & Sample/Test Code (reference only)' to find your Taqoz entry. I took the link to your 'MY P2 DROPBOX'. Downloaded the lot.
I then opened folder TAQOZ/binaries and used _BOOT_P2.BIX. I'll try the spin or bin file route, thank you.
On Windows, using the Propeller Tool 2.5.3 downloaded today, I can load Taqoz spin file. When attempting to compile that, it fails at line 5143, the line starts with a ; which isn't recognised. I replaced that with '
The code will then compile - the debug window reports:-
On reset and with tera term or the Propeller tool terminal Taqoz starts to run, but the terminal is unresponsive to input:-
Is there an alternative tool that will compile Taqoz under Windows, please?
Alternatively, I don't know what tool to use to flash taqoz.bin?
@bob_g4bby - that ; seemed to assemble fine with p2asm but I will check the windows environment for compatibility. BTW, the ; seems to be accepted as a symbol and the line was compiled, so just removed the symbol and it will work. I have edited the console.twc file to remove that offended ; which wasn't meant to be there or as a comment either.
For now, I loaded TAQOZ.BIN using ERSmiths' flexprop tool. The kernel v2.8 boots and is responsive and Extend, File and P2ASM all compile fine.
Hope all is well with the family, Peter. Sorry to hear about the flooding. We're just coming into Spring and our covid lockdown is easing, so was legally able to have a first spin out in the little three wheeler. Unseasonably warm for the last few days - the ladies are busy spreading compost and planting seeds and seedlings in the garden. Lots of netting and canes deployed
Is it worth me starting a 'Taqoz Bites' article on inline assembly techniques? If others would like to contribute I can set it up on Google docs.
My aim is to make a software defined HF radio in Taqoz, so want to go on to write dsp words to work on IQ data arrays.
Cheers, Bob
@bob_g4bby - stable enough for me to use in my media module? Yes. Mature enough? I doubt it
This is the listing from the subroutine that renders the text font. It's not 100% as I need to do more with processing labels and expressions. I can see that I could add a macro for copying and running code from cog memory too. I chose to make an automatic augs when I do a # too and conditionals and effects can be anywhere on the line so " wz mov a,a ret" is quite valid, why not?
The listing turns on automatically when assembling this interactively but is suppressed somewhat during block load.