Using flowcharts, simulate the tasks required to read a C program and compile the program. The C program name, input as a program argument, will be passed to a compiler 'gcx' to compile the input program. Assume the 'gcx' compiler is in your environment path. The 'gcx' compiler will read one text line (up to a CR/LF or EOF in the file) at a time from the input text based C program, parse the input text program into compiled tokens, and write the binary tokens to a 'tmp' directory in a file called 'tokens.o'. The 'tmp' directory will be relative to the directory of the C program. All parsed tokens from the C program will be written to a 'tokens.o' binary output file. Once all the tokens are written to its binary output file, the 'gcl' linker will be invoked to assemble the 'tokens.o' file along with a dependent library 'system.out' located in the '/lib' directory to produce a final binary executable file. Assume the 'gcl' linker is in your environment path. The output binary executable will be created with the same name as the C program except with an 'out' extension. Linking is done by reading each .o file one at a time using a processing buffer of 1024 bytes and concatenating the contents of one file to the end of the previous file to produce the output binary file. This will require multiple flowcharts. Once all of the binary data has been written to the output file, a checksum will be calculated and put in the header of the file. The checksum will be written as a 64-bit binary number at the beginning of the output file to produce the final output file. The final output file will be written relative to the directory of the C input text program. All files in the 'tmp' directory will be removed once the linker has finished producing the final output file. This will require multiple flowcharts.
Using flowcharts, simulate the tasks required to read a C
Trending now
This is a popular solution!
Step by step
Solved in 3 steps