Monday 24 October 2016

8086 Assembler Tutorial for Beginners

8086 Assembler Tutorial for Beginners(PART-1)


 This tutorial is intended for those who are not familiar with assembler at all, or have a very distant idea about it. Of course if you have knowledge of some other programming language (Basic, C/C++, Pascal...) that may help you a lot. But even if you are familiar with assembler, it is still a good idea to look through this document in order to study emu8086 syntax. It is assumed that you have some knowledge about number representation (HEX/BIN), if not it is highly recommended to study
Numbering Systems Tutorial before you proceed.


What is an assembly language?

Assembly language is a low level programming language. You need to get some knowledge about computer structure in order to understand anything. The simple computer model as I see it: 

The system bus (shown in yellow) connects the various components of a computer. 

The CPU is the heart of the computer, most of computations occur inside the CPU.


RAM is a place to where the programs are loaded in order to be executed.

GENERAL PURPOSE REGISTERS 8086 CPU has 8 general purpose registers, each register has its own name:
· AX - the accumulator register (divided into AH / AL).
· BX - the base address register (divided into BH / BL).
· CX - the count register (divided into CH / CL).
· DX - the data register (divided into DH / DL).
· SI - source index register.
· DI - destination index register.
· BP - base pointer.
· SP - stack pointer. Despite the name of a register, it's the programmer who determines the usage for each general purpose register. The main purpose of a register is to keep a number (variable). The size of the above registers is 16 bit, it's something like: 0011000000111001b (in binary form), or
12345 in decimal (human) form. 4 general purpose registers (AX, BX, CX, DX) are made of two separate 8 bit registers, for example if AX= 0011000000111001b, then AH=00110000b and AL=00111001b. Therefore, when you modify any of the 8 bit registers 16 bit register is also updated, and vice-versa. The same is for other 3 registers, "H" is for high and "L" is for low part. Because registers are located inside the CPU, they are much faster than memory. Accessing a memory location requires the use of a system bus, so it takes much longer. Accessing data in a register usually takes no time. Therefore, you should try to keep variables in the registers. Register sets are very small and most registers have special purposes which limit their use as variables, but they are still an excellent place to store temporary data of calculations.

Sunday 23 October 2016

Homeless to billionaire(John Paul Dejoria)

John Paul Dejoria-

John Paul Jones DeJoria (born April 13, 1944) is a Greek-Italian-American billionaire businessman and philanthropist best known as a co-founder of the Paul Mitchell line of hair products and The Patrón Spirits Company.John Paul DeJoria slept in his car and sold shampoo door-to-door before he teamed up with Paul Mitchell in 1980 and turned $700 into hair-care outfit John Paul Mitchell Systems. The company is still going strong with an estimated $1 billion in annual revenues. He later helped create tequila distiller Patrón Spirits as a hobby. Today Patron sells some 2.4 million cases of premium tequila per year. DeJoria also has interests in a range of industries, including life sciences, yachts and telecom.  Net worth-3.1 billions.

  Homeless to billionaire 

 

 

 The following interview has been edited for brevity and clarity.

(SOURACE-BUSINESS INSIDER)

Business Insider: When did you know you were going to start your own business?
John Paul DeJoria: After I was fired for the third time, I started a consulting firm in 1978. For a couple of years I did that. It was tough. But it was still my own business. Then I knew I wanted to find my niche. I wanted to be an owner of a business that did something physical.
That's when I started John Paul Mitchell Systems with a pal of mine [the late Paul Mitchell] who was a super hairdresser.
BI: And that's also when you were homeless for the second time. How did you go broke?
JPD: We thought we had half a million dollars to start John Paul Mitchell in 1980. The guy backed out. And we didn't have another option.Inflation in the US was over 12%, interest rates 17% - it was a terrible time.
But we believed so much in what we were going to do, we were going to do it. So we started with $700.
BI: Then you split from your second wife and moved out.
JPD: I lived in my car, and I learned how to live off a couple of dollars a day.
It taught me how to survive. I slept in my car, and I could shower by the pool at Griffith Park.
I'd go to the Freeway Cafe in LA after 9 in the morning, because for 99 cents you got one egg, one piece of toast, one orange juice or coffee, and either one piece of bacon or sausage. Then I'd go to a Mexican restaurant called El Torido between 4:30 and 5:30 in the afternoon because for 99 cents you got a margarita and some food like little tacos or chicken wings.
I explained my situation to the girl who worked there after she asked, and they'd occasionally bring me an entree. Once I started making money I went back and I tipped them very well.
After a couple weeks being homeless, an actress named Joanna Pettet came by my car. She heard I was living in it and couldn't believe it. I had left my house behind with my family because we were parting ways at that time. She gave me a room to stay in for a couple months until I got back on my feet. It was wonderful of her.
BI: How did the experience affect you?
JPD: When you're so low that you look up and see ants walking over you, you can only go up. And then when you do, it's so easy to give and help others because you remember where you were before.
So from that point forward, whenever I would earn some extra money, I'd find a way to give back.
You don't forget the people who've helped you.
BI: What did it feel like when John Paul Mitchell started to catch on?
JPD: I was very happy. The biggest thing was I could sleep at night and not worry about not paying my bills the next day, because that freaked me out.
After selling Paul Mitchell products for two years, we could finally pay our bills on time. And at $2,000 each left over, we gave ourselves a dividend, and then I knew man, we had made it!
BI: What appealed to you about the hair-care industry?
JPD: I was fascinated with hair care because the industry was about professionals who wanted to enhance everyone's beauty.
I met Paul in 1972 at the Fountain Blue Hotel in Florida during a beauty convention. Paul never did business. I never did hair, so we were perfect partners.
BI: In 1989, you and the late Martin Crowley bought a Mexican distillery. What made you want to get into the tequila business?
I liked margaritas but had a very difficult time drinking tequila straight. It was appealing to have one luxury tequila that you could sip and not a get a terrible hangover. I was given the opportunity to create the finest tequila in the world and decided why not give it a try. If not, I'd have bottles of tequila to give as presents for everyone for years to come.
BI: How did you build the Patron brand?
JPD: It was so expensive to make. The type of agave we used and the way it's processed - we had to sell it for $37.95 a bottle. Your average tequila was $4 or $5 a bottle. But it was better, so we had to let people know it was worth it.
We did a Paul Mitchell event where 3,000 hairdressers came, and we gave it to them for free.
I would also go to franchise restaurants and bars and say, "Hey, check this out and compare it to the best tequila you've had. Here's a couple bottles. Could you sell it to some of your celebrity guests?"
Little by little it caught on.
BI: You've invested in an eclectic variety of products. Besides Paul Mitchell and Patron, there are several other brands ranging from affordable wireless service ROK Mobile to cold sore balm Aubio. How do you decide what businesses to spend money on?
JPD: It must be something that I would be proud to be associated with.
As an example, I've invested so much money in water programs to try and come up with clean water, and I've lost a lot of millions. But I'm still plugging away.
Is it good for mankind? Is it good for the environment? How does it benefit everybody, and how does it create jobs? Can I bring it out where it's going to be affordable? Is it something I would be proud to be associated with?
That's the big deal. I turn down almost everything, but occasionally something will come through.
I don't want to sell things to people. I want the service or the product to be so good that people will tell their friends about it or reorder it.
BI: It seems like your approach to business is similar to your involvement in humanitarian and environmental efforts through the Peace, Love & Happiness Foundation.
JPD: I'm one the the young adults of the '60s. We all had movements where we were going to change the world and make things better. A lot of those things just stuck with me.
BI: Was it difficult, given your modest roots, to ground yourself as you became increasingly wealthy?
JPD: It was very easy. In my case, as the money came, I was so thankful and appreciative. And I didn't forget those who helped me.
I think it was from my upbringing. As a young boy my mom taught me about giving back a little bit, even though we had nothing. At Christmas we might give a dime from the whole family to the Salvation Army. She would say, "Boys, they need it more than we do."
BI: What was the best advice that you ever received?
JPD: I got it when I sold encyclopedias door to door in my early 20s. I would just go out there and bang on doors - the average encyclopedia salesmen that was on commission lasted three days after training. I was out there about three and a half years and made pretty good money.
The company would tell us, "When the going's tough, the tough get going, and never give up. You must knock on door number 25 or 50 or 100 as enthusiastically as you did on the first door that was closed in your face."
I tell a lot of both young and even mature businesspeople that you need to be prepared for a lot of rejection and never give up their enthusiasm. It'll get you eventually to a successful area.
BI: The CIA has invited you to speak to their teams about management. What is your general management philosophy?
JPD: Fewer moving parts. Fewer people doing more.
A lot of people are just bogged down with middle management and don't give other managers the opportunity to make decisions.
BI: Are you in touch with each of your teams every single day?
JPD: That's impossible. We have too many people now, but everyone knows they can pick up the phone and call me at anytime they want to. I don't have email - if I had email, I'd be inundated.
BI: What is your best advice to managers?
JPD: Whenever someone does a good job, praise them loudly in front of as many people as you possibly can.
Whenever you have to reprimand somebody, do it one on one behind closed doors so nobody hears you. Tell them what they did incorrectly and how to do it correctly.
Then tell them something they're doing right so that they leave with a good feeling.

 

 

Powered by Blogger.