Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

The TERSE Programming Language

395 views
Skip to first unread message

Jim Neil

unread,
Sep 4, 1996, 3:00:00 AM9/4/96
to

Eric-

>From: kor...@albert.ssl.berkeley.edu (Eric J. Korpela)
>>In article <507m1i$k...@ddi2.digital.net>,
>>Jim Neil <jim-...@digital.net> wrote:

Thanks for at least giving TERSE a look. However, you are under
a missimpression about the syntax of the language that I would like
to clear up:

>>
>> es = ax = 0A000h; \ Mov ax,0A000h; Mov es,ax;
>> =ax =bx =cx; \ Push ax; Push bx; Push cx;
>> ax= bx= cx=; \ Pop cx; Pop bx; Pop ax;
>>
>
>In this I see two reasons that I'll never use Terse.
>
>1) I'll never use a language that requires operators to be spaced properly
> from their operands. (MAGIC/L taught me that). A spelling error could
> make line 2: (assuming this is legal)
> =ax =bx = cx; \ Push ax; Push bx; Mov bx,cx; ?????


The use of the 'spaces' around the operators is PURELY a STYLISTIC
one of MINE. TERSE is a TOTALLY FREE FORMAT LANGUAGE that requires
NO SPACES ANYWHERE in the language. I could have written the above
example like this (but it think it is hard to read IMO:


es=ax=0A000h;=ax=bx=cx;ax=bx=cx=; \ Mov ax,0A000h; Mov es,ax;
\ Push ax; Push bx; Push cx;
\ Pop cx; Pop bx; Pop ax;

>2) I'll never use a language that evaluates different operators in a
> different order in a compound statement. i.e.
> =ax =bx =cx; \ Should be push cx; push bx; push ax;

This point could be argued. I did it this way on purpose. Over
the MANY years of writing assembly language, I found there were
several 'mistakes' that I made again and again. When I created TERSE
I tried to "help" myself (and hopefully others) to avoid these
"common" errors. One of these was getting my pushes and pops
out-of-order.

When I write a subroutine, I typically save the necessary registers,
write the 'body' of the routine, and then restore the registers. I
found that copying the pushes at the beginning to the bottom and then
changing the "Push" to a "Pop" and then REORDERING them was both time
consuming and error prone. So when I designed TERSE I made it simple
to grab the pushes and 'convert' them to pops WITHOUT ANY RISK of
introducing any 'ordering' mistakes. By allowing the compiler to do
the work of 'reversing' the order of the operations I was able to
acheave the desired result.

Here is an example of what I mean:

=ax=bx=cx; \ save regs.
... \ some code...
ax=bx=cx=; \ restore the regs.

It is really pretty simple. Note that the spaces are NOT used in
this example. It is very common for languages to alter the order
of operations. It is just a matter of "learing the rules" before
you become 'comfortable' with them. For example, most HLLs will
reorder the following statement:

v0 = v1 + v2 * v3 + v4 - v5 / v6;

I assume you don't have any 'problem' with this re-ordering. I'm
sure you would 'argue' that "this is a 'natural re-ordering'". I
would argue that it is 'natural' ONLY because it has been drummed
into your head since grammer school.

>Good luck with it [TERSE] anyway.

Thanks. I hope you will reconsider TERSE. Perhaps if you
learned a bit more about it, you wouldn't jump to incorrect
conclusions about it. I'm sorry if my "style" was misinterperted
as a "requirement" of the language, but I've NEVER liked languages
that *required* any kind of spacing around the operators either.

>Eric
>
>--
>Eric Korpela | An object at rest can never be
>kor...@ssl.berkeley.edu | stopped.

Jim Neil ___ ___/ ____/ ___ / ____/ ____/
Creator of The / / / / / /
TERSE Programming Language / ___/ ___/ ____ / ___/
ISBN: 0-9652660-0-1 / / / \ / /
jim-...@digital.net __/ ______/ __/ __\ ______/ ______/ TM
http://www.terse.com

Jim Neil

unread,
Sep 4, 1996, 3:00:00 AM9/4/96
to

>jos...@value.net (Schol-R-LEA) wrote:

>One thing that hasn't been mentioned is that the idea is anything like
>original. Some versions of the Forth assembler allow 'shortcut'
>syntax, and a language called PL/Dave was kicking around about five
>years ago (actually, PL/Dave wasn't really an assembly code; it used a
>small set of common instructions (moves, compares, simple addition and
>logical functions) and had high-level control and data structuring
>contructs. Still, it mapped at a very low level). I'm sure that other
>systems like this have existed as well. I don't know if any of these
>influenced Terse, in fact I rather doubt it; I only point out that it
>is a fairly obvious idea, and for some people it may work well, but
>most assembly programmers, for whatever reason, won't go for it.

You're right, TERSE was NOT influenced by any of these languages.
It WAS influenced by ALL high-level languages I have used over the
years. I always wanted the look-and-feel and ease-of-use of a HLL
but at the same time I wanted the TOTAL control of assembly language.
TERSE give me that. I'm surprised to hear you say that 'most' won't
go for it with out stating any reasons. What are you basing this on?

>Of course, my interest here is purely incidental -its difficult to
>write compilers and OSes without a substantial asm background, as it
>so happens. I'm *mostly* a high-level programmer (worse, I sometimes
>*design* and *implement* languages, OO and functional languages at
>that) so I doubt that most assembly programmers will care much for
>what I have to say. ^_^;;

Ah, but we (I) DO care. I'd even like to suggest that now that
TERSE is available that you might consider entering the wonderful
world of machine level programming! :o)

Jim Neil

unread,
Sep 4, 1996, 3:00:00 AM9/4/96
to

>edp...@primenet.com (Ed Parry) wrote:
>Re: TERSE language
>
>Hi JN!

Hello!

>1) Do you only offer a commercial version, or do you have a shareware
>version so we can check it out ourselves without paying up front?

Well, I do have a "Toy TERSE Compiler" that I was sending out
for a while. My reasons for NOT sending it out any longer are:

1) Since TERSE is so different from anything else on the
market, many people have responded negatively to it
when they see it WITHOUT the manual.

2) The Toy version is VERY limiting. Although it is capable
of compiling the complete TERSE syntax, it limits you to
source program of under 100 lines. It is very hard to
write ANYTHING meaningful in under 100 lines of machine
level code.

3) I offer a Money Back Guarantee, so you get a RISK FREE
opportunity to 'test drive' the language *with* the benefit
of the manual. The manual is very clear and makes learning
TERSE very simple and straight forward. And, it's only
$49 (a lot less than other compilers).

>2) I commend you (anyone) for writing something that appears to be
>useful, but I must admit, from the source you've posted here, it DOES
>appear a bit cryptic to me.

Thank you. I knew when I decided to market TERSE that you guys
were perhaps the toughest most critical group of people in the
computer field. Don't take that the wrong way. I admire people
that are skeptical, doubting, cautious, and not willing to accept
things on faith. All good programmers either instinctively know,
or have learned, to be cautious and not to take ANYBODYS word for
ANYTHING. All I can ask for is a fair evaluation of my product
after a careful review. IMO, looking at a few examples without
the manual is NOT a careful review.

Cryptic? I believe MOST computer languages are cryptic to the
untrained eye. C has been criticized for being cryptic but coders
have accepted it. With C you are asked to accept the syntax on
faith. K&R offer no explanations for their choice of operators.
The TERSE manual gives you a *reason* for the selection of each
operator. These reasons make the learning and remembering much
simpler. With other languages I have always had to *guess* or
*make up* my OWN little memory aids. It would have been nice
to KNOW what the authors had in mind at the time they designed
their languages. I assume they DID have something in mind and
didn't just arbitrarily assign symbols to operations. ;-)

With TERSE you don't HAVE to use the parts you don't like. I
know of no other language that offers this flexibility/option. If
you don't like '==' for Xchg, don't use it. If you don't like
the fact that the semantics are reversed on Pops vs. Pushes, then
don't use that part of the language. If you use only the '='
for Mov and the Structured Flow Control features of the language
your code will be more writable, readable and maintainable.

>As an average ASM programmer at best, *I* would like to see something
>a bit more simplistic or BASIC like perhaps.

Perhaps if you take a 'closer' look, you might find that TERSE
*is* more simplistic than you think.

>3) Couldn't macro's offer a lot of the syntax that TERSE offers?

No. TTBOMK, macros don't allow you to do ANYTHING that TERSE
offers. Macros (as they are defined in the popular assemblers)
don't give you the ability to:

1) Use SYMBOLS as prefix, infix and postfix operators.
2) Place multiple statements on a line.
3) Create compound statements using an implied work register.
4) Define Structured Flow Control Blocks with curly braces.

Also by using MACROS, each programmer can alter the way the
macros work. TERSE offers a *standard* for programmers to use
as a common method of communicating their ideas, both to the
machine and to each other. Standards can be a very good thing.
I am making a commitment to the programming community to maintain
this standard. It has and will remain unchanged. TERSE was
designed in 1986, implemented in 1987 and has remained unaltered
ever since. But, that doesn't mean it will become out-of-date.
As more and new instructions are added to the processor, TERSE
gives you access to them. If your assembler can assemble it,
you can access it with TERSE.

>Not flaming, just asking - eP

Not taken as a flame. I appreciate the opportunity to clarify
some of the misconceptions about TERSE. I have no way of knowing
what is 'clear' and what is not unless I hear about it from you,
the programming public. You can be sure I will help clarify
any misconceptions about TERSE in the future. As more and more
of you start using TERSE, everything will become as natural as
any other computer language you are currently familiar with.

If you haven't already, please visit my Website for more
information and a brief history of TERSE. The URL is:

http://www.terse.com

Thank you.

Jim Neil

unread,
Sep 4, 1996, 3:00:00 AM9/4/96
to

>jco...@taeus.com (Jerry Coffin) wrote:

Jerry-

>I had meant to mention this - an even closer example that the ones you
>give was a set of macros from one of the assemblers on the Apple II
>(sorry, but I don't recall the name anymore) that was very similar to
>this, allowing things like substituting `a=x' for `txa'. Overall, my
>impression of it (gleaned only from advertisements) was that it
>attempted to look quite a bit like BASIC. While the core idea of
>TERSE may not be original, I have to admit that the source code for it
>doesn't look like any other programming language I've ever seen.
>(Though it's likely closer to APL than anything else.)

Thanks. I'm not sure I think being compared to APL is
favorable or not. Two MAJOR differences:

1) APL was/is a VERY high-level language. TERSE is a VERY
low-level language.

2) APL used a 'special' character set that required special
hardware (teletypes) to use. TERSE us defined using the
standard ascii character set, just like C and other HLLs.

>For work I do quite a bit of reverse engineering, which typically
>involves working at the assembly level. However, it's been a long
>time since I wrote a large program purely in assembly.

Me too. I believe the days of 'all assembly/TERSE' programs
are gone forever. I do feel there is a need for the occational
function/routine to be 'down-coded' for speed. All the more
reason to use TERSE. Because it has a more high-level look-and-
feel, switching to it instead of 'pure' assembly should be a more
natural transition for those who spend the bulk of their time
in a high-level world.

>--
> Later,
> Jerry.

Jim Neil

unread,
Sep 4, 1996, 3:00:00 AM9/4/96
to

>jco...@taeus.com (Jerry Coffin) wrote:

Jerry-

>> So, is that a reason for not using Terse?
>
>Perhaps not a reason to avoid it, but merely a correction in
>terminology?

I call it a compiler, he calls it a translator, what is the
difference? Where is the definition of these thing written in
stone? I used compiler writing techniques I learned in college
and in 25 years of real world experience to implement TERSE. So,
I call it a compiler and I make no apologies for it.

>> By reading the manual. It's strange that you as an assembler code
>> are worried about cryptic syntax.
>
>I think it's reasonable to hope that something meant to be a
>replacement (more or less) be an improvement, not a step backwards.

I feel Ruben's reply here is a valid one. Once you read the
manual you'll see the *logic* behind the choice of operators. If
you haven't read it, I'm sure it looks foreign to you and everybody
else who hasn't.

>> You should know it's not that hard to adapt to a new very limited
>> syntax... especially when there's a consistent philosophy behind it.

>At one time I managed to adapt to the extremely consistent philosophy
>that all instructions and data were entered by toggling them in on a
>front-panel in binary. I'm sure if I _had_ to, I could do so again,
>but certainly wouldn't advocate it as an improved method of
>programming.

How true. The fact that people put up with MASM/TASM proves
this point very well (IMHO). People can get used to (and end up
liking) ANYTHING.

>> If you want plain readable English code try Pascal. If you want to
>> see a program's structure and flow I say Terse definitely beats
>> assembler.

>Hopefully you'll agree that something may appear to be an improvement
>to you, but not to others?

Of course. Matters of taste should not be argued.

[snip]
>What makes you say that? It sounds to me like he's simply interested
>in knowing what they are. Frankly, I'm curious as well.

I hope you have seen my answers to this and that it satisfied
your curiosity.

>Personally, I like the idea of TERSE quite a bit. I think some parts,
>like replacing `mov' with an assignment operator, are excellent ideas.
>However, I have to agree with Tenie that some parts don't seem like
>great improvements.

With TERSE you can "be as terse as you like". The parts that
don't suit your 'taste' you don't HAVE to use. TERSE allows you
to intermix standard assembly right along with your TERSE statements.

>Jim strikes me as secure enough in the knowledge that he's a damn
>good programmer that he won't take all questions and suggestions as
>personal attacks.

You are correct. I DON'T take ANY of these comments with any
amount of negativity. I know they are NOT personal attacks. I
MUST say however that it made me feel pretty good to see somebody
else defend me and my language. I thank Ruben and ALL those who
responded by private E-Mail for their support and complements.

[snip]

>>From what I've seen, I'd say that Tenie usually has excellent
>suggestions, but has few illusions about being perfect. Leaving the
>suggestions and questions in the open allows others to contribute
>further suggestions as well as (perhaps) learn more about why Jim
>made the decisions he did.

I agree, Tenie is a VERY smart guy. TERSE is foreign to him
(and everybody else). It takes a while for *new* ideas to become
accepted. This forum has offered me an opportunity to have a
discussion about TERSE and explain EXACTLY why I made the
decisions I did. I hope that in doing so, some of you can better
understand why TERSE is the way it is. There seems to be a bit
of confusion about some points and I hope I have clarified them.
If anybody else has any other questions, please let me know and I'll
respond as soon as I can. BTW, my news server sucks, so if you
would CC E-Mail me anything you post, I'll get it!

>Both Tenie and Jim Neil impress me as consistently and regularly
>providing help and information to many other participants of this
>newsgroup. I wish I could claim that my own posts were as
>consistently helpful, positive or even just correct, as either of
>their's.

Now I'm blushing. Thank you. I DO make every attempt to be
helpful and thorough in my replies. I've made a couple of mistakes
in the past and have learned from them. I'm not perfect and don't
pretend to be. I only wish that news groups had been around when
I was first learning. It would have been nice to be able to ask
a question now and then.

Christian Ludloff

unread,
Sep 4, 1996, 3:00:00 AM9/4/96
to Jim Neil

Hello Jim Neil,

what do you think about a newsgroup for TERSE? Seriously.

--
Christian Ludloff [Intel's log, stardate 10/30/1994] We are Pentium (TM)
lud...@anet-dfw.com of borg. Division is futile. You will be approximated.

Speaking for myself. Any trademark is the property of the respective owner.

Schol-R-LEA

unread,
Sep 5, 1996, 3:00:00 AM9/5/96
to

jim-...@digital.net (Jim Neil) was baying at the moon about:

<mention of PL/Dave clipped>

> You're right, TERSE was NOT influenced by any of these languages.
>It WAS influenced by ALL high-level languages I have used over the
>years. I always wanted the look-and-feel and ease-of-use of a HLL
>but at the same time I wanted the TOTAL control of assembly language.
>TERSE give me that. I'm surprised to hear you say that 'most' won't
>go for it with out stating any reasons. What are you basing this on?

On the fact that a) most have been trained to work with assembly
language in a particular way, and b) your language, contrary to the
purpose of assembly language, seperates the programmer from the
direct, instruction by instruction nature of assembly language. Even
though each instruction has its own command, its still a higher level
language than assembly, defeating the purpose of using assembly
langauge in the process. The standard intstruction codes, opaque as
they are, can be *directly* compared, byte for byte, to the machine
code generated. the source of TERSE cannot be, without additional
'deciphering'. Given the availability of compilers than are far more
efficient than most hand-coding, the only reasonable purposes for
assembly coding are for either ultra-optimization or direct access to
facilities unreachable by compiled code. In either case, the
programmer needs to see *exactly* what he is doing, even to the level
of the specific op-codes generated in some cases. TERSE won't do that.

>>Of course, my interest here is purely incidental -its difficult to
>>write compilers and OSes without a substantial asm background, as it
>>so happens. I'm *mostly* a high-level programmer (worse, I sometimes
>>*design* and *implement* languages, OO and functional languages at
>>that) so I doubt that most assembly programmers will care much for
>>what I have to say. ^_^;;

> Ah, but we (I) DO care. I'd even like to suggest that now that
>TERSE is available that you might consider entering the wonderful
>world of machine level programming! :o)

I doubt it; not because I have any problem with assembly programming,
or any other approach to programming for that matter (well, except
COBOL I suppose) but because, frankly speaking, I'm mostly working in
extremely complex data structures. Quite frankly, assembly is much
*less* efficent for that kind of work. I believe in fitting the tool
to the job; for much of what I'm doing now, I need the advantages of
assembly, but in general it simple isn't reasonable to use it for what
I'm doing.


Schol-R-LEA;2, ELF BiWM MGT POEE JAM LCF GS SMOF KCO
First Speaker, Last Eristic Church of Finagle and Holy Bisexuality
Anybody for President '96!|| Trouble rather the tiger in his lair
http://www.bpp.com/whig/ || than the Scholar amongst his books


George C. Lindauer

unread,
Sep 7, 1996, 3:00:00 AM9/7/96
to

Christian Ludloff (lud...@anet-dfw.com) wrote:
: Hello Jim Neil,

:
: what do you think about a newsgroup for TERSE? Seriously.

Anyone know Jim's email address? I want to talk to him about terse...
but I never get any of his postings directly.

David
:
: --

james earl

unread,
Sep 8, 1996, 3:00:00 AM9/8/96
to

> Anyone know Jim's email address? I want to talk to him about terse...
> but I never get any of his postings directly.

jim-...@digital.net


Phil Seakins

unread,
Sep 9, 1996, 3:00:00 AM9/9/96
to

Christian Ludloff <lud...@anet-dfw.com> wrote:

>Hello Jim Neil,
>what do you think about a newsgroup for TERSE? Seriously.

As the proud owner of the first official copy of Terse, I second that
motion.

Phil Seakins.

james earl

unread,
Sep 10, 1996, 3:00:00 AM9/10/96
to


Phil Seakins <phi...@brisbane.DIALix.oz.au> wrote in article
<511bhs$9cn$1...@brisbane.DIALix.oz.au>...

Third.


0 new messages