728x90

Operating System 72

Lec11) Design and Code of UNIX more utility

notice it is just displaying only the first file. let's fix this issue. we add while loop and used "argv[i]" instead of "argv[1]" . this way we can iteratively stdout files. now it works fine. #include #include #definePAGELEN20 #defineLINELEN512 void do_more(FILE *); int get_input(); int main(int argc , char *argv[]) { int i=0; if (argc == 1){ printf("This is the help page\n"); exit (0); } FILE ..

Lec03) Working of Linkers: Creating your own Libraries

every .o file start with 0 memory address. relocate symbols from thier relative locations in the .o files to their final absolute memory location in the executables. Global symbol = that are defined in one module and can be reference by other module. External symbol = Gobal symbol that are referenced by a module but are defined in some other module. declared with 'external' keyword Local symbol ..

728x90