Saturday, 11 January 2014
Thursday, 2 January 2014
SYSTEMS PROGRAMMING AND HARDWARE LAB
HOW TO RUN MASM ON UBUNTU/WINDOWS
1. Create a folder named 'splab' in the home folder
2. move (cut-paste) the extracted "MASM" folder inside splab folder in home.
Using DOSBOX for MASM (FOR UBUNTU):
1. Open terminal, type dosbox. (If not found, install it by typing "sudo apt-get install dosbox".
2. Run the command dosbox from terminal
3. At Z prompt type
'mount c /home/yourLoginName/splab'
4. Type C: ,you will get C prompt
5. Change directory to MASM to assemble masm programs (cd MASM)
How to Assemble MASM program:
1. masm program.asm (create .obj file)
2. link program.obj (create .exe file)
3. program (execute your program)
Test if MASM is working fine:
( c2e1.asm is an example program included in the folder )
1. open terminal, type dosbox
2. in dosbox type, mount c /home/yourLoginName/splab
3. type, C:
4. type, cd MASM
5. type, masm c2e1.asm
6. type, link c2e1.obj
7. type, c2e1 to run it
Firstly, Download MASM (click on the link, goto "File" and choose "download") and extract it from zip.
1. Create a folder named 'splab' in the home folder
2. move (cut-paste) the extracted "MASM" folder inside splab folder in home.
Using DOSBOX for MASM (FOR UBUNTU):
1. Open terminal, type dosbox. (If not found, install it by typing "sudo apt-get install dosbox".
2. Run the command dosbox from terminal
3. At Z prompt type
'mount c /home/yourLoginName/splab'
4. Type C: ,you will get C prompt
5. Change directory to MASM to assemble masm programs (cd MASM)
How to Assemble MASM program:
1. masm program.asm (create .obj file)
2. link program.obj (create .exe file)
3. program (execute your program)
Test if MASM is working fine:
( c2e1.asm is an example program included in the folder )
1. open terminal, type dosbox
2. in dosbox type, mount c /home/yourLoginName/splab
3. type, C:
4. type, cd MASM
5. type, masm c2e1.asm
6. type, link c2e1.obj
7. type, c2e1 to run it
Monday, 2 December 2013
COMPUTER GRAPHICS
Please visit following links for Computer Graphics Programs:
http://tripticusat.blogspot.in/
http://shubhamsalonicg.blogspot.in/
http://tripticusat.blogspot.in/
http://shubhamsalonicg.blogspot.in/
Thursday, 28 November 2013
LANGUAGE PROCESSING: COMPILER PROGRAMMING
HOW TO INSTALL LEX AND YACC IN LINUX:
Type following in Terminal.
LEX
sudo apt-get install flex-old
YACC
sudo apt-get install bison
HOW TO INSTALL LEX AND YACC IN WINDOWS:
Check Here [External Link]
Study Materials :
LEX AND YACC TUTORIAL
YYPARSE INTERNALLY
Basic Programs: Language C, LEX, YACC
YACC
Type following in Terminal.
LEX
sudo apt-get install flex-old
YACC
sudo apt-get install bison
HOW TO INSTALL LEX AND YACC IN WINDOWS:
Check Here [External Link]
Study Materials :
LEX AND YACC TUTORIAL
YYPARSE INTERNALLY
Basic Programs: Language C, LEX, YACC
YACC
For more Programs, refer following blogs from our senior:
Friday, 22 November 2013
NETWORK AND OPERATING SYSTEM
Study Materials :
IPC : PIPES, SHARED MEMORY, SOCKETS ETC
SHARED MEMORY PROGRAMMING: BASIC CONCEPT
PROCESSES
THREADS
Basic Programs : Language C
IPC : PIPES, SHARED MEMORY, SOCKETS ETC
SHARED MEMORY PROGRAMMING: BASIC CONCEPT
PROCESSES
THREADS
Basic Programs : Language C
- To-send-n-numbers-from-parent-process
- To-send-n-strings-from-parent-to-child
- To-send-back-prime-numbers-to-parent
- To-send-palindrome-back-to-parent
- Shared Memory: Child Process finds the largest and Smallest Number
- Shared Memory: Display names in alphabetical order in child process
- Producer-Consumer Problem
- X sends N numbers to Y who select prime numbers and send them to Z. Z send the sum of primes to X who displays the result. Implement IPC using pipes. X,Y,Z are processes.(2013)
- Process X gives a file name and value n to process Y. Y has to copy first n lines of file into a new file and sent the file name back to X who display the content of new file. Implement using pipes.(2013)
For more programs refer following links:
Saturday, 5 October 2013
Program to print itself :P
Language C.
Program name: printitself.c
CODE:
#include<stdio.h>
int main()
{
FILE *file;
char ch;
file = fopen("printitself.c","r");
while(( ch = fgetc(file) ) != EOF)
{
fputc(ch,stdout);
}
fclose(file);
return 0;
}
Program name: printitself.c
CODE:
#include<stdio.h>
int main()
{
FILE *file;
char ch;
file = fopen("printitself.c","r");
while(( ch = fgetc(file) ) != EOF)
{
fputc(ch,stdout);
}
fclose(file);
return 0;
}
Subscribe to:
Posts (Atom)