Friday, December 30, 2011

Impact of E-Commerce on Supply Chain Management


A production supply chain refers to the flow of physical goods and associated information from the source to the consumer. Key supply chain activities include production planning, purchasing, materials management, distribution, customer service, and sales forecasting. These processes are critical to the success of any operation whether they’re manufacturers, wholesalers, or service providers.

E-commerce impacts supply chain management in a variety of key ways. These include:

Cost efficiency:

E-commerce allows transportation companies of all sizes to exchange cargo documents electronically over the Internet. E-commerce enables shippers, freight forwarders and trucking firms to streamline document handling without the monetary and time investment required by the traditional document delivery systems.

By using e-commerce, companies can reduce costs, improve data accuracy, streamline business processes, accelerate business cycles, and enhance customer service. For example, Ocean carriers and their trading partners can exchange bill of lading instructions, freight invoices, container status messages, motor carrier shipment instructions, and other documents with increased accuracy and efficiency. The only tools needed to take advantage of this solution are a personal computer and an Internet browser.

Changes in the distribution system:

E-commerce will give businesses more flexibility in managing the increasingly complex movement of products and information between businesses, their suppliers and customers. E-commerce will close the link between customers and distribution centers. Customers can manage the increasingly complex movement of products and information through the supply chain.

Customer orientation:

E-commerce is a vital link in the support of logistics and transportation services for both internal and external customers. E-commerce will help companies deliver better services to their customers, accelerate the growth of the e-commerce initiatives that are critical to their business, and lower their operating costs.

Using the Internet for e-commerce will allow customers to access rate information, place delivery orders, track shipments and pay freight bills. E-commerce makes it easier for customers to do business with companies: Anything that simplifies the process of arranging transportation services will help build companies' business and enhance shareholder value.

By making more information available about the commercial side of companies, businesses will make their web site a place where customers will not only get detailed information about the services the company offers, but also where they can actually conduct business with the company.


Shipment tracking:

E-commerce will allow users to establish an account and obtain real-time information about cargo shipments. They may also create and submit bills of lading, place a cargo order, analyze charges, submit a freight claim, and carry out many other functions. In addition, e-commerce allows customers to track shipments down to the individual product and perform other supply chain management and decision support functions.
The application uses encryption technology to secure business transactions.

Shipping notice:

E-commerce can help automate the receiving process by electronically transmitting a packing list ahead of the shipment. It also allows companies to record the relevant details of each pallet, parcel, and item being shipped.


Shipping Documentation and Labeling:

There will be less need for manual intervention because standard bills of lading, shipping labels, and carrier manifests will be automatically produced; this includes even the specialized export documentation required for overseas shipments. Paperwork is significantly reduced and the shipping department will therefore be more efficient.

Online Shipping Inquiry:

This gives instant shipping information access to anyone in the company, from any location. Parcel shipments can be tracked and proof of delivery quickly confirmed. A customer's transportation costs and performance can be analyzed, thus helping the customer negotiate rates and improve service.

Risks:
  •    Trust
In most of the cases, customers do not trust to conduct business with a newly introduced company because they have no well reputation on the market. To achieve the belief of people, the company has to be determined to make the company’s business purposes very well.

  •     Internet connectivity
 Although e-commerce has a significant impact on supply chain management system, but e-commerce is fully dependable on the internet. So, failure of internet connection (for example, natural disaster, power failure etc) may cause a negative impact on business such as a firm can not contact with customers and other business partners, delay  of delivery etc.
 
Supply chain management links and coordinates the activities of involved in buying, making and moving a product .It also integrates supplier, manufacture,  distributor and customers by reducing time and inventory costs. E-commerce advantages are taking companies a substantial step forward by providing customers with a faster and easier way to do business with them.

Monday, November 14, 2011

The impact of E-Commerce in Bangladesh



The impact of E-Commerce in Bangladesh

Introduction:

E-commerce refers to the buying and selling of products or services over electronic systems through Internet and other computer networks. In fact, E-commerce is a way of conducting business over the Internet. Though it is a relatively new concept, it has the potential to alter the traditional form of economic activities. Already it affects such large sectors as communications, finance and retail trade and holds promises in areas such as education, health and government.

1. Impact on Business:

With the increasing diffusion of ICTs , more specifically the Internet, the global business community is rapidly moving towards Business-to-Business (B2B) e-Commerce. Bangladesh is pursuing an economic policy of export-led growth. With the rising forces of globalization, it is becoming increasingly important that the private sector, particularly the export sectors are well prepared to meet the requirements and expectations of the importers and also stand out in the competition against exporters in other countries.

2. Impact on Marketing:

In Bangladesh, the cost of delivering information to customers over the Internet results in substantial savings to senders when compared with non ­electronic delivery. Major savings are also realized in delivering digitized products versus physical delivery. Customer service can be greatly enhanced by enabling customers to find detailed information online. Also, intelligent agents can answer standard e-mail questions in seconds and human experts' services can be expedited using help-desk software.

3. Impact on organization:

     Technology and Organizational Learning Rapid progress in E-Commerce is forcing companies of Bangladesh to adapt quickly to the new technology and offer them an opportunity to experiment with new products, services, and processes. New technologies require new organizational approaches. For instance, the structure of the organizational unit dealing with E-Commerce might have to be different from the conventional sales and marketing departments.
 
  The nature of work and employment is transformed in the Digital Age.Driven by increased competition in the global marketplace, firms are reducing the number of employees down to a core of essential staff and outsourcing whatever work they can to countries where wages are significantly less expensive. The upheaval brought on by these changes is creating new opportunities and new risks and forcing us into new ways of thinking about jobs, careers, and salaries.

4. Impact on Manufacturing:

E-Commerce is changing manufacturing systems from mass production to demand-driven and possibly customized, just-in-time manufacturing. Furthermore, the production systems are integrated with finance, marketing, and other functional systems, as well as with business partners and customers. Using Web-based ERP systems, orders that are taken from customers can be directed to designers and to the production floor, within seconds. Production cycle time is cut by 50 percent or more in many cases, especially when production is done in a different country from where the designers and engineers are located.

5. Impact on Finance:

E-commerce has brought a great impact in our finance system of Bangladesh. Using ATM machine, people now can banking at any time that changes the customers' financial lives and shake the foundations of financial systems.

6. Impact on Education:

Online learning systems are now available in Bangladesh in which people can take higher study. Online learning systems are taken to mean educational structures that include a web-based technological infrastructure, online course material and online enrolment, tutoring, communication, assessment and administration procedures.

7. Impact on Transportation:

The use of the Internet to provide sell-side e-commerce has been widely adopted in the transportation in Bangladesh. Almost every transportation company offers its customers the ability to log onto its Web site to make bookings, and to track and trace shipments.

Conclusion:

So, Electronic commerce or e-commerce has brought a wide range of online business activities for products and services in Bangladesh. It also pertains to any form of business transaction in which the parties interact electronically rather than by physical exchanges or direct physical contact. E-commerce is the use of electronic communications and digital information processing technology in business transactions to create, transform, and redefine relationships for value creation between or among organizations, and between organizations and individuals.


Friday, October 28, 2011

Capability Maturity Model(CMM)

The Capability Maturity Model (CMM)

The Capability Maturity Model (CMM) is a methodology used to develop and refine an organization's software development process. The model describes a five-level evolutionary path of increasingly organized and systematically more mature processes.

History

The Capability Maturity Model was initially funded by military research. The United States Air Force funded a study at the Carnegie-Mellon Software Engineering Institute to create a model for the military to use as an objective evaluation of software subcontractors. The result was the Capability Maturity Model, published as Managing the Software Process in 1989.

Software Process

A software process can be defined as a set of activities, methods, practices, and transformations that people use to develop and maintain software and the associated products
Example: project plans, design documents, code, test cases, and user manuals.
As an organization matures, the software process becomes better defined and more consistently implemented throughout the organization.


Maturity Model

A maturity model is a structured collection of elements that describe characteristics of effective processes.
A maturity model can be used as a benchmark for assessing different organizations for equivalent comparison. It describes the maturity of the company based upon the project the company is dealing with the clients.


How can the CMM help an organization?

First, the CMM helps build an understanding of software process by describing the practices that contribute to a level of process maturity.

The second role of the CMM is to provide a consistent basis for conducting appraisals of software processes. The CMM defines a scale for measuring process maturity, thus allowing an organization to accurately compare its process capability to that of another organization. ISO is using the CMM in its efforts to develop international standards for software process assessments.

The CMM 's third role is to serve as a blueprint for software process improvement. The CMM can help an organization focus on the areas it must address in order to advance to the next level of maturity.

CMM 's Five Maturity Levels of Software Processes


IT management uses the CMM tool to improve the software development process. There are two steps to use the tool. The first step is to measure where the organization stands in terms of the CMM levels. The next step is to use the CMM tool for process improvement to move the organization up to the next level.

Level 1 Initial level:

 At this level, processes are disorganized, even chaotic. Success is likely to depend on individual efforts. Even in large organizations, CMM Level 1 is common. Many times, software development takes place in department and business unit groups without any centralized direction or control. Duplication of systems functionality and incompatible systems are developed without considering the needs of the overall organization. There is little sharing of knowledge or code because each software developer might use different tools and techniques.
The only advantage of CMM Level 1 software development is that the software might be developed quickly to meet the exact needs of the business unit. But this one advantage is heavily outweighed by the inefficiencies caused by the chaotic nature of this process.

Level 2 Repeatable level:

Basic project management processes are established to track cost, schedule, and functionality. The necessary process discipline is in place to repeat earlier successes on projects with similar applications. For an organization to have a repeatable process, the project management controls and discipline that are provided by the Level 2 KPAs must first be established. Without a foundation of disciplined project management, even effective software engineering procedures may be abandoned during times of schedule pressure or rapidly changing requirements.

Level 3 Defined level:

The software process for both management and engineering activities is documented, standardized, and integrated into a standard software process for the organization. All projects use an approved, tailored version of the organization's standard software process for developing and maintaining software.
At CMM Level 3, software development for the organization is centralized.
Individual departments and business units may still employee development groups, but management oversight and software development processes are centrally controlled. In many companies, all software development is centralized and business units contract with the software development group for services.
By eliminating duplication of effort and allowing better integration of software across the organization, operating at CMM Level 3 provides benefits that help the organization meet its business goals.


Level 4 Managed level:

At this level, an organization monitors and controls its own processes through data collection and analysis. At CMM Level 4, the software development group collects performance and quality metrics to measure how well it is doing. Caution must be used at this step to collect the right metrics. Many organizations begin by attempting to collect too much information and the process becomes overly bureaucratic and costly.


Level 5 Optimizing level:

Quantitative feedback from the process and from piloting innovative ideas and technologies enables continuous process improvement. An organization reaches CMM Level 5 by taking the process and quality data it began collecting, using it in Level 4, and creating a feedback loop to continuously monitor and control the software development process. At Level 5, quality control is built into the software development process. An important benefit for an organization operating at CMM Level 5 is the ability to try out new technologies and processes with a reduced risk of failure. Because the software development process is constantly monitored, a new technique or process can be stopped or adjusted if it does not perform adequately.

 Key Process Areas(KPAs) of CMM 

            Each CMM level focuses on a series of Key Process Areas (KPAs) . The KPA's for a particular level are the focus of enhancements. As processes are systematically implemented, it helps an organization to move to the next maturity level. Within each KPA, is a set of key practices to be taken in order to effectively follow and institutionalize the achievement of the process goals.

Maturity Level
Key Process Areas
1
No KPAs
2
        a. Software Requirement Management
The purpose of Requirements Management is to manage requirements of the project’s products and product components and to ensure alignment between those requirements and the project’s plans and work products.

         b. Software Project Planning
The purpose of Software Project Planning is to establish reasonable plans for performing the software engineering and for managing the software project.

       c. Software Project Tracking & Oversight
The purpose of Software Project Tracking and Oversight is to provide adequate visibility into actual progress so that management can take effective actions when the software project's performance deviates significantly from the software plans.
        d. Software Subcontract Management
The purpose of Software Subcontract Management is to select qualified software subcontractors and manage them effectively.

    e. Software Quality Assurance
The purpose of Software Quality Assurance is to provide management with appropriate visibility into the process being used by the software project and of the products being built.

         f. Software Configuration Management
The purpose of Software Configuration Management is to establish and maintain the integrity of the products of the software project throughout the project's software life cycle.
3
     a.  Organizational Process Focus
The purpose of Organization Process Focus is to establish the organizational responsibility for software process activities that improve the organization's overall software process capability.
Organization Process Focus involves developing and maintaining an understanding of the organization's and projects' software processes and coordinating the activities to assess, develop, maintain, and improve these processes.

     b.  Organizational Process Definition
The purpose of Organization Process Definition is to develop and maintain a usable set of software process assets that improve process performance across the projects and provide a basis for cumulative, long-term benefits to the organization.

Organization Process Definition involves developing and maintaining the organization's standard software process, along with related process assets, such as descriptions of software life cycles, process tailoring guidelines and criteria, the organization's software process database, and a library of software process-related documentation.

         c.Training Program
The purpose of the Training Program key process area is to develop the skills and knowledge of individuals so they can perform their roles effectively and efficiently.
Training Program involves first identifying the training needed by the organization, projects, and individuals, then developing or procuring training to address the identified needs.

     d.  Software Product Engineering
The purpose of Software Product Engineering is to consistently perform a well-defined engineering process that integrates all the software engineering activities to produce correct, consistent software products effectively and efficiently.
     e.  Integrated Software Management
The purpose of Integrated Software Management is to integrate the software engineering and management activities into a coherent, defined software process that is tailored from the organization's standard software  process to address the specific characteristics of the project
          f. Inter-Group Coordination
The purpose of Intergroup Coordination is to establish a means for the software engineering group to participate actively with the other engineering groups so the project is better able to satisfy the customer's needs effectively and efficiently.

     g. Peer Review
Peer Reviews involve a methodical examination of software work products by the producers' peers to identify defects and areas where changes are needed. The specific products that will undergo a peer review are identified in the project's defined software process and scheduled as part of the software project planning activities.




4
          a. Software Quantitative Process Management
The purpose of Quantitative Process Management is to control the process performance of the software project quantitatively. Software process performance represents the actual results achieved from following a software process.

         b. Software Quality Management
Software Quality Management involves defining quality goals for the software products, establishing plans to achieve these goals, and monitoring and adjusting the software plans, software work products, activities, and quality goals to satisfy the needs and desires of the customer and end user for high quality products.

5
         a.  Defect Prevention
Defect Prevention involves analyzing defects that were encountered in the past and taking specific actions to prevent the occurrence of those types of defects in the future. The defects may have been identified on other projects as well as in earlier stages or tasks of the current project. Defect prevention activities are also one mechanism for spreading lessons learned between projects.
.       
      b. Technology Change Management

Technology Change Management involves identifying, selecting, and evaluating new technologies, and incorporating effective technologies into the organization. The objective is to improve software quality, increase productivity, and decrease the cycle time for product development.

         c. Process Change Management
The purpose of Process Change Management is to continually improve the software processes used in the organization with the intent of improving software quality, increasing productivity, and decreasing the cycle time for product development.




 
A simple example can explain all of the five levels for an organization:
LEVEL 1

GIAC Bikes got into the software development business when the World Wide Web became popular. GIAC Bikes wanted a web presence, and one of the offices personal volunteered to develop the GIACBikes.com web site. The volunteer had no formal software development training but did an excellent job getting the web site developed. The GIACBikes.com web site was very popular and generated much new business for GIAC Bikes. Over the years, new features were added and the web site became more and more mission critical for GIAC Bikes. As developer left the company, others stepped up to run the web site; however, a little was documented, and the system became complex and hard to maintain. Serious security and operational problems surfaced regularly. These problems were difficult and costly to correct because no one person knew how the system was developed or how it operated. GIAC Bikes management decides that the organization needs a better way to develop and maintain the GIACBikes.com web site software.

LEVEL 2

GIAC Bikes management takes the following steps to move the software development process from Level 1 (ad hoc) to Level 2 (repeatable):
 1. Training – GIAC Bikes programmers receive training in software development techniques and processes, including the Software Development Lifecycle (SDLC).

 2. Organization – GIAC Bikes management creates a business analyst position. The business analyst job description includes overall responsibility for GIAC Bikes software development and web site. The business analyst job title may be different (i.e. systems analyst, IT project manager), but the job function to direct and control the software development process is the same.
Now, the GIAC Bikes software development process has some definition as new projects are developed with a SDLC methodology. The software development function is led by a person whose job is to organize the development efforts and be sure the software meets the needs of GIAC Bikes.
GIAC Bikes software is now built and documented using a known process and so, it becomes easier and cheaper to maintain and enhance the software.

LEVEL 3

      After gaining experience operating at CMM Level 2, GIAC Bikes management decides it needs further improvement in the software development process. To move from CMM Level 2 (repeatable) to CMM Level 3 (defined), GIAC Bikes management takes these steps:
  
  1. Project Management – GIAC Bikes institutes a formal Project Management Office (PMO). The PMO is a central place to manage all GIAC Bikes software development projects. GIAC Bikes institutes a formal company policy giving the PMO responsibility for software development projects and project management and SDLC methodologies.

  2. Custom SDLC methodology - Based on experience from operating at CMM Level 2, GIAC Bikes customizes a SDLC methodology around its unique business needs.  At Level 3 of the CMM, GIAC Bikes elevates the importance of the software development process for the organization by formalizing the SDLC process and centralizing control over the process. This step adds stronger management oversight to the software development process. By customizing the process methodology, GIAC Bikes makes the process more efficient because those decisions do not have to be made for each new project.

LEVEL 4

      At CMM Level 4, GIAC Bikes identifies metrics to measure the effectiveness of its project management and SDLC methodologies. Some example metrics include schedule and cost performance measures for project management and software defect rates (including security defects) for software development. This is a difficult and costly step because collecting and analyzing quantitative metrics is time-consuming. But GIAC Bikes finds that the payoff is worth the cost as it can identify problem areas in its processes and correct the problems. It also allows GIAC Bikes management to spot projects that are beginning to go out of control and take corrective action before the project crashes. Putting quantitative metric collection process in place now allows GIAC Bikes to move to the final CMM level.

LEVEL 5
 
   With quality metrics in place from CMM Level 4 (managed), GIAC Bikes is ready to reap the full benefit from its software development process improvements. Because GIAC Bikes can measure the effects of changes to the software development process, it can try new techniques and measure the impact. For example, GIAC Bikes programmers try a new programming language. Because metrics for the old system can be compared to the new system, GIAC Bikes determines that the new programming language cuts programming defects by 20 percent. Based on these results, the new programming language is adopted companywide and saves money on maintenance programming. GIAC Bikes is in a position to optimize the software development process and react positively to new business needs and technology changes.

   The framework for process improvement provided by the CMM can go a long way toward improving the ability of a software organization to be successful on project after project.

Tuesday, June 21, 2011

Buy original books (foreign) at very low price in Bangladesh

Recently, a book named "COMPUTER ORGANIZATION AND ARCHITECTURE(8th Edition) by William Stallings " was needed to buy for my study and that's why i went to Nilkhet to buy the original copy of the book. But the book was not available at every bookshop and hardly i got a book but the seller wanted 650Tk. for this. Then another good seller gave me a advise to go to a shop where any foreign books can be purchased at the same price of rupee and then i went to that shop and bought the book at the price of 400Tk.(399Rupee).From then,i suggest every of my friends to visit the shop.Here,i have attached the address of the shop for everybody.

Place to buy original books at low price in Bangladesh
 Parama Publishers & Distributors Ltd.
House-7,Road-4
Momotaz Plaza(Opposite of LabAid Hospital)
Dhanmondi,Dhaka-1205

Implementation of Tic-Tac-Toe game (Human-to- Human) in C++

This is a simple tic-tac-toe game in c++ which i have collected from the web. I have edited it for myself and it is working 100% perfectly.You can also enjoy it :-)

Code:
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>

void Board();
void PlayerX();
void PlayerO();
void Player_win();
void check();
int win=0,wrong_X=0,wrong_O=0,chk=0;

char name_X[20];
char name_O[20];
int pos_for_X[3][3];
int pos_for_O[3][3];
int pos_marked[3][3];

void main()
{
int i,ch,j;
char ans;

do
{
clrscr();
printf("\n\t\t\t\t*TIC TAC TOE GAME*");
printf("\n\t\t\t\t");

printf("\n1.Start The Game");
printf("\n2.Quit The Game");
printf("\nEnter your choice(1-2) : ");
scanf("%d",&ch);
switch(ch)
{
case 1:
chk=0;
win=0;
for(i=1;i<=3;i++)
{
for(j=1;j<=3;j++)
{
pos_for_X[i][j]=0;
pos_for_O[i][j]=0;
pos_marked[i][j]=0;
}
}
printf("\n\n");
printf("\nEnter the name of the player playing for'X': ");
fflush(stdin);
gets(name_X);
printf("\nEnter the name of the player playing for 'O': ");
fflush(stdin);
gets(name_O);
Board();
for(;;)
{
if(win==1)
break;
check();
if(chk==9)
{
printf("\n\n\t\t\tMATCH TIE!");
printf("\nPress any key....");
break;
}
else
chk=0;
printf("\nTURN FOR %s:",name_X);
PlayerX();
do
{
if(wrong_X!=1)
break;
wrong_X=0;
printf("\nTURN FOR %s:",name_X);
PlayerX();
}while(wrong_X==1);
check();
if(chk==9)
{
printf("\n\t\t\tMATCH DRAWS");
printf("\nPress any key....");
break;
}
else
chk=0;
printf("\nTURN FOR %s:",name_O);
PlayerO();
do
{
if(wrong_O!=1)
break;
wrong_O=0;
printf("\nTURN FOR %s:",name_O);
PlayerO();
}while(wrong_O==1);

}
Board();
if(win!=1)
{
printf("\n\t\t\tMATCH TIE!");
printf("\nPress any key.......");
}
getch();
break;
case 2:
printf("\n\n\n\t\t\t\tThank You");
printf("\n\t\t\t\t__________");
getch();
exit(1);
break;
}
printf("\nWant To Play(Y/N) ? ");
fflush(stdin);
scanf("%c",&ans);
}while(ans=='y' || ans=='Y');
}
void Board()
{
int i,j;
clrscr();
printf("\n\t\t\t\tTIC TAC TOE BOARD");
printf("\n\t\t\t\t*****************");
printf("\n\n\n");
printf("\n\t\t\t    1\t      2\t        3");
for(i=1;i<=3;i++)
{
printf("\n \t\t\t _____________________________");
printf("\n \t\t\tº\t  º\t   º\t     º");
printf("\n\t\t%d\t",i);
for(j=1;j<=3;j++)
{

if(pos_for_X[i][j]==1)
{
printf("    X");
printf("     ");
}
else if(pos_for_O[i][j]==1)
{
printf("    O");
printf("     ");
}
else
{
printf("          ");
continue;
}
}
printf("\n\t\t\tº\t  º\t   º\t     º");
}
printf("\n\t\t\t------------------------------");
Player_win();
}


void PlayerX()
{
int row,col;
if(win==1)
return;
printf("\nEnter the row no. : ");
fflush(stdin);
scanf("%d",&row);
printf("Enter the column no. : ");
fflush(stdin);
scanf("%d",&col);
if(pos_marked[row][col]==1 || row<1 || row>3 || col<1 || col>3)
{
printf("\nWRONG POSITION!! Press any key.....");
wrong_X=1;
getch();
Board();
}
else
{
pos_for_X[row][col]=1;
pos_marked[row][col]=1;
Board();
}
}
void PlayerO()
{
int row,col;
if(win==1)
return;
printf("\nEnter the row no. : ");
scanf("%d",&row);
printf("Enter the column no. : ");
scanf("%d",&col);
if(pos_marked[row][col]==1 || row<1 || row>3 || col<1 || col>3)
{
printf("\nWRONG POSITION!! Press any key....");
wrong_O=1;
getch();
Board();
}
else
{
pos_for_O[row][col]=1;
pos_marked[row][col]=1;
Board();
}
}
void Player_win()
{
int i;
for(i=1;i<=3;i++)
{
if(pos_for_X[i][1]==1 && pos_for_X[i][2]==1 && pos_for_X[i][3]==1)
{
win=1;
printf("\n\nRESULT: %s wins!!",name_X);
printf("\nPress any key............");
return;
}
}
for(i=1;i<=3;i++)
{
if(pos_for_X[1][i]==1 && pos_for_X[2][i]==1 && pos_for_X[3][i]==1)
{
win=1;
printf("\n\nRESULT: %s wins!!",name_X);
printf("\nPress any key............");
return;
}
}
if(pos_for_X[1][1]==1 && pos_for_X[2][2]==1 && pos_for_X[3][3]==1)
{
win=1;
printf("\n\nRESULTL: %s wins!!",name_X);
printf("\nPress any key......");
return;
}
else if(pos_for_X[1][3]==1 && pos_for_X[2][2]==1 &&
pos_for_X[3][1]==1)
{
        win=1;
printf("\n\nRESULT: %s wins!!",name_X);
                printf("\nPress any key.....");
return;
}

        for(i=1;i<=3;i++)
{
if(pos_for_O[i][1]==1 && pos_for_O[i][2]==1 && pos_for_O[i][3]==1)
{
win=1;
printf("\n\nRESULT: %s wins!!",name_O);
printf("\nPress any key.....");
return;
}
}
for(i=1;i<=3;i++)
{
if(pos_for_O[1][i]==1 && pos_for_O[2][i]==1 && pos_for_O[3][i]==1)
{
win=1;
printf("\n\nRESULT: %s wins!!",name_O);
printf("\nPress any key.....");
return;
}
}
if(pos_for_O[1][1]==1 && pos_for_O[2][2]==1 && pos_for_O[3][3]==1)
{
win=1;
printf("\n\nRESULT: %s wins!!",name_O);
printf("\nPress any key.....");
return;
}
else if(pos_for_O[1][3]==1 && pos_for_O[2][2]==1 &&
pos_for_O[3][1]==1)
{
        win=1;
printf("\n\nRESULT: %s wins!!",name_O);
                printf("\nPress any key.....");
return;
}
}
void check()
{
int i,j;
for(i=1;i<=3;i++)
{
for(j=1;j<=3;j++)
{
if(pos_marked[i][j]==1)
chk++;
else
continue;
}
}
}





Sunday, March 27, 2011

Print a string multiple times using assembly language

Objective:
Using this simple code, we can easily print a string as we need.

Instruction:

M1  DB  'Maria',0DH,0AH,'$' -> This line instructs that need to print Maria
MOV CX,10 -> The name 'Maria ' will print for 10 times

Code:

 .MODEL SMALL
.STACK 100H
.DATA

M1  DB  'Maria',0DH,0AH,'$'

.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AX

MOV CX,10
PRINT_LOOP:

MOV AH,9
LEA DX,M1
INT 21H
DEC CX

JNZ PRINT_LOOP

MOV AH,4CH
INT 21H

MAIN ENDP
END MAIN