Jump to content
IGNORED

c99 - getting started?


unhuman

Recommended Posts

You're not supposed to tell me that until AFTER I'm hooked (and figured that out myself).

 

BTW - it might depend on what you mean by modern C... To me, C is K&R.

 

-H

 

Ahh man this is great!! Thank you Walid!!! You may have just inspired some C programmers to come try out our little small C language... Little do they know that C99 has very little to do in any way with modern C... But it's a hook anyway. :)

Link to comment
Share on other sites

You're not supposed to tell me that until AFTER I'm hooked (and figured that out myself).

 

BTW - it might depend on what you mean by modern C... To me, C is K&R.

 

-H

 

I agree. Actually c99 is pretty close and quite capable. I personally never quite got hooked on it because it was rather difficult to read and much preferred Pascal. I am trying to translate the manual of Turbo Pasc'99 that Filip sent me from German to English, and once I do I think I am going to do a project in Pascal. I also have a pretty complete Fortran compiler for the TI on loan from Berry Harmsen in Amsterdam which I am going to make available at some point when I have had a chance to convert the disks.

Link to comment
Share on other sites

I had a copy of Turbo Pasc at some point. The only thing I could get it to do was lock up my machine.

 

I agree. Actually c99 is pretty close and quite capable. I personally never quite got hooked on it because it was rather difficult to read and much preferred Pascal. I am trying to translate the manual of Turbo Pasc'99 that Filip sent me from German to English, and once I do I think I am going to do a project in Pascal. I also have a pretty complete Fortran compiler for the TI on loan from Berry Harmsen in Amsterdam which I am going to make available at some point when I have had a chance to convert the disks.

Link to comment
Share on other sites

I had a copy of Turbo Pasc at some point. The only thing I could get it to do was lock up my machine.

 

That most likely was the Turbo Pasc copy protection. You could only make a reliable copy when using a track copier software.

Turbo Pasc'99 used to lockup during compilation when it thought it was running as a copy.

Due to its copy protection scheme it was reported that it didn't work with certain disk controllers.

Link to comment
Share on other sites

Ummm... Not sure. I don't have it anymore. But, it's what forced me to get a PC and Borland was very nice to us with super-low prices when I was in college.

 

I had a copy of Turbo Pasc at some point. The only thing I could get it to do was lock up my machine.

 

That most likely was the Turbo Pasc copy protection. You could only make a reliable copy when using a track copier software.

Turbo Pasc'99 used to lockup during compilation when it thought it was running as a copy.

Due to its copy protection scheme it was reported that it didn't work with certain disk controllers.

Link to comment
Share on other sites

Oo, I'd love a copy of the Fortran compiler when you've got that ready! I enjoyed it much more than Pascal in school, though both are fine learning languages.

 

I only took Fortran in high school and hated it thoroughly! I still have the original textbook however, and looking back at it, it's really not a bad language after all. One of the reasons I had a tough time with it was that unlike my TI which was interactive, we had to use punched cards for programming then (1981-1983). Then I took Pascal in college and fell in love with it. Unfortunately, I was not allowed access to the college mainframe after the Pascal course was over. In these days (1983-1986), mainframe computer time was still expensive and mostly reserved to engineering and computer science majors:) I did not pick up Pascal again until the late 90's when I acquired a P-code card, and now I mostly use it on my PCjr with Borland's Turbo Pascal 3.

Link to comment
Share on other sites

Oo, I'd love a copy of the Fortran compiler when you've got that ready! I enjoyed it much more than Pascal in school, though both are fine learning languages.

 

I only took Fortran in high school and hated it thoroughly! I still have the original textbook however, and looking back at it, it's really not a bad language after all. One of the reasons I had a tough time with it was that unlike my TI which was interactive, we had to use punched cards for programming then (1981-1983). Then I took Pascal in college and fell in love with it. Unfortunately, I was not allowed access to the college mainframe after the Pascal course was over. In these days (1983-1986), mainframe computer time was still expensive and mostly reserved to engineering and computer science majors:) I did not pick up Pascal again until the late 90's when I acquired a P-code card, and now I mostly use it on my PCjr with Borland's Turbo Pascal 3.

 

3??!!! I started with 4, IIRC. :) 5 is when they added objects.

Link to comment
Share on other sites

I only took Fortran in high school and hated it thoroughly! I still have the original textbook however, and looking back at it, it's really not a bad language after all. One of the reasons I had a tough time with it was that unlike my TI which was interactive, we had to use punched cards for programming then (1981-1983). Then I took Pascal in college and fell in love with it. Unfortunately, I was not allowed access to the college mainframe after the Pascal course was over. In these days (1983-1986), mainframe computer time was still expensive and mostly reserved to engineering and computer science majors:) I did not pick up Pascal again until the late 90's when I acquired a P-code card, and now I mostly use it on my PCjr with Borland's Turbo Pascal 3.

 

Fortran is the inspiration for BASIC, which is probably why I grok'd it so well when I encountered it, having started off with BASIC (and LOGO and Lisp). Pascal seemed baroque to me and I didn't really get it until I worked with C. Then the syntax made sense and I started to see how loose BASIC (and Fortran) were. But I still have a place in my heart for Fortran and would like to have a go at again, if only for nostalgia's sake.

 

Any versions of COBOL you've got, you can keep. ;)

Link to comment
Share on other sites

Hehe. Similar story. As a kid, went to computer camp. was one of the "smarter" kids and got pushed into Pascal. I didn't get it at all. Didn't comprehend how you could not have line numbers. Alas, come college and I guess my brain evolved a bit and I got it no problem. Then C... Objects did the same thing until I got a real job and had an application.

 

-H

 

I only took Fortran in high school and hated it thoroughly! I still have the original textbook however, and looking back at it, it's really not a bad language after all. One of the reasons I had a tough time with it was that unlike my TI which was interactive, we had to use punched cards for programming then (1981-1983). Then I took Pascal in college and fell in love with it. Unfortunately, I was not allowed access to the college mainframe after the Pascal course was over. In these days (1983-1986), mainframe computer time was still expensive and mostly reserved to engineering and computer science majors:) I did not pick up Pascal again until the late 90's when I acquired a P-code card, and now I mostly use it on my PCjr with Borland's Turbo Pascal 3.

 

Fortran is the inspiration for BASIC, which is probably why I grok'd it so well when I encountered it, having started off with BASIC (and LOGO and Lisp). Pascal seemed baroque to me and I didn't really get it until I worked with C. Then the syntax made sense and I started to see how loose BASIC (and Fortran) were. But I still have a place in my heart for Fortran and would like to have a go at again, if only for nostalgia's sake.

 

Any versions of COBOL you've got, you can keep. ;)

Link to comment
Share on other sites

Oo, I'd love a copy of the Fortran compiler when you've got that ready! I enjoyed it much more than Pascal in school, though both are fine learning languages.

 

I only took Fortran in high school and hated it thoroughly! I still have the original textbook however, and looking back at it, it's really not a bad language after all. One of the reasons I had a tough time with it was that unlike my TI which was interactive, we had to use punched cards for programming then (1981-1983). Then I took Pascal in college and fell in love with it. Unfortunately, I was not allowed access to the college mainframe after the Pascal course was over. In these days (1983-1986), mainframe computer time was still expensive and mostly reserved to engineering and computer science majors:) I did not pick up Pascal again until the late 90's when I acquired a P-code card, and now I mostly use it on my PCjr with Borland's Turbo Pascal 3.

 

3??!!! I started with 4, IIRC. :) 5 is when they added objects.

 

I also have 5.1 which I can run on my PCjr as well, but only after installing it on my parallel zip drive (yes, there actually is a zip driver for legacy DOS computers), and having an IDE really simplifies program development. Version 3 on the other hand is so compact that it fits on a single 360K diskette with plenty of room to spare for projects. Also, the CPM version runs on my TRS 80 model 4 as well as on the CP/M card sitting in my PEB.

 

BTW, I recently picked up Borland Prolog 1.0, and boy is it a weird language :) It does intrigue me though, and I hope to explore it a bit further. BUT first, I have to complete Ultimate Planet! See what I'm talking about??? It does not take much to distract me :)

Link to comment
Share on other sites

BTW, I recently picked up Borland Prolog 1.0, and boy is it a weird language :) It does intrigue me though, and I hope to explore it a bit further. BUT first, I have to complete Ultimate Planet! See what I'm talking about??? It does not take much to distract me :)

 

Oohhhh... I <3'ed (Borland) Prolog in college!!!! It was so very much fun. Then there was LISP, which I did not so enjoy.

 

I wrote some crazy tool for prolog to compile and run projects - or something... Whatever it did, it fixed the issues I had with the environment...

 

Umm... but that's as far as it went.

 

-H

Edited by unhuman
Link to comment
Share on other sites

Prolog is cool, one of the better AI languages. And for anyone who as played with Lisp, try Scheme, it's kind of a next-gen Lisp that is more graspable to the average user.

 

An overlooked language that is fun if you think like an engineer is Icon. I played around with it on the Amiga and it has a spartan efficiency that's refreshing.

 

Meanwhile, I notice unhuman has selected a TARDIS avatar, presumably outing himself as a Doctor Who fan. Yet another unsettling coincidence between him and me. I've been a fan of the show since the British originals were shown over here in my teens. I also once owned a large, cantakerous boxy blue car with the custom license plate DR WHOM. :)

Link to comment
Share on other sites

Ha. I'm unveiling something, but perhaps it's not merely that I'm a fan. I'm more of a "modern-day" fan, btw - didn't watch as a kid. Got into it with the new, good production values stuff.

 

Meanwhile, I notice unhuman has selected a TARDIS avatar, presumably outing himself as a Doctor Who fan. Yet another unsettling coincidence between him and me. I've been a fan of the show since the British originals were shown over here in my teens. I also once owned a large, cantakerous boxy blue car with the custom license plate DR WHOM. :)

Edited by unhuman
Link to comment
Share on other sites

Hmm, could it be a Dr Who game for the TI? That would be fab if so. Almost every platform had some kind of Timelord game, from the BBC Micro's Doctor Who And The Mines Of Terror through the Amiga's Dalek Attack all the way up to the web games in the works on the BBC site. The TI really needs an incarnation of The Doctor as well.

 

Tangentially related, I did a remake of Daleks for a "games that could have appeared on the TI calculator" competition a while back. The best version of this old terminal classic is the Amiga one. Anyway, good luck on your own Doctor game, if that's indeed what is being alluded to. ;)

Edited by The Codex
Link to comment
Share on other sites

  • 4 years later...
  • 4 weeks later...

Still learning C99 and ran into a problem. I can get the sprite to show but it won't move. I have a key() in there that supposed to invoke the interrupt but no.motion.

Here is the code.

 

#include "DSK1.GRF1RF"

/*loaders CSUP,GRF1*/
#define sng -10
#define spo 10
main()
{
int c,s;
c=0;
grf1();
clear();
sprite (0,88,5,100,125);
spmotn(0,10,10); /* even this doesn't seem to make them move*/
while (c!=81)
{
c=key(0,&s);
if (c=="E") up();
if (c=="X") down();
if (c=="S") left();
if (c=="D") right();
/*inon();*/
}
}
up()
{ spmotn(0,sng,0); }
down()
{ spmotn(0,spo,0); }
left()
{ spmotn(0,0,sng); }
right()
{ spmotn(0,0,spo); }
/* tried below also, but no go* - it gives a compile error of duplicate code*/
/* inon()
{
#asm
LIMI 2
LIMI 0
#endasm
}
*/

 

what am I doing wrong?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...