



全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Hui ZhangLab39-11-12SECTION: 1539LAB3 Pre-laboratory ReportSection 1:1.1 Program DescriptionPart2: Write an Assembly code program that find the maximum score and minimum score from a list of test scores using two for-loops.Part3: Set up an 8 bit LED display on the F28335 board, which allows us to see the program is doing through the LED lights. It is for debugging purpose. Part4: Add a 4 bit DIP switch onto the F28335 board. This allows us to input information during program execution.1.2 Flowchart1.3 Schematic1.4 Problems EncounteredWhile writing the assembly code, I had a problem where I tried to copy the score_vector_len to the counter. Apparently, it doesnt work if I simply write MOV *AR3, *AR2 (where AR3 = score_vector_len and AR2 = counter). I couldnt compile it with that line of code. Instead, I had to move the score_vector_len to accumulator, and then copy the value in accumulator to the destination AR2, which is counter.Also, I had a lot of problems with writing the test program for LED and switch. The email from EEL4744 group helped me solve this problem.1.5 Future Work/ApplicationsTo go future after finding the minimum and maximum, we can look into finding outliers from a list of grades or even create a list of ranked score.1.6 Program Code2 ; Lab3: Assembly programming & Elementary Wiring3 ; Hui Zhang4 .global_c_int005 ;-6 ;constants7 ;-8 score_addr.set0xA002;set starting address for the score vectors in memory9 score_vector_len.set0xA001;address of the vector_length10 data_sect.set0xa000;constant that is actually the starting addr of .data section11 bss_sect.set0xb000;constant that is actually the starting addr of .bss section12 ;-1314 ;* DATA ALLOCATION SECTION - Variables/Data *15 .data;data section starts at 0xA0001617 counter.word0h; empty it first18 vector_length.word5192021 scores.word33; 0-100, create the scores22 .word5023 .word6524 .word825 .word202627 .bssmax_addr, 128 .bssmin_addr, 129 .globalscore_addr,score_vector_len,counter,vector_length,num4,counter,scores,max_addr,min_addr30 .text31 _c_int00: ;PROGRAM STARTS HERE3233 MOV AR0, #score_addr34 MOV AR1, #max_addr35 MOV AR2, #score_vector_len36 MOV AR3, #counter37 MOV AL, *AR238 MOV *AR3, AL39 DEC *AR340 MOV AL, #041 MOVAL, *AR042 MOV *AR1, AL43 LOOP1INC AR044 MOV AL, *AR045 SUB AL, *AR146 BYES1, LT47 MOV AL, *AR048 MOV *AR1, AL49 YES1DEC *AR3;decrement counter50 BLOOP1, NEQ51 NOP52 NOP5354 ;find min_score55 MOV AR0, #score_addr56 MOV AR1, #min_addr57 MOV AR2, #score_vector_len58 MOV AR3, #counter59 MOV AL, *AR260 MOV *AR3, AL;put the length to counter61 DEC *AR362 MOV AL, #0;empty the AL6364 MOVAL, *AR065 MOV *AR1, AL66 LOOP2
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 财务分析的意义和内容说课稿-2025-2026学年中职专业课-财务管理-财经类-财经商贸大类
- unit 7 Today is Monday教学设计-2025-2026学年小学英语四年级下册北师大版(一起)
- 第1课 寻根之旅教学设计-2025-2026学年初中艺术·美术人教版2024七年级下册-人教版2024
- 幼儿的社会行为与道德发展说课稿-2025-2026学年中职专业课-幼儿心理学-学前教育类-教育与体育大类
- 外研版八年级上册英语全册教学设计(配2025年秋改版教材)
- 跳动的琴弦(欣赏 阳光照耀着塔什库尔)教学设计-2025-2026学年小学音乐西师大版五年级上册-西师大版
- 蓄电池知识培训内容课件
- 2025年天津市红桥区中考三模物理试题(解析版)
- 2025年四川省资阳市中考英语试卷(含答案与解析)
- 第1章 生命的世界说课稿-2025-2026学年初中生物学北师大版七年级上册-北师大版
- 调相机工程施工质量验收规程-第4部分-仪表与控制系统
- 四渡赤水(课件)
- 2024年浙江绍兴杭绍临空示范区开发集团有限公司招聘笔试真题
- 部编版五年级语文上册各单元作文范文
- 贵州省贵阳市(2024年-2025年小学五年级语文)统编版小升初真题(上学期)试卷及答案
- 2024-2025学年青岛版七年级数学上册第一次单元过关检测 (前两章)
- 苏少版七年级上册综合实践活动教案
- 院前急救技能竞赛(驾驶员)理论考试题库大全-上(选择题)
- 锁骨骨折的护理查房
- 部编人教版六年级上册语文全册教学课件+单元复习课件
- 《消费心理学》课程教学大纲
评论
0/150
提交评论