The much talked about Indian tablet costing as low as $35 is taking shape and soon will be seen in the market. The tablet is now officially called Sakshat and will be launched by January 10th of next year. The low cost laptop will be manufactured buy HCL technologies and the Indian government has already allocated $6.5 million or Rs. 300 million for the project. HCL has earlier worked on a similar ‘low cost project’ when it partnered with Microsoft to produce world’s cheapest Windows laptops, the Classmate PC in 2008.
Earlier in July the Indian Human Resource Development Minister Kapil Sibal showed off the prototype touch screen computer which the government hopes to roll out to students with the end cost to further get down to $20 or even $10 after subsidy. The device will come with a color display and can performer functions like web browsing, email, word; processing and can even display YouTube videos. The device will have a solar charging option and will run the open source Linux OS.
The low cost laptop named Sakshat is also expected to include other features and specification like a 2GB of RAM, USB ports, integrated Wi-Fi connectivity. Sakshat will support web conferencing, video, media player, Internet Browser, PDF reader, Open Office and unzip utilities. The Sakshat will be a 9-inch tablet with camera and surprisingly low power requirement. It will need just two watts of power.
The tablet will be introduced to higher education institutions next year. Sakshat will be tested by Indian Institute of Technology in Rajasthan ‘in intensive laboratory and fields tests across the country.’ The manufacturer of the tablet Sakshat, HCL has contracted with the Indian government to manufacture 100,000 units in the first phase of production. The government plans to purchase these 100,000 units after testing and distribute to university students in second half of the year.
Tuesday, January 11, 2011
Sunday, January 9, 2011
ibus malayalam ubuntu 10.10
To create my previous post, i tried to use ibus to type in malayalam, but in ibus, malayalam was misssing. i found a solution, it may work for you also.
To get malayalam support in ibus , run the following command
To get malayalam support in ibus , run the following command
sudo apt-get install ibus ibus-m17n m17n-db m17n-contrib ibus-gtk
not only for malayalam but several other like Hindi,urdu....
Friday, January 7, 2011
IS de fragmentation required in Linux File system?
One of the question that come out every once a while from new GNU/Linux users is how to defrag Linux? Usually most would be satisfied with the short answer "Linux does not need filesystem defragmentation like Windows".
For curious users who prefer a rather complete explanation about why GNU/Linux filesystem doesn't need defragmentation like WIndows are, then this article might provide such answer to you : Why doesn't Linux need defragmenting?
For curious users who prefer a rather complete explanation about why GNU/Linux filesystem doesn't need defragmentation like WIndows are, then this article might provide such answer to you : Why doesn't Linux need defragmenting?
Tuesday, January 4, 2011
My Lap
Processor Intel CoreTM i3-330M Processor
(2.13GHz , FSB:1066MHz , 3MB 2nd Level Cache)
software genuine microsoft windows 7 home premium (64 bit )
Memory 2,048 MB DDr3 RAM (1066MHz) System Memory
Storage Controller 320GB Hard Disk sata
Graphics ATI mobility Radeon HD 5145 , 512MB dedicated Up To 2,810MB Graphics
Wireless technologies 802.11 a/B/G integrated Wi-FiTM ;Bluetooth
Optical DVD Super Multi Drive (double layer)
Monitor 15.6" Toshiba TruBrite® HD TFT High Brightness display
Cam & Mic Toshiba integrated WEB Camera , With Built in Mic
(2.13GHz , FSB:1066MHz , 3MB 2nd Level Cache)
software genuine microsoft windows 7 home premium (64 bit )
Memory 2,048 MB DDr3 RAM (1066MHz) System Memory
Storage Controller 320GB Hard Disk sata
Graphics ATI mobility Radeon HD 5145 , 512MB dedicated Up To 2,810MB Graphics
Wireless technologies 802.11 a/B/G integrated Wi-FiTM ;Bluetooth
Optical DVD Super Multi Drive (double layer)
Monitor 15.6" Toshiba TruBrite® HD TFT High Brightness display
Cam & Mic Toshiba integrated WEB Camera , With Built in Mic
My Movie Collection
[BD-RiP] Paiyaa 2010 - 720px - www.uyirvani.com- {ChiyaaN}.mkv
007.Quantum.Of.Solace.2008.DvDRip.Ac3-FxM
04_Vel.avi
13 Going on 30[2004][Eng][sub arabic]DvDrip-T0Z00N
13B.2009.DVDRip.XviD
1408[2007]DvDrip[Eng]-aXXo
1984 Indiana Jones and the Temple of Doom
1989 Indiana Jones and the Last Crusade
2012-720p.mkv
2012.R5.LINE.XviD-MDMA
2020_JAYNYC
2fast 2furius.avi
2HNGAR DVDRip [Desidhamal.com].avi
3 Idiots - DVDRip - 720p - AC3 - x264 - [DDR]
300.2006.nHD.720p.x264.AAC.NhaNc3
A.Arunthadhi.avi
Aadhavan.2009.Lotus.DvDRip-ACDC-Uyirvani.com.mp4
Aagathan.2010.DvDRiP.x264.AAC.5.1.ESub.xMS
Aayirathil Oruvan (2010) Lotus Fivestar XVID HQ [700Mb] [TTHellRaiser].avi
Air Crash investigation
Air Force One.mp4
Akkarae.Akkarae.Akkarae.DVDRIP.XviD.Sparrow.malluhut.com.desibeats.org.avi
AlbumArtSmall.jpg
Alice in Wonderland 720p Bluray x264-CBGBcompleted
alien3.avi
Alvin And The Chipmunks 2007 BRRip 720p H264-3Li
Alvin And The Chipmunks The Squeakquel 2009 BRRip 720p H264-3Li
Angadi Theru.mp4
Angel.John.2009.DvDRip.1CD.xMS
Angels & Demons (2009) DVDRip XviD-MAXSPEED
anim
Anniyan
Apocalypto[2006]DvDrip[Eng.Hard.Sub]-aXXo
Apoorva.Ragam.2010.DVDRip.x264.1CD.ESub.xMS
AR videos
Avatar 1080p
Awake.2007.DvDRip.AC3 5 1-FxM
Ayan [2009]
AzhagiyaTamilMagan
Baby's Day Out.avi
Back.To.The.Future-Part.II.avi
Back.To.The.Future-Part.III.avi
Bad Boys 2.avi
Bandidas[2006]DvDrip.AC3[Eng]-aXXo
Batman.Begins_2005_DvDrip-aXXo.avi
Bean-The Ultimate Disaster.avi
BHARAMARAMX264_JAYNYC
Bheema - Uyirvani.com
Bicentennial.Man{AC3-5.1}DvdRip.Dino
Billu[2009]DVDRip[Hindi]-SaM
Black.Hawk.Downn Spiddy.mkv
Bolt[2008]DvDrip-aXXo
Bolt[2008]DvDrip[Eng]-FXG
Boys.avi
Boys.DTS
Brooklyn's.Finest.2010.DVDSCR.XviD-MegaPlay
Bruce Almighty
BURN.E.2008.HQRip.x264-QuAdKa.mkv
CALCUTTANEWS_JAYNYC
Cars.2006.nHD.720p.x264.NhaNc3
Cast Away
Chak De India.mkv
Chandni.Chowk.to.China[2009]DVDRip[Hindi]-SaM
CHANDRALEKHA_JAYNYC
Chattambinadu.2009.DvDRip.x264.AAC.2.1.Subs.xMS
Chemistry.2009.DVDRip.Xvid.AC3.5.1-XM3
Chocolate.avi
Clash.of.the.Titans.1080p.Bluray.x264-CBGB
CLICK
Daybreakers[2009]DvDrip[Eng]-FXG
Deep Blue Sea 1999 XviD ENG.avi
Deepavali.avi
Desktop.ini
Dhamm Dhoom - Uyirvani.com
Dhoom 2 Back In Action.avi
Die Hard 4.0 (Live Free Or Die Hard) DVD Quality [ENG] Carisma99
Dil Se[1998]DVDRip[Hindi]-SaM
Echelon Conspiracy.2009.R5.[Blueman}x264
Eeram ~ Suara ~ Org-Rip ~ x264 ~ 1CD.mp4
Enchanted[2007]DvDrip[Eng]-FXG
Endhiran - DVDScr - XviD - [DDR]
EO.H 2006 ©eVin
Evan Almighty
Evidam.Swargamanu.2009.DvDRiP.x264.AAC.5.1.Subs.xMS
FAF_Dvdrip_©eVin
Fanaa.2006.1CD.DvDrip.lovein.avi
Fashion.2008.DVDRip.XviD-BrG
Fast and furius 4.avi
Final Destination [DivX].avi
Final Destination 2.avi
Final.Destination.3[2006]DvDrip.AC3[Eng].avi
Finding Nemo
Folder.jpg
Freaky.Friday.2003.DVDRip.XViD-DEiTY.avi
From Paris With Love.2010.DvdRip.Xvid {1337x}-Noir
Funny
gandhi
ghajini dts
Ghajini Tamil DVD
Ghajini[2008]DVDRip-SaM
Ghost.Rider_2007_DvDrip_Eng_-aXXo
Ghost.Town[2008]DvDrip-aXXo
Gi Joe The Rise of Cobra.DVDRIP.By.NaBiVish.avi
GOA @ mediaX Paravoor.mp4
Green Day
Green Zone (2010) DVDRip XviD-MAXSPEED
Gulumal.The.Escape.2009.DVDRip.Xvid.AC3.5.1.Sub-XM3
HALLO_JAYNYC
HAPPYDAYS_dvdrip_AC3_vAvA
HAPPYHUSBANDX264_JAYNYC
HARRIS
HDV
HINDI ALBUMS
holo man
Horton Hears a Who![2008]DvDrip AC3[Eng]-FXG
Hot Tub Time Machine (2010) R5 DVDRip XviD-MAXSPEED
How.To.Train.Your.Dragon.720p.Bluray.x264-CBGB
Hubblecast14.mp4
hubblecast17a.mp4
Hubblecast28.mp4
I Hate Luv Storys 2010 Hindi DVDRip XviD E-SuB xRG
I, Robot HD
I.Am.Legend.PROPER.DVDSCR.XviD.avi
Ice Age 3 - Scrat In Love_h1080p.mov
Ice Age 3.mov
Iceage.dat
Igor[2008]DvDrip-aXXo
Iirupatham Noothandu.AVI
IMAX.Dolphins.HD.1080p.HDTV.x264.AC3.2000.DUAL.[www.TorrentMas.com]
In Ghost House Inn (2010) Malayalam DvDRiP AAC 2.1 ESub xMS(www.mastitorrents.com)
In.HariHar.Nagar.Xvid.WMA2.DivXAudio.VCD.rip.PINDIS.avi
Inception 2010 BRRip 720p H264 AAC - SecretMyth (Kingdom-Release)
INNATHECHINTHAVISHAYAM_JAYNYC
Inside Man [2006].avi
Inspector Gadget 2.avi
Inspector Gadget DvdRip.mp4
Into the Universe with Stephen Hawking-Ep01,02,03(HDTV-XviD).FQM
irobot.avi
Iron Man 2 (2010) 1080P X264 MKV AC3 + DTS NLSub
Iron Man 2 (2010) DVDRip XviD-MAXSPEED
Iron Man 2 Trailer 1080p.mov
Iron.Man[2008]DvDrip-aXXo
Ithu Njangalude Lokham
JAKI DVDRip 5.1DD_©eVin
Jannat[2008]
Jaws 1.avi
Johnny_English_(2003)
Jumper.avi
Just Like Heaven (2005) DVDRiP XviD
Kaana.Kanmani.2009.DVDRip.Xvid.AC3.5.1-XM3
Kabhi Khushi Kabhi Gham[2001]
Kacheri Aarambam ~ NaBiVish ~
Kadha.Thudarunnu.2010.1CD.DVDRip.x264.AAC.SS3-Bintop.mp4
KAKKA KAKKA
Kal Ho Na ho 1CD DVD RIP xRG Release
Kalavaani - DVDRip - XviD - 1CDRip - [DDR].mpg
Kandhasamy.2009.Sruthi.DvDRip-ACDC-Uyirvani.com.mkv
Kanthasamy 5.1 Dolby Digital Trailer HQ [TTHellRaiser]
Karthik Calling Karthik 2010 Hindi DVDRip XviD E-SuB xRG
Kiss.of.the.Dragon.2001.DVDRIP.XViD-EDRP.avi
Kites 2010 Hindi Repack DVDRip x264 E-SuB xRG
Knight Rider 2008 Pilot
Koi... Mil Gaya 2o03 2CD DVDRip {www.desibbrg.com} ~ Da Xclusives
krish
Kung Fu Panda secrets-_2008_dvdrip
KURUKSHTHRA_DVDRIP
Kuruvi.2008.DVDRip.XviD.AC3.Subs-TmG
Lakshya (2004) DVD Rip (1.36GB) {RDY} Dr.Maanu RatioFreeDownload@BindassDesi.com.avi
Leap.Year.2010.480p.BRRip.XviD.AC3-ViSiON
Linkin Park - New Divide [2009] [iVANA-XviD]
Lion
Lock stock and two smoking barrels [1998]
LOLLIPOP_JAYNYC
Lord Of The Rings-Two Towers.avi
Loud.Speaker.2009.DVDRip.x264.AAC.2.1.Sub-XM3
Madagascar.Escape.2.Africa.1080p.Bluray.x264-1920
madagaskar
Madrasapattinam 2010 download tamil movie - {chiyaaN-www.uyirvani.com.mp4
Main Hoon Na
Manmathan (2004).DvDRip.x264.700Mb~E-Subs~TTK-18
Mannar mattayi speaking
Marley And Me.avi
mask
Mazhai - Uyirvani.com
Meenaxi.Tale.Of.3.Cities.2004.Hindi.DvDRip.XviD.Subs.1CD.MeN
Meet The Spartans 2008 DvDRip Jozzep
Men.in.Black-Pack.DvDrip-aXXo
messengers 2.avi
Mighty
Mirrors[2008]DvDrip-aXXo
MOUSE HUNT-1997-IN H.264 BY WINKER
Mr__Bean_-_1x04_-_Mr__Bean_Goes_To_Town
Mudhalvan.DVDRip,Majaa.NET
Mummy.And.Me.2010.DVDRip.x264.AAC.SS3-Bintop.mp4
mvs-bean.rmvb
My Big Father.2009.DVDRip.x264.AAC.2.1.mkv
My Name Is Khan(2010).DVDRip.XviD.AC3.ESubs.[DDR]
Mynaa (2010) ~ Lotus ~ 1CD ~ XviD ~ www.uyirvani.com.avi
Naadodigal.Desman.Rapidtamil.com.avi
Naan Avan Illai 2
Naan Kadavul.Rip By_Desman.avi
Naan Mahaan Alla (2010) DVDrip -Tamil - SRG
Nallavan(2010) DVDrip - x264 - AC3 - 5.1 - Team MJY
National tresure 2.avi
national tresure.avi
NAYAKANX264_JAYNYC
NEELATHAMARA_JAYNYC
New York - DVDRip - XviD - 1CDRip - [DDR]
New.Moon.DVDRip.XviD-NeDiVx
NEXT 2007
Night At The Museum
Night at the Museum Battle of the Smithsonian 2009 DvDrip NLsub code kako
Nirakazhcha 2010 x264 AAC 1CD DVDRip -SS3
One Miss Call.avi
Ong-Bak.2.2008.READ.NFO.DVDRip.XviD-d0h
Ong.Bak.3.2010.720p.BluRay.x264-aAF
Oru.Black.And.White.Kudumbam.2009.DVDRip.Xvid.AC3.5.1.Sub-XM3
OST - Inside Man [2006]
OST - The Passion Of The Christ
Over The Hedge.avi
Over.Her.Dead.Body[2008]DvDrip[Eng]-aXXo
Paa
Paiya.mp4
PALERIMANIKYAMX264_JAYNYC
PAPPIAPPACHA_JANYC
PATTANAPRAVESHAM.1CD.DVD Rip.XVID.avi
Pazhasi Raja.2009.Malayalam.DvDRip.Xvid.Ac3. Subs.MeN
Pearl.Harbor.avi
Percy Jackson & the Olympians The Lightning Thief[2010]DvDrip[En
Perfume-The.Story.Of.A.Murderer[2006]DvDrip[Eng]-aXXo
Phone Booth.[2002].DVDrip.[Eng].avi
Phoonk 2 (2010) DVDRip XviD AC3 ESub UDR
Phoonk 2008 1CD DVDRip E-Subbs XviD[DnR]-=Roamer=-
Pirates of the Caribbean The Curse of the Black Pearl (2003)
Pirates.Of.The.Caribbean-At.World's.End[2007]DvDrip[Eng]-aXXo
Pirates.of.the.Caribbean-Dead.Man's.Chest
Poison.Ivy.The.Secret.Society.DVDRip.XviD
Pokiri
Predator
Prince of Persia The Sands of Time (2010) DVDRip XviD-MAXSPEED
Pulse
punjabi house
Pussycat Dolls - Jai Ho(2).mp3
PUTHIYAMUGHAM_JAYNYC
Pyaar.Impossible.2010.DVDRip.XViD-VoMiT
Quantum of Solace [2008] dvd screener nlx
R.E.A.L-xitrum90.avi
Rab_Ne_Bana_Di_jodi_2008_1CD-DvD-RiP_E-Subs_xviD_xRG
Race to witch mountain
Race.avi
Rambo[2008]
RAMJIRAOSPEAKING_JAYNYC
Ravan.2010.DVDRIP.www.getindianstuff.com.avi
Recovered_Avi_5.avi
Recovered_Avi_6.avi
Red
Resident Evil Extinction[2007]DvDrip[Eng]-FXG
Resident_Evil_Degeneration
Robinnhood.2009.DVDRip.Xvid.AC3.5.1.Subs-XM3
RocknRoll.2007.Xvid.AC3.5.1.Sub-XM3
Runway [2004] DvDrip [BasalOna]
Rush.Hour.1.2.3.Collection.RETAIL.DVDRIP.[Eng]-DUQA
Saawariya_2007_DVDVDrip_XviD-Ekolb
Sakudumbam.Shyamala.2010.x264.AAC.1CD.DVDRip.mkv
Salaam.Namaste[2005]DVDRip[Hindi]-SaM
Salt.2010.R5.V2.XviD-PrisM-iNK
Saw [2005]
Saw.3[2006][Unrated.Edition]DvDrip[Eng]-aXXo
Saw.4[2007][Unrated.Edition]DvDrip[Eng]-aXXo
Saw.5[2008][Unrated.Edition]DvDrip-aXXo
Scrat-NoTimeForNuts.Softarchive.Net.mkv
Scrat-SurvivingSid.Softarchive.Net.mkv
See No Evil
Shakira - She Wolf [2009][iVANA-XviD]
Shakira Ft.Wyclef Jean - Hips Dont Lie [2006][SkidVid Gold_XviD]
Shakira_-_Waka_Waka_(This_Time_For_Africa)_(Xvid-2nafish).avi
She's Out of My League[2010]DvDrip[Eng]-FXG
Sholay1975 DVD rip SPECIAL EDITION DIRECTOR'S CUT
Shrek 1.avi
Shrek 2.avi
Shrek.The.Third.avi
Shutter.2004.DVDRip.XviD-PROMiSE
Shutter.DVDRip.2008.DvDRip-FxM
sillunu oru kaathal.DTS
sillunu oru kadhal x264 - beseboys
Singam [2010] 1CD x264 [~TT~Knight] [Team TT]
Sivaji
Slumdog.Millionaire
Snakes.On.A.Plane_2006_DvDrip_Eng_-aXXo
Sound Effects Ringtones148
Species 4 The Awakening KLAXXON
Spiderman 3.avi
Spy Kids 1 DVDRip Occor.avi
Spy Kids 2 DVDRip Occor.avi
Spy Kids 3 DVDRip Occor.avi
Step Up
Step Up 2-The Streets [OST] [2008][CD+3 SkidVid_XviD+Cov]
Step.Up.3.BRRip.H264.Feel-Free
Stomp.The.Yard[2007]
Superman Returns.avi
Taal (1999) Original DvDRiP - [AXiS].avi
Taal [1999-Lossless-FLAC] - [TMB]
The A-Team
The Butterfly Effect [DVDRip][2004][Eng][BugBunny]
The Crazies[2010]DvDrip[Eng]-FXG
The Day After Tomorrow 2004 BRRip H264 5.1 ch-SecretMyth (Kingdom-Release)
The Expendables.2010.R5.Xvid {1337x}-Noir
The Fast And The Furious Tokyo Drift
The Final Destination 4 (2009) DVDRip XviD-MAXSPEED
The Game Plan
The Hills Have Eyes[2006]
The Incredible Hulk.avi
The Karate Kid.2010.BrRip.UNCUT.Xvid {1337x}-Noir
The Losers[2010]DvDrip[Eng]-FXG
The Myth _XviD_ (Bilingual).mkv
The Other End of the Line (2008) [DvdRip] [Xvid] {1337x}-Noir
The Passion Of The Christ HD
The Passion of the Christ KLAXXON DVDRIP
The Pink Panther 2[2009]DvDrip[Eng]-FXG.avi
The Restless 2006
The Wolfman[2010][Unrated Edition]DvDrip[Eng]-FXG.avi
The.Animal.2001.DvdRip.eng
The.Bounty.Hunter.2010.DVDRip.XviD-DUBBY [NO-RAR] - [ www.torrentday.com ]
The.Cell.2.2009.BDRip.XviD-BeStDivX-BTARENA.avi
The.Dark.Knight[2008]DvDrip-aXXo
The.Day.The.Earth.Stood.Still[2008]DvDrip-aXXo
The.Forbidden.Kingdom.R5.XViD-PUKKA
The.Hills.Have.Eyes-2[2007]DvDrip.AC3[Eng]-aXXo
The.Kung.Fu.Kid.2010.720p.BluRay.x264.DTS-WiKi [semlimites.org]
The.Matrix.Reloaded-2003-DVDRip.Xvid.avi
The.Medallion.DVDRip.XviD.SWESUB.-ThaKebab
The.Sixth.Sense.[1999].DVDRip.Xvid.Blood
The.Spirit.PROPER.DVDRip.XViD-PUKKA
The.Torturer.2008.DVDRip.XviD-SPRiNTER
Theeratha Vilayattu Pillai [2010] Lotus - NeedForSpeed
TheNumber23[2007DvDripEng-ak
THIRAKKADHA
Thumbs.db
Tinker.Bell.2008.DVDRip.XviD-i©eVin
Titanic.1997.nHD.720p.x264.NhaNc3
Tom & Jerry Collection.avi
Tom & Jerry.avi
Tooth Fairy (2010) DVDRip [ResourceRG XviD By MegaPlay]
Torque
Toy story
Train.2008.DVDRip.XviD-HNR
Transformers Revenge of the Fallen 2OO9 Trailer2.[FINAL]
Transformers.mkv
Transformers.Revenge.of.the.Fallen.1080p.BluRay.x264-ETHOS
Transporter 2.avi
Transporter 3
Transporter.avi
Triangle [2009]DVDRip[Xvid]AC3 5.1[Eng]BlueLady.avi
Ullam.Ketkumay(2003)_Rider1587_DVD.Rip_Xvid.avi
Unnai Pol Oruvan(2009)(Sruthi).avi
unsorted videos
Unstoppable(2010).v2.R5.Line.H264.ResourceRG by Dusty
Vallavan
Van.Helsing[2004]DvDrip[Eng]-Zeus_Dias.avi
Varanam Ayiram
Veer.Zaara [2004]DVDRip-SaM
veruthorubharya_jaynyc
Vettaikaran [Lotus] DvD-Rip - NeedForSpeed.mp4
Video Songs
Villu - Suruthi - DVD - Uyirvani.com.avi
Vinnaithandi Varuvaya.2010.tamil.DVDrip~karlog.avi
Wake Up Sid.avi
WALL-E.1080p.BluRay.x264-HD1080
WALLPAPER(08-09)
Wanted[2008]DvDrip-aXXo
WESTERN ALBUMS
Wild.Hogs[2007]DvDrip[Eng]-aXXo
Wrong Turn 2.avi
Wrong.Turn.3.Left.for.Dead.2009.DVDRip.XviD-THS
X-Men 1
X-Men 2 [2003] DvDrip [Eng] BugZ
X-Men Origins Wolverine[2009]DvDrip - ghatway.avi
xXx 1[2002]
Zathura
Design of Single Pass Assembler using C
DESCRIPTION
input : sic source code in the file 'INPUT.DAT'
out put : files : SYMTAB.DAT,OBJFILE.DAT,ERROR.DAT
RUN
abhisheklal@abhisheklal-System-Product-Name:~/Documents/Single Pass/Single Pass$ gcc SINGLE.c
abhisheklal@abhisheklal-System-Product-Name:~/Documents/Single Pass/Single Pass$ ./a.out
Output file:OBJCODE.DAT
Errors are described in ERROR.DAT
Symbol table is in the file:SYMTAB.DATabhisheklal@abhisheklal-System-Product-Name:~/Documents/Single Pass/Single Pass$
CODE
#include<stdio.h>
#include<string.h>
#define q 11//no. of mnemonics in the array A
void main()
{
int lc,ad,address,err=0;
int s,num,l,i=0,j,n=0,line=1,f=0,f1=0,t=0,ni=0,m=0,t1;
FILE *fp1,*fp2,*fp3,*fp4;
char lab[10],op[10],val[10],code[10];
char a[20][15]={"STA","STL","LDA","LDB","J","JEQ","J","SUB","COMP","STCH","ADD","SUB"};
char b[20][15]={"14","32","03","69","34","30","48","28","24","16","0C"};
char sym[15][10];
int symadd[15];
//clrscr();
fp1=fopen("INPUT.DAT","r");
fp2=fopen("OBJFILE.DAT","w");
fp3=fopen("ERROR.DAT","w");
fp4=fopen("SYMTAB.DAT","w");
while((!feof(fp1)))
{
fscanf(fp1,"%s\t%s\t%s",lab,op,val);
t++;
m++;
if(strcmp(op,".")==0)
m=0;
else if(strcmp(op,"END")==0)
break;
}
t=t-1;
m--;
fclose(fp1);
fp1=fopen("INPUT.DAT","r");
fscanf(fp1,"%s\t%s\t%x",lab,op,&lc);
fprintf(fp3,"-------------------------------------\n");
fprintf(fp3,"LINE NO.\t|ERROR FOUND\n");
fprintf(fp3,"-------------------------------------");
fprintf(fp4,"SYMBOL\tADDRESS");
s=lc;
fprintf(fp2,"H^%s^00%x^%x\n",lab,lc,t*3);
fprintf(fp2,"T^00%x^",lc);
if(m>10)
fprintf(fp2,"1E");
else
fprintf(fp2,"%x",m*3);
while((op,".")!=0&&(!feof(fp1)))
{
fscanf(fp1,"%s\t%s\t%s",lab,op,val);
line++;
if(strcmp(lab,"$")!=0)
{
for(i=0;i<n;i++)
{
if(strcmp(lab,sym[i])==0)
{
f=1;
break;
}
f=0;
}
if(f==0)
{
strcpy(sym[n],lab);
symadd[n]=lc;
fprintf(fp4,"\n%s\t%x",lab,lc);
n++;
}
if(f==1){
fprintf(fp3,"%d\t\t|SYMBOL ALREADY DEFINED\n",line);err++;}
}
num=atoi(val);
if(strcmp(op,"RESW")==0)
lc=lc+(num*3);
else if(strcmp(op,"RESB")==0)
lc=lc+num;
else if(strcmp(op,"BYTE")==0)
{
num=strlen(val)-3;
lc=lc+num;
for(i=2,j=0;i<strlen(val)-1;i++)
{
code[j]=val[i];
j++;
}
code[j]='\0';
fprintf(fp2,"^%s",code);
ni++;
}
else
lc=lc+3;
if(strcmp(op,".")==0)
break;
}
while(strcmp(op,"END")!=0&&(!feof(fp1)))
{
fscanf(fp1,"%s\t%s\t%s",lab,op,val);
line++;
if(strcmp(op,"END")==0)
break;
if((strcmp(lab,"$")!=0)&&((strcmp(op,"RESW")!=0||strcmp(op,"RESB")!=0||strcmp(op,"WORD")!=0||strcmp(op,"BYTE")==0)))
{
for(i=0;i<n;i++)
{
if(strcmp(lab,sym[i])==0)
{
f=1;
break;
}
f=0;
}
if(f==0)
{
strcpy(sym[n],lab);
symadd[n]=lc;
fprintf(fp4,"\n%s\t%x",lab,lc);
n++;
}
else{
fprintf(fp3,"\n%d\t\t|SYMBOL ALREADY DEFINED",err++);}
}
else if(strcmp(op,"RESW")==0||strcmp(op,"RESB")==0||strcmp(op,"WORD")==0||strcmp(op,"BYTE")==0)
fprintf(fp3,"\n%d\t\t|Declaration not allowed here",line);
if(strcmp(op,"RESW")!=0&&strcmp(op,"RESB")!=0&&strcmp(op,"WORD")!=0&&strcmp(op,"BYTE")!=0)
{
for(i=0;i<q;i++)
{
if(strcmp(op,a[i])==0)
{
strcpy(code,b[i]);
f1=0;
break;
}
f1=1;
}
if(f1==1){
fprintf(fp3,"\n%d\t\t|WRONG OPCODE",line);err++;}
for(i=0;i<n;i++)
{
if(strcmp(val,sym[i])==0)
{
address=symadd[i];
f=0;
break;
}
f=1;
}
if(f){
fprintf(fp3,"\n%d\t\t|UNDEFINED SYMBOL",line);err++;}
}
if(ni<10)
{
fprintf(fp2,"^%s%x",code,address);
ni++;
}
else
{
fprintf(fp2,"T^00%x^",lc);
if(m>10)
{
fprintf(fp2,"1E");
m=m-10;
}
else
{
fprintf(fp2,"%x",m*3);
fprintf(fp2,"^%s%x",code,address);
ni=0;
}
}
lc=lc+3;
}
fprintf(fp2,"\nE^00%x",s);
fprintf(fp3,"\nNo of errors=%d\n--------------------------------------",err);
printf("Output file:OBJCODE.DAT\nErrors are described in ERROR.DAT\nSymbol table is in the file:SYMTAB.DAT");
//getch();
fcloseall();
}
Subscribe to:
Posts (Atom)