Subscribe For Free Updates!

We'll not spam mate! We promise.

Thursday 18 July 2013

Saturday 18 May 2013


Top 10 Online Shopping Sites in India – Best Indian Online Shopping Websites

 (1) Flipkart.com .You can not only buy books online through Flipkart, but also mobile phones & mobile accessories, laptops, computer accessories, cameras, movies, music, televisions, refrigerators, air-conditioners, washing-machines, MP3 players and products from a host of other categories. After takeover of letsbuy.com now flipkart is largest  player of e-commerce of India.

 (2) ebay.in  - After almost 6month of dominating at number 1 ebay has come down at number two on indiafreestuff.in list.  eBay.in is the Indian version of the popular online shopping portal eBay.com – world’s online marketplace. Ebay has a diverse and passionate community of individuals and small businesses. Ebay offers used and fresh items with a wide network of international shipping.

(3) tradus.com - Tradus.in is owned by ibibo from books to clothes they sell you everything and after buying Buytheprice.com they have become more bigger. Tradus offers the Online Shopping in India to buy Books, Mobiles, Cameras, Watches, Apparel, Home Appliances, Ipods & Many More at Lowest Price & Free shipping although their refunding process takes more than expected time and they don’t ship all over India but still at no 3 on our list.

(4) Shopclues.com:- Shopclues is famous for their heavily discounted Jaw Dropping deals. Shopclues is one of the best online stores that offers a wide variety of cameras, Computer accessories, Mobile, Gift, Jewellery, Cosmetics, toys, clothes, books and bag. Their Jaw Dropping dealhas become most liked deal of 2012.

(5) infibeam.com - India’s Online Shopping Platform offers Buy Mobile Phones, Books, Apparel, Jewellery, Cameras, Watches, Send Gifts to India, New/ Used Cars & Bikes in India a report says 40 lakh visits per month by Indians on this site.

 (6) homeshop18.com -here you find large range appliances, kitchen, cameras, mobiles, laptops, site, indian, gifts, apparel, buy, online, gifts. and more, HomeShop18 is a venture of theNetwork18 Group, India’s fastest growing media and entertainment Group. Network18 operates India’s leading business news television channels – CNBC TV18 and CNBC Awaaz. HomeShop18 has also launched India’s first 24 hour Home Shopping TV channel. The company has its headquarters in Noida, UP. The website has received the ‘Best shopping site” award from PC World Magazine in 2008

(7) Yebhi.com-   Yebhi is India Largest Shopping Destination for your Wardrobe. Shop for shoes, apparels, jewelery, Bags and more. No matter yebhi rules in Apparel catagory and if you want to buy clothes or shoes online this is best site, Their deals become more lucrative with discount coupons, Now they are also selling mobiles at good price

 (8) Snapdeal.com - SnapDeal offers everything from local daily deals on restaurants, spas, travel to online products deals. They offer you best price with free shipping.

(9) Pepperfry.com :- Pepperfry is one of leading Indian website in selling lifestyle products ranging from men and womens clothing, home decor, jewellery, perfumes and cosmetics, furnitures, bags and accessories.

(10) indiaplaza.in – Score(6.06) indiaplaza.in is on 10th place of indiafreestuff.in  ranking, Shop online over 8 million items at India’s largest shopping site at lowest prices.


( 11) Myntra.com :-Myntra.com is leading online retailer of lifestyle and fashion products. Myntra offers T-shirts, Shoes, watches and more at discounted price.

Hope u r satisfied !! :P




Tuesday 14 May 2013

HTML5 Boilerplate

The web's most popular front end template 

helps u create fast,robust,adaptable apps or sites
Download it here 

DOWNLOAD

Tuesday 30 April 2013

15 Awesome Tutorial Websites !!

15 Awesome Tutorial Websites ! !

Here are 15 super-useful sites which aim to provide you with all the tutorials you'd ever need.

  1. How Stuff Works
    How Stuff Works is probably the best known How-to tutorials site. It has has a vast and diverse collection with topics ranging from food, health, computers, etc. One of the best things about this site is that it explains even the toughest tutorial in a very simple and easy to understand language.

  2. YouTube
    Surprised? Well, it shouldn't be if you use YouTube a lot. Yesterday my younger brother bought a new guitar and the very first thing he needed to do was to tune it. So he just logged on, went to youtube.com and searched for "How to tune a guitar". And there you go! He had a nice video explaining the process step-by-step.

  3. eHow
    eHow is another comprehensive tutorials website with detailed instructions on how to do just about anything. Like How Stuff Works, this site also covers a wide range of topics.

  4. About.com's Video Tutorials
    About.com's video tutorial site has a collection of very informative how-to videos and screencasts on topics which include Parenting, Style, Electronics and Gadgets, etc. I found the collection to be very comprehensive and probably better than You Tube's collection of similar videos.

  5. wikiHow
    wikiHow, as it says, is an editable How-to site with 40,100 articles contributed by volunteers from different parts of the world. You're sure to find some nice tutorials here too.

  6. Instructables
    Instructables is a cool Do-It-Yourself site that has an extensive collection of user submitted how-to articles and easy instructions complete with videos and photographs. It's a community driven website where you can submit content, vote and comment on existing content.

  7. Wired's How-To Wiki
    Wired magazine's how-to wiki has some very elaborate and detailed tutorials focussed primarily on topics like Gadgets, Technology and Computers. You can also subscribe to its RSS feed to get them the new how-to articles directly in your feed reader.

  8. PC World's How-to Site
    PC World, one of the best tech journals available, also has a how to site that publishes technology focused tutorials related to various electronic gadgets, hardware and software applications.

  9. VideoJug
    When it comes to how-to video tutorial sites, VideoJug is probably the largest and most comprehensive. It has videos on varied subjects like choosing a new hairstyle, playing golf, installing windows or how to kiss someone passionately.

  10. W3Schools
    W3Schools is a first class web development tutorials website which provides easy reference guides on languages like HTML, XHTML, CSS, PHP and JavaScript. All the tutorials are free and nicely explained through various examples.

  11. NETTUTS And PSDTUTS
    NETTUTS and PSDTUTS are sister sites, in fact blogs, and definitely one of the best online resources on web development and Photoshop skills. NETTUTS explores web development and designing in detail while PSDTUTS provides some world-class Adobe Photoshop tutorials.

  12. 5min
    5min is a video tutorial site with a difference- the videos are short and no more than 5 mins. Like other video sites, this too covers a wide range of topics, however it's yet to take on sites like VideoJug in the online video tutorial space.

  13. SuTree
    Sutree aggregates the best video tutorials from other video sites and covers a variety of topics like softwares, games, pets & animals etc. Like instructables, SuTree is also a community driven website and lets you find videos through tags and subscribe to the RSS feed of the site.

  14. VTC
    Although VTC is not entirely free to use, it does provide some nice tutorials on software and business applications. Out of around 66,000 tutorials, it provides 12,500 for free.

  15. Good TutorialsGood Tutorials has a nice collection of graphic design tutorials which it aggregates through various web design sites and blogs. And yes, it's free to use 
  16. Stepbystep.com
  17. Howcast.com

Thursday 25 April 2013

How to protect your computer against dangerous Java Applets ??????


How to protect your computer against dangerous Java Applets ???


Java exploits represent a common attack vector used by the bad guys to infiltrate vulnerable computers via the web browser. We wrote about the rise of Java exploits as early as 2010, and we haven't seen that trend decline. In fact, in the first quarter of 2013 alone, we've seen three Java remote code execution vulnerabilities being exploited in the wild: CVE-2013-0422CVE-2013-0431, and CVE-2013-1493. In response, Oracle recently introduced a new security feature regarding the way unsigned Java applets and web start applications are run in the release of Java 7 update 11. The text in Oracle's release notes reads:

Synopsis: Default Security Level Setting Changed to High.
The default security level for Java applets and web start applications has been increased from "Medium" to "High". This affects the conditions under which unsigned (sandboxed) Java web applications can run. Previously, as long as you had the latest secure Java release installed applets and web start applications would continue to run as always. With the "High" setting the user is always warned before any unsigned application is run to prevent silent exploitation.
 Today, the vast majority of applets exploiting security vulnerabilities are not signed; this basically means that every time a user opens a webpage that tries to load an unsigned applet (which is a classic exploitation scenario), there is a risk that the computer will get infected. This scenario is known as a drive-by attack.
This new security enhancement eliminates the risk of silent exploitation using drive-by attacks via unsigned applets, which were possible before Java 7 update 11. This leaves attackers with no choice but to use social engineering techniques to convince users to click the Run button on the security warning dialog (displayed below). While still possible, it's no longer as easy for them to infect your computer.
With the new security enhancement, the following dialog box appears when you visit a webpage hosting an unsigned Java applet:
If you don't expect to see an applet on the page, we strongly advise you to click Cancel. In fact, we advise you to click Cancel by default for untrusted pages (don't check the "Do not show this again for this app" box), check the loaded webpage, and choose Run only if you truly believe that the applet is risk free, that is:
  1. It is the webpage you expected to see.
  2. The URL in the dialog box matches with the URL of the page you're viewing (in case the dialog originated from another browser tab).
  3. The applet was not hidden and you see the text:
    in the location where the applet's canvas should have been painted.
Keep in mind that in case the webpage tries to load multiple applets, there's going to be one dialog box for every applet. We recommend you assess each one individually. You can then hit the refresh button on your browser when you're done, and when the security warning dialog reappears, you can click OK if you think the applet is safe.
What about self-signed Java applets? These applets, although signed, do not use a certificate from a recognized certificate authority, hence they still require your approval to run. This is also a known scenario used by attackers (we detect variants used in these kinds of attacks as TrojanDownloader:Java/Toniper). In such a situation, the following dialog box will appear:



As you can see, in the self-signed scenario the warning is presented in an even more clear fashion, as opposed to the previous unsigned warning where it didn't clearly state the risk. Signed applets run as trusted code, without any restrictions, and can run arbitrary code on your computer. This means that a signed applet doesn't need to exploit a vulnerability to potentially take control of your computer. It just needs to be allowed to execute.
Again, in this scenario, we recommend that you click Cancel for untrusted webpages. However, note that clicking Cancel on this dialog doesn't mean you don't allow it to execute, only that you're not allowing this applet to run with full access. After clicking Cancel another dialog will pop up, like the one presented in the first picture, which asks you if you will allow it to execute. It is because of this that it is imperative that whenever you are redirected to such a page, you do not allow the applet to run initially. Please see steps 1 to 3 described above on how to properly assess the situation and decide whether to allow the applet to run or not.
As it stands today, thanks to Java 7 update 11, only Java applets signed with a trusted certificate are allowed to run without asking the user's permission, if not requesting full permissions. It is uncommon to see malicious trusted signed Java applets. To protect yourself in all scenarios we strongly advise you to use an up-to-date antivirus solution and software (e.g. Java Runtime), and follow best practices when browsing the Internet, especially on opening links coming from untrusted sources.
Also, starting with Java 7 update 21, planned for today, April 16, 2013, the look and feel of the above dialog boxes will change slightly to further highlight the potential danger of running unsigned code. Please read more here and see how the new dialog boxes will look here.

SOURCE: MICROSOFT MALWARE PROTECTION CENTER






Architecture Aware
Programming on
Multi-Core Systems

issue in cache hierachry....

CLICK

Wednesday 20 March 2013

Program to find factorial using 8051


Program to find factorial using 8051  :

MOV R1,#04 
MOV R0,#04 
MOV A,R0
CALL:DEC R0
MOV F0,R0
MUL AB
DJNZ R1,CALL
 SJMP 0

Tuesday 19 March 2013

Program to generate 50msec delay



26. Program to generate 50msec delay:

mov tmod,#01 ;select timer 0
here:mov tl0,#0fdh ;load tl0 with 0fdh
mov th0,#4bh ;load th0 with 4bh
cpl p1.5 ;compliment p1.5
acall delay ;call delay routine
sjmp here ;jump to here
delay:mov r1,#0c8h ;load r1 with data 0c8h
l1:setb tr0 ;set bit tr0
again:jnb tf0,again ;repeat till tf0=0
clr tr0 ;clear tr0
clr tf0 ;clear tf0
djnz r1,l1 ;decrement r1, jump to l1, if not equal to 0
ret
end

Program to implement BCD counter to count from 99-0


25;Program to implement BCD counter to count from 99-0 :

here:mov b,#99h ;move 99h to b
up:mov a,b ;move data from b to a
add a,#99h ;add 99h to a
da a ;decimal adjust accumulator after addition
mov b,a ;move data from b to a
mov p0,a ;move data from a to p0
acall delay ;call delay routine
mov a,b ;move data from b to a
cjne a,#0ffh,up ;compare a with 0ffh, if not equal , jump to location up
sjmp here ;jump to location here
delay routine:
delay:mov r1,#25h ;move 25h to r1
l3:mov r2,#0ffh ;move 0ffh to r2
l2:mov r3,#0ffh ;move 0ffh to r3
l1:djnz r3,l1 ;decrement r3, jump if not equal to 0 to l1
djnz r2,l2 ;decrement r2, jump if not equal to 0 to l2
djnz r1,l3 ; decrement r1, jump if not equal to 0 to l3
ret
end

Program to implement BCD counter to count from 0-99


24. Program to implement BCD counter to count from 0-99 :

here:mov a,#0h ;move 0 to a
up:mov p0,a ;move data fr
acall delay ;call delay program
inc a ;increment a
da a ;decimal adjust accumulator after addition
cjne a,#100,up ;compare a with 100, if not equal, jump to location up
sjmp here ;jump to location here
delay routine
delay:mov r1,#0ffh ;move 0ffh to r1
l3:mov r2,#0ffh ;move 0ffh to r2
l2:mov r3,#0ffh ;move 0ffh to r3
l1:djnz r1,l1 ;decrement r1, repeat till r1=0
djnz r3,l2 ;decrement r3,repeat l2 till r3=0
djnz r2,l3 ;decrement r2, repeat l3 till r2=0
ret ;return
end

Program to count from 0-9


23. Program to count from 0-9 :

here:mov a,#0h ;move 0 to a
up:mov p0,a ;move data from a to port0
acall delay ;call delay routine
add a,#01 ;increment a
cjne a,#010,up ;compare a with 10, if not equal, jump to location up
sjmp here ;jump to location here
;delay routine
delay:mov r1,#0ffh ;move 0ffh to r1
l3:mov r2,#0ffh ;move 0ffh to r2
l2:mov r3,#0ffh ;move 0ffh to r3
l1:djnz r1,l1 ;decrement r1, repeat till r1=0
djnz r3,l2 ;decrement r3,repeat l2 till r3=0
djnz r2,l3 ;decrement r2, repeat l3 till r2=0
ret ;return
end

Program to find the square of an 8 bit number


22.Program to find the square of an 8 bit number :

mov dptr,#9000h ;load dptr with 9000h
movx a,@dptr ;move data from external memory location to a
mov b,a ;move data from a to b
mul ab ;multiply and b
inc dptr ;increment dptr
mov r0,a ;move data from a to r0
mov a,b ;move data from b to a
movx @dptr,a ;move data from a to external memory location
inc dptr ;increment dptr
mov a,r0 ;move data from r0 to a
movx @dptr,a ;move data from a to external memory location
here:sjmp here
end

Program to add two BCD numbers


21. Program to add two BCD numbers :

mov dptr,#9000h ;move dptr with 9000h
movx a,@dptr ; move data from external memory location to a
mov b,a ;move data from a to b
inc dptr ;increment dptr
movx a,@dptr ; move data from external memory location to a
add a,b ;add a and b
da a ;decimal adjust accumulator after addition
jc down ;if carry, jump to label down
inc dptr ;increment dptr
movx @dptr,a ;move data from a to external memory location
sjmp last ;jump to label last
down:mov r2,a ;move data from a to r2
mov a,#01h ;move data 01h to a
movx @dptr,a ;move data from a to external memory location
inc dptr ;increment dptr
mov a,r2 ;move data from r2 to a
movx @dptr,a ;move data from external memory location to a
last:sjmp last
end

Program to check whether a 4th bit of a byte is 1, Store FFh if 1, else store 00 in


20. Program to check whether a 4th bit of a byte is 1, Store FFh if 1, else store 00 in :

the same location
mov dptr,#9000h
movx a,@dptr ;move data from external memory location to a
jnb 0e3h,down ;jump to location down, if 4th bit of a is set
inc dptr ;increment dptr
mov a,#0ffh ;move 0ffh to a
movx @dptr,a ;move data from a to external memory location
sjmp last ;jump to location last
down:mov a,#0h ;move 00 to a
inc dptr ;increment dptr
movx @dptr,a ; move data from a to external memory location
last:sjmp last
end

Program to convert ASCII to hex


19. Program to convert ASCII to hex :

ASCII codes 30 to 39 represent 0 to 9 in binary and 41 to 46 represent A to F. Therefore
if the ASCII code is between 30-39h then 30h is subtracted from the code. If the number
lies between A to F then 37h is subtracted from the code to get its binary equivalent
mov dptr, #9000h ;load dptr with address 9000h
movx a,@dptr ; move data from external memory location to a
clr c ;clear carry bit
mov r1,a ;move data from a to r1
subb a,#40h ;subtract 40h from a
jc l2 ;jump to location l2, if carry
mov a,r1 ;move data from r1 to a
subb a,#37h ;subtract with borrow, 37h from a
sjmp here ;jump to location here
l2:mov a,r1 ;move data from r1 to a
clr c ;clear carry bit
subb a,#30h ;subtract with borrow, 30h from a
here:inc dptr ;increment dptr
movx @dptr,a ;move data from a to external memory location
rep:sjmp rep
end

Program to find largest of n numbers


18. Program to find largest of n numbers :

mov r0,#10h ;move immediate data 10h to r0.
mov a,@r0 ;move data from internal RAM location to a
mov r2,a ;move data from a to r2
dec r2 ;decrement r2
inc r0 ;increment r0
mov a,@r0 ;move data from internal RAM location to a
l2:push 0e0h ;save the content of a on stack
inc r0 ;increment r0
subb a,@r0 ;subtract content of internal RAM location from a
jnc down ;if no carry, jump to label down
mov a,@r0 ; move data from internal RAM location to a
sjmp d1 ;jump to location d1
down:pop 0e0h ;pop a from stack
d1:djnz r2,l2 ;decrement r2, if not zero, jump to location l2
inc r0 ;increment r0
mov @r0,a ;move data from a to internal RAM location
here:sjmp here
end

Program to count number of 1's in a given data byte


17. Program to count number of 1's in a given data byte :

mov dptr,#9000h ;Load dptr with 9000h
movx a,@dptr ;move data from external memory location to a
mov r0,#0h ;load r0 with 0
mov r1,#8h ;load r1 with 8
clr c ;clear carry bit
up:rlc a ;rotate a left through carry
jnc next ;if no carry, jump to label next
inc r0 ;increment r0
next:djnz r1,up ;decrement r1, and jump to label next, if r1?0
inc dptr ;increment dptr
mov a,r0 ;move data from r0 to a
movx @dptr,a ;move data from a to external memory location
here:sjmp here
end

Program to divide an 8 bit no by another 8 bit number


16. Program to divide an 8 bit no by another 8 bit number :

mov r0,#26h ;load r0 with immediate data 26h
mov a,@r0 ;load a with data from internal RAM location(dividend)
inc r0 ;increment r0
mov b,@r0 ;move data from internal RAM location to b(divisor)
div ab ;divide a by b
inc r0 ;increment r0
mov @r0,a ;load internal RAM location with data from a
inc r0 ; increment r0
mov a,b ;move data from b to a
mov @r0,b ;move data from b to internal RAM location
here:sjmp here
end

Program to sort an array of 10 elements


15. Program to sort an array of 10 elements :

mov r3,#0ah ;load r3 with immediate data 0ah
dec r3 ;decrement r3
start:mov a,r3 ;move data from r3 to a
mov r0,a ;move data from a to r0
mov dptr,#9000h ;Load dptr with address 9000h
l1:movx a,@dptr ;move data from external memory location to a
mov r1,a ;move data from a to r1
inc dptr ;increment dptr
movx a,@dptr ; move data from external memory location to a
clr c ;clear carry bit
subb a,r1 ;subtract with borrow, r1 from a
jnc next ;if no carry, jump to label next
movx a,@dptr ;move data from external memory location to a
mov r2,a ;move data from a to r2
mov a,r1 ;move data from r1 to a
movx @dptr,a ; move data from a to external memory location
dec dpl ;decrement dpl
mov a,r2 ;move data from r2 to a
movx @dptr,a ; move data from a to external memory location
inc dptr ;increment dptr
next:djnz r0,l1 ;decrement r0, if not equal to 0, jump to label next
djnz r3,start ;decrement r3, if not equal to 0, jump to label start
here:sjmp here
end

Program to search an element in an array


14. Program to search an element in an array :

mov r0,#05h ;Load r0 with immediate data 05h
clr a ;clear a
mov dptr,#9000h ;load dptr with address 9000h
mov r1,#0ah ;load r1 with immediate data 0ah
l1:mov a,#0h ;load a with 00
movc a,@a+dptr ;move data from code memory location to a
mov r2,a ;move data from a to r2
inc dptr ;increment dptr
dec r1 ;decrement r1
cjne r2,#05h,l2 ;compare r2 with 05h, if not equal, jump to label l2
mov dptr,#900ah ;load dptr with immediate data 900ah
mov a,#0ffh ;laod a with immediate data 0ffh
movx @dptr,a ;move data from a to external memory location
sjmp here
l2:cjne r1,#0h,l1 ; compare r1 with 0, if not equal, jump to label l1
mov dptr,#900ah ;load dptr with 900ah
mov a,#0h ;load a with 00h
movx @dptr,a ;move data from a to external memory location
here:sjmp here
end
Input:05,
9000h: 01 02 03 04 05 06 07 08 09 0a
Output:0ff

Program to multiply 16 bit number by 8 bit number


13. Program to multiply 16 bit number by 8 bit number :

mov r0,#11h ;load r0 with immediate data 11h
mov r1,#22h ;load r1 with immediate data 22h
mov r2,#33h ;load r2 with immediate data 33h
clr c ;clear carry bit
mov a,r0 ;move data from r0 to a
mov b,r2 ;move data from r2 to b
mul ab ;multiply and b
mov dptr,#9000h ;Load dptr with 9000h
movx @dptr,a ; move data from external memory location to a
mov r0,b ;move data from b to r0
mov a,r2 ;move data from r2 to a
mov b,r1 ;move data from r1 to b
mul ab ;multiply and b
add a,r0 ;add a and r0
inc dptr ;increment dptr
movx @dptr,a ;move data from a to external memory location
inc dptr ;increment dptr
mov a,b ;move data from b to a
movx @dptr,a ;move data from a to external memory location
here:sjmp here
end
Input: 1122, 33
Output:369c6h

Program to find the LCM of two numbers


 12. Program to find the LCM of two numbers :

mov dptr,#9000h ;Load dptr with immediate data 9000h
movx a,@dptr ;move data from external memory location to a
mov r0,a ;move data from a to r0
mov b,r0 ;move data from r0 to b
inc dptr ;increment dptr
movx a,@dptr ; move data from external memory location to a
mov r2,a ;move data from a to r2
l2:push 0e0h ;push a onto the stack
div ab ;divide a by b
mov r1,b ;move data from b to r1
cjne r1,#00,l1 ;compare r1 with 0, if not equal, jump to label l1
pop 0e0h ;pop a from satck
inc dptr ;increment dptr
movx @dptr,a ;move data from a to external memory location
sjmp here
l1:pop 0e0h ;pop a from stack
add a,r2 ;add a and r2
mov b,r0 ;move data from r0 to b
sjmp l2
here:sjmp here
end
Input: 05 02
Output:0ah

Program to interchange two blocks of data


11. Program to interchange two blocks of data :

mov dptr,#9000h ;Load 9000h into dptr register
mov r0,#04h ;Move immediate data 04 to r0
mov r1,#90h ;move immediate data 90h to r1
mov r2,#91h ;move immediate data 91h to r2
back:movx a,@dptr ;move data from external memory location to a
mov r3,a ;move data from a to r3
mov dph,r2 ;move data from r2 to dph
movx a,@dptr ;move data from external memory location to a
mov dph,r1 ;move data from r1 to dph
movx @dptr,a ;move data from external memory location to a
mov a,r3 ;move data from r3 to a
mov dph,r2 ;move data from r2 to dph
movx @dptr,a ;move data from a to external memory location
inc dptr ;increment dptr
mov dph,r1 ;move data from r1 to dph
djnz r0,back ;decrement r0, if not equal to 0, jump to label back
here:sjmp here
end

Program to convert an 8bit Hex number to decimal number


10. Program to convert an 8bit Hex number to decimal number :

mov dptr,#9000h ;Load 9000h into dptr register
movx a,@dptr ;move data from external memory location to a
mov r2,a ;move data from a to r2
clr c ;clear carry bit
subb a,#0ah ;subtract with borrow, 0ah from a
jc over ;if carry, jump to label over
mov a,r2 ;move data from r2 to a
subb a,#064h ;subtract with borrow, 64h from a
jc d1 ; if carry, jump to label d1
mov a,r2 ;move data from r2 to a
mov b,#64h ;move immediate data 64h to b
div ab ;divide a by b
inc dptr ;increment dptr
movx @dptr,a ; move data from external memory location to a
mov a,b ;move data from b to a
mov r3,a ;move data from a to r3
clr c ; clear carry bit
subb a,#0ah ;subtract with borrow, 0ah from a
jc d2 ;if carry, jump to label d2
mov b,#0ah ;Load b with immediate data 0ah
mov a,r3 ;move data from r3 to a
div ab ;divide a by b
inc dptr ;increment dptr
movx @dptr,a ;move data from a to external memory location
mov a,b ;move data from b to a
inc dptr ;increment dptr
movx @dptr,a ;move data from a to external memory location
sjmp end1
d2:mov a,r3 ;move data from r3 to a
inc dptr ;increment dptr
movx @dptr,a ;move data from a to external memory location
sjmp end1
d1:mov a,r2 ;move data from r2 to a
mov b,#0ah ;load b with immediate data 0ah
div ab ;divide a by b
inc dptr ; increment dptr
movx @dptr,a ;move data from a to external memory location
mov a,b ;move data from b to a
inc dptr ;increment dptr
movx @dptr,a ;move data from a to external memory location
sjmp end1
over:mov a,r2 ;move data from r2 to a
inc dptr ;increment dptr
movx @dptr,a ;move data from a to external memory location
here:sjmp here
end1:sjmp end1
end
Input: 0ffh
Output:02 05 05

Program to convert hex number to ASCII number


9.Program to convert hex number to ASCII number :

mov dptr,#9000h ; Load dptr with immediate data 9005h
movx a,@dptr ; Load dptr with immediate data 9005h
clr c ;clear carry bit
subb a,#0ah ;subtract with borrow, 0ah from
movx a,@dptr ; move data from external memory location to a
jc down ;if carry, jump to label down
add a,#07h ;add 07 to a
down:add a,#30h ;add 30h to a
inc dptr ;increment dptr
movx @dptr,a ; move data from a to external memory location
here:sjmp here
end
Input:45
Output:34 35

Program to find the GCF of two numbers


8.Program to find the GCF of two numbers :

mov dptr,#9000h ;Load 9000h into dptr register
movx a,@dptr ; move data from external memory location to a
mov b,a ; move data from a to b
inc dptr ;increment dptr
movx a,@dptr ; move data from external memory location to a
back:mov r1,b ;move data from b to r1
div ab ;divide a by b
mov a,b ;move data from b to a
jz mess ;if a=0, jump to label mess
mov a,r1 ;move data from r1 to a
jmp back ;jump to label back
mess:mov dptr,#9005h ;Load dptr with immediate data 9005h
mov a,r1 ;move data from r1 to a
movx @dptr,a ;move data from a to external memory location
here:sjmp here
end
Input: 05 02
Output:01

Program to generate Fibonacci series


7. Program to generate Fibonacci series :

mov r1,#0ah ;Load r1 with immediate data 0ah
mov dptr,#9000h ;load 9000h into dptr register
movx a,@dptr ; move data from external memory location to a
inc dptr ;increment dptr
mov r0,a ;move data from a to r0
movx a,@dptr ; move data from external memory location to a
back:mov r2,a ;move data from a to r2
add a,r0 ;add a and r0
inc dptr ;increment dptr
movx @dptr,a ;move data from a to external memory location
mov r3,a ;move data from a to r3
mov a,r2 ; move data from r2 to a
mov r0,a ; move data from a to r0
mov a,r3 ; move data from r3 to a
djnz r1,back ;decrement r1, if not 0, jump to label back
here:sjmp here
end
Output:00 01 01 02 03 05 08 0bh, 15h, 22h


6. Program to convert a decimal number to hex number :

mov dptr,#9000h ; Load 9000h into dptr register
movx a,@dptr ; move data from external memory location to a
mov r2,a ;move data from r2 to a
clr c ;clear carry bit
subb a,#0ah ;subtract with borrow, 0ah from a
jc over ;if carry, jump to label over
mov a,r2 ;move data from r2 to a
anl a,#0f0h ;and a with 0f0h
swap a ;swap a
mov b,#0ah ;move 0ah to b
mul ab ;multiply and b
mov r3,a ;move data from a to r3
mov a,r2 ;move data from r2 to a
anl a,#0fh ;move 0fh to a
add a,r3 ;add a and r3
inc dptr ;increment dptr
movx @dptr,a ; move data from a to external memory location
sjmp here
over:mov a,r2 ;move data from r2 to a
inc dptr ;increment dptr
movx @dptr,a ;move data from a to external memory location
here:sjmp here
end
Input:99
Output:63

To transfer a block of data from one memory location to another


5. To transfer a block of data from one memory location to another :

mov r2,#0ah ;Load r2 with immediate data 05h
mov dptr,#9000h ;Load 9000h into dptr register
mov r0,#0a0h ;Load r0 with immediate data 0a0h
mov r1,#00h ;Load r1 with immediate data 00h
mov a,#0h ; Load a with immediate data 00h
up:movx a,@dptr ;move data from external memory to a
push dph ;push dph on the stack
push dpl ;push dpl on the stack
mov dph,r0 ;move data from r0 to dph
mov dpl,r1 ;move data from r1 t dpl
movx @dptr,a ;move data from a to external memory location
pop dpl ;pop dpl from the stack
pop dph ;pop dph from the stack
inc dptr ;increment dptr
inc r1 ;increment r1
dec r2 ;decrement r2
cjne r2,#00,up ;compare r2 with 0, if not equal, jump to label up
here:sjmp here
end
Output:
I block:9000h: 01 02 03 04 05
II block:a000h:01 02 03 04 05( after block transfer)

Program to find the average of 10 numbers


 4: Program to find the average of 10 numbers:

mov dptr,#9000h ;Load 9000h into dptr register
clr a ;Clear a register
mov 0f0h,a ;move data from a to b
mov r1,#05h ;move 05 to r1 register
up: movx a,@dptr ; ;move data from external memory location to a
add a,0f0h ;add a and b
mov 0f0h,a ;move the result to b
dec r1 ;decrement r1
inc dptr ;increment dptr
cjne r1,#00h,up ;compare r1 with 0, if not equal, jump to label up
mov a,0f0h ;move data from b to a
mov 0f0h,#05h ;move 05h to b
div ab ;divide a by b
mov dptr,#09005h ; Load 9005h into dptr register
movx @dptr,a ;move data from a to external memory location
mov a,0f0h ;move data from b to a
inc dptr ;increment dptr
movx @dptr,a ;move data from a to external memory location
here:sjmp here
end


3: ASCII to BCD conversion:

To convert ASCII to packed BCD, it is first converted to unpacked BCD(to mask 3) and
then combined to make packed BCD. For example, for 4 and 5 the keyboard gives 34 and
35, respectively. The goal is to produce 45h, which is packed BCD.
;ASCII to packed BCD conversion

mov r0,#10h ;R0=10h,Internal memory adress
mov a,@r0 ;a=hex value of Ist ASCII number
anl a,#0fh ;mask upper nibble
swap a ;swap upper and lower nibble of a
mov b,a ;save the number in B
inc r0 ;Increment R0
mov a,@r0 ;Get the next number from memory
anl a,#0fh ;Mask Higher nibble
orl a,b ;Or a & B
inc r0 ;Increment memory address to store the result
mov @r0,a ;Move the content of A to internal RAM location
here:sjmp here
end

Program to convert a BCD number to ASCII


2. Program to convert a BCD number to ASCII using 8051 :

To convert packed BCD to ASCII, it must first be converted to to unpacked BCD. Then the unpacked BCD is tagged with 30h.
mov dptr,#9000h ;Load 9000h into dptr register
movx a,@dptr ;Move the content of location 9000h to a
mov r2,a ;Move the data from a to r2
anl a,#0f0h ;And a with 0f0h
swap a ;Swap a
orl a,#30h ;Or a with 30h
inc dptr ;increment dptr
movx @dptr,a ;move the data from a to memory location
mov a,r2 ; Move the data from r2 to a
anl a,#0fh ; And a with 0fh
orl a,#30h ;Or a with 30h
inc dptr ;increment dptr
movx @dptr,a ;move the data from a to memory location
here:sjmp here
end
Input: 45
Output:34 35

Program to add two multibyte numbers

8051 MICROCONTROLLER

Programs:

1.Program to add two multibyte numbers using 8051 .

mov r4,#0h ;move 00 to r4
mov r3,#0h ;move 00 to r3
mov dptr,#9000h ; Load 9000h into dptr register
movx a,@dptr ;move the data from memory location to a register
mov r0,a ;move the data from a to r0
inc dptr ;increment dptr

movx a,@dptr ;move the data from memory location to a
mov r1,a ;move the data from a register to r1
inc dptr ;increment dptr
movx a,@dptr ;move the data from memory to a
mov r2,a ;move the data form a to r2
inc dptr ;increment dptr
movx a,@dptr ; move the data from memory location to a register
clr c ;clear carry bit
add a,r1 ;add a and r1
jnc res ;if no carry, jump to label res
mov r3,a ;move data from a to r3
mov a,r0 ;move data from r0 to a
addc a,r2 ; add with carry and r2
jnc end1 ;if no carry, jump to label end1
inc r4 ;increment r4
ajmp end1 ;jump to label end1
res:mov r3,a ; move data from a to r3
mov a,r0 ; move data from r0 to a
add a,r2 ;add a and r2
jnc end1 ; if no carry, jump to label end1
inc r4 ;increment r4
end1:mov r5,a ;move data from a to r5
mov dptr,#900ah ;load 9000h into dptr register
mov a,r4 ; move data from r4 to a
movx @dptr,a ;move data from a to memory location
mov a,r5 ;move data from r5 to a
inc dptr ;increment dptr
movx @dptr,a ; move data from a to memory location
mov a,r3 ; move data from r3 to a
inc dptr ; increment dptr
movx @dptr,a ; move data from a to memory location
here:sjmp here
end
Input Location:9000h,9001h,9002h,9003h
Output Location:900ah
Input Data: 1111 1111(hex)
Output : 2222h
2 nd method
mov r1,#0ffh ;load r1 with immediate data
mov r2,#0ffh ; load r1 with immediate data
mov r3,#0ffh ;load r1 with immediate data
mov r4,#0ffh ;load r1 with immediate data
clr c ;Clear carry bit
mov a,r1 ;move data from r1 to a
add a,r4 ;add a and r4
mov 31h,a ;move data from a to internal RAM location 31h
mov a,r2 ;move data from r2 to a
addc a,r3 ;add with carry a and r3
mov 32h,a ; move data from a to internal RAM location 32h
mov a,#00 ;Clear a register
addc a,#00 ;add with carry and 0
mov 33h,a ; move data from a to internal RAM location 33h
here:sjmp here
end