tiny-c/PC - CP/M

This is a discussion on tiny-c/PC - CP/M ; Some of you may recall the discussion on tiny-c here recently. I am happy to be able to announce that I have managed to get tiny-c/PC going. This is a version of the language that runs on IBM PC compatibles ...

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 20 of 54

Thread: tiny-c/PC

  1. tiny-c/PC


    Some of you may recall the discussion on tiny-c here recently. I am
    happy to be able to announce that I have managed to get tiny-c/PC
    going. This is a version of the language that runs on IBM PC
    compatibles - no need for a CP/M emulator. I learned about a book
    called "Learning C with tiny-c" by Scott Guthery, bought the book and
    typed in the C and tiny-c source code for the interpreter and compiled
    it with the DeSmet C compiler. This interpreter is an extremely
    interesting program in its own right - I think CS majors studying
    compiler / interpreter
    construction and C would learn a lot from it.

    I've posted the source and executable at http://primepuzzle.com/tc/tiny-c-pc.ZIP

    A page that includes a link to the above plus links to various example
    programs is http://primepuzzle.com/tiny-c/

    I got help on this from several people that visit this forum as well
    as the fellow who has posted the now Public Domain DeSmet C compiler
    that was used to compile the interpreter. It took a lot of typing, a
    lot of debugging and a lot of thought to get this to go.

    A very brief document on this version of tiny-c is in the above .ZIP
    but I'll point you to it here as well:

    http://primepuzzle.com/tiny-c/tinyc-doc.html

    Lee Bradley

    PS - The folks at the 99 bottles of beer site finally got around to
    publishing both the Mouse and the tiny-c versions of this program.
    Check it out!

  2. Re: tiny-c/PC

    Hello, Lee!

    In 2005, I published a "WS4 Files of French Luser".

    Inside it, one could see:

    C. General Purpose
    ------------------

    1) DOIT Compiler
    2) Flow
    3) WSFN (= Which Stands For Nothing!...)
    4) APL/Z
    5) BASEX
    6) COBOL
    7) FOCAL
    8) MUMPS
    9) STOIC
    10) Dr. Logo
    11) Augusta (ADA subset in 24K interpreted MBASIC)
    12) MINILANG (A full PL (source and doc) in 28KB...)
    13) WADUZIDO (The smallest interpreter known: 256 Bytes!...)
    14) BASIC-E
    15) Mallard BASIC
    16) Tiny Pascal (2 versions: BASIC and 8080 ASM)
    17) Tarbell BASIC
    18) CBASIC Compiler
    19) Tiny BASIC Version 3.0

    So, congratulation on ressurrecting your first interpreter!

    I have just a slight problem with your work...

    Where is the "lovely documentation"?

    (Using Google, I found nothing about "tiny-c"... So, if you don't make
    it available (as a PDF file, if you cannot do better), it is quite
    likely to disappear for ever.)

    (Me, I recreated from scratch the source code of all the above
    programming language AFTER retyping their manuals and/or all the docs
    that I could find on those rarities.)

    Yours Sincerely,
    Mr Emmanuel Roche


  3. Re: tiny-c/PC

    On Nov 29, 12:33 pm, roche...@laposte.net wrote:
    > Hello, Lee!
    >
    > In 2005, I published a "WS4 Files of French Luser".
    >
    > Inside it, one could see:
    >
    > C. General Purpose
    > ------------------
    >
    > 1) DOIT Compiler
    > 2) Flow
    > 3) WSFN (= Which Stands For Nothing!...)
    > 4) APL/Z
    > 5) BASEX
    > 6) COBOL
    > 7) FOCAL
    > 8) MUMPS
    > 9) STOIC
    > 10) Dr. Logo
    > 11) Augusta (ADA subset in 24K interpreted MBASIC)
    > 12) MINILANG (A full PL (source and doc) in 28KB...)
    > 13) WADUZIDO (The smallest interpreter known: 256 Bytes!...)
    > 14) BASIC-E
    > 15) Mallard BASIC
    > 16) Tiny Pascal (2 versions: BASIC and 8080 ASM)
    > 17) Tarbell BASIC
    > 18) CBASIC Compiler
    > 19) Tiny BASIC Version 3.0
    >
    > So, congratulation on ressurrecting your first interpreter!
    >
    > I have just a slight problem with your work...
    >
    > Where is the "lovely documentation"?


    Good point. I am actually scanning the book and will have a PDF of it
    in a couple of days. The copyright issue is something I will be trying
    to get permission on although so far the author has not got back to me
    (I emailed him twice asking for help on the interpreter but he has not
    replied).

    This is what I have so far ...

    http://primepuzzle.com/tc/tiny-c-pc.html

    My experience using Google on the word tiny-c is I get lots of hits
    but almost all of them are for a different language, one by a guy
    named Fabrice Bellard. I was pleased to get two hits just the other
    day when I Googled on tiny-c/PC (namely to this forum). I guess it's a
    good idea to name your product uniquely!

    I am familiar with quite a few languages in your list. I remember
    typing in WADUZIDO and getting it to work.

    This is actually the 2nd interpreter I've implemented / revived /
    promoted. The first was Mouse.

    Thanks for your interest! Stay tuned.

    Lee

    >
    > (Using Google, I found nothing about "tiny-c"... So, if you don't make
    > it available (as a PDF file, if you cannot do better), it is quite
    > likely to disappear for ever.)
    >
    > (Me, I recreated from scratch the source code of all the above
    > programming language AFTER retyping their manuals and/or all the docs
    > that I could find on those rarities.)
    >
    > Yours Sincerely,
    > Mr Emmanuel Roche



  4. Re: tiny-c/PC

    Lee wrote:

    > My experience using Google on the word tiny-c is I get lots of hits
    > but almost all of them are for a different language,


    As far as I know, Google ignores any punctuation. A search for "tiny-c"
    is as good as "tiny c" which likely finds things you don't want.

    -- glen


  5. Re: tiny-c/PC

    glen herrmannsfeldt wrote:
    > Lee wrote:
    >
    >> My experience using Google on the word tiny-c is I get lots of
    >> hits but almost all of them are for a different language,

    >
    > As far as I know, Google ignores any punctuation. A search for
    > "tiny-c" is as good as "tiny c" which likely finds things you
    > don't want.


    Pointless nit. '-' is not punctuation. ',', '.', '?', '!' etc.
    are punctuation.

    --
    Chuck F (cbfalconer at maineline dot net)

    Try the download section.



    --
    Posted via a free Usenet account from http://www.teranews.com


  6. Re: tiny-c/PC

    CBFalconer wrote:

    (I wrote)

    >>As far as I know, Google ignores any punctuation. A search for
    >>"tiny-c" is as good as "tiny c" which likely finds things you
    >>don't want.


    > Pointless nit. '-' is not punctuation. ',', '.', '?', '!' etc.
    > are punctuation.


    Maybe not completely pointless. It does seem to ignore '-',
    along with the others you mention and '@', '#', '$', '%', '*',
    '(', ')', '+', '`', but it doesn't ignore '_'. '~' seems to
    have a special function, also.

    -- glen


  7. Re: tiny-c/PC

    Hello, Lee

    > This is what I have so far ...


    Yes, but this is for the IBM Clown. From the pages that you have
    scanned, I learned that the original doc was called "The Tiny-C
    Owner's Manual". This is probably the one containing the 4K listing...
    And this is the one that interest me.

    (You could add a PDF of the book in the tiny-C/PC directory, and a PDF
    of the manual in the tiny-C directory, so that both versions would be
    documented.)

    > I am familiar with quite a few languages in your list. I remember
    > typing in WADUZIDO and getting it to work.
    >
    > This is actually the 2nd interpreter I've implemented / revived /
    > promoted. The first was Mouse.


    Mouse! ****! I had forgotten that I had recreated its source code
    (Z-80 assembler and Pascal...)

    Incredible. I had totally forgotten it. One day, after I retire, I
    will have to dive into my stuff, to see what I have done...

    (I seem to remember GPM, Trac, and SAM-76... But it has been... more
    than 20 years, now. Ha, if only I could find a University to work full-
    time on CP/M and my collection of Programming Languages!)

    Yours Sincerely,
    Mr Emmanuel Roche


  8. Re: tiny-c/PC

    On Dec 1, 8:22 am, roche...@laposte.net wrote:
    > Hello, Lee
    >
    > > This is what I have so far ...

    >
    > Yes, but this is for the IBM Clown. From the pages that you have
    > scanned, I learned that the original doc was called "The Tiny-C
    > Owner's Manual". This is probably the one containing the 4K listing...
    > And this is the one that interest me.


    Well, I understand your attitude. I started with the CP/M version
    myself, bought the product, installed it and enjoyed it.

    http://primepuzzle.com/tiny-c/

    has (I expect you know) an archive that has the 8080 version's source
    code etc. I don't think I am up to scanning the tinyc owners manual
    (which I own) which is HUGE. The book (that I am now scanning) is very
    very close to what you need to understand either version of tiny-c.
    Although the original tiny-c is great, my current objective is to
    promote the language itself and, let's face it, if you can eliminate
    one level of emulation by running it directly from a DOS prompt, more
    people might get intriqued.

    >
    > I am familiar with quite a few languages in your list. I remember
    > typing in WADUZIDO and getting it to work.
    >
    > This is actually the 2nd interpreter I've implemented / revived /
    > promoted. The first was Mouse.
    >
    > Mouse! ****! I had forgotten that I had recreated its source code
    > (Z-80 assembler and Pascal...)
    >
    > Incredible. I had totally forgotten it. One day, after I retire, I
    > will have to dive into my stuff, to see what I have done...
    >
    > (I seem to remember GPM, Trac, and SAM-76... But it has been...
    > more than 20 years, now. Ha, if only I could find a University
    > to work full-time on CP/M and my collection of Programming
    > Languages!)
    >
    > Yours Sincerely,
    > Mr Emmanuel Roche


    Looks like you and I have duplicated each others' efforts. Have you
    ever been to

    http://primepuzzle.com/mouse ?

    I don't have either the Pascal or Z80 source posted but of course I
    have both. I've been a Mouse freak for as long as Mouse has been
    around. I'll never forget the day I found Grogono's book in a book
    store, took a brief look at it and said, "I gotta buy this one." Kind
    of similar to what happened when I saw the cover on the January 1975
    Popular Electronics.

    http://primepuzzle.com/altair.jpg

  9. Re: tiny-c/PC


    Group: comp.os.cpm Date: Thu, Nov 29, 2007, 9:48pm (CST-2) From:
    gah@ugcs.caltech.edu (glen*herrmannsfeldt)

    script:

    >Maybe not completely pointless. It does
    >seem to ignore '-', along with the others
    >you mention and '@', '#', '$', '%', '*', '(', ')',
    > '+', '`´, but it doesn´t ignore ´_´. ´~´ seems
    >to have a special function, also.


    IIRC: Minus means 'don't include links containing the following', and
    plus means 'only include links containing the following'.

    'tiny' is too general, and excluding 'c' would eliminate virtually
    everything.

    Enclosing 'tiny-c' in quotes may be the only way to search for it.

    salaam,
    dowcom

    To e-mail me, add the character zero to "dowcom". i.e.:
    dowcom(zero)(at)webtv(dot)net.

    --
    http://community.webtv.net/dowcom/DOWCOMSAMSTRADGUIDE

    MSWindows is television,… Linux is radar.


  10. Re: tiny-c/PC

    bud wrote:

    (snip on google searching)

    > IIRC: Minus means 'don't include links containing the following', and
    > plus means 'only include links containing the following'.


    > 'tiny' is too general, and excluding 'c' would eliminate virtually
    > everything.


    > Enclosing 'tiny-c' in quotes may be the only way to search for it.


    Yes, you need the quotes, but "tiny-c", "tiny+c", and "tiny c" are
    all the same search. - and + apply outside quotes.

    The first link, a sponsored link, is for "tiny C" vitamins,
    presumably vitamin C.

    -- glen


  11. Re: tiny-c/PC

    On Nov 29, 2:48 pm, Lee wrote:
    > On Nov 29, 12:33 pm, roche...@laposte.net wrote:
    >
    >



    > > I have just a slight problem with your work...

    >
    > > Where is the "lovely documentation"?

    >
    > Good point. I am actually scanning the book and will have a PDF of > it in a couple of days. The copyright issue is something I will be > trying to get permission on although so far the author has not got > back to me
    > (I emailed him twice asking for help on the interpreter but he has > not replied).
    >
    > This is what I have so far ...
    >
    > http://primepuzzle.com/tc/tiny-c-pc.html


    I just want to point out the fact that the above link is still active
    but now sends you to a page which consists of two hyperlinks, one of
    which is to a 11.3 MB .pdf of the 100+ page book on tiny-c that I have
    been using. If you are interested in this language, download
    this .pdf. BTW, try scanning a 100+ page book sometime. Lotta work!

    Other news. A fellow who visits here has been corresponding with me
    about tiny-c and found that the DeSmet C compiled tinyc.exe was a bit
    of a resource hog on his XP machine. He's managed to make changes to
    the source and clean compile it with a Win32 C compiler. There are
    still some issues but he's making GREAT progress. Anybody else that
    wants to jump in on this "tiny" project, feel free! Future plans of
    mine include:

    1. a Wiki page
    2. writing tiny-c routines to do ANSI escape sequences to clear
    screen, position cursor, bright / dim video, maybe even color etc.
    I had fun last night w/ cls.tc. Would you believe ...

    /* cls.tc - lrb - 11/30/2007 - 12/1,2/2007
    /* clear screen - note need to code ESC character and left bracket
    /* as 1 more than they really are and then subtract the character
    /* 1 - cannot use the left bracket itself because it confuses the
    /* interpreter
    cls [
    MC '\'-1-'@',1
    MC '\'-1,1
    MC '2',1
    MC 'J',1
    ]

    MC (Machine Call) 1 is the putchar routine.
    So the above is really send ESC[2J to the screen which is how you
    clear the screen in ANSI.

    This stuff is fun.

    >
    > My experience using Google on the word tiny-c is I get lots of hits
    > but almost all of them are for a different language, one by a guy
    > named Fabrice Bellard. I was pleased to get two hits just the other
    > day when I Googled on tiny-c/PC (namely to this forum). I guess it's a
    > good idea to name your product uniquely!
    >
    > I am familiar with quite a few languages in your list. I remember
    > typing in WADUZIDO and getting it to work.
    >
    > This is actually the 2nd interpreter I've implemented / revived /
    > promoted. The first was Mouse.
    >
    > Thanks for your interest! Stay tuned.
    >
    > Lee
    >
    >
    >
    > > (Using Google, I found nothing about "tiny-c"... So, if you don't make
    > > it available (as a PDF file, if you cannot do better), it is quite
    > > likely to disappear for ever.)

    >
    > > (Me, I recreated from scratch the source code of all the above
    > > programming language AFTER retyping their manuals and/or all the docs
    > > that I could find on those rarities.)

    >
    > > Yours Sincerely,
    > > Mr Emmanuel Roche



  12. Re: tiny-c/PC

    Hello, Lee!

    > (...) I don't think I am up to scanning the tinyc owners manual
    > (which I own) which is HUGE. The book (that I am now scanning) is very
    > very close to what you need to understand either version of tiny-c.


    Still, I would prefer to have the original manual as the definitive
    reference (since the book seems to be available).

    Would you mind sending me such a rarity?

    Mr Emmanuel Roche
    Chemin de Boisrond
    17430 Tonnay-Charente
    FRANCE

    It will take about one week to reach me, I will use it one week, then
    another week to re-send it to you.

    > Although the original tiny-c is great, my current objective is to
    > promote the language itself and, let's face it, if you can eliminate
    > one level of emulation by running it directly from a DOS prompt, more
    > people might get intriqued.


    I totally agree with "eliminating one level of emulation"... That's
    why I would prefer to rewrite it directly in assembler (did you notice
    that the original executable was 4K, while your compiled one is
    19K?... So much for the "small code" of C!)

    > Looks like you and I have duplicated each others' efforts. Have you
    > ever been to
    >
    > http://primepuzzle.com/mouse ?


    No. As I wrote, it has been 20+ years since I played with Mouse. I had
    totally forgotten it.

    > I don't have either the Pascal or Z80 source posted but of course I
    > have both. I've been a Mouse freak for as long as Mouse has been
    > around. I'll never forget the day I found Grogono's book in a book
    > store, took a brief look at it and said, "I gotta buy this one." Kind
    > of similar to what happened when I saw the cover on the January 1975
    > Popular Electronics.


    Yes, macro-processing can be addictive: that's why I am such a fan of
    MAC/SID, rather than ASM/DDT like so much other people who started
    with CP/M 2.2.

    Another one which was interesting was WSFN, since it produced graphics
    (on a 256x256 grid!) in about 2K.

    Yours Sincerely,
    Mr Emmanuel Roche


  13. Re: tiny-c/PC

    On Dec 3, 10:53 am, roche...@laposte.net wrote:
    > Hello, Lee!
    >
    > > (...) I don't think I am up to scanning the tinyc owners manual
    > > (which I own) which is HUGE. The book (that I am now scanning) is very
    > > very close to what you need to understand either version of tiny-c.

    >
    > Still, I would prefer to have the original manual as the definitive
    > reference (since the book seems to be available).
    >
    > Would you mind sending me such a rarity?
    >
    > Mr Emmanuel Roche
    > Chemin de Boisrond
    > 17430 Tonnay-Charente
    > FRANCE
    >
    > It will take about one week to reach me, I will use it one week, then
    > another week to re-send it to you.


    I'll send it to you. I sure hope it does not get lost en route.

    >
    > > Although the original tiny-c is great, my current objective is to
    > > promote the language itself and, let's face it, if you can eliminate
    > > one level of emulation by running it directly from a DOS prompt, more
    > > people might get intrigued.

    >
    > I totally agree with "eliminating one level of emulation"... That's
    > why I would prefer to rewrite it directly in assembler (did you notice
    > that the original executable was 4K, while your compiled one is
    > 19K?... So much for the "small code" of C!)


    I'm not sure I follow you on this. The assembler version of tiny-c is
    already available so you don't need to write it!

    http://primepuzzle.com/tiny-c/tiny-c.zip

    which has the .asm files (and a bunch of other stuff).

    Or do you mean 80x86 assembler? The above link is to 8080 assembler.
    Now THAT would be impressive! Personally, I don't think it's worth the
    time it would take. We have a working executable and although a C-less
    executable would no doubt really crank, I wouldn't bother.

    >
    > > Looks like you and I have duplicated each others' efforts. Have you
    > > ever been to

    >
    > >http://primepuzzle.com/mouse?

    >
    > No. As I wrote, it has been 20+ years since I played with Mouse. I had
    > totally forgotten it.
    >
    > > I don't have either the Pascal or Z80 source posted but of course I
    > > have both. I've been a Mouse freak for as long as Mouse has been
    > > around. I'll never forget the day I found Grogono's book in a book
    > > store, took a brief look at it and said, "I gotta buy this one." Kind
    > > of similar to what happened when I saw the cover on the January 1975
    > > Popular Electronics.

    >
    > Yes, macro-processing can be addictive: that's why I am such a fan of
    > MAC/SID, rather than ASM/DDT like so much other people who started
    > with CP/M 2.2.
    >
    > Another one which was interesting was WSFN, since it produced graphics
    > (on a 256x256 grid!) in about 2K.
    >
    > Yours Sincerely,
    > Mr Emmanuel Roche


  14. Re: tiny-c/PC

    Hello, Lee!

    > I'm not sure I follow you on this. The assembler version of tiny-c is
    > already available so you don't need to write it!


    Ok. Obviously, you have difficulty understanding what I am meaning.

    --> "The documentation is much more important than the source code."
    <--

    (You can print this, and pin it on your wall, above your computer.)

    Why is documentation so important (you will note that it is a
    characteristics of newbies that they write programs without
    documentation)? Because it gives (if well written) some essential
    indications upon what the programmer had in mind when writing his
    program.

    As I already wrote, documenting a program ("Load A-register with 12H")
    is totally useless. What we want to know is WHY the programmer is
    loading A-register with something.

    Have a look to some of my programs (more than 20 published, by now),
    and see how many lines are devoted to the ideas surrounding the actual
    working of the program. It is not uncommon for me to mention some
    historical way of doing (that could be thought of of being no longer
    relevant, yet, whithout knowing them, the purpose of the program
    become uncomprehensible).

    You made available the book as a PDF file. It is 123 pages long, so
    would cost 12.30 Euros (about 18 to 20 US dollars) to print at my
    cybercafe. A quick search on the Internet (since I am a "book worm")
    found your book for $1.00 in the USA... with a floppy disk containing
    some files! Even taking into account the postage, it will be cheaper
    to get it than print your PDF file. So, I bought it, and should
    receive it in about a week.

    I have some experience with word-processing. Let us imagine that the
    book contains 123 pages of my standard word-processing (this is
    obviously not the case). WordStar 4 would produce a 246 KB ASCII file.
    Now, do some mathematics, and see how much space is wasted by using a
    PDF file, rather than a ASCII file. (From the keyboard of this
    cybercafe, I would say 246 is below 256 KB, which is 1/4 of a
    megabyte, and your file is 12 Megabytes, so about 48 times bigger...)

    The thing still missing is the manual for the 8080 version.

    Yours Sincerely,
    Mr Emmanuel Roche


  15. Re: tiny-c/PC

    On Dec 2, 5:00 pm, Lee wrote:
    > On Nov 29, 2:48 pm, Lee wrote:> On Nov 29, 12:33 pm, roche...@laposte.net wrote:
    >
    >
    >
    > > > I have just a slight problem with your work...

    >
    > > > Where is the "lovely documentation"?

    >
    > > Good point. I am actually scanning the book and will have a PDF of > it in a couple of days. The copyright issue is something I will be > trying to get permission on although so far the author has not got > back to me
    > > (I emailed him twice asking for help on the interpreter but he has > not replied).

    >
    > > This is what I have so far ...

    >
    > >http://primepuzzle.com/tc/tiny-c-pc.html

    >
    > I just want to point out the fact that the above link is still active
    > but now sends you to a page which consists of two hyperlinks, one of
    > which is to a 11.3 MB .pdf of the 100+ page book on tiny-c that I have
    > been using. If you are interested in this language, download
    > this .pdf. BTW, try scanning a 100+ page book sometime. Lotta work!
    >
    > Other news. A fellow who visits here has been corresponding with me
    > about tiny-c and found that the DeSmet C compiled tinyc.exe was a bit
    > of a resource hog on his XP machine. He's managed to make changes to
    > the source and clean compile it with a Win32 C compiler. There are
    > still some issues but he's making GREAT progress. Anybody else that
    > wants to jump in on this "tiny" project, feel free! Future plans of
    > mine include:
    >
    > 1. a Wiki page
    > 2. writing tiny-c routines to do ANSI escape sequences to clear
    > screen, position cursor, bright / dim video, maybe even color etc.
    > I had fun last night w/ cls.tc. Would you believe ...
    >
    > /* cls.tc - lrb - 11/30/2007 - 12/1,2/2007
    > /* clear screen - note need to code ESC character and left bracket
    > /* as 1 more than they really are and then subtract the character
    > /* 1 - cannot use the left bracket itself because it confuses the
    > /* interpreter
    > cls [
    > MC '\'-1-'@',1
    > MC '\'-1,1
    > MC '2',1
    > MC 'J',1
    > ]
    >
    > MC (Machine Call) 1 is the putchar routine.
    > So the above is really send ESC[2J to the screen which is how you
    > clear the screen in ANSI.
    >
    > This stuff is fun.
    >
    >
    >
    > > My experience using Google on the word tiny-c is I get lots of hits
    > > but almost all of them are for a different language, one by a guy
    > > named Fabrice Bellard. I was pleased to get two hits just the other
    > > day when I Googled on tiny-c/PC (namely to this forum). I guess it's a
    > > good idea to name your product uniquely!

    >
    > > I am familiar with quite a few languages in your list. I remember
    > > typing in WADUZIDO and getting it to work.

    >
    > > This is actually the 2nd interpreter I've implemented / revived /
    > > promoted. The first was Mouse.

    >
    > > Thanks for your interest! Stay tuned.

    >
    > > Lee

    >
    > > > (Using Google, I found nothing about "tiny-c"... So, if you don't make
    > > > it available (as a PDF file, if you cannot do better), it is quite
    > > > likely to disappear for ever.)

    >
    > > > (Me, I recreated from scratch the source code of all the above
    > > > programming language AFTER retyping their manuals and/or all the docs
    > > > that I could find on those rarities.)

    >
    > > > Yours Sincerely,
    > > > Mr Emmanuel Roche


    That was a smart move on your part - to order the book. You just saved
    yourself about $69! And you got the real thing (albeit not the
    original 8080 one).

    As for the importance of documentation, I totally agree with you. A
    well-phrased, well-placed comment in a computer program is a very
    helpful thing.

    If and when you ever write something in tiny-c I'd be interested to
    see it. My current effort involves writing a program that will play
    Christmas carols! I got the idea from a program a fellow I used to
    work with wrote a long time ago, in BASIC. For starters, I found a
    tiny (no
    pun intended!) program in the IBM PC BASIC Reference manual that plays
    "Mary had a little lamb." I've got that going in tiny-c/PC. I'll post
    the full Christmas carol one as soon as I have it working. This will
    of course be a much more complex program. But "Mary had a little lamb"
    has most of the major ideas I'll need to get the next one going.

    Lee

    http://primepuzzle.com/tc/LITTLE-L.BAS
    http://primepuzzle.com/tc/LITTLE-L.EXE

    http://primepuzzle.com/tc/mary.tc

    PS - despite my remarks above about the importance of documenting your
    programs, neither the BASIC nor the tiny-c programs above is terribly
    well commented. Sorry about that!

  16. Re: tiny-c/PC

    On Dec 5, 4:47 am, roche...@laposte.net wrote:
    > Hello, Lee!
    >
    > > I'm not sure I follow you on this. The assembler version of tiny-c is
    > > already available so you don't need to write it!

    >
    > Ok. Obviously, you have difficulty understanding what I am meaning.
    >
    > --> "The documentation is much more important than the source code."
    > <--
    >
    > (You can print this, and pin it on your wall, above your computer.)
    >
    > Why is documentation so important (you will note that it is a
    > characteristics of newbies that they write programs without
    > documentation)? Because it gives (if well written) some essential
    > indications upon what the programmer had in mind when writing his
    > program.
    >
    > As I already wrote, documenting a program ("Load A-register with 12H")
    > is totally useless. What we want to know is WHY the programmer is
    > loading A-register with something.
    >
    > Have a look to some of my programs (more than 20 published, by now),
    > and see how many lines are devoted to the ideas surrounding the actual
    > working of the program. It is not uncommon for me to mention some
    > historical way of doing (that could be thought of of being no longer
    > relevant, yet, whithout knowing them, the purpose of the program
    > become uncomprehensible).
    >
    > You made available the book as a PDF file. It is 123 pages long, so
    > would cost 12.30 Euros (about 18 to 20 US dollars) to print at my
    > cybercafe. A quick search on the Internet (since I am a "book worm")
    > found your book for $1.00 in the USA... with a floppy disk containing
    > some files! Even taking into account the postage, it will be cheaper
    > to get it than print your PDF file. So, I bought it, and should
    > receive it in about a week.
    >
    > I have some experience with word-processing. Let us imagine that the
    > book contains 123 pages of my standard word-processing (this is
    > obviously not the case). WordStar 4 would produce a 246 KB ASCII file.
    > Now, do some mathematics, and see how much space is wasted by using a
    > PDF file, rather than a ASCII file. (From the keyboard of this
    > cybercafe, I would say 246 is below 256 KB, which is 1/4 of a
    > megabyte, and your file is 12 Megabytes, so about 48 times bigger...)
    >
    > The thing still missing is the manual for the 8080 version.
    >
    > Yours Sincerely,
    > Mr Emmanuel Roche


    (This is the 2nd copy of this reply; the first copy was incorrectly
    placed and it would appear this software does not allow a poster to
    delete his own messages!)

    That was a smart move on your part - to order the book. You just saved
    yourself about $69! And you got the real thing (albeit not the
    original 8080 one).

    As for the importance of documentation, I totally agree with you. A
    well-phrased, well-placed comment in a computer program is a very
    helpful thing.

    If and when you ever write something in tiny-c I'd be interested to
    see it. My current effort involves writing a program that will play
    Christmas carols! I got the idea from a program a fellow I used to
    work with. For starters, I found a tiny (no pun intended!) program in
    the IBM PC BASIC Reference manual that plays "Mary had a little lamb."
    I've got that going in tiny-c/PC. I'll post the full Christmas carol
    one as soon as I have it working. This will of course be a much more
    complex program. But "Mary had a little lamb" has most of the major
    ideas I'll need to get the next one going.

    Lee

    http://primepuzzle.com/tc/LITTLE-L.BAS
    http://primepuzzle.com/tc/LITTLE-L.EXE

    http://primepuzzle.com/tc/mary.tc

    PS - despite my remarks above about the importance of documenting your
    programs, neither the BASIC nor the tiny-c programs above is terribly
    well commented. Sorry about that!

  17. Re: tiny-c/PC

    Lee wrote:

    > I'm not sure I follow you on this. The assembler version of tiny-c is
    > already available so you don't need to write it!
    >
    > http://primepuzzle.com/tiny-c/tiny-c.zip
    >
    > which has the .asm files (and a bunch of other stuff).
    >
    > Or do you mean 80x86 assembler? The above link is to 8080 assembler.
    > Now THAT would be impressive! Personally, I don't think it's worth the
    > time it would take. We have a working executable and although a C-less
    > executable would no doubt really crank, I wouldn't bother.


    There is a Tiny C in 8080 code, and a Tiny C in 8086 code. google's
    book search and Amazon.com are informative:

    Learning C With Tiny C, By Scott Guthery Published 1985, McGraw-Hill,
    ISBN 0830608958
    Learning C with Tiny C (IBM) By Scott B. Guthery Published 1991,
    McGraw-Hill School Education Group ISBN 0830666206

    Amazon.com says several PAPERBACK copies are available of what appears
    to be the 1985 version.
    A general Web search on the "IBM" version found some stores with the
    1991 version.

    A Scott B. Guthery is a co author of the 2002 book "Smart Cards: The
    Developer's Toolkit"
    published by Prentice-Hall, which says he (ws) currently Chief
    Technical Officer for Mobile-Mind, Inc..

    Herb Johnson

    Herbert R. Johnson, New Jersey USA
    http://www.retrotechnology.com/herbs_stuff/ web site
    http://www.retrotechnology.net/herbs_stuff/ domain mirror
    my email address: hjohnson AAT retrotechnology DOTT com
    if no reply, try in a few days: herbjohnson ATT comcast DOTT net
    "Herb's Stuff": old Mac, SGI, 8-inch floppy drives
    S-100 IMSAI Altair computers, docs, by "Dr. S-100"

  18. Re: tiny-c/PC


    Group: comp.os.cpm Date: Sun, Dec 2, 2007, 1:28am (CST-2) From:
    gah@ugcs.caltech.edu (glen*herrmannsfeldt)

    script:

    >Yes, you need the quotes, but "tiny-c",
    > "tiny+c", and "tiny c" are all the same
    >search. - and + apply outside quotes.


    You're right. That's what I meant and didn't say, expecting everyone to
    read my mind. ((-:

    Thanks for the clarification.

    salaam,
    dowcom

    To e-mail me, add the character zero to "dowcom". i.e.:
    dowcom(zero)(at)webtv(dot)net.

    --
    http://community.webtv.net/dowcom/DOWCOMSAMSTRADGUIDE

    MSWindows is television,… Linux is radar.


  19. Re: tiny-c/PC

    >
    > There is a Tiny C in 8080 code, and a Tiny C in 8086 code. google's
    > book search and Amazon.com are informative:
    >
    > Learning C With Tiny C, By Scott Guthery Published 1985, McGraw-Hill,
    > ISBN 0830608958
    > Learning C with Tiny C (IBM) By Scott B. Guthery Published 1991,
    > McGraw-Hill School Education Group ISBN 0830666206
    >
    > Amazon.com says several PAPERBACK copies are available of what appears
    > to be the 1985 version.
    > A general Web search on the "IBM" version found some stores with the
    > 1991 version.
    >
    > A Scott B. Guthery is a co author of the 2002 book "Smart Cards: The
    > Developer's Toolkit"
    > published by Prentice-Hall, which says he (ws) currently Chief
    > Technical Officer for Mobile-Mind, Inc..
    >
    > Herb Johnson
    >


    Herb -

    The above is all very interesting! You are a search wizard. I recall
    your recent post which listed Kaypro II software.

    Anyway, I've looked into the 1991 book Guthery wrote and have pretty
    much come up empty in the sense that none of the bookstores seems to
    have any copies available, new or used. Oh well. I sure would like to
    see what is in this book. If he wrote the interpreter in 8086, it must
    be a screamer. I'm still working on the version published in his 1985
    book with a couple of people. This one is written in C (and tiny-c).
    There are still a few issues that need to be addressed. As I don't
    know too much 8086 assembler, it's probably just as well I can't find
    his "IBM" book.

    One little thing that's come up that (coincidentally) involves 16-bit
    assembler is this: Guthery wrote a "Meteor Shower" program in tiny-c
    that sends "shooting stars" every which way on the screen. It annoyed
    me that the mouse pointer was blinking throughout the show so I
    wondered how I could turn it off. I've learned you can use a call to
    interrupt 33h to handle this. But you need just the right combination
    of a C compiler, operating system and some method to integrate the
    call into the interpreter. Don't have the magic formula yet but am
    treating it all as an opportunity to learn some assembler, some C and
    some tiny-c.

    - Lee

  20. Re: tiny-c/PC

    Hello, Lee!

    Well got your message about the various persons interested in Tiny-C.

    However, from reading it, it seems to be starting in all directions.

    And, in my humble opinion, you commited the cardinal sin of not
    searching for more info about Tiny-C before starting to work.

    Since Herb Johnston found a second book dealing with "Tiny-C (IBM)", I
    suggest to first get a copy of it before deciding what to do.

    At least, this proves that Tiny-C seemed so much interesting that the
    doc was written at least 3 times: the first time for CP/M, then 2
    times probably for the IBM Clown.

    Needless to say, it would be interesting to compare all 3 versions, to
    know if the "primitives" of the language have changed when the
    hardware changed.

    Until then, thinking to write an entry for Wikipedia is pure fantasy.

    Yours Sincerely,
    Mr Emmanuel Roche
    (someone who did this kind of job several times)


+ Reply to Thread
Page 1 of 3 1 2 3 LastLast