资源描述:
《microprocessor lab 3 prelab》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、HuiZhangLab39-11-12SECTION:1539LAB3Pre-laboratoryReportSection1:1.1ProgramDescriptionPart2:WriteanAssemblycodeprogramthatfindthemaximumscoreandminimumscorefromalistoftestscoresusingtwofor-loops.Part3:Setupan8bitLEDdisplayontheF28335board,whichallowsustoseetheprogramisdoingthro
2、ughtheLEDlights.Itisfordebuggingpurpose.Part4:Adda4bitDIPswitchontotheF28335board.Thisallowsustoinputinformationduringprogramexecution.1.2FlowchartHuiZhangLab39-11-12SECTION:15391.1Schematic1.2ProblemsEncounteredWhilewritingtheassemblycode,IhadaproblemwhereItriedtocopythescore
3、_vector_lentothecounter.Apparently,itdoesn’tworkifIsimplywriteMOV*AR3,*AR2(whereAR3=score_vector_lenandAR2=counter).Icouldn’tcompileitwiththatlineofcode.Instead,Ihadtomovethescore_vector_lentoaccumulator,andthencopythevalueinaccumulatortothedestinationAR2,whichiscounter.Also,I
4、hadalotofproblemswithwritingthetestprogramforLEDandswitch.TheemailfromEEL4744grouphelpedmesolvethisproblem.1.3FutureWork/ApplicationsTogofutureafterfindingtheminimumandmaximum,wecanlookintofindingoutliersfromalistofgradesorevencreatealistofrankedscore.HuiZhangLab39-11-12SECTIO
5、N:15391.1ProgramCode2;Lab3:Assemblyprogramming&ElementaryWiring3;HuiZhang4.global_c_int005;-------------------------------------------------------------------6;constants7;-------------------------------------------------------------------8score_addr.set0xA002;setstartingaddres
6、sforthescorevectorsinmemory9score_vector_len.set0xA001;addressofthevector_length10data_sect.set0xa000;constantthatisactuallythestartingaddrof.datasection11bss_sect.set0xb000;constantthatisactuallythestartingaddrof.bsssection12;--------------------------------------------------
7、-----------------1314;********DATAALLOCATIONSECTION-Variables/Data**************15.data;datasectionstartsat0xA0001617counter.word0h;emptyitfirst18vector_length.word5192021scores.word33;0-100,createthescores22.word5023.word6524.word825.word202627.bssmax_addr,128.bssmin_addr,129
8、.globalscore_addr,score_vector_len,counter,vector_length,num4