P2 Newbie Discussion

So that we don't mess up the official "P2-ES Board Support" Discussion at forums.parallax.com/discussion/169367/p2-es-board-support#latest I am am starting this discussion, where Us P2 Newbies can share info and come up to speed on the P2.

I wish to thank Chip, Parallax and those "smart" users/developers (you know who you are) that have made the P2 a reality!!!

I will start things off, with a copy of my post from the "P2-ES Board Support" Discussion.
zappman wrote: »
ersmith wrote: »

I've gathered together some tools for programming the P2 FPGA and bundled them with a very simple IDE as "spin2gui". You can find the most recent release at:

https://github.com/totalspectrum/spin2gui/releases

This should also work on the P2-ES, but obviously we haven't had a chance to test it yet. In the meantime, it does work on P1 as well, so you can test it out there (under Commands > Configure Commands... hit either "P2 defaults" or "P1 defaults" to switch between the two processors).

The compiler included with spin2gui is called "fastspin", although someday that name should change, because it now supports not only Spin but also BASIC (see docs/basic.md) and a little bit of C.

Eric
Eric,
Thanks for the link to "spin2gui". I have downloaded and installed it. I am anxiously awaiting for my P2-ES board.
Regards, zappman
«134

Comments

  • Excellent idea Zappman!

    I'll go first - I'm unable to get any of the code in spin2gui/samples to actually run - not even helloworld. The binaries appear to load but nothing appears out the serial pins and even trying to just bring a pin high and low does nothing. I'm using the latest spin2cpp files as well. TAQOZ does run fine and I'm positive I have a good USB cable feeding the P2-ES board. Perhaps the sample code is configured somehow for the FPGAs and things are inoperative due to that? I've looked at the generated .asm and .lst files and nothing jumps out at me. The pin designation for tx is correct, etc. Ideas are appreciated!

    Thanks, Mike R...
  • Cluso99Cluso99 Posts: 14,388
    edited 2018-12-24 - 00:37:56
    Guys,
    To start with the P2 now, you will pretty much need to learn/use P2 assembler, or learn/run TAQOZ. That does not mean you will need to learn all the assembler opcodes. Heck I don't even understand many of them, and I have to check regularly.

    So, I am going to suggest two routes...

    TAQOZ
    No assembler required. Use TAQOZ and just use one-liners. Peter has an extension that can be loaded into FLASH (or SD?) that can then easily be added into TAQOZ which allows lots of extra TAQOZ features.

    P2ASM
    I am going to suggest unless you are experienced, I suggest you use P2ASM as the assembler because it gives a nice listing. PNUT is more for experienced programmers - it is the "bible" for P2 assembly but for you, P2ASM will be more friendly.

    Editing source for P2ASM or PNUT in Win10
    I use PropTool because I like the color interface, and highlit words. Use the extension ".spin" but just be careful not to confuse with P1 .spin code. Obviously not all P2 opcodes are recognised, but it does make life easier. Otherwise, use your favourite editor. When you are done editing, save your work with Ctl-S !!!!! You can leave the file open.

    Compile with P2ASM.EXE
    Edit a ".bat" file with Notepad to compile your .spin program. Here is an example.
    p2asm ClusoInterpreterP2_301f.spin
    
    Tip: Make sure P2ASM.exe, the .BAT file and your .SPIN files are in the same directory.

    To compile, just double-click the .bat file in Windows File Explorer.

    P2ASM creates two files, a .BIN which is the code to download, and a .LST which is the listing file. You can view this in any editor. I use NotePad++.

    Download your .bin file
    Need some help here guys? Where is P2Load up to and a link???

    Compile with PNUT.EXE
    Open your .spin file (make sure you do this each time you edit your source) and compile and download.
    DO NOT EDIT your code with PNUT. You have your source open in PropTool for this.

    Boot from SD
    Alternately, copy your .BIN file as "_BOOT_P2.BIX" (case sensitive) to a microSD card formatted as FAT32, and boot your P2 from that.

    PST Propeller Serial Terminal
    I use PST as my W10 terminal program. It's not the greatest but it works. Have it open and after downloading, quickly select it and click enable and you are good to go.

    Obviously there are other ways to do this. I find this simple. :smiley:

    Here is a link where the ROM Monitor/Debugger etc are discussed
    forums.parallax.com/discussion/168502/p2-rom-booter-serial-flash-sd-card-monitor-and-taqoz-features-and-operation/p1

    Here is an example of calling/using the serial monitor ROM from your P2ASM code
    forums.parallax.com/discussion/comment/1450717/#Comment_1450717
    My Prop boards: P8XBlade2, RamBlade, CpuBlade, TriBlade
    Prop OS (also see Sphinx, PropDos, PropCmd, Spinix)
    Website: www.clusos.com
    Prop Tools (Index) , Emulators (Index) , ZiCog (Z80)
  • loadp2 is used to load a binary file produced by p2asm to a P2. The -t option will run a terminal emulator after the binary is loaded. The configuration is currently hardwired to an FPGA P2 running at 80MHz. However, there is a -f option to set the frequency, and a -m option to set the clock mode. I'll clean things up a bit once I receive a P2 Eval board, and am able to work with it.
  • Cluso99 wrote: »
    Guys,
    To start with the P2 now, you will pretty much need to learn/use P2 assembler, or learn/run TAQOZ.
    What about fastspin? That should let you program the P2 using Spin, BASIC, or a subset of C as well as PASM2.

  • David Betz wrote: »
    Cluso99 wrote: »
    Guys,
    To start with the P2 now, you will pretty much need to learn/use P2 assembler, or learn/run TAQOZ.
    What about fastspin? That should let you program the P2 using Spin, BASIC, or a subset of C as well as PASM2.
    Can you do a description of how to use it for beginners?
    My Prop boards: P8XBlade2, RamBlade, CpuBlade, TriBlade
    Prop OS (also see Sphinx, PropDos, PropCmd, Spinix)
    Website: www.clusos.com
    Prop Tools (Index) , Emulators (Index) , ZiCog (Z80)
  • Cluso99 wrote: »
    David Betz wrote: »
    Cluso99 wrote: »
    Guys,
    To start with the P2 now, you will pretty much need to learn/use P2 assembler, or learn/run TAQOZ.
    What about fastspin? That should let you program the P2 using Spin, BASIC, or a subset of C as well as PASM2.
    Can you do a description of how to use it for beginners?
    Ummm... I'm hoping Eric will chime in here. I have used it from the command line but beginners will probably want to use spin2gui and I don't have any experience with that.
  • When I get my board, I plan on doing FastSpin. Will leave notes.

    Do not taunt Happy Fun Ball! @opengeekorg ---> Be Excellent To One Another SKYPE = acuity_doug
    Parallax colors simplified: https://forums.parallax.com/discussion/123709/commented-graphics-demo-spin<br>
  • Today was "Chipmas Day" (December 23, 2018), my P2-ES board arrived around Noon today :smile:, just before I was leaving home to visit my son.
    I was was able to power-up my board, before seeing any posts in this thread.
    I had the same results as "pmrobert" when trying to use "spin2gui".
    However, I was able to use "TAQOZ" via the "Parallax Serial Terminal" program to send commands to my P2-ES board, and blink the on-board LEDs at different rates. :cool:
    @Cluso99 and the other above posters, thank you for your posts, helping us "P2 Newbies". :thumb:
  • My Prop boards: P8XBlade2, RamBlade, CpuBlade, TriBlade
    Prop OS (also see Sphinx, PropDos, PropCmd, Spinix)
    Website: www.clusos.com
    Prop Tools (Index) , Emulators (Index) , ZiCog (Z80)
  • evanhevanh Posts: 6,085
    edited 2018-12-24 - 07:08:43
    Pnut works with Wine for those that can't use loadp2 and also don't have a Windoze setup. Just have to setup/assign comport access is all.

    "There's no huge amount of massive material
    hidden in the rings that we can't see,
    the rings are almost pure ice."
  • marsman2020marsman2020 Posts: 69
    edited 2018-12-24 - 07:57:20
    Cluso99 wrote: »
    David Betz wrote: »
    Cluso99 wrote: »
    Guys,
    To start with the P2 now, you will pretty much need to learn/use P2 assembler, or learn/run TAQOZ.
    What about fastspin? That should let you program the P2 using Spin, BASIC, or a subset of C as well as PASM2.
    Can you do a description of how to use it for beginners?

    https://github.com/totalspectrum/spin2gui
    Spin2gui is a very simple GUI for running applications on the Parallax Propeller 1 or 2, using the Spin language. It consists of a very basic front end (designed for working on one file at a time), the fastspin compiler, and Dave Hein's loadp2 program loader. I've also included David Betz's proploader.exe, which allows spin2gui to work on Propeller 1 systems as well (and in fact the default configuration is for Prop1).

    To use it, create a directory called "spin2gui" (or whatever you'd like) and unpack the .zip file into that directory. Then run spin2gui.exe. The program will save its configuration in a file called .spin2gui.config in that directory.

    Spin2gui is distributed under the MIT license; see the file License.txt for details.

    Latest release is here - https://github.com/totalspectrum/spin2gui/releases

    For new people I suppose it's important to note Chip is still working on the official reference implementation of Spin2.
  • twm47099twm47099 Posts: 737
    edited 2018-12-25 - 01:21:27
    Just got my P2-ES today. Ran some tests using Taqoz, just blinking LEDs on P56 and P57 as well as 4 LEDs connected to P1 to P4. My Teraterm session is listed below.
    Cold start
    ----------------------------------------------------------------
      Parallax P2  .:.:--TAQOZ--:.:.  V1.0--142          180530-0135
    ----------------------------------------------------------------
    TAQOZ# 56 blink  ok
    TAQOZ# 1 blink  ok
    TAQOZ# 2 blink  ok
    TAQOZ# 3 blink  ok
    TAQOZ# 4 blink  ok
    TAQOZ# 2 pin 5 hz  ok
    TAQOZ# 4 pin 10 hz  ok
    TAQOZ# 57 blink  ok
    TAQOZ# 57 pin 4 hz  ok
    TAQOZ# 4 0 do i pin i 2 + hz loop  ok
    TAQOZ#
    

    Thanks Peter for an easy to use environment.

    Tom
  • To blink P58 in software vs smart pin mode you can do this:
    BEGIN 58 HIGH 100 ms 58 LOW 100 ms AGAIN
    
    It's just an endless loop which you could also assign another cog to run in the background

    Has anybody checked the Flash and SD?
    .SF will print the SPI Flash IDs
    MOUNT will mount a FAT32 card and report
    DIR prints the directory
    BACKUP saves any TAQOZ code you've loaded or created into Flash so that a ^R keystroke will restore everything when you boot up fresh into TAQOZ again. Do this after you pasted in TAQOZ EXTEND (it's the first link in my sig). These utilities allow you to change the clock rate easily, just type CRUISE to shift up to 180MHz or TURBO FOR 240MHz etc.

    Type WORDS (or use ^W) to list the dictionary.
    To check the state of all the I/O pins type lsio
    Use DUMP DUMPW DUMPL DUMPA DUMPAW to dump all kinds of memory (SD, Flash, or default hub) in standard byte/word/long/ASCII/ASCII wide format.

    To list memory from 0 for $100:
    0 $100 DUMP
    
    After I MOUNT the card I can open the root directory and DUMP it as if it were RAM.
    TAQOZ# @ROOT FOPEN  ok
    TAQOZ# 0 $80 SD DUMP 
    00000: 50 32 44 32  20 20 20 20  20 20 20 08  00 00 9A 80     'P2D2       .....'
    00010: 82 4D 82 4D  00 00 9A 80  82 4D 00 00  00 00 00 00     '.M.M.....M......'
    00020: 5F 42 4F 4F  54 5F 50 32  42 49 4E 20  00 00 B1 30     '_BOOT_P2BIN ...0'
    00030: 82 4D 84 4D  00 00 B1 30  82 4D 03 00  00 00 02 00     '.M.M...0.M......'
    00040: 5F 42 4F 4F  54 5F 50 32  42 49 41 20  00 00 B9 30     '_BOOT_P2BIA ...0'
    00050: 82 4D 82 4D  00 00 B9 30  82 4D 23 00  00 00 08 00     '.M.M...0.M#.....'
    00060: 5F 42 4F 4F  54 5F 50 32  42 49 42 20  00 00 C1 30     '_BOOT_P2BIB ...0'
    00070: 82 4D 82 4D  00 00 C1 30  82 4D A3 00  00 00 04 00     '.M.M...0.M......' ok
    

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    P2CHIP-1.jpg
    P2 +++++ TAQOZ INTRO & LINKS +++++ P2 SHORTFORM DATASHEET
    P1 +++++ Latest binary V5.4 includes EASYFILE +++++ Tachyon Forth News Blog
    Brisbane, Australia
  • Yes. SD Boot has been verified :smiley:

    A few of us proved that TAQOZ could load extensions from FLASH on the P2D2. No reason for it not to work on P2-EVAL. Currently there is a hardware fix that won't be necessary with the next ROM.
    My Prop boards: P8XBlade2, RamBlade, CpuBlade, TriBlade
    Prop OS (also see Sphinx, PropDos, PropCmd, Spinix)
    Website: www.clusos.com
    Prop Tools (Index) , Emulators (Index) , ZiCog (Z80)
  • To blink P58 in software vs smart pin mode you can do this:
    BEGIN 58 HIGH 100 ms 58 LOW 100 ms AGAIN
    
    It's just an endless loop which you could also assign another cog to run in the background

    .......
    [/code]
    I suggest this is a better way. The LEDs on the "P2 EVAL Board" work backwards, a 'LOW' turns the LED 'on' and a 'HIGH' turns the LED 'off'.
    To blink P58 in software vs smart pin mode you can do this:
    BEGIN 58 LOW 100 ms 58 HIGH 100 ms KEY UNTIL 58 HIGH
    
    In the above line KEY UNTIL makes the LED keep blinking until you press any key on your keyboard sending a character to the "P2 EVAL Board", the final 58 HIGH on the above line turns 'off' LED P58.
  • marsman2020marsman2020 Posts: 69
    edited 2018-12-25 - 19:46:31
    It's Chipmas! Testing some things in TAQOZ that Peter asked about on the P2-ES
    Has anybody checked the Flash and SD?
    .SF will print the SPI Flash IDs
    I set the 'FLASH' DIP switch to ON, and then I get the following output for the Flash ID:
    .SF $EF70_1800 $DB59_3129_$E468_5835 ok
    
    MOUNT will mount a FAT32 card and report
    Mounting appears to work OK:
    TAQOZ# MOUNT .JTNCard C829_46B7 NO NAME    4k 7,583M ok
    
    DIR prints the directory
    I get a scrambled directory for some reason. I just formatted this card with a fresh FAT32 format in Windows and put two short .txt files on it to test with. Maybe I need to uncheck 'quick format', or try the official SD Association SD Card Formatter program?
    TAQOZ# DIR
    .JTNCard C829_46B7 NO NAME    4k 7,583M
    insERK7Q.Str $FDAC_24B5   2014.11.13.13.58   1,953,391,981
    12hasAtt.rib $07C3_CC4D   1980.03.07.13.51   825,314,126
    QDomElem.ent $9F4C_9BED   2020.09.23.09.26   1,735,289,202
    S2_ _ZNK.16Q $979C_6B1D   2036.03.01.09.43   1,684,368,737
    ItemERK7.QSt $FDAC_24B5   2014.11.13.13.58   1,953,391,981
    13attrib.ute $16BB_F155   2031.11.14.13.11   1,362,710,106
    HashData.14d $9FA4_AB85   2020.02.05.06.19   1,599,295,056
    4NodeEPv.EPF $E6F4_64CD   2014.02.17.07.01   1,819,307,337
    ementati.on1 $1F3C_C3F5   2038.03.14.12.43   1,380,279,664
    

  • Still having trouble with the SD Card FAT32 formatting. I unchecked 'quick format' and let the Windows format utility zero out the entire drive, then put two .txt files on it. Now I get an empty directory listing, no .txt files:
    TAQOZ# MOUNT .JTNCard 56D0_AC41 NO NAME    4k 7,583M ok
    TAQOZ# DIR
    .JTNCard 56D0_AC41 NO NAME    4k 7,583M
     ok
    
    Are there restrictions as far as file name that TAQOZ will see (all caps, have to be exactly 8.3, etc) or how I need to be formatting the SD card?
    BACKUP saves any TAQOZ code you've loaded or created into Flash so that a ^R keystroke will restore everything when you boot up fresh into TAQOZ again. Do this after you pasted in TAQOZ EXTEND (it's the first link in my sig). These utilities allow you to change the clock rate easily, just type CRUISE to shift up to 180MHz or TURBO FOR 240MHz etc.
    I loaded the TACOZ-EXTEND.FTH, then used 'BACKUP', unplugged the board, plugged it back in, and restored with Ctrl-R from the TACOZ prompt. All the speed setting words from the backup work fine, so that is working well (all with the FLASH dip switch still at 'on' of course).
  • I think it has to be all caps and 8.3
    Prop Info and Apps: http://www.rayslogic.com/
  • jmgjmg Posts: 12,892
    Are there restrictions as far as file name that TAQOZ will see (all caps, have to be exactly 8.3, etc) or how I need to be formatting the SD card?
    The files you have shown already look to use a file name display field of 8.3, and caps do not seem to matter.
    What size are the files ? - you could check if it is getting that bit right ?
    You could try files like 1.1, 22.22, 333.333, 1234.TXT, 12345678.TXT, 1234567890.TXT of varying sizes and see what DIR looks like.

  • Most FAT32 drivers from all micros seem to only use 8.3 filenames. The long filenames are subject to a microsoft patent (expired?) and it is more complex. 8+3 works fine and can co-exist with long filenames. Also note, quite often only the first directory is used for micro access to 8+3 files - ie sub-directory are often not supported even tho they can co-exist.
    My Prop boards: P8XBlade2, RamBlade, CpuBlade, TriBlade
    Prop OS (also see Sphinx, PropDos, PropCmd, Spinix)
    Website: www.clusos.com
    Prop Tools (Index) , Emulators (Index) , ZiCog (Z80)
  • With the boot ROM there were some cards that seemed to mount but not properly. Just try issuing a second MOUNT command and repeat. Don't be surprised to see what seems like junk in the directory, that's MicroSoft's "patented" long file naming scheme. Not only is it a kludge upon a kludge, it is also not that friendly for embedded systems really. Just how big a buffer do you need to allocate for those monsterously_long_file_names_that_never_seem_to_end_and_never_do_as they continue_on_to_the_next_page?
    Make sure your filename is in capitals, up to 8 characters in length and only 3 characters for the extension (8.3).

    Here's part of my directory dump in ASCII format using DUMPA. You can clearly see the 8.3 names as they look like a 11 character name with spaces to fill the gaps.
    TAQOZ# 0 $400 SD DUMPA 
    00000: P2D2       ......M.M.....M......_BOOT_P2BIN ...0.M.M...0.M......
    00040: _BOOT_P2BIA ...0.M.M...0.M#....._BOOT_P2BIB ...0.M.M...0.M......
    00080: BEACH   BMP ...0.M.M...DkM..Z...SPIDEY  PNG ...0.M.M...j]M/.....
    000C0: SPIDEY  GIF ...0.M.M....]MN..8..SPIDEY  BMP ...0.M.M...#\Mr.z...
    00100: MCQUEEN BMP ...0.M.M..n"\M..z...EYEGOD  BMP ...0.M.M..2"\M..z...
    00140: SUNSET  BMP ...0.M.M...!\MV.z...FACE    BMP ...0.M.M..y \M..z...
    00180: TIGER1  BMP ..[7.M.M..U7.M.=z0..TIGER   GIF ...0.M.M....YM..t...
    001C0: TIGER   JPG .d.0.M.M..N.YM?.....TIGER   PNG .d.0.M.M....YM`.X...
    00200: P2D2A   BMP .dZs.M.M..Cs.MQ?z...LMMS    BMP .d.0.M.M..7.WM[.8...
    00240: TIGER   BMP ..[s.M.M...r.M.?z...MARIO   BMP .d.r.M.M...r.M.?*...
    00280: MARIO   PNG .d.0.M.M...tSM2..A..BIRD    BMP .d.r.M.M...r.Mm>z...
    002C0: ASM51C  FTH .d.1.M.M...k~M...7..C2PROG  FTH ...1.M.M...6}M..d,..
    00300: TAQOZ   FTH ..31.M.M...-.M..SV..3X5     TXT ..I1.M.M...xwK......
    00340: ASCIIARTTXT ..I1.M.M...xwK..l...CALCDEMOFTH ..I1.M.M...3KK..8...
    00380: EASYFILEFTH ..I1.M.M...nXK..]...EASYNET FTH ..I1.M.M..6.XK......
    003C0: EXTEND  FTH ..I1.M.M...aXK......FISH2   VT  ..I1.M.M...ywK...;.. ok
    

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    P2CHIP-1.jpg
    P2 +++++ TAQOZ INTRO & LINKS +++++ P2 SHORTFORM DATASHEET
    P1 +++++ Latest binary V5.4 includes EASYFILE +++++ Tachyon Forth News Blog
    Brisbane, Australia
  • I ended up having to re-format the card using the 'overwrite mode' from the SD Cards Association format utility (https://www.sdcard.org/downloads/formatter_4/) in order to get it to work, both for SD card bootloading and showing up as as directory in TAQOZ. I'm not sure how that thing is different from the Windows format utility, but apparently it does something differently.

    Windows also ""helpfully"" puts the stupid 'System Volume Information' long-file-named directory on every drive you plug into it. So from inside TAQOZ, this is what I end up with:
    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
     ok
    
  • Here is the info for using the ROM Monitro/Debugger calls from your own program. I'll post some examples as time permits :)
    '' +--------------------------------------------------------------------------+
    ''              LMM DEBUGGER - lmm_f CALL Modes...(not all modes supported in ROM)
    '' +--------------------------------------------------------------------------+
      _MODE         = $F << 5                       ' mode bits defining the call b8..b5 (b4..b0 are modifier options)
      _SHIFT        = 5                             ' shr # to extract mode bits
      _HEX_         = 2 << 5                        ' hex...
        _REV_               = 1 << 4                '   - reverse byte order
        _SP                 = 1 << 3                '   - space between hex output pairs
       '_DIGITS             = 7..0 where 8->0       '   - no. of digits to display
      _LIST         = 3 << 5                        ' LIST memory line (1/4 longs) from cog/hub
        _ADDR2              = 1 << 4                ' 1= use lmm_p2 as to-address
        _LONG_              = 1 << 1                ' 1=display longs xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
      _TXSTRING     = 4 << 5                        ' tx string (nul terminated) from hub
      _RXSTRING     = 5 << 5                        ' rx string
        _ECHO_              = 1 << 4                '    - echo char
        _PROMPT             = 1 << 3                '    - prompt (lmm_x)
        _ADDR               = 1 << 2                '    - addr of string buffer supplied
        _NOLF               = 1 << 1                '    - strip <lf>
      _MONITOR      = 7 << 5                        ' goto rom monitor
    '' +--------------------------------------------------------------------------+
    _SerialInit        = $fcab8     ' Serial Initialise     (lmm_x & lmm_bufad must be set first)
    _HubTxCR           = $fcae4     ' Sends <cr><lf>        (overwrites lmm_x)
    _HubTxRev          = $fcaec     ' Sends lmm_x with bytes reversed
    _HubTx             = $fcaf0     ' Sends lmm_x           (can be up to 4 bytes)
    _HubHexRev         = $fcb24     ' Sends lmm_x with bytes reversed as Hex char(s) as defined in lmm_f
    _HubHex8           = $fcb28     ' Sends lmm_x as Hex char(s) after setting lmm_f as 8 hex chars
    _HubHex            = $fcb2c     ' Sends lmm_x as Hex char(s) as defined in lmm_f
    _HubTxStrVer       = $fcb9c     ' Sends $0 terminated string at lmm_p address after setting lmm_p=##_str_vers
    _HubTxString       = $fcba4     ' Sends $0 terminated string at lmm_p address
    _HubListA2H        = $fcbc4     ' List/Dump line(s) from lmm_p address to lmm_p2 address after setting lmm_f=#_LIST+_ADDR2 
    _HubList           = $fcbc8     ' List/Dump line(s) from lmm_p address to lmm_p2 address according to lmm_f
    _HubRx             = $fcb10     ' Recv char into lmm_x
    _HubRxStrMon       = $fccc4     ' Recv string into lmm_bufad address after setting prompt=lmm_x=#"*" & params=lmm_f=#_RXSTRING+_ECHO_+_PROMPT
    _HubRxString       = $fcccc     ' Recv string into lmm_p/lmm_bufad address according to params in lmm_f
    _HubMonitor        = $fcd78     ' Calls the Monitor; uses lmm_bufad as the input buffer address
    _RdLongCogHub      = $fcf34     ' read cog/lut/hub long from lmm_p address into lmm_x, then lmm_p++
    _str_vers          = $fd014     ' locn of hub string, $0 terminated
    '' +--------------------------------------------------------------------------+
    
    My Prop boards: P8XBlade2, RamBlade, CpuBlade, TriBlade
    Prop OS (also see Sphinx, PropDos, PropCmd, Spinix)
    Website: www.clusos.com
    Prop Tools (Index) , Emulators (Index) , ZiCog (Z80)
  • HydraHackerHydraHacker Posts: 38
    edited 2018-12-27 - 00:51:45
    Hello Everybody,
    I have included a screenshot of my first "Hello World program in TAQOZ Forth.

    HydraHacker

    JB%20Hello%20World%20TAQOZ%20Forth.png
    1366 x 768 - 61K
  • @HydraHacker - good start!
    Just remember that words that require parameters expect them on the stack before executing. So 32 EMIT will emit the value 32 from the stack. SPACE does the same thing but ." HELLO WORLD!" is the normal form for printing a literal string. Notice the space between ." And the first part of the string since ." is a word and all words need to be separated by whitespace. Notice too that you can just type this in without having to create a definition so try this (copy and paste).
    10 FOR CRLF ." HELLO WORLD!" NEXT
    

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    P2CHIP-1.jpg
    P2 +++++ TAQOZ INTRO & LINKS +++++ P2 SHORTFORM DATASHEET
    P1 +++++ Latest binary V5.4 includes EASYFILE +++++ Tachyon Forth News Blog
    Brisbane, Australia
  • HydraHackerHydraHacker Posts: 38
    edited 2018-12-27 - 00:55:37
    Hi Peter,
    I tried your code and it works great, I might get to like Forth yet!
    I just made changes to my code and reposted, I put the parameter before the word and it works better...thanks Peter.

    HydraHacker
  • I have tried the Spin2gui and get an error. Any ideas??
    694 x 683 - 75K
  • It seems spin2gui doesn't like pathnames with spaces in them. Rename your "propeller 2 docs" directory to something without spaces and it should at least run fastspin.
  • I will try that.
  • Tried that and got this error.
    1169 x 683 - 117K
Sign In or Register to comment.