Shop OBEX P1 Docs P2 Docs Learn Events
TAQOZ - Tachyon Forth for the P2 BOOT ROM - Page 19 — Parallax Forums

TAQOZ - Tachyon Forth for the P2 BOOT ROM

1161719212238

Comments

  • MJBMJB Posts: 1,235
    twm47099 wrote: »
    I've tried FLOAD but it doesn't seem to work. I get the following:
      Cold start
    ----------------------------------------------------------------
      Parallax P2  .:.:--TAQOZ--:.:.  V1.0--142          180530-0135
    ----------------------------------------------------------------
    TAQOZ# mount .SDSS16G 3665_3133 NO NAME    32k 15,189M ok
    TAQOZ# dir
    .SDSS16G 3665_3133 NO NAME    32k 15,189M
    PFTH103      $0000_4040   2016.11.14.17.36   0
    Bh - c o. l  $1C00_3F80   1980.03.06.00.03   4,294,901,760
     t h i n. k  $0B40_3F80   1980.03.15.00.03   7,602,290
    THINKI~1.PDF $0000_65C0   2014.02.02.21.27   4,499,830
    Bd o c  .    $FFC0_3F80   2107.15.31.31.63   4,294,967,295
     A n d  . s  $1BC0_3F80   1980.03.20.00.03   3,014,760
    ANDSOF~1.DOC $0000_6200   2014.01.31.14.37   476,160
    B  I n f. o  $1D00_3F80   1980.03.15.00.03   110
     S y s t. e  $1BC0_3F80   1980.03.21.00.03   6,619,245
    SYSTEM~1     $0000_8840   2017.07.07.20.22   0
    3204GOOD.FTH $0000_8880   2019.01.06.04.15   1,335
     N D . F. T  $FFC0_3F80   2107.15.31.31.63   4,294,967,295
     T A Q O. Z  $0B40_3F80   1980.02.24.00.02   4,522,068
     AQOZ1~1.FTH $0000_88C0   2019.01.11.20.51   3,059
    EXTEND  .FTH $0000_88C0   2019.01.11.20.51   3,059
     ok
    TAQOZ# FLOAD EXTEND.FTH ???   ok
    TAQOZ# ïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïï
    
    
    After a couple of pages of ï I hit esc 4 times to stop it. In the listing above, I deleted a long string of ï.

    Tom

    I don'T have a P2, but AFAIK Extend.fth is already in ROM as is EasyFile-ROM.fth

    so why would you want to load EXTEND again?

    loading EXTEND again might mess up things since EasyFile is loaded after Extend in the first place.

    FLOAD is defined as pre which expects the argument AFTER !! the command and not as usual before on the stackas Mike @msrobots suggests.
  • msrobots wrote: »
    I think you need the sector address not the name.

    try FLOAD $0000_88C0

    uups NO this is FORTH so it would be

    $0000_88C0 FLOAD

    in FORTH parameters go first and method last.

    Mike

    Thanks Mike,
    I tried that and the file loaded (with the line numbers spinning by). I got the message
    109
    110 lines and 858 bytes compiled,  with 0 errors in 541ms  ok
    
    But then it started printing the long string of ï 's.
    After I hit esc 4 times I checked and extend.fth did load and I was able to run the words.
    I used FLOAD to load my MCP3204 program and that loaded and started printing ÿ 's. I stopped it and ran the 3204 and it also worked. Not sure what needs to be done to prevent the extraneous printing after each FLOAD.
  • MJB wrote: »
    twm47099 wrote: »
    I've tried FLOAD but it doesn't seem to work. I get the following:
      Cold start
    ----------------------------------------------------------------
      Parallax P2  .:.:--TAQOZ--:.:.  V1.0--142          180530-0135
    ----------------------------------------------------------------
    TAQOZ# mount .SDSS16G 3665_3133 NO NAME    32k 15,189M ok
    TAQOZ# dir
    .SDSS16G 3665_3133 NO NAME    32k 15,189M
    PFTH103      $0000_4040   2016.11.14.17.36   0
    Bh - c o. l  $1C00_3F80   1980.03.06.00.03   4,294,901,760
     t h i n. k  $0B40_3F80   1980.03.15.00.03   7,602,290
    THINKI~1.PDF $0000_65C0   2014.02.02.21.27   4,499,830
    Bd o c  .    $FFC0_3F80   2107.15.31.31.63   4,294,967,295
     A n d  . s  $1BC0_3F80   1980.03.20.00.03   3,014,760
    ANDSOF~1.DOC $0000_6200   2014.01.31.14.37   476,160
    B  I n f. o  $1D00_3F80   1980.03.15.00.03   110
     S y s t. e  $1BC0_3F80   1980.03.21.00.03   6,619,245
    SYSTEM~1     $0000_8840   2017.07.07.20.22   0
    3204GOOD.FTH $0000_8880   2019.01.06.04.15   1,335
     N D . F. T  $FFC0_3F80   2107.15.31.31.63   4,294,967,295
     T A Q O. Z  $0B40_3F80   1980.02.24.00.02   4,522,068
     AQOZ1~1.FTH $0000_88C0   2019.01.11.20.51   3,059
    EXTEND  .FTH $0000_88C0   2019.01.11.20.51   3,059
     ok
    TAQOZ# FLOAD EXTEND.FTH ???   ok
    TAQOZ# ïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïï
    
    
    After a couple of pages of ï I hit esc 4 times to stop it. In the listing above, I deleted a long string of ï.

    Tom

    I don'T have a P2, but AFAIK Extend.fth is already in ROM as is EasyFile-ROM.fth

    so why would you want to load EXTEND again?

    loading EXTEND again might mess up things since EasyFile is loaded after Extend in the first place.

    FLOAD is defined as pre which expects the argument AFTER !! the command and not as usual before on the stackas Mike @msrobots suggests.

    Peter made a new extend for TAQOZ that needs to be loaded in order to do things such as easily change clock speed. He said that it also fixes the lap word.

  • msrobotsmsrobots Posts: 3,701
    edited 2019-01-13 02:18
    MJB wrote: »
    twm47099 wrote: »
    I've tried FLOAD but it doesn't seem to work. I get the following:
      Cold start
    ----------------------------------------------------------------
      Parallax P2  .:.:--TAQOZ--:.:.  V1.0--142          180530-0135
    ----------------------------------------------------------------
    TAQOZ# mount .SDSS16G 3665_3133 NO NAME    32k 15,189M ok
    TAQOZ# dir
    .SDSS16G 3665_3133 NO NAME    32k 15,189M
    PFTH103      $0000_4040   2016.11.14.17.36   0
    Bh - c o. l  $1C00_3F80   1980.03.06.00.03   4,294,901,760
     t h i n. k  $0B40_3F80   1980.03.15.00.03   7,602,290
    THINKI~1.PDF $0000_65C0   2014.02.02.21.27   4,499,830
    Bd o c  .    $FFC0_3F80   2107.15.31.31.63   4,294,967,295
     A n d  . s  $1BC0_3F80   1980.03.20.00.03   3,014,760
    ANDSOF~1.DOC $0000_6200   2014.01.31.14.37   476,160
    B  I n f. o  $1D00_3F80   1980.03.15.00.03   110
     S y s t. e  $1BC0_3F80   1980.03.21.00.03   6,619,245
    SYSTEM~1     $0000_8840   2017.07.07.20.22   0
    3204GOOD.FTH $0000_8880   2019.01.06.04.15   1,335
     N D . F. T  $FFC0_3F80   2107.15.31.31.63   4,294,967,295
     T A Q O. Z  $0B40_3F80   1980.02.24.00.02   4,522,068
     AQOZ1~1.FTH $0000_88C0   2019.01.11.20.51   3,059
    EXTEND  .FTH $0000_88C0   2019.01.11.20.51   3,059
     ok
    TAQOZ# FLOAD EXTEND.FTH ???   ok
    TAQOZ# ïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïïï
    
    
    After a couple of pages of ï I hit esc 4 times to stop it. In the listing above, I deleted a long string of ï.

    Tom

    I don'T have a P2, but AFAIK Extend.fth is already in ROM as is EasyFile-ROM.fth

    so why would you want to load EXTEND again?

    loading EXTEND again might mess up things since EasyFile is loaded after Extend in the first place.

    FLOAD is defined as pre which expects the argument AFTER !! the command and not as usual before on the stackas Mike @msrobots suggests.

    Ah another tidbit, thanks @MJB,

    So if a word is defined as PRE it takes parameter behind the word? I did not know that TAQOZ allows that. Cool. I still have a hard time with FORTH thinking. I somehow like it, but can't really grook it, sadly.

    As I grew up I despised any kind of cheese. Could not eat it at all. Now some decades later I do enjoy cheese very much. Maybe I am still to young for FORTH. Or I need to spend some time down-under, something being on my bucket list for a long time anyways.

    Working for bed, food and FORTH training with @"Peter Jakacki", @Tubular or @ozpropdev. I could split wood, take care of nagging women, fetch beer from the store, get water from the well, you know the simple stuff...

    Any offers?

    Enjoy!

    Mike
  • Putting the sector address after the FLOAD command doesn't work. The file doesn't load and the continuous printout of ï 's starts.

    Tom
  • I think people should be careful about assuming that words in TAQOZ work the same way they work in P1 Tachyon/EasyFile. Peter had to trim out of a lot to make TAQOZ fit.
    As far as I can tell, FOPEN is *not* "pre". You put the file address from 'DIR' on the stack before it's called.
    Here is a TAQOZ 1.0 (from the P2 ROM) session in which I dump the contents of a short text file:
    ----------------------------------------------------------------
      Parallax P2  .:.:--TAQOZ--:.:.  V1.0--142          180530-0135
    ----------------------------------------------------------------
    TAQOZ# MOUNT .JTNCard 7E15_1584 PROP       32k 7,579M ok
    TAQOZ# DIR
    .JTNCard 7E15_1584 PROP       32k 7,579M
    PROP         $0000_3F80   1980.00.00.00.00   0
    B  I n f. o  $1D00_3F80   1980.03.15.00.03   110
     S y s t. e  $1BC0_3F80   1980.03.21.00.03   6,619,245
    SYSTEM~1     $0000_4040   2018.12.25.16.53   0
    _BOOT_P2.BIX $0000_40C0   2018.12.25.16.44   32
     m e n t. .  $0000_3F80   2107.15.31.31.63   4,294,967,295
     N e w  . T  $0800_3F80   1980.03.15.00.02   7,667,811
     EWTEX~1.TXT $0000_3F80   2019.01.12.22.05   0
    TEXT    .TXT $0000_4140   2019.01.12.22.06   496
     ok
    TAQOZ# $0000_4140 FOPEN  ok
    TAQOZ# 0 $40 SD DUMP
    00000: 54 68 65 20  71 75 69 63  6B 20 62 72  6F 77 6E 20     'The quick brown '
    00010: 66 6F 78 20  6A 75 6D 70  65 64 20 6F  76 65 72 20     'fox jumped over '
    00020: 74 68 65 20  6C 61 7A 79  20 64 6F 67  2E 20 20 0D     'the lazy dog.  .'
    00030: 0A 0D 0A 4C  6F 72 65 6D  20 69 70 73  75 6D 20 64     '...Lorem ipsum d' ok
    TAQOZ#
    




  • it works differently in TAQOZ 1.1
    ----------------------------------------------------------------
      Parallax P2  .:.:--TAQOZ--:.:.  V1.1--RAM          181216-1800
    ----------------------------------------------------------------
    TAQOZ# FOPEN FRED.FTH  ok
    TAQOZ# 0 $40 SD DUMP
    00000: 3A 20 42 4C  49 4E 4B 45  52 20 42 45  47 49 4E 20     ': BLINKER BEGIN '
    00010: 35 36 20 48  49 47 48 20  31 30 30 20  6D 73 20 35     '56 HIGH 100 ms 5'
    00020: 36 20 4C 4F  57 20 31 30  30 20 6D 73  20 41 47 41     '6 LOW 100 ms AGA'
    00030: 49 4E 20 3B  0D 0A 42 4C  49 4E 4B 45  52 00 00 00     'IN ;..BLINKER...' ok
    TAQOZ#
    
    
  • twm47099 wrote: »
    Not sure what needs to be done to prevent the extraneous printing after each FLOAD.

    I just made a quick test for TAQOZ V1.0

    if I FLOAD a file with CRLF at the end it works,
    if there is no CRLF it never stops
  • I made a simple p2asm program that blink LED 56 on p2-es
    00000 000 0006DCFC    | 	rep #3, #0
    00004 001 5F7064FD    |     	drvnot #56
    00008 002 969880FF
    0000c 003 1F0066FD    |     	waitx ##20_000_000
    

    I then put that in memory with TAQOZ
    TAQOZ# $0006DCFC $0 !  ok
    TAQOZ# $5F7064FD $4 !  ok
    TAQOZ# $969880FF $8 !  ok
    TAQOZ# $1F0066FD $C !  ok
    TAQOZ# $0 QD
    00000: FC DC 06 00  FD 64 70 5F  FF 80 98 96  FD 66 00 1F
    

    Next I try to run the code with COGINIT
    ' COGINIT ( addr cog -- )
    
    $0 1 COGINIT
    

    But it does not work. Am I doing something wrong?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-01-13 20:37
    @FredBlais - Your code's byte order is wrong and should be $FCDC0600 not $0006DCFC. P2ASM's listing shows these instructions as longs rather than a byte dump from PNut. You can use DUMPL to dump longs in TAQOZ.
    $FCDC0600 0 ! $FD64705F 4 ! $FF809896 8 ! $FD66001F 12 !
    0 16 DUMPL
    

    I will get back later to looking at other issues.

    BTW - Here's the list file from p2asm:
    DAT
    00000 000          	org
    00000 000 fcdc0600 	rep	@.l0,#0
    00004 001 fd647a5f 	drvnot	#61
    00008 002 ff809896 	waitx	##20_000_000
    0000c 003 fd66001f 
    00010 004          .l0
    
  • FredBlaisFredBlais Posts: 370
    edited 2019-01-13 20:55
    @FredBlais - Your code's byte order is wrong and should be $FCDC0600 not $0006DCFC. P2ASM's listing shows these instructions as longs rather than a byte dump from PNut. You can use DUMPL to dump longs in TAQOZ.
    $FCDC0600 0 ! $FD64705F 4 ! $FF809896 8 ! $FD66001F 12 !
    0 16 DUMPL
    

    I will get back later to looking at other issues.

    BTW - Here's the list file from p2asm:
    DAT
    00000 000          	org
    00000 000 fcdc0600 	rep	@.l0,#0
    00004 001 fd647a5f 	drvnot	#61
    00008 002 ff809896 	waitx	##20_000_000
    0000c 003 fd66001f 
    00010 004          .l0
    

    Thanks Peter! that works well.

    If someone wants to try with their P2-ES, just type that line into TAQOZ (with V1.1)
    $FCDC0600 0 ! $FD64705F 4 ! $FF809896 8 ! $FD66001F 12 ! 0 1 COGINIT
    
  • @"Peter Jakacki" What memory range should I use to put custom data and code so that it does not interfere with TAQOZ?
  • TAQOZ V1.0 in ROM overwrites low memory anyway, and that was an oversight but you can easily allocate some data memory.
    4 longs B1
    $FCDC0600 B1 ! $FD64705F B1 4 + ! $FF809896 B1 8 + ! $FD66001F B1 12 + ! B1 1 COGINIT
    
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-01-13 22:25
    Here's a rough and ready method for putting machine code into a definition and running it:

    : ASM 		R> SWAP COGINIT ;
    : BLINKER ( cog -- )
    	ASM [
    	$FCDC0600 , 
     	$FD64705F , 
    	$FF809896 , 
    	$FD66001F , 
    

    To run this BLINKER in cog 7:
    7 BLINKER
    


    EDIT: Not quite elegant but allows any pin on any cog. It modifies the DRVNOT instruction and writes that to the correct location before running.
    : ASM 		R> SWAP COGINIT ;
    : BLINKER ( pin cog -- )
    	SWAP 9 << $FD64005F OR ' BLINKER 30 + !  
    	ASM [
    	$FCDC0600 , 
     	0 , 
    	$FF809896 , 
    	$FD66001F , 
    

    and this version which saves a few bytes:
    : ASM 		R> SWAP COGINIT ;
    : BLINKER ( pin cog -- )
    	SWAP 2* $6400 OR ' BLINKER 27 + W!
    	ASM [
    	$FCDC0600 ,
     	$FD64005F ,
    	$FF809896 ,
    	$FD66001F ,
    
  • MJBMJB Posts: 1,235
    msrobots wrote: »
    MJB wrote: »
    twm47099 wrote: »
    I've tried FLOAD but it doesn't seem to work. I get the following:
      Cold start...
    
    
    After a couple of pages of ï I hit esc 4 times to stop it. In the listing above, I deleted a long string of ï.

    Tom

    I don'T have a P2, but AFAIK Extend.fth is already in ROM as is EasyFile-ROM.fth

    so why would you want to load EXTEND again?

    loading EXTEND again might mess up things since EasyFile is loaded after Extend in the first place.

    FLOAD is defined as pre which expects the argument AFTER !! the command and not as usual before on the stackas Mike @msrobots suggests.

    Ah another tidbit, thanks @MJB,

    So if a word is defined as PRE it takes parameter behind the word? I did not know that TAQOZ allows that. Cool. I still have a hard time with FORTH thinking. I somehow like it, but can't really grook it, sadly.
    ....

    to maybe clarify the pre or not-pre

    in Peter's dropbox \p2\BOOT\includes\FILES\SDCARD.INC
    we find
    ' FOPEN ( sect -- )
    FOPEN	word	w+_fread,CLRL,w+opensect,STOREX+ex
    
    FLOAD	word	FOPEN,rg+ukey,WFETCH,w+fkey,WSTORE
    	word	_WORD,FGET,SETKEY+ex
    
    this seems to be TAQOS 1.0 ROM then

    and
    \p2\Forth\EASYFILE-ROM.FTH
    has this:
    --- Load a file as console input - scripts or source code
    pre FLOAD ( <name> -- )			GET$ FOPEN$ 0EXIT FILE> ;
    
    which I was refering to and which might be TAQOS 1.1 then ??
  • HydraHackerHydraHacker Posts: 76
    edited 2019-01-14 13:15
    Hi Everybody,
    I would like to post my first game written in Forth which I call Guess.
    The object of the game is that the player selects a number from 1 - 100
    and the computer will try to guess your number in the fewest number of try's.

    HydraHacker



    VAR MP
    VAR LO 
    VAR HI 
    : GUESS 
    1 LO !
    100 HI !
    CRLF
    CRLF
    ." Please select number from 1 - 100, I'll try to guess the number in the fewest number of try's."
    CRLF
    BEGIN
    LO @ HI @ + 2/ MP !
    ." MY GUESS IS: "
    MP @ .
    CRLF
    ." Is my guess correct?, type 'c = correct', else type 'h = higher' or 'l = lower'."  
    CRLF
    GET$ @  
    CRLF
    DUP 104 = IF MP @ 1+ LO ! ELSE THEN DUP 108 = IF MP @ 1- HI ! THEN
    99 = IF ." Correct!!!" EXIT THEN 
    LO @ HI @ > IF ." Number is not between 1 - 100! or you went in the wrong direction!"  EXIT THEN 
    AGAIN
    ;
    


    Jeffs%20Forth%20game%20Guess%20%281024x546%29.jpg
  • twm47099twm47099 Posts: 867
    edited 2019-01-14 00:37
    Fred,
    Thanks for your help. I made sure that my files had CRLF at the end, but I still get the endless printing when I FLOAD. The files do load and run correctly.

    Not sure what else I can try.
    Tom
  • twm47099 wrote: »
    Fred,
    Thanks for your help. I made sure that my files had CRLF at the end, but I still get the endless printing when I FLOAD. The files do load and run correctly.

    Not sure what else I can try.
    Tom

    Try with TAQOZ V1.1,

    just put this file on your SD card and try again (remove the .TXT extension)
  • Fred,
    I put Boot_P2.BIX on the SD card and rebooted. The TAQOZ screen shows v1.1--RAM
    I have to slow the clock to 80Mhz
    I can mount the SD card and list the directory.

    But when I enter FLOAD <address> the screen shows "ok" but nothing is loaded. If I enter <address> FLOAD nothing happens until I press the enter key again, and the I get the ok, but again nothing loads?

    Any idea what I am doing wrong?
    Thanks
    Tom

    I also noticed that when I press the P2 reset with the BIX file loaded on the SD, 2 LEDS I have attached to pins 3 and 4 are dimly lit. Any ideas?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-01-14 02:03
    V1.1 uses FOPENS ( sector -- ) whereas FOPEN is defined as an interactive word which looks for a filename following FOPEN. The same for FLOAD.
    So FLOAD <filename> should work but V1.1 boot image already has the EXTEND loaded as well as VGA on P0..P4 which is why those LEDs there are dimly lit.

    NOTE: TAQOZ like Tachyon in addition to the : colon symbol to define words also uses these words:
    pub Create a header that is public (normal header like : does )
    pri Create a header that is marked private so a RECLAIM can strip them as directed.
    pre Create a header that has the "immediate" attribute set so that it executes immediately (words like IF ELSE THEN etc)

    So in V1.1 FOPEN and FLOAD are defined using pre so that when they are encountered they execute immediately and wait for a filename.
  • Cluso99Cluso99 Posts: 18,066
    Could it be the filename? It should be (case sensitive)
    _BOOT_P2.BIX
  • Peter,
    Thanks. I like the FLOAD <filename>, and it loads very quickly.
    I'll move my LEDs.

  • @"Peter Jakacki" , would you mind explaining a little bit about
    [ , R>

    In TAQOZ source, I can find that :
    [ end definition and lock allocated bytes
    , compile a long literal
    R> Pop n from the return stack

    but I'm not sure how you got that to work. Also, the BLINKER word you defined does not end with ; ?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-01-15 03:04
    @FredBlais - sure!

    The [ is an immediate word that simply tells the compiler that it is no longer building up a definition but now in interactive mode again. This is necessary since the definition is essentially finished but we don't need to EXIT since when ASM was implicitly called it popped the return address with R> which points to the assembly code we compiled after the ASM [ . So at that point the stack has the cog number and now the pointer to the assembly code which we now SWAP so that it is in the right order for a COGINIT which requires ( codeptr cog# -- ) . After the COGINIT it returns using the previous return address, not the one that called ASM.

    The comma symbol , will simply store a long from the stack into the first code position and allocate those 4 bytes as if it were part of a definition and not to be confused with any code we are executing in interactive mode. Perhaps a bit of explanation is needed here since traditional Forths work very differently.

    Normally when you type an interactive line (not within a definition) such as "123 456 + ." the TIB text input buffer simply builds up this text until you hit the enter. Then it will go through finding each "word" delimited by whitespace and try to find it in the dictionary. If found it will simply execute it right then and there while it is still parsing the TIB. Numbers will fail the dictionary search and so the "word" will then be tested to see if it is a valid number depending upon the current number base. If it is then it will be converted and pushed onto the stack. In our example therefore 123 and 456 are processed in order as numbers after the enter is hit followed by + which executes, adds the two numbers, pushes the result followed by . which prints the number from the stack.

    TAQOZ is different. It does not have a TIB but rather it does have a word buffer that once it encounters a delimiter it will check first if it is a number and convert and compile it (not push it). If it is not a number it will search the dictionary and when found it will compile it unless of course it is an immediate execution word such as IF THEN etc. So after compiling + and . it encounters the enter key as the end of line it will execute this temporary code at full speed. The code that was executed was only temporarily allocated so the next line starts compiling at the same start point again. One of the reasons for handling each word and number as it comes in is compilation speed and the reason for compiling it is also so that we can run it the exact same way it would within a definition and at full speed. This also allows use to use the DO LOOP IF THEN etc that you just cannot use in other Forths. So much better I'm sure you'd agree.

    This you can type into TAQOZ but have no hope of typing into most Forths interactively.
    10 FOR CRLF ." HELLO WORLD!" NEXT
    

  • MJBMJB Posts: 1,235
    edited 2019-01-15 14:03
    @FredBlais - sure!

    ..... long interesting explanation .....

    I started a Google-Doc to capture those GEMS and hopefully save them from getting lost in long forum threads.

    The link is editable so anbody can add if they like.

    TAQOS GEMS

    EDIT: edible -> editable ;-)
  • MJB wrote: »
    @FredBlais - sure!

    ..... long interesting explanation .....

    I started a Google-Doc to capture those GEMS and hopefully save them from getting lost in long forum threads.

    The link is edible so anbody can add if they like.

    TAQOS GEMS

    So what flavour is the link? ;-)
  • MJBMJB Posts: 1,235
    AJL wrote: »
    MJB wrote: »
    @FredBlais - sure!

    ..... long interesting explanation .....

    I started a Google-Doc to capture those GEMS and hopefully save them from getting lost in long forum threads.

    The link is edible so anbody can add if they like.

    TAQOS GEMS

    So what flavour is the link? ;-)

    sweet ;-)
  • Peter,
    Cluso told me that you have a link to p2pasm?? as I was looking at his demo code. Would you please send me that link.
    Thanks
    Martin
  • pilot0315 wrote: »
    Peter,
    Cluso told me that you have a link to p2pasm?? as I was looking at his demo code. Would you please send me that link.
    Thanks
    Martin

    You can find p2asm as part of Dave Hein's p2gcc .

    NOTE: Cluso99 started a P2 LINKS sticky in the P2 forum where everyone has been posting their links (reference only, no discussions)
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-01-17 01:59
    TAQOZ is to Forth, what the P2 is to ARM.

    Sure, both the P2 and ARM are 32-bit processsors. Sure, TAQOZ is Forth based. But don't let your dislike of ARM or familiarity with other processors stop you from considering the P2. Likewise, don't let your dislike of Forth or familiarity with other tools stop you from considering TAQOZ.

    For one, TAQOZ is built into the P2 ROM and can be accessed and used without having to install any tools, save a simple terminal.

    Second, TAQOZ has very low "language" overhead, like Spin but more so, you can get things working with the very first line you type.

    Thirdly, TAQOZ provides the low-level access to hardware that we need while allowing us to interactively talk with it at a high level.

    Many people may think that Forth is Forth and anything RPN is Forth etc. Lump it all together just like distributors lump the P1 in and it ends up in a dark corner. Take the time to evaluate TAQOZ for its own merit in relation to the P2. Learn the P2 by using TAQOZ because TAQOZ is both a learning and hacking tool as well as a developmental platform.

    Having trouble with RPN and stacks? Here's a hint, just stop trying to translate ideas into your language and just try simple things first and get used to them. When you want a delay, don't think in terms of your native computer language translated into RPN.

    We want a short delay and we figure that to be 100 ms
    In many languages we write that a bit like "delay.ms(100)" and don't forget the indent and braces etc.
    Then we try to translate that to Forth we think, oh no, it's back to front !@!$*&!
    But all we need to do in TAQOZ is say "100 ms".

    We want to turn on an LED by taking P8 high and in Spin we used to say
    dira[8] := 1
    outa[8] := 1
    In TAQOZ we say "8 HIGH" and instantly P8 is high and the LED lit.

    To run write "Hello World!" in C:
    #include <stdio.h>
    #include <propeller.h>
    
    void main(void)
    {
        int i;
        for (i = 1; i <= 10; i++)
        {
            printf("Hello World\n");
        }
    }
    

    To run "Hello World!" in TAQOZ:
    10 FOR   CRLF   ." Hello World!"   NEXT
    

    There is a difference though and don't forget that once you are talking to TAQOZ via the serial terminal that you are talking directly to the P2 and those one-liners run as soon as you press enter. But don't think in Forth or any language itself, think in terms of what you are trying to do.
    For instance, I sometimes write code the way I would like to see it work rather than writing "Forth code". The difference is that I am no longer just coding, I am shaping and creating an application specific language that becomes part of Forth. If your Forth code looks unreadable it could probably do with this "reshaping".

    Focus on the job, not the tools. TAQOZ is a tool that you shape to help you focus on the job.



Sign In or Register to comment.