New features on v3.63.0

66 views
Skip to first unread message

The Beez

unread,
Oct 30, 2017, 2:31:35 PM10/30/17
to 4tH-compiler
Hi 4tH-ers!

We've been pretty busy! First during a chat with Ron Aaron, author of the wonderful 8th compiler, I got an idea. What if I made the symbol table part of the 4tH structure? You could do cool things like:

4tH message: No errors at word 76
Object size: 76 words
String size: 85 chars
Variables  : 1 cells
Strings    : 0 chars
Symbols    : 9 names
Reliable   : Yes

  Addr| Opcode                        Operand   Argument

     0| branch                             14   enter
     1| refill                              0
     2| drop                                0
     3| literal                            32
     4| dup                                 0
     5| omit                                0
     6| parse                               0
     7| number                              0
     8| literal                   -2147483648
     9| over                                0
    10| =                                   0
    11| 0branch                            13
    12| drop                                0
    13| branch                              0   enter
    14| exit                                0
    15| branch                             25
    16| value                               0   seed
    17| *                                   0
    18| +                                   0
    19| dup                                 0
    20| to                                  0   seed
    21| literal                           -16
    22| shift                               0
    23| literal                         32767
    24| and                                 0
    25| exit                                0
    26| branch                             29   random
    27| literal                         12345
    28| literal                    1103515245
    29| branch                             15
    30| branch                             33   MSrandom
    31| literal                       2531011
    32| literal                        214013
    33| branch                             15
    34| branch                             37   randomize
    35| time                                0
    36| to                                  0   seed
    37| exit                                0
    38| branch                             73   guesses
    39| call                               34   randomize
    40| call                               26   random
    41| literal                            10
    42| mod                                 0
    43| +literal                            1
    44| swap                                0
    45| ."                                  0   Guess a number between 1 and 10
    46| cr                                  0
    47| dup                                 0
    48| 0branch                            68
    49| over                                0
    50| call                                0   enter
    51| over                                0
    52| over                                0
    53| =                                   0
    54| 0branch                            59
    55| literal                             1
    56| use                                 0
    57| ."                                 32   Guessed!
    58| cr                                  0
    59| quit                                0
    60| ."                                 41   Too
    61| >                                   0
    62| 0branch                            64
    63| ."                                 46   small
    64| branch                             65
    65| ."                                 52   big
    66| cr                                  0
    67| +literal                           -1
    68| branch                             46
    69| drop                                0
    70| ."                                 56   You didn't guess it, it was
    71| .                                   0
    72| cr                                  0
    73| exit                                0
    74| literal                             3
    75| call                               38   guesses


Yes! Append labels to already compiled code. Note it only works for things that do NOT compile to a literal, but those are quite a few. As you can see, I updated the report itself (unchanged since 1994) as well.

And we applied a few fixes that boost the compilation performance with 25%! Yes, even on my simple P4, 4tH compiles with a rate of 10 MILLION lines per minute.

Keep you posted! And code in SVN.

Hans Bezemer

Ron K. Jeffries

unread,
Oct 30, 2017, 8:28:21 PM10/30/17
to 4th-co...@googlegroups.com
I didn't realize using a Pentium 4 was still legal. 

😎
Ron K Jeffries

--
You received this message because you are subscribed to the Google Groups "4tH-compiler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 4th-compiler+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

The Beez

unread,
Oct 31, 2017, 4:31:42 AM10/31/17
to 4tH-compiler


On Tuesday, October 31, 2017 at 1:28:21 AM UTC+1, rjeffries wrote:
I didn't realize using a Pentium 4 was still legal. 
Well, it isn't here in Holland, but I'm the leader of a ring of P4 rebels that keeps the platform alive. There getting closer, but they haven't caught us yet? Wait, who is knocking on the door at this hour? I'll be right back.

Hans Bezemer
Reply all
Reply to author
Forward
0 new messages