Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

C Program to Simulate Round Robin CPU Sceduling Algorithm

The round robin CPU scheduling algorithm is simulated using C program. The time slice or time quantum is read from the user.

Program:

#include<stdio.h>
struct process{

C Program to Simulate grep Command in Linux

This post contains C program to simulate grep command in Linux or Unix operating systems

Simulation of  grep command in Linux

#include<stdio.h>
#include<string.h>
main()
{

C Program to Simulate the ls Command in Linux Operating system

This is a c program to do Simulation of ls Command in linux. The ls command lists all the contents of the directory including filse and sub-directories. The following program in C language will simulate the ls command.

#include<stdio.h>
#include<dirent.h>
main()
{

C Program to Remove (Delete) a Directory using LINUX System Calls

This is a C program to delete  or remove a directory using the system calls in Linux or Unix operating systems. The program make use of the remove() system call in Linux.

#include<stdio.h>
#include<fcntl.h>
main()
{

C Program to open, read and write files and perform file copy operation usingSystem Calls in UNIX

Write a program to open, read and write files and perform file copy operation. This program show how to open, read, write and copy files using Linux or Unix system calls like open(), read() and write().

#include<stdio.h>
#include<fcntl.h>
main()
{

C Program to Open, Read and Write a file using System Calls

This is a C program to open , read and write files using system calls in Linux (UNIX) operating systems. The system calls open(), read() and write() are used in the C program to open, read and write files in Unix/Linux operating systems.

#include<stdio.h>
#include<fcntl.h>
main()
{

Using System calls in C Program to rename a Directory in Linux

C Program to rename a directory in Unix or Linux operating systems using system call rename().

#include<stdio.h>
main()
{

How to Create process and display Process ID (pid) of Both Parent and Child

This program shows how to create process and display Process ID (pid) of Both Parent and Child processes. The process is created using the fork system call in UNIX (Linux) operating systems.

#include<stdio.h>
#include<dirent.h>
main(int argc,char **argv)
{

How to use fork and exec System Call

Using fork and exec System calls in Linux (UNIX) operating systems. Fork system call is used to create a child process from a parent process.
#include<stdio.h>
main()
{

How to use exit() System call

C program to show how to use exit system call. The function exit() is used to exit from a process (or to terminate a process). This works both in Linux or UNIX and Windows operating systems.

#include<stdio.h>
main()
{

How to make parent process wait till Completion of Child Process (Joining parent with child process)

How to make the parent process wait till the completion of execution of child process. The following C program makes the parent process to wait till the completion of its child process.

#include<stdio.h>
main()
{

Common GSM Codes or USSD Codes and Their Use

These are some of the common GSM service commands (or service codes), also called USSD (Unstructured Supplementary Service Data) codes and their use.

Call Redirection


*#61# To check status of redirection of all incoming calls, if there is no answer.

##002# To Cancel redirection of all calls

Call Waiting or Holding

How to make tables using HTML code

In HTML (Hyper Text markup Language), <table> tag is used to create tables. Table is basically meant to represent data in tabular form. But people also use tables to design webpages, especially when they want to divide the web pages into some equal blocks. Now we will start with the basics of table tag. The table starts with a <table> tag and ends with the HTML tag </table>. Whatever comes in between <table> and </table> is either the data in the table or further HTML codes to design the table. These two tags help only to inform the starting and ending of the table.

C Program to Display and Set System Time and Date Using 8086 Interrupts

This is a C Program to Display and Set System Time and Date Using 8086 Interrupts. Interrupt number 21 (in hexadecimal) is used to:
C program to get system time and date and also to set it using 8086 interrupt INT 21 interrupt 0x21 21h int86() function call interrupts in C program
Output of c Program to get and set system time and date 

  • Get System time
  • Set System time
  • Get System Date
  • Set System Date
To Get system date:
- Call interrupt 0x21 (hexadecimal) 
- AH (higher byte of accumulator) should be made equal to 2A (hex) before calling interrupt
Output:

C Program to Display SCAN and ASCII Codes of Keys on Keyboard Using 8086 Interrupt

output of C program source code to find scan code and ASCII code of any key pressed on keyboard asci ascii A 65 97 32 30 keyboard code using 8086 interrupt 16 0x16 16h INT16 int86 int86x
Output (ASCII and SCAN code) when a is pressed
This program displays SCAN code and ASCII code of any key pressed on the keyboard. We use inregs is made zero in the program. Then interrupt 16h is called using int86() function in dos.h. The arguments are interrupt number (in hexadecimal ; in C 0x16) pointer to input register and pointer to output register.

Age of Empires 3 Cheat Codes and Tricks

It would be helpful sometimes to use some of the cheat codes while you play the game Age of Empires III from Ensemble studios. There are some tricks also which will help you to enjoy the game better. Here are the cheat codes and game tricks and hints for the Age of Empire 3 Game. You can use the same cheats for the Warchiefs and Asian dynasties extension packs of the game also.

Cheat codes

Code Effect
this is too hard Win in singleplayer
<censored> Gives 10,000 wood
Ya gotta make
do with what ya got
spawns the Mediocre
Bombard at your Home City gather point
Sooo Good Turn on “Musketeer’ed!” when you get killed by Musketeers
Speed always wins

Intel 8085 Microprocessor Instructions - Hex codes and Mnemonics

In this post, we will see the 8085 Microprocessor instructions and corresponding hex codes. This table is useful to hand assemble the  8085 program. In many universities, 8085 programming is included for practicals under computer science and engineering courses. Each mnemonic has its own hex codes. An assembler is a program which converts the code written in mnemonics into hexadecimal codes. The monitor program (part of microprocessor kit) translates the hex codes to corresponding actions to be performed by CPU.

Get 8085 Simulator (with assembler)  for computer


Get 8085 Simulator for Mobile