TACHYON O/S V3.0 JUNO - Furiously Fast Forth, FAT32+LAN+VGA+RS485+OBEX ROMS+FP+LMM+++

14546485051109

Comments

  • Dave HeinDave Hein Posts: 6,063
    edited 2014-06-05 - 10:14:23
    mindrobots wrote: »
    There's a link to the Tachyon Dropbox in Peter's signature.
    Thanks, that's what I was looking for. I usually ignore the stuff in people's signatures. It might be a good idea to add that link to beginning of the Tachyon documents pages in BIG letters.
  • max72max72 Posts: 1,150
    edited 2014-06-05 - 13:59:51
  • base2designbase2design Posts: 78
    edited 2014-06-06 - 04:26:03
    So I'm breaking into Tachyon again and I've still not figured out how to include PASM code from OBEX into the system... is there an example of how to do this buried in this thread? I specifically wanted to pull the PASM portion of SIDcog into it and Peter had implied it was easy but I'm too thick to see the path.

    Can anyone point me to an example?

    Regards!
  • Peter JakackiPeter Jakacki Posts: 9,360
    edited 2014-06-06 - 10:25:24
    So I'm breaking into Tachyon again and I've still not figured out how to include PASM code from OBEX into the system... is there an example of how to do this buried in this thread? I specifically wanted to pull the PASM portion of SIDcog into it and Peter had implied it was easy but I'm too thick to see the path.

    Can anyone point me to an example?

    Regards!

    Please make sure you change your thread title to reflect the subject matter, you are discussing the sidcog but the thread is still titled "Spinneret .......".

    Now on the subject of the sidcog I had replied at the time and even created a Google doc with most of the code done but I think this was waiting on my target resident obex where TF can find and load pasm objects from upper eeprom. I might be able to convert the sidcog code by passing the compiler generated listing through TF itself which can extract the machine code and write it to a eeprom (or SD) file. I probably would have finished this at the time had you been chasing me about it but I've got plenty of things to do so "no pressure, no results" :)
  • base2designbase2design Posts: 78
    edited 2014-06-06 - 10:38:31
    Thanks Peter and sorry about the thread header too. I guess I know too little about the underlying operation of the Prop to understand how "machine code" (PASM) gets executed natively, much less under TF. As far as exploring existing PASM code, is it productive to look at the SPI/I2C implementation on TF compared to spin/pasm stuff to understand things better?

    As far as "pressure", hell dude, until I'm writing you a check, there's no pressure. Thanks though!

    -joe
  • D.PD.P Posts: 790
    edited 2014-06-06 - 11:05:17
    MJB wrote: »
    hi D.P. I have an idle Spinneret sitting here waiting for Tachyon as well :-)
    I want to use it as the internet gateway to my sensor/actor network I am setting up here.

    The kernel, Extend and Wiznet versions are from DROPBOX ?
    Original or did you have to adapt things?

    As I understand the WIZNET.fth for W5100 does not run with Tachyon2.3 ??
    That's why I postponed my Spinneret experiments atm. ( busy with construction site, house in the mountains ..)
    Thanks MJB

    Here are the files I use on the spinneret. It would be great as Peter says if we get a new driver that supports the 5100 stuff too. That chip will be a buck very soon now and great for simple network devices with a 64K eeprom, prop 1, magjack, basic IO.

    The zip file contains Tachyon V2.1 with a modified extend so that both SPI and I2C work well together and the appropriate WIZnet.fth driver include with added support for client sockets i.e. DIP, DPORT words to support destination port and ip.

    I am using the spinneret in a UDP client CO2 monitoring application with the Air Sense K30 10K PPM sensor, let me know if you want that finicky K30 I2C base forth driver, what a mess of a device that just doesn't follow its own datasheet. I worked for a week to get the K33 (CO2, TEMP, RH) to work with I2C in spin quite a while back, took me less than 2 hours to get the K30 working with Tachyon. THANKS PETER.

    Enjoy
  • Peter JakackiPeter Jakacki Posts: 9,360
    edited 2014-06-09 - 00:07:57
    A few days ago mjb mentioned that it would be good to be able to analyse bytecode in realtime so I thought up of a Q&D method that was next to realtime, just a little slower. The BCA loads a small RUNMOD which then redirects doNEXT via unext to the BCA which then looks after those functions plus it uses 256 longs in BUFFERS to count each code. I just got around to really testing now and I happened to have a gate card-reader controller running and grabbed the results and then pasted that into a spreadsheet.

    These are the sorted results, just for interest and note that since it just sits around reading the I2C RTC that there are some skewed results.

    EGATE software running - system info
    [FONT=courier new].TASKS 
    0001: CONSOLE                         0000 00 00 00 00 00 00 
    0002: IDLE                            0000 01 00 00 00 00 00 
    0003: IDLE                            0000 01 00 00 00 00 00 
    0004: IDLE                            0000 01 00 00 00 00 00 
    0005: IDLE                            0000 01 00 00 00 00 00 
    0006: SERIN.TASK                      379B 01 00 00 00 00 00 
    0007: TIMERTASK                       2F74 01 00 00 00 00 00  ok
    .TIMERS  ticks = 1/1000
    3AD8: master              000,000ms =0000.0000 L3B64 
    3B64: operation           000,000ms =0000.0000 L3B74 
    3B74: delay               000,000ms =0000.0000 L3D38 
    3D38: checktimer          079,236ms =0001.3583 L2E00 
    2E00: wdt                 029,913ms =0000.74D7 L0001 ALARM=REBOOT ok
    .MODULES 
    MODULES LOADED: 
    364A: EGATE.fth           RFID Gate Access interface V1.0 140605.1700 - Peter Jakacki & Jack Stubbs 
    3461: MCP79410-RTC.fth    MCP79410 I2C DECIMAL RTC DRIVER - 140422.0000 
    1880: EXTEND.fth          Primary extensions to TACHYON kernel - 140604-02OO
    [/FONT]
    

    [TABLE]
    [TR]
    [TD="align: center"]CODE[/TD]
    [TD="align: center"]NAME[/TD]
    [TD="align: center"]COUNT[/TD]
    [/TR]
    [TR]
    [TD="align: left"]93:[/TD]
    [TD="align: left"]CLOCK[/TD]
    [TD="align: right"]117085896[/TD]
    [/TR]
    [TR]
    [TD="align: left"]E2:[/TD]
    [TD="align: left"]NEXT[/TD]
    [TD="align: right"]52039352[/TD]
    [/TR]
    [TR]
    [TD="align: left"]A3:[/TD]
    [TD="align: left"]SHRINP[/TD]
    [TD="align: right"]39011640[/TD]
    [/TR]
    [TR]
    [TD="align: left"]7E:[/TD]
    [TD="align: left"]BYTE[/TD]
    [TD="align: right"]20654363[/TD]
    [/TR]
    [TR]
    [TD="align: left"]11:[/TD]
    [TD="align: left"]NOP[/TD]
    [TD="align: right"]19527126[/TD]
    [/TR]
    [TR]
    [TD="align: left"]C1:[/TD]
    [TD="align: left"]YCALL[/TD]
    [TD="align: right"]18734587[/TD]
    [/TR]
    [TR]
    [TD="align: left"]0F:[/TD]
    [TD="align: left"]EXIT[/TD]
    [TD="align: right"]16953988[/TD]
    [/TR]
    [TR]
    [TD="align: left"]8A:[/TD]
    [TD="align: left"]CON[/TD]
    [TD="align: right"]15999567[/TD]
    [/TR]
    [TR]
    [TD="align: left"]89:[/TD]
    [TD="align: left"]0[/TD]
    [TD="align: right"]13336702[/TD]
    [/TR]
    [TR]
    [TD="align: left"]A6:[/TD]
    [TD="align: left"]SHROUT[/TD]
    [TD="align: right"]13297219[/TD]
    [/TR]
    [TR]
    [TD="align: left"]9A:[/TD]
    [TD="align: left"]INPUTS[/TD]
    [TD="align: right"]12736736[/TD]
    [/TR]
    [TR]
    [TD="align: left"]17:[/TD]
    [TD="align: left"]DUP[/TD]
    [TD="align: right"]10178693[/TD]
    [/TR]
    [TR]
    [TD="align: left"]21:[/TD]
    [TD="align: left"]SWAP[/TD]
    [TD="align: right"]9720988[/TD]
    [/TR]
    [TR]
    [TD="align: left"]CE:[/TD]
    [TD="align: left"]IF[/TD]
    [TD="align: right"]9108331[/TD]
    [/TR]
    [TR]
    [TD="align: left"]C2:[/TD]
    [TD="align: left"]XCALL[/TD]
    [TD="align: right"]9031175[/TD]
    [/TR]
    [TR]
    [TD="align: left"]14:[/TD]
    [TD="align: left"]DROP[/TD]
    [TD="align: right"]8685744[/TD]
    [/TR]
    [TR]
    [TD="align: left"]83:[/TD]
    [TD="align: left"]8[/TD]
    [TD="align: right"]7323679[/TD]
    [/TR]
    [TR]
    [TD="align: left"]97:[/TD]
    [TD="align: left"]OUTCLR[/TD]
    [TD="align: right"]7317844[/TD]
    [/TR]
    [TR]
    [TD="align: left"]42:[/TD]
    [TD="align: left"]SHR[/TD]
    [TD="align: right"]6508626[/TD]
    [/TR]
    [TR]
    [TD="align: left"]D6:[/TD]
    [TD="align: left"]FOR[/TD]
    [TD="align: right"]6505507[/TD]
    [/TR]
    [TR]
    [TD="align: left"]4E:[/TD]
    [TD="align: left"]REV[/TD]
    [TD="align: right"]6504772[/TD]
    [/TR]
    [TR]
    [TD="align: left"]59:[/TD]
    [TD="align: left"]0=[/TD]
    [TD="align: right"]6257384[/TD]
    [/TR]
    [TR]
    [TD="align: left"]BF:[/TD]
    [TD="align: left"]VCALL[/TD]
    [TD="align: right"]5686467[/TD]
    [/TR]
    [TR]
    [TD="align: left"]1A:[/TD]
    [TD="align: left"]OVER[/TD]
    [TD="align: right"]5077834[/TD]
    [/TR]
    [TR]
    [TD="align: left"]8C:[/TD]
    [TD="align: left"]VAR[/TD]
    [TD="align: right"]4878459[/TD]
    [/TR]
    [TR]
    [TD="align: left"]25:[/TD]
    [TD="align: left"]ROT[/TD]
    [TD="align: right"]4876571[/TD]
    [/TR]
    [TR]
    [TD="align: left"]B8:[/TD]
    [TD="align: left"]I[/TD]
    [TD="align: right"]4350596[/TD]
    [/TR]
    [TR]
    [TD="align: left"]6A:[/TD]
    [TD="align: left"]C![/TD]
    [TD="align: right"]4350415[/TD]
    [/TR]
    [TR]
    [TD="align: left"]DC:[/TD]
    [TD="align: left"]LOOP[/TD]
    [TD="align: right"]4340910[/TD]
    [/TR]
    [TR]
    [TD="align: left"]C0:[/TD]
    [TD="align: left"]ZCALL[/TD]
    [TD="align: right"]4332014[/TD]
    [/TR]
    [TR]
    [TD="align: left"]29:[/TD]
    [TD="align: left"]+[/TD]
    [TD="align: right"]4207290[/TD]
    [/TR]
    [TR]
    [TD="align: left"]95:[/TD]
    [TD="align: left"]OUTSET[/TD]
    [TD="align: right"]3800051[/TD]
    [/TR]
    [TR]
    [TD="align: left"]3A:[/TD]
    [TD="align: left"]AND[/TD]
    [TD="align: right"]3615721[/TD]
    [/TR]
    [TR]
    [TD="align: left"]62:[/TD]
    [TD="align: left"]C@[/TD]
    [TD="align: right"]3458983[/TD]
    [/TR]
    [TR]
    [TD="align: left"]CD:[/TD]
    [TD="align: left"]UNTIL[/TD]
    [TD="align: right"]3167818[/TD]
    [/TR]
    [TR]
    [TD="align: left"]FB:[/TD]
    [TD="align: left"]UM*[/TD]
    [TD="align: right"]2977644[/TD]
    [/TR]
    [TR]
    [TD="align: left"]04:[/TD]
    [TD="align: left"]XOP[/TD]
    [TD="align: right"]2510320[/TD]
    [/TR]
    [TR]
    [TD="align: left"]5F:[/TD]
    [TD="align: left"]C@++[/TD]
    [TD="align: right"]2358507[/TD]
    [/TR]
    [TR]
    [TD="align: left"]5C:[/TD]
    [TD="align: left"]>[/TD]
    [TD="align: right"]2324733[/TD]
    [/TR]
    [TR]
    [TD="align: left"]57:[/TD]
    [TD="align: left"]=[/TD]
    [TD="align: right"]2196607[/TD]
    [/TR]
    [TR]
    [TD="align: left"]64:[/TD]
    [TD="align: left"]W@[/TD]
    [TD="align: right"]1839204[/TD]
    [/TR]
    [TR]
    [TD="align: left"]85:[/TD]
    [TD="align: left"]4[/TD]
    [TD="align: right"]1633370[/TD]
    [/TR]
    [TR]
    [TD="align: left"]66:[/TD]
    [TD="align: left"]@[/TD]
    [TD="align: right"]1630539[/TD]
    [/TR]
    [TR]
    [TD="align: left"]16:[/TD]
    [TD="align: left"]?DUP[/TD]
    [TD="align: right"]1383374[/TD]
    [/TR]
    [TR]
    [TD="align: left"]2B:[/TD]
    [TD="align: left"]1-[/TD]
    [TD="align: right"]1277622[/TD]
    [/TR]
    [TR]
    [TD="align: left"]2C:[/TD]
    [TD="align: left"]1+[/TD]
    [TD="align: right"]1257434[/TD]
    [/TR]
    [TR]
    [TD="align: left"]7D:[/TD]
    [TD="align: left"]WORD[/TD]
    [TD="align: right"]1050279[/TD]
    [/TR]
    [TR]
    [TD="align: left"]84:[/TD]
    [TD="align: left"]1[/TD]
    [TD="align: right"]1005054[/TD]
    [/TR]
    [TR]
    [TD="align: left"]EB:[/TD]
    [TD="align: left"]REG[/TD]
    [TD="align: right"]895974[/TD]
    [/TR]
    [TR]
    [TD="align: left"]86:[/TD]
    [TD="align: left"]2[/TD]
    [TD="align: right"]736835[/TD]
    [/TR]
    [TR]
    [TD="align: left"]13:[/TD]
    [TD="align: left"]2DROP[/TD]
    [TD="align: right"]543457[/TD]
    [/TR]
    [TR]
    [TD="align: left"]D2:[/TD]
    [TD="align: left"]ADO[/TD]
    [TD="align: right"]541536[/TD]
    [/TR]
    [TR]
    [TD="align: left"]7B:[/TD]
    [TD="align: left"]LONG[/TD]
    [TD="align: right"]541366[/TD]
    [/TR]
    [TR]
    [TD="align: left"]4C:[/TD]
    [TD="align: left"]2*[/TD]
    [TD="align: right"]513905[/TD]
    [/TR]
    [TR]
    [TD="align: left"]87:[/TD]
    [TD="align: left"]3[/TD]
    [TD="align: right"]443141[/TD]
    [/TR]
    [TR]
    [TD="align: left"]0D:[/TD]
    [TD="align: left"]0EXIT[/TD]
    [TD="align: right"]279914[/TD]
    [/TR]
    [TR]
    [TD="align: left"]8F:[/TD]
    [TD="align: left"]IN@[/TD]
    [TD="align: right"]274867[/TD]
    [/TR]
    [TR]
    [TD="align: left"]72:[/TD]
    [TD="align: left"]![/TD]
    [TD="align: right"]272809[/TD]
    [/TR]
    [TR]
    [TD="align: left"]BC:[/TD]
    [TD="align: left"]CALL[/TD]
    [TD="align: right"]270744[/TD]
    [/TR]
    [TR]
    [TD="align: left"]F3:[/TD]
    [TD="align: left"]DELTA[/TD]
    [TD="align: right"]270688[/TD]
    [/TR]
    [TR]
    [TD="align: left"]50:[/TD]
    [TD="align: left"]MASK[/TD]
    [TD="align: right"]270683[/TD]
    [/TR]
    [TR]
    [TD="align: left"]98:[/TD]
    [TD="align: left"]OUTPUTS[/TD]
    [TD="align: right"]270683[/TD]
    [/TR]
    [TR]
    [TD="align: left"]1C:[/TD]
    [TD="align: left"]3RD[/TD]
    [TD="align: right"]180464[/TD]
    [/TR]
    [TR]
    [TD="align: left"]28:[/TD]
    [TD="align: left"]-[/TD]
    [TD="align: right"]172347[/TD]
    [/TR]
    [TR]
    [TD="align: left"]40:[/TD]
    [TD="align: left"]XOR[/TD]
    [TD="align: right"]172111[/TD]
    [/TR]
    [TR]
    [TD="align: left"]3E:[/TD]
    [TD="align: left"]OR[/TD]
    [TD="align: right"]16125[/TD]
    [/TR]
    [TR]
    [TD="align: left"]81:[/TD]
    [TD="align: left"]BL[/TD]
    [TD="align: right"]10629[/TD]
    [/TR]
    [TR]
    [TD="align: left"]C9:[/TD]
    [TD="align: left"]AGAIN[/TD]
    [TD="align: right"]10416[/TD]
    [/TR]
    [TR]
    [TD="align: left"]ED:[/TD]
    [TD="align: left"]REG[/TD]
    [TD="align: right"]9263[/TD]
    [/TR]
    [TR]
    [TD="align: left"]88:[/TD]
    [TD="align: left"]ON[/TD]
    [TD="align: right"]8124[/TD]
    [/TR]
    [TR]
    [TD="align: left"]68:[/TD]
    [TD="align: left"]C+![/TD]
    [TD="align: right"]7759[/TD]
    [/TR]
    [TR]
    [TD="align: left"]DB:[/TD]
    [TD="align: left"]+LOOP[/TD]
    [TD="align: right"]5827[/TD]
    [/TR]
    [TR]
    [TD="align: left"]54:[/TD]
    [TD="align: left"]>N[/TD]
    [TD="align: right"]5728[/TD]
    [/TR]
    [TR]
    [TD="align: left"]44:[/TD]
    [TD="align: left"]SHL[/TD]
    [TD="align: right"]4831[/TD]
    [/TR]
    [TR]
    [TD="align: left"]33:[/TD]
    [TD="align: left"]U/MOD[/TD]
    [TD="align: right"]4712[/TD]
    [/TR]
    [TR]
    [TD="align: left"]E9:[/TD]
    [TD="align: left"]R>[/TD]
    [TD="align: right"]4018[/TD]
    [/TR]
    [TR]
    [TD="align: left"]E6:[/TD]
    [TD="align: left"]>R[/TD]
    [TD="align: right"]4017[/TD]
    [/TR]
    [TR]
    [TD="align: left"]36:[/TD]
    [TD="align: left"]NIP[/TD]
    [TD="align: right"]2810[/TD]
    [/TR]
    [TR]
    [TD="align: left"]82:[/TD]
    [TD="align: left"]16[/TD]
    [TD="align: right"]2526[/TD]
    [/TR]
    [TR]
    [TD="align: left"]55:[/TD]
    [TD="align: left"]>B[/TD]
    [TD="align: right"]2326[/TD]
    [/TR]
    [TR]
    [TD="align: left"]6E:[/TD]
    [TD="align: left"]W![/TD]
    [TD="align: right"]1261[/TD]
    [/TR]
    [TR]
    [TD="align: left"]77:[/TD]
    [TD="align: left"]CLR[/TD]
    [TD="align: right"]894[/TD]
    [/TR]
    [TR]
    [TD="align: left"]31:[/TD]
    [TD="align: left"]NEGATE[/TD]
    [TD="align: right"]822[/TD]
    [/TR]
    [TR]
    [TD="align: left"]BA:[/TD]
    [TD="align: left"]LSTACK[/TD]
    [TD="align: right"]818[/TD]
    [/TR]
    [TR]
    [TD="align: left"]D5:[/TD]
    [TD="align: left"]DO[/TD]
    [TD="align: right"]769[/TD]
    [/TR]
    [TR]
    [TD="align: left"]CA:[/TD]
    [TD="align: left"]ELSE[/TD]
    [TD="align: right"]685[/TD]
    [/TR]
    [TR]
    [TD="align: left"]6C:[/TD]
    [TD="align: left"]W+![/TD]
    [TD="align: right"]447[/TD]
    [/TR]
    [TR]
    [TD="align: left"]76:[/TD]
    [TD="align: left"]SET[/TD]
    [TD="align: right"]438[/TD]
    [/TR]
    [TR]
    [TD="align: left"]07:[/TD]
    [TD="align: left"]STREND[/TD]
    [TD="align: right"]108[/TD]
    [/TR]
    [TR]
    [TD="align: left"]D7:[/TD]
    [TD="align: left"]>L[/TD]
    [TD="align: right"]93[/TD]
    [/TR]
    [TR]
    [TD="align: left"]D9:[/TD]
    [TD="align: left"]L>[/TD]
    [TD="align: right"]93[/TD]
    [/TR]
    [TR]
    [TD="align: left"]2F:[/TD]
    [TD="align: left"]?NEGATE[/TD]
    [TD="align: right"]31[/TD]
    [/TR]
    [TR]
    [TD="align: left"]4A:[/TD]
    [TD="align: left"]2/[/TD]
    [TD="align: right"]18[/TD]
    [/TR]
    [TR]
    [TD="align: left"]7C:[/TD]
    [TD="align: left"]TRYPE[/TD]
    [TD="align: right"]5[/TD]
    [/TR]
    [TR]
    [TD="align: left"]35:[/TD]
    [TD="align: left"]U/[/TD]
    [TD="align: right"]2[/TD]
    [/TR]
    [/TABLE]







    EDIT: Or how about just what happens when we run 10 iterations of the Sieve of Eratosthenes:
    [FONT=courier new]!BCA SIEVE 1 $1A5 COG! .BCA
    CODE    COUNT        NAME
    B8:    296031        I
    17:    169211        DUP
    29:    160632        +
    6A:    150041        C!
    89:    150005        0
    DB:    149960        +LOOP
    CE:    101261        IF
    8C:    96314        VAR
    BF:    96312        VCALL
    62:    82017        C@
    DC:    81911        LOOP
    8A:    26210        CON
    C0:    26210        ZCALL
    C2:    19467        XCALL
    0F:    19434        EXIT
    5C:    19155        >
    21:    19061        SWAP
    14:    19003        DROP
    2C:    19000        1
    84:    18991        3
    1A:    7276        OVER
    D5:    7211        DO
    EB:    422        REGADR
    7E:    341        BYTE
    16:    249        ?DUP
    04:    170        XOP
    5F:    162        C@++
    64:    155        W@
    C9:    132        AGAIN
    59:    115        0=
    3A:    92        AND
    3E:    61        OR
    68:    58        C+!
    88:    58        ON
    CD:    50        UNTIL
    0D:    46        0EXIT
    33:    46        U/MOD
    C1:    13        YCALL
    E6:    13        >R
    E9:    13        R>
    13:    12        2DROP
    87:    12        1
    2B:    11        -1
    77:    11        CLR
    1C:    10        3RD
    28:    4        -
    07:    3        STREND
    42:    2        SHR
    57:    2        =
    66:    2        @
    72:    2        !
    7D:    2        WORD
    83:    2        8
    BA:    2        LSTACK
    CA:    2        ELSE
    EF:    2        LAP
    35:    1        U/
    36:    1        NIP
    44:    1        SHL
    7C:    1        TRYTE
    81:    1        BL
    D2:    1        ADO
    FB:    1        UM*[/FONT]
    
  • MJBMJB Posts: 1,167
    edited 2014-06-09 - 08:46:40
    The BCA loads a small RUNMOD <snip>
    Peter,
    where has !BCA & .BCA from EXTEND gone to?
  • Peter JakackiPeter Jakacki Posts: 9,360
    edited 2014-06-09 - 08:57:44
    MJB wrote: »
    Peter,
    where has !BCA & .BCA from EXTEND gone to?

    I sent you the link for the edit document but here's the published Google web page too for anyone who's interested. I'm still getting around to performing a sort by count but to get it to run now you just insert your code between the <BCA code BCA> like this:
    <BCA 0 40 DUMP BCA>                                                             
    0000_0000:   00 B4 C4 04  6F E3 10 00   A0 7E A8 7E  74 7E AC 7E   ....o....~.~~
    0000_0010:   90 7E 02 00  64 7E 00 00   FE 18 61 01  D0 07 00 00   .~..d~....a..
    0000_0020:   00 84 03 00  00 48 00 00   00 00 00 00  00 00 00 00   .....H.......
    0000_0030:   00 00 00 00  00 00 00 00   00 00 00 00  8D 20 00 00   .............
    CODE NAME      COUNT                                                            
    04:  XOP       405                                                              
    0D:  0EXIT     34                                                               
    0F:  EXIT      1630                                                             
    13:  2DROP     4                                                                
    14:  DROP      152                                                              
    16:  ?DUP      428                                                              
    17:  DUP      396                                                              
    1A:  OVER      233                                                              
    21:  SWAP      216                                                              
    28:  -         151                                                              
    29:  +         406                                                              
    2C:  1+        64                                                               
    31:  NEGATE    64                                                               
    33:  U/MOD     34                                                               
    36:  NIP       41                                                               
    3A:  AND       206                                                              
    3E:  OR        40                                                               
    40:  XOR       64                                                               
    42:  SHR       72                                                               
    44:  SHL       4                                                                
    54:  >N        128                                                              
    55:  >B        8                                                                
    57:  =         160                                                              
    59:  0=        440                                                              
    5C:  >         308                                                              
    5F:  C@++      52                                                               
    62:  C@        396                                                              
    64:  W@        340                                                              
    66:  @         208                                                              
    68:  C+!       40                                                               
    6A:  C!        61                                                               
    72:  !         74                                                               
    77:  CLR       4                                                                
    7D:  (WORD)    5                                                                
    7E:  (BYTE)    665                                                              
    81:  BL        200                                                              
    82:  16        12                                                               
    83:  8         17                                                               
    84:  1         34                                                               
    85:  4         225                                                              
    86:  2         68                                                               
    87:  3         128                                                              
    88:  ON        40                                                               
    89:  0         154                                                              
    8C:  (VAR)     145                                                              
    B8:  I         324                                                              
    BA:  LSTACK    64                                                               
    C0:  ZCALL     1                                                                
    C1:  YCALL     300                                                              
    C2:  XCALL     1479                                                             
    C9:  (AGAIN)   44                                                               
    CA:  (ELSE)    4                                                                
    CE:  (IF)      1010                                                             
    D2:  ADO       5                                                                
    D5:  DO        8                                                                
    D6:  FOR       20                                                               
    DB:  +LOOP     68                                                               
    DC:  LOOP      96                                                               
    E2:  NEXT      32                                                               
    E6:  >R        68                                                               
    E9:  R>        68                                                               
    EB:  (REG)     740                                                              
    ED:  REG       114                                                              
    ------------------------ ok
    
  • MJBMJB Posts: 1,167
    edited 2014-06-09 - 11:49:21
    Analysis of filein of EXTEND.fth
    [TABLE="width: 240"]
    [TR]
    [TD="class: xl22, width: 80"]  [TABLE="width: 400"]
      [TR]
       [TD="class: xl24, width: 80"]BCA>[/TD]
       [TD="width: 80"]total:
    [/TD]
       [TD="width: 80, align: right"]1732617860[/TD]
       [TD="width: 80"][/TD]
       [TD="width: 80"][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]CODE[/TD]
       [TD="class: xl24"]NAME[/TD]
       [TD]COUNT
    [/TD]
       [TD="class: xl25"]           1/1000
    [/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]64:[/TD]
       [TD="class: xl24"]W@[/TD]
       [TD="align: right"]295306346[/TD]
       [TD="class: xl26, align: right"]170[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]2B:[/TD]
       [TD="class: xl24"]1-[/TD]
       [TD="align: right"]236119899[/TD]
       [TD="class: xl26, align: right"]136[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]CE:[/TD]
       [TD="class: xl24"](IF)[/TD]
       [TD="align: right"]178126589[/TD]
       [TD="class: xl26, align: right"]103[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]EB:[/TD]
       [TD="class: xl24"](REG)[/TD]
       [TD="align: right"]177604603[/TD]
       [TD="class: xl26, align: right"]103[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]16:[/TD]
       [TD="class: xl24"]?DUP[/TD]
       [TD="align: right"]176934635[/TD]
       [TD="class: xl26, align: right"]102[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]17:[/TD]
       [TD="class: xl24"]DUP[/TD]
       [TD="align: right"]119574066[/TD]
       [TD="class: xl26, align: right"]69[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]21:[/TD]
       [TD="class: xl24"]SWAP[/TD]
       [TD="align: right"]118367537[/TD]
       [TD="class: xl26, align: right"]68[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]CD:[/TD]
       [TD="class: xl24"](UNTIL)[/TD]
       [TD="align: right"]60190163[/TD]
       [TD="class: xl26, align: right"]35[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]89:[/TD]
       [TD="class: xl24"]0[/TD]
       [TD="align: right"]59852344[/TD]
       [TD="class: xl26, align: right"]35[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]1A:[/TD]
       [TD="class: xl24"]OVER[/TD]
       [TD="align: right"]59660067[/TD]
       [TD="class: xl26, align: right"]34[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]0F:[/TD]
       [TD="class: xl24"]EXIT[/TD]
       [TD="align: right"]59616073[/TD]
       [TD="class: xl26, align: right"]34[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]C2:[/TD]
       [TD="class: xl24"]XCALL[/TD]
       [TD="align: right"]59579351[/TD]
       [TD="class: xl26, align: right"]34[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]57:[/TD]
       [TD="class: xl24"]=[/TD]
       [TD="align: right"]59420289[/TD]
       [TD="class: xl26, align: right"]34[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]13:[/TD]
       [TD="class: xl24"]2DROP[/TD]
       [TD="align: right"]58909676[/TD]
       [TD="class: xl26, align: right"]34[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]29:[/TD]
       [TD="class: xl24"]+[/TD]
       [TD="align: right"]2380270[/TD]
       [TD="class: xl26, align: right"]1[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]59:[/TD]
       [TD="class: xl24"]0=[/TD]
       [TD="align: right"]1558047[/TD]
       [TD="class: xl26, align: right"]1[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]62:[/TD]
       [TD="class: xl24"]C@[/TD]
       [TD="align: right"]1370575[/TD]
       [TD="class: xl26, align: right"]1[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]87:[/TD]
       [TD="class: xl24"]3[/TD]
       [TD="align: right"]958984[/TD]
       [TD="class: xl26, align: right"]1[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]5F:[/TD]
       [TD="class: xl24"]C@++[/TD]
       [TD="align: right"]939283[/TD]
       [TD="class: xl26, align: right"]1[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]04:[/TD]
       [TD="class: xl24"]XOP[/TD]
       [TD="align: right"]893429[/TD]
       [TD="class: xl26, align: right"]1[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]93:[/TD]
       [TD="class: xl24"]CLOCK[/TD]
       [TD="align: right"]736182[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]7E:[/TD]
       [TD="class: xl24"](BYTE)[/TD]
       [TD="align: right"]666296[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]3A:[/TD]
       [TD="class: xl24"]AND[/TD]
       [TD="align: right"]449040[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]E2:[/TD]
       [TD="class: xl24"]NEXT[/TD]
       [TD="align: right"]327414[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]11:[/TD]
       [TD="class: xl24"]NOP[/TD]
       [TD="align: right"]327220[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]A6:[/TD]
       [TD="class: xl24"]SHROUT[/TD]
       [TD="align: right"]327192[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]6A:[/TD]
       [TD="class: xl24"]C![/TD]
       [TD="align: right"]282122[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]2C:[/TD]
       [TD="class: xl24"]1+[/TD]
       [TD="align: right"]196180[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]86:[/TD]
       [TD="class: xl24"]2[/TD]
       [TD="align: right"]173066[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]5C:[/TD]
       [TD="class: xl24"]>[/TD]
       [TD="align: right"]159745[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]28:[/TD]
       [TD="class: xl24"]-[/TD]
       [TD="align: right"]145626[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]C1:[/TD]
       [TD="class: xl24"]YCALL[/TD]
       [TD="align: right"]120608[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]14:[/TD]
       [TD="class: xl24"]DROP[/TD]
       [TD="align: right"]111498[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]7D:[/TD]
       [TD="class: xl24"](WORD)[/TD]
       [TD="align: right"]100052[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]6E:[/TD]
       [TD="class: xl24"]W![/TD]
       [TD="align: right"]96724[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]85:[/TD]
       [TD="class: xl24"]4[/TD]
       [TD="align: right"]95812[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]55:[/TD]
       [TD="class: xl24"]>B[/TD]
       [TD="align: right"]93620[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]3E:[/TD]
       [TD="class: xl24"]OR[/TD]
       [TD="align: right"]88797[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]8A:[/TD]
       [TD="class: xl24"](CON)[/TD]
       [TD="align: right"]75711[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]81:[/TD]
       [TD="class: xl24"]BL[/TD]
       [TD="align: right"]67896[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]95:[/TD]
       [TD="class: xl24"]OUTSET[/TD]
       [TD="align: right"]52968[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]83:[/TD]
       [TD="class: xl24"]8[/TD]
       [TD="align: right"]45504[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]9A:[/TD]
       [TD="class: xl24"]INPUTS[/TD]
       [TD="align: right"]44612[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]D6:[/TD]
       [TD="class: xl24"]FOR[/TD]
       [TD="align: right"]40936[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]4E:[/TD]
       [TD="class: xl24"]REV[/TD]
       [TD="align: right"]40899[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]8F:[/TD]
       [TD="class: xl24"]IN@[/TD]
       [TD="align: right"]40899[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]0D:[/TD]
       [TD="class: xl24"]0EXIT[/TD]
       [TD="align: right"]40758[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]B8:[/TD]
       [TD="class: xl24"]I[/TD]
       [TD="align: right"]31249[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]DC:[/TD]
       [TD="class: xl24"]LOOP[/TD]
       [TD="align: right"]29760[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]33:[/TD]
       [TD="class: xl24"]U/MOD[/TD]
       [TD="align: right"]25322[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]E6:[/TD]
       [TD="class: xl24"]>R[/TD]
       [TD="align: right"]18389[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]E9:[/TD]
       [TD="class: xl24"]R>[/TD]
       [TD="align: right"]18389[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]40:[/TD]
       [TD="class: xl24"]XOR[/TD]
       [TD="align: right"]17884[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]CA:[/TD]
       [TD="class: xl24"](ELSE)[/TD]
       [TD="align: right"]14896[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]36:[/TD]
       [TD="class: xl24"]NIP[/TD]
       [TD="align: right"]14068[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]84:[/TD]
       [TD="class: xl24"]1[/TD]
       [TD="align: right"]13773[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]BD:[/TD]
       [TD="class: xl24"]JUMP[/TD]
       [TD="align: right"]12982[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]88:[/TD]
       [TD="class: xl24"]ON[/TD]
       [TD="align: right"]12560[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]6C:[/TD]
       [TD="class: xl24"]W+![/TD]
       [TD="align: right"]12191[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]97:[/TD]
       [TD="class: xl24"]OUTCLR[/TD]
       [TD="align: right"]11604[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]C9:[/TD]
       [TD="class: xl24"](AGAIN)[/TD]
       [TD="align: right"]10571[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]68:[/TD]
       [TD="class: xl24"]C+![/TD]
       [TD="align: right"]10228[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]42:[/TD]
       [TD="class: xl24"]SHR[/TD]
       [TD="align: right"]9189[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]1C:[/TD]
       [TD="class: xl24"]3RD[/TD]
       [TD="align: right"]7028[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]77:[/TD]
       [TD="class: xl24"]CLR[/TD]
       [TD="align: right"]6362[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]8C:[/TD]
       [TD="class: xl24"](VAR)[/TD]
       [TD="align: right"]4288[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]4C:[/TD]
       [TD="class: xl24"]2*[/TD]
       [TD="align: right"]4170[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]82:[/TD]
       [TD="class: xl24"]16[/TD]
       [TD="align: right"]3716[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]25:[/TD]
       [TD="class: xl24"]ROT[/TD]
       [TD="align: right"]3078[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]BC:[/TD]
       [TD="class: xl24"]CALL[/TD]
       [TD="align: right"]2214[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]D7:[/TD]
       [TD="class: xl24"]>L[/TD]
       [TD="align: right"]1799[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]D9:[/TD]
       [TD="class: xl24"]L>[/TD]
       [TD="align: right"]1799[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]66:[/TD]
       [TD="class: xl24"]@[/TD]
       [TD="align: right"]1521[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]DB:[/TD]
       [TD="class: xl24"]+LOOP[/TD]
       [TD="align: right"]1489[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]07:[/TD]
       [TD="class: xl24"]STREND[/TD]
       [TD="align: right"]1260[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]FB:[/TD]
       [TD="class: xl24"]UM*[/TD]
       [TD="align: right"]1162[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]72:[/TD]
       [TD="class: xl24"]![/TD]
       [TD="align: right"]998[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]4A:[/TD]
       [TD="class: xl24"]2/[/TD]
       [TD="align: right"]816[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]76:[/TD]
       [TD="class: xl24"]SET[/TD]
       [TD="align: right"]801[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]D2:[/TD]
       [TD="class: xl24"]ADO[/TD]
       [TD="align: right"]467[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]7C:[/TD]
       [TD="class: xl24"](TRYTE)[/TD]
       [TD="align: right"]465[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]F3:[/TD]
       [TD="class: xl24"]DELTA[/TD]
       [TD="align: right"]465[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]31:[/TD]
       [TD="class: xl24"]NEGATE[/TD]
       [TD="align: right"]408[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]7B:[/TD]
       [TD="class: xl24"](LONG)[/TD]
       [TD="align: right"]271[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]2F:[/TD]
       [TD="class: xl24"]?NEGATE[/TD]
       [TD="align: right"]257[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]44:[/TD]
       [TD="class: xl24"]SHL[/TD]
       [TD="align: right"]221[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]3C:[/TD]
       [TD="class: xl24"]ANDN[/TD]
       [TD="align: right"]75[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]54:[/TD]
       [TD="class: xl24"]>N[/TD]
       [TD="align: right"]26[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]70:[/TD]
       [TD="class: xl24"]+![/TD]
       [TD="align: right"]17[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]50:[/TD]
       [TD="class: xl24"]MASK[/TD]
       [TD="align: right"]8[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]C0:[/TD]
       [TD="class: xl24"]ZCALL[/TD]
       [TD="align: right"]6[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]BF:[/TD]
       [TD="class: xl24"]VCALL[/TD]
       [TD="align: right"]4[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]F9:[/TD]
       [TD="class: xl24"]ABS[/TD]
       [TD="align: right"]4[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]2E:[/TD]
       [TD="class: xl24"]-NEGATE[/TD]
       [TD="align: right"]2[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]35:[/TD]
       [TD="class: xl24"]U/[/TD]
       [TD="align: right"]2[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]74:[/TD]
       [TD="class: xl24"]BIT![/TD]
       [TD="align: right"]2[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD="class: xl24"]EF:[/TD]
       [TD="class: xl24"]LAP[/TD]
       [TD="align: right"]1[/TD]
       [TD="class: xl26, align: right"]0[/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD][/TD]
       [TD][/TD]
       [TD][/TD]
       [TD][/TD]
       [TD][/TD]
      [/TR]
      [TR]
       [TD][/TD]
       [TD][/TD]
       [TD][/TD]
       [TD][/TD]
       [TD][/TD]
      [/TR]
     [/TABLE]
    [/TD]
    [TD="class: xl22, width: 80"][/TD]
    [TD="width: 80"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD="class: xl22"][/TD]
    [TD="class: xl22"][/TD]
    [TD="align: right"][/TD]
    [/TR]
    [TR]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [/TR]
    [TR]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [/TR]
    [/TABLE]
    
    
  • base2designbase2design Posts: 78
    edited 2014-06-10 - 17:51:03
    Hey all. Finally spending some quality time with Tachyon and having fun. I've "transliterated" a small piece of Jason Dorie's Nokia 5110 spin LCD driver from OBEX (http://obex.parallax.com/objects/700/) to TF. I'm not versed in TF's idioms for things like SPI so this is the best I could do so far. Any tips from TF'ers to make this better?
    \ establish pin settings
    0 CONSTANT RST
    1 CONSTANT SCE
    2 CONSTANT DC
    3 CONSTANT SDIN
    4 CONSTANT SCLK
    pub _write ( data -- )
        8 0 DO DUP
            7 I - SHR 1 AND SDIN PIN!
            SCLK DUP
            PINCLR
            PINSET
        LOOP
        SCE PINSET DROP
    ;
    pub cwrite ( data -- ) SCE PINCLR 0 DC PIN! _write ;
    pub dwrite ( data -- ) SCE PINCLR 1 DC PIN! _write ;
    pub goto ( x y -- )
        $40 + cwrite
        $80 + cwrite
    ;
    pub clear ( byte -- )
        0 0 goto
        $1F8 0 DO DUP dwrite LOOP
    ;
    pub init ( -- )
        \ make pins high before setting direction
        RST  PINSET
        SCE  PINSET
        DC   PINSET
        SDIN PINSET
        SCLK PINSET
        \ set pins to outputs
        RST  MASK OUTSET
        SCE  MASK OUTSET
        DC   MASK OUTSET
        SDIN MASK OUTSET
        SCLK MASK OUTSET
        \ reset the lcd
        RST PINCLR
        RST PINSET
        $21 cwrite \ PD=0=active, V=0=normal mode, H=1=extended commands follow
        $C8 cwrite \ Vop=$48 (contrast)
        $06 cwrite \ Temp=$02
        $12 cwrite \ Bias=$02
        $20 cwrite \ PD=0=active, V=0=normal mode, H=0=normal commands follow
        $0C cwrite \ DE=10=normal display
        \ for testing only use the next two inits
        \ $0D cwrite \ DE=11=inverse
        \ $09 cwrite \ DE=01=all segments on
        0 clear
    ;
    
  • Peter JakackiPeter Jakacki Posts: 9,360
    edited 2014-06-10 - 19:44:08
    Hey all. Finally spending some quality time with Tachyon and having fun. I've "transliterated" a small piece of Jason Dorie's Nokia 5110 spin LCD driver from OBEX (http://obex.parallax.com/objects/700/) to TF. I'm not versed in TF's idioms for things like SPI so this is the best I could do so far. Any tips from TF'ers to make this better?
    \ establish pin settings
    0 CONSTANT RST
    1 CONSTANT SCE
    2 CONSTANT DC
    3 CONSTANT SDIN
    4 CONSTANT SCLK
    pub _write ( data -- )
        8 0 DO DUP
            7 I - SHR 1 AND SDIN PIN!
            SCLK DUP
            PINCLR
            PINSET
        LOOP
        SCE PINSET DROP
    ;
    pub cwrite ( data -- ) SCE PINCLR 0 DC PIN! _write ;
    pub dwrite ( data -- ) SCE PINCLR 1 DC PIN! _write ;
    pub goto ( x y -- )
        $40 + cwrite
        $80 + cwrite
    ;
    pub clear ( byte -- )
        0 0 goto
        $1F8 0 DO DUP dwrite LOOP
    ;
    pub init ( -- )
        \ make pins high before setting direction
        RST  PINSET
        SCE  PINSET
        DC   PINSET
        SDIN PINSET
        SCLK PINSET
        \ set pins to outputs
        RST  MASK OUTSET
        SCE  MASK OUTSET
        DC   MASK OUTSET
        SDIN MASK OUTSET
        SCLK MASK OUTSET
        \ reset the lcd
        RST PINCLR
        RST PINSET
        $21 cwrite \ PD=0=active, V=0=normal mode, H=1=extended commands follow
        $C8 cwrite \ Vop=$48 (contrast)
        $06 cwrite \ Temp=$02
        $12 cwrite \ Bias=$02
        $20 cwrite \ PD=0=active, V=0=normal mode, H=0=normal commands follow
        $0C cwrite \ DE=10=normal display
        \ for testing only use the next two inits
        \ $0D cwrite \ DE=11=inverse
        \ $09 cwrite \ DE=01=all segments on
        0 clear
    ;
    

    The built-in SPI instructions were created to make things like this a breeze, and also fast. Also the PINxxx and OUTxxx instructions always set the pin to an output as there is no sense in not making it an output, so there is never a need to explicitly set a pin to an output. Also a good technique to use in any language is not to have multiple routines which basically do the same thing, such as cwrite and dwrite, but have one and just pass the parameter as to which you want, in this case it was a simple 1 or 0 to say whether it was data or control.

    Tachyon Forth also allows code "fall-through" in that if you don't place a semi-colon at the end of the definition then it won't exit but execute the next instruction of the next defintion and all TF code is code, there are no code field pointers in the way. So rather than saying 1 lcdwr for characters it just passes the character to lcdch which pushes a 1 and falls through to lcdwr. Of course I could have made 0 lcdwr work like that instead.

    Here's my take:
    [FONT=courier new]\ establish pin settings
    0 == RST
    1 == SCE
    2 == DC
    3 == SDIN
    4 == SCLK
    
    
    pub lcdch ( char -- ) 1
    pub lcdwr ( data reg -- ) DC PIN! SCE PINCLR SPIWRB DROP SCE PINSET ;
    
    pub goto ( x y -- )
        $40 + 0 lcdwr
        $80 + 0 lcdwr
    ;
    pub clear    0
    pub lcdfill ( byte -- ) --- it's not really a clear since you specify the character to fill it with
        0 0 goto
        $1F8 FOR DUP lcdch NEXT
        DROP
    ;
    pub init ( -- )
        \ make pins high before setting direction
        RST  PINCLR --- Note* PINxxx and OUTxxx always makes the pin an output
        SCE  PINSET
        DC   PINSET
        SDIN PINSET
        SCLK PINSET
        SDIN |< 8 SHL SCLK |< + SPIPINS --- setup masks for SPIWR
        \ reset the lcd
        RST PINSET --- now release RST which generated a longer reset
        $21 0 lcdwr \ PD=0=active, V=0=normal mode, H=1=extended commands follow
        $C8 0 lcdwr \ Vop=$48 (contrast)
        $06 0 lcdwr \ Temp=$02
        $12 0 lcdwr \ Bias=$02
        $20 0 lcdwr \ PD=0=active, V=0=normal mode, H=0=normal commands follow
        $0C 0 lcdwr \ DE=10=normal display
        \ for testing only use the next two inits
        \ $0D 0 lcdwr \ DE=11=inverse
        \ $09 0 lcdwr \ DE=01=all segments on
        clear
    ;[/FONT]
    

    BTW, the multiple PINSET operations in init could all be replaced with a single OUTSET.
    BTW, glad to hear you are having fun!

    BTW, try this and have some more fun.
    --- configure LCD as a regular output device (improved output could use control character handling)
    : LCD    ' lcdch uemit W! ;
    init
    LCD PRINT" HELLO WORLD" CON
    

  • base2designbase2design Posts: 78
    edited 2014-06-11 - 21:48:24
    Thanks for the code review Peter.

    I've been having some trouble making sense of the SPI words but searched the forum and learned how they worked (at least in theory) and did have to adjust a few things: SPIPINS in your example doesn't set CE (SCE in my code) and instead I did:
    SCE 16 SHL 3 + 8 SHL SCLK + SPIPINS --- setup masks for SPIWR (no MISO hence the "16 SHL" to skip that byte)
    

    *** It seems my logic analyzer compared with the speed of this routing was resulting in "sub-par" logic levels for the device. Removing the analyzer pins yields flawless writes and blazing pixel updates! Nice work! ***

    The LCD device I have might not be able to keep up with the rate your code pumps out the bits. I've looked at the output of "init" with a logic analyzer and it looks like proper SPI (albeit @ 4MHz instead of ~35KHz in my code). My LCD "mostly" displays the bytes I write to it but one sure sign writes are getting dropped is that a "lcdfill" doesn't fill the entire screen with the bit pattern I specify, leaving approximately 10 or so bytes of the last row untouched. Short of re-writing SPIWR, is there a way to throttle this to a lower speed?

    One thing that did bother me after looking at the analyzer output was that the SCE and SCLK lines seem to come up in a random state after SPIPINS... is this normal? I resorted to setting the pins to the desired start state after SPIPINS to compensate.

    As far as vectoring "lcdch" to "uemit" in your printing examples, this doesn't work on the Nokia 5110 style displays, as they have no built-in fonts... and are instead arranged as 84 bytes 6 rows high (yielding a display 84 pixels by 48 pixels), so each "lcdch" puts a 1 pixel wide by 8 pixels high on the display.

    The picture @ http://thegaragelab.com/galleries/microboard/nokia_lcd_memory.png might explain it better than my words.

    Thanks again for your guidance... I'm slowly working up to getting SIDcog into TF and this LCD interfacing is giving me nice visual feedback for learning.
  • Peter JakackiPeter Jakacki Posts: 9,360
    edited 2014-06-11 - 22:51:48
    Thanks for the code review Peter.

    I've been having some trouble making sense of the SPI words but searched the forum and learned how they worked (at least in theory) and did have to adjust a few things: SPIPINS in your example doesn't set CE (SCE in my code) and instead I did:
    <snip>
    Thanks again for your guidance... I'm slowly working up to getting SIDcog into TF and this LCD interfacing is giving me nice visual feedback for learning.

    Actually SPI instructions don't require a chip enable so it's quite redundant as you might not want the CE to return high after a transfer. You could just set the masks manually with:
    SCLK |< @SPISCK COGREG!
    SDIN |< @SPISCK 1+ COGREG!
    So doing it this way means it won't try to set these pins low during setup.
    Of course the easy way to throttle the SPI is simply to insert a delay after each write since the actual clock speed seems to work, it's just the transfer rate that needs to be reduced.
    So if the clear loop is too fast just try this (adjust delay if necessary):
    pub lcdwr ( data reg -- ) DC PIN! SCE PINCLR SPIWRB DROP #10 us SCE PINSET ;

    If you added a character generator word then LCD could be made to work like a regular output word. I've done similar things with VGA and graphic LCDs. Let me know if you need some tips with that and also SIDCOG.

    BTW, just found the datasheet for the PCD8544 chip and it does work to 4Mbit okay and there is no mention of having to slow it down anywhere.
    According to the datasheet it's possible to transmit several bytes in which case a clear screen function would simply be:
    0 0 goto SCE PINCLR 0 $1F8 FOR SPIWR NEXT DROP SCE PINSET
    which would only take 1.4ms to clear the whole screen!
  • D.PD.P Posts: 790
    edited 2014-06-11 - 23:00:27
    Been trying to get this first ethernet driver to compile, seems to be just the lack of COGREGS word in the current kernel.

    Looks like I can just assign the pins without this I guess.

    Since you are talking SPI above anything else I should look for.

    Would like to bring the few spinnerets I bought to life with a 2.3 kernel.
  • Peter JakackiPeter Jakacki Posts: 9,360
    edited 2014-06-11 - 23:17:39
    D.P wrote: »
    Been trying to get this first ethernet driver to compile, seems to be just the lack of COGREGS word in the current kernel.

    Looks like I can just assign the pins without this I guess.

    Since you are talking SPI above anything else I should look for.

    Would like to bring the few spinnerets I bought to life with a 2.3 kernel.

    Pretty sure that we should just be able to take W5200.fth and convert it down to suit the W5100. I may have some time tonight so I will have a look. The old COGREGs word was replaced with SETPINS which is used by SPIPINS and MODPINS.
    Passing a mask to specify up to 4 pin is handy but I may add words that allow us to specify the 4 parameters like this:
    myCE mySI mySO myCK SPIPINS
    and then for the mask I would:
    mySPIMASK SPIMASK
  • MJBMJB Posts: 1,167
    edited 2014-06-12 - 04:53:42
    Pretty sure that we should just be able to take W5200.fth and convert it down to suit the W5100. ....
    Migration from W5100 to W5200
    http://openmicrolab.com/wp/wp-content/uploads/1/cfile3.uf.1221F0404EE59A7B11507B.pdf

    Impressive the 80 instead 4 MHz SPI clock and 32 instead of 16kB RAM + 8 Sockets

    Changes: Different SPI command format, so driver is not fully compatible.


    +OSYmBpSkxuxvY2Pj4uISGRnp5eVlaWkZEBD
    529 x 479 - 70K
  • Peter JakackiPeter Jakacki Posts: 9,360
    edited 2014-06-12 - 06:11:31
    MJB wrote: »
    Migration from W5100 to W5200

    Yes, I looked back at my W5100 code but other than half the memory and sockets which is not important the only real difference is the SPI framing in that W5100 always operates in 32-bit transfer mode which included the address each time, slow but sure. So I have started by copying the W5200.fth file into W5100.fth and changing the SPI interface layer using the newer SPI instructions that are part of the primary bytecode instructions. The W5200 is a lot snappier, especially if I get around to running at a faster SPI rate later but I also have the W5500 to do too, and that very soon.
  • D.PD.P Posts: 790
    edited 2014-06-12 - 10:05:17
    Yes, I looked back at my W5100 code but other than half the memory and sockets which is not important the only real difference is the SPI framing in that W5100 always operates in 32-bit transfer mode which included the address each time, slow but sure. So I have started by copying the W5200.fth file into W5100.fth and changing the SPI interface layer using the newer SPI instructions that are part of the primary bytecode instructions. The W5200 is a lot snappier, especially if I get around to running at a faster SPI rate later but I also have the W5500 to do too, and that very soon.

    Okay, I've got the 5100 compiling with a V2.3 kernel and will test it later today. This will work okay until the new driver/s are ready. Appreciate the efforts.
  • MJBMJB Posts: 1,167
    edited 2014-06-12 - 10:22:05
    D.P wrote: »
    Okay, I've got the 5100 compiling with a V2.3 kernel and will test it later today. This will work okay until the new driver/s are ready. Appreciate the efforts.
    D.P wrote: »
    Okay, I've got the 5100 compiling with a V2.3 kernel and will test it later today. This will work okay until the new driver/s are ready. Appreciate the efforts.
    just had my first experiments with SD/EASYFILE working - great

    D.P. I'd love to have a look on the changes you made in the W5100.fth file
    My Spinneret still is waiting ...
    Have you thought about using the parallel interface?
    Since it is hardwired on the spinneret, it is of no other use anyhow.
    And should be quite faster than SPI. (just realized W5200 is up to 80MHz SPI vs. 4MHz the W5100 - which is 20!!)
    Parallel could give a speedup by 10 I would guess.
  • Peter JakackiPeter Jakacki Posts: 9,360
    edited 2014-06-12 - 19:44:25
    MJB wrote: »
    just had my first experiments with SD/EASYFILE working - great

    D.P. I'd love to have a look on the changes you made in the W5100.fth file
    My Spinneret still is waiting ...
    Have you thought about using the parallel interface?
    Since it is hardwired on the spinneret, it is of no other use anyhow.
    And should be quite faster than SPI. (just realized W5200 is up to 80MHz SPI vs. 4MHz the W5100 - which is 20!!)
    Parallel could give a speedup by 10 I would guess.

    Yes, it might be worthwhile to use the parallel interface considering that the pins are already dedicated on the Spinneret then. So there's no reason why a Spinneret couldn't be used as a webserver as well as FTP an Telnet. I've just added the extra STOR functionality to FTP to allow me to upload files so I have been playing with editing the home page on LibreOffice and then FTPing up to the Prop after which I can view it.

    BTW, the W5200 is quoted as running up to 80MHz SPI but I understand that around 33MHz is the tested limit. Same goes for the W5500 but I will be looking at a tight coupling with P2 to achieve full theoretical speed if possible.
  • D.PD.P Posts: 790
    edited 2014-06-12 - 20:04:41
    Was about to try my hacked W5100 WizNet.fth driver with a current kernel: V2.3 140606-2000 and the current Extend.fth, but after loading extend before BACKUP it goes into a reboot boot loop until I press reset.

    This is on a spinneret. I've been working with 2.1 kernels with no problem, also the V2.3 kernel seems fully functional as well?
  • Peter JakackiPeter Jakacki Posts: 9,360
    edited 2014-06-12 - 20:13:25
    D.P wrote: »
    Was about to try my hacked W5100 WizNet.fth driver with a current kernel: V2.3 140606-2000 and the current Extend.fth, but after loading extend before BACKUP it goes into a reboot boot loop until I press reset.

    This is on a spinneret. I've been working with 2.1 kernels with no problem, also the V2.3 kernel seems fully functional as well?

    Can't see why you would be having that problem but I've updated the Dropbox files just in case. There was one little thing to do with constants that relied on the position of the bytecode for a constant but other than that it should be fine. EXTEND.fth was modified to detect this though.
  • D.PD.P Posts: 790
    edited 2014-06-12 - 20:18:21
    Can't see why you would be having that problem but I've updated the Dropbox files just in case. There was one little thing to do with constants that relied on the position of the bytecode for a constant but other than that it should be fine. EXTEND.fth was modified to detect this though.

    I'll give it a try and postback.

    UPDATE: no joy
    ropeller .:.:--TACHYON--:.:. Forth V23140606.2000
    
    ropeller .:.:--TACHYON--:.:. Forth V23140606.2000
    
    ropeller .:.:--TACHYON--:.:. Forth V23140606.2000
    
    ropeller .:.:--TACHYON--:.:. Forth V23140606.2000
    
    ropeller .:.:--TACHYON--:.:. Forth V23140606.2000
    
    ropeller .:.:--TACHYON--:.:. Forth V23140606.2000
    
    ropeller .:.:--TACHYON--:.:. Forth V23140606.2000
    
    ropeller .:.:--TACHYON--:.:. Forth V23140606.2000
    
  • D.PD.P Posts: 790
    edited 2014-06-12 - 20:29:22
    My feeling is that the I2C bus is really "busy" with items on the spinneret and maybe the new I2C stuff is wonky on this board?

    "140602 Add in delays into I2CSTART and I2CSTOP, add timeout for @EEWAIT."
  • Peter JakackiPeter Jakacki Posts: 9,360
    edited 2014-06-12 - 20:36:29
    D.P wrote: »
    My feeling is that the I2C bus is really "busy" with items on the spinneret and maybe the new I2C stuff is wonky on this board?

    "140602 Add in delays into I2CSTART and I2CSTOP, add timeout for @EEWAIT."

    I'll fire up the Spinneret and get back to you
  • Peter JakackiPeter Jakacki Posts: 9,360
    edited 2014-06-12 - 20:58:31
    I didn't have any problems but I loaded in the file system as well and made an image for the Spinneret which you can find in the Dropbox folder.
  • D.PD.P Posts: 790
    edited 2014-06-12 - 21:06:23
    I didn't have any problems but I loaded in the file system as well and made an image for the Spinneret which you can find in the Dropbox folder.

    Well that worked just fine? Thanks.
  • MJBMJB Posts: 1,167
    edited 2014-06-13 - 00:15:39
    I had a look at Peters W5200.fth, Spinneret schema and W5100 datasheet.

    To me it looks like there are only minor changes/additions required.

    replace those low level routines with parallel ones:

    The single read / write

    \ Write to the WIZnet register via SPI
    pub WIZX! ( data address cnt -- )

    \ Read from the WIZnet register via SPI
    pri WIZX@ ( address cnt -- data )

    and the block read / write

    \ Read a block of memory from the WIZnet
    pub LREAD ( src dst cnt -- )

    \ Write a block to the WIZnet - 3.2ms/512 bytes = = 6.25us/byte = 160kB/sec
    pub LWRITE ( src dst cnt -- )

    and an Init:

    \ Init the SPI for the WIZnet chip
    pub !WIZIO

    Clean layering has it's benefits ;-)

    The block operations can be done with the fast auto increment mode of the indirect address mode.


    ##### in WIZNET.fth for the W5100 I see:

    \ Write to the WIZnet register via SPI
    pub WIZ! ( data address -- )

    \ Read from the WIZnet register via SPI
    pub WIZ@ ( address -- data )

    \ Init the SPI for the WIZnet chip
    pub !WIZIO


    Peter, do I miss anything?

    D.P. did you notice s.h. relevant?
  • Peter JakackiPeter Jakacki Posts: 9,360
    edited 2014-06-13 - 00:24:30
    MJB wrote: »
    I had a look at Peters W5200.fth, Spinneret schema and W5100 datasheet.

    To me it looks like there are only minor changes/additions required.

    replace those low level routines with parallel ones:

    ---

    Peter, do I miss anything?

    D.P. did you notice s.h. relevant?

    That's basically it and later on I will probably transfer the block send routines from easynet over to the drivers instead. I will send you a link to the new W5100.fth which I haven't started working with yet but just setting up the page which was copied from W5200.fth.
Sign In or Register to comment.