Jump to content

Photo

c99 - getting started?


78 replies to this topic

#26 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 10,733 posts
  • Location:Hustisford, WI

Posted Sun May 2, 2010 10:12 PM

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. :)

#27 Willsy OFFLINE  

Willsy

    River Patroller

  • 3,100 posts
  • Location:Uzbekistan (no, really!)

Posted Mon May 3, 2010 8:54 AM

I did a sprite designer with C99:



and



#28 unhuman OFFLINE  

unhuman

    Stargunner

  • Topic Starter
  • 1,227 posts
  • Location:Vienna, VA

Posted Mon May 3, 2010 9:17 AM

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. :)



#29 The Codex OFFLINE  

The Codex

    Dragonstomper

  • 573 posts
  • Location:Richmond, VA

Posted Mon May 3, 2010 9:23 AM

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


Agreed. Though I prefer C++ these days, being oriented to objects as I am.

#30 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 3,726 posts
  • Location:Eagan, MN, USA

Posted Mon May 3, 2010 11:46 AM

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.

#31 The Codex OFFLINE  

The Codex

    Dragonstomper

  • 573 posts
  • Location:Richmond, VA

Posted Mon May 3, 2010 11:51 AM

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.

#32 unhuman OFFLINE  

unhuman

    Stargunner

  • Topic Starter
  • 1,227 posts
  • Location:Vienna, VA

Posted Mon May 3, 2010 12:06 PM

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.



#33 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 10,733 posts
  • Location:Hustisford, WI

Posted Mon May 3, 2010 12:19 PM

Awesome stuff--- hope to get up and running playing with this language soon!!!

#34 retroclouds OFFLINE  

retroclouds

    Stargunner

  • 1,698 posts
  • Location:Germany

Posted Mon May 3, 2010 1:10 PM

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.

#35 unhuman OFFLINE  

unhuman

    Stargunner

  • Topic Starter
  • 1,227 posts
  • Location:Vienna, VA

Posted Mon May 3, 2010 1:24 PM

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.



#36 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 3,726 posts
  • Location:Eagan, MN, USA

Posted Mon May 3, 2010 4:35 PM

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.

#37 unhuman OFFLINE  

unhuman

    Stargunner

  • Topic Starter
  • 1,227 posts
  • Location:Vienna, VA

Posted Mon May 3, 2010 5:26 PM

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.

#38 unhuman OFFLINE  

unhuman

    Stargunner

  • Topic Starter
  • 1,227 posts
  • Location:Vienna, VA

Posted Mon May 3, 2010 5:30 PM

Grumble. The docs don't look very good in OpenOffice.org. Oh well. Will have to find another way.

#39 The Codex OFFLINE  

The Codex

    Dragonstomper

  • 573 posts
  • Location:Richmond, VA

Posted Mon May 3, 2010 7:17 PM

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. ;)

#40 unhuman OFFLINE  

unhuman

    Stargunner

  • Topic Starter
  • 1,227 posts
  • Location:Vienna, VA

Posted Mon May 3, 2010 8:16 PM

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. ;)



#41 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 3,726 posts
  • Location:Eagan, MN, USA

Posted Mon May 3, 2010 9:03 PM

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 :)

#42 unhuman OFFLINE  

unhuman

    Stargunner

  • Topic Starter
  • 1,227 posts
  • Location:Vienna, VA

Posted Tue May 4, 2010 5:54 AM

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, Tue May 4, 2010 5:55 AM.


#43 The Codex OFFLINE  

The Codex

    Dragonstomper

  • 573 posts
  • Location:Richmond, VA

Posted Tue May 4, 2010 8:24 AM

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. :)

#44 unhuman OFFLINE  

unhuman

    Stargunner

  • Topic Starter
  • 1,227 posts
  • Location:Vienna, VA

Posted Tue May 4, 2010 9:03 AM

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, Tue May 4, 2010 9:35 AM.


#45 The Codex OFFLINE  

The Codex

    Dragonstomper

  • 573 posts
  • Location:Richmond, VA

Posted Tue May 4, 2010 10:03 AM

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, Tue May 4, 2010 10:04 AM.


#46 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 10,733 posts
  • Location:Hustisford, WI

Posted Tue May 4, 2010 5:11 PM

I am going to unveil something here too... Marc Hull sleeps with a little brown Teddy bear with big blue eyes.

#47 hloberg OFFLINE  

hloberg

    Dragonstomper

  • 773 posts
  • Location:Land of the Road Runners (they don't go beep,beep)

Posted Fri Mar 6, 2015 3:41 PM

Anyone have the source for GRF1 (or a document description of the functions)? Going to start programming is C99 but don't have a good idea of GRF1 library functions apart from figuring them out by looking at old programs,



#48 Tursi OFFLINE  

Tursi

    Quadrunner

  • 5,638 posts
  • HarmlessLion
  • Location:BUR

Posted Sat Mar 7, 2015 4:05 AM

This disk image has the documentation for GRF1, I believe. The full C99 release is on WHTech under the Programming section.

 

Attached File  C99REL2B.zip   35.39KB   13 downloads



#49 hloberg OFFLINE  

hloberg

    Dragonstomper

  • 773 posts
  • Location:Land of the Road Runners (they don't go beep,beep)

Posted Sat Mar 7, 2015 10:36 AM

thanks Tursi, that had it. I either deleted it or the version I downloaded didn't have it.



#50 hloberg OFFLINE  

hloberg

    Dragonstomper

  • 773 posts
  • Location:Land of the Road Runners (they don't go beep,beep)

Posted Mon Mar 30, 2015 12:42 PM

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?






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users