Writing code on System 6?
There is no terminal application for System 6, at least not out of the box.  There is Macintosh Programmers Workshop and a couple of other oddities around, as well as things like telnet clients for connecting to other computers.  

While I don't know all possible programming languages, MPW will give you a command line, C, C++, and Pascal.  Other languages I've seen were Chipmunk BASIC, Perl, and other development environments that were common were Think C and Metrowerks CodeWarrior.  Here is a random webpage about it.