TTP`s from C by Darryn Lavery In issue 15 Marc Young asked how to gain access to the information given to .TTP program.I personally do not know how to do this from Assembler but I do know how to do if from C and maybe of interest to other readers.This useful feature of C is because C was developed for main frames and to be used with UNIX.To access TTP information from C it is neccessary to set main with two input values:- main(argc,argv) int argc; char *argv[]; { etc... As you can probably guess argc is the number of entries and argv the entries or parameters themselves. For example if you enter the line on the example prog below hello world You would expect argc to be 2 but it is 3 because the first parameter is always CPROG. i.e argv[0]="CPROG" argv[1]="HELLO" argv[2]="WORLD" So you will always get one more than you put in .I think this is a hang-off from UNIX where programs were often run as commands. Here is that demo program:- /**************************************************/ /*A small demo to illustrate the use of passing */ /*parameters to a TTP program.Make sure that when */ /*compiling and linking this program that the */ /*resulting program has a TTP extension */ /* */ /*This program was written using Lattice C 3.04 */ /*Your compiler may not need the void cast */ /**************************************************/ #include"stdio.h" void main(argc,argv) int argc; char *argv[]; { int loop; printf("You typed %d entries\n",argc); printf("They were...\n\n"); for (loop=0;loop