ImageVerifierCode 换一换
格式:DOC , 页数:4 ,大小:1.97MB ,
资源ID:3179785      下载积分:20 文钱
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,省得不是一点点
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.wenke99.com/d-3179785.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: QQ登录   微博登录 

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(Microprocessor lab 3 prelab.doc)为本站会员(11****ws)主动上传,文客久久仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知文客久久(发送邮件至hr@wenke99.com或直接QQ联系客服),我们立即给予删除!

Microprocessor lab 3 prelab.doc

1、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 se

2、e 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 FlowchartS t a r tc o u n t e r = s c o r e _ v e c t o r _ l e nA L = 0m a x = s c o r e ( i )c o u n t e

3、 r - -I n p u tA L = s c o r e ( i + + )A L = A L m a xN f l a g = 1 ?N OA L = s c o r e ( i + 1 )M a x = A LC o u n t e r - -Y E SY E Sc o u n t e r = s c o r e _ v e c t o r _ l e nA L = 0M i n = s c o r e ( i )c o u n t e r - -A L = s c o r e ( i + + )A L = A L m i nN f l a g = 0 ?A L = s c o r e

4、 ( i + 1 )M i n = A LC o u n t e r - -Y E SE N DC o u n t e r = 0 ?N ON OC o u n t e r = 0 ?Y E SN OHui ZhangLab39-11-12SECTION: 15391.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

5、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 proble

6、ms 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.Hui ZhangLab39-

7、11-12SECTION: 15391.6 Program Code2 ; Lab3: Assembly programming Hui Zhang4 .global _c_int005 ;-6 ;constants7 ;-8 score_addr .set 0xA002 ;set starting address for the score vectors in memory9 score_vector_len .set 0xA001 ;address of the vector_length10 data_sect .set 0xa000 ;constant that is actuall

8、y the starting addr of .data section11 bss_sect .set 0xb000 ;constant that is actually the starting addr of .bss section12 ;-1314 ;* DATA ALLOCATION SECTION - Variables/Data *15 .data ;data section starts at 0xA0001617 counter .word 0h ; empty it first18 vector_length .word 5192021 scores .word 33 ;

9、 0-100, create the scores22 .word 5023 .word 6524 .word 825 .word 202627 .bss max_addr, 128 .bss min_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 A

10、R2, #score_vector_len36 MOV AR3, #counter37 MOV AL, *AR238 MOV *AR3, AL39 DEC *AR340 MOV AL, #041 MOV AL, *AR042 MOV *AR1, AL43 LOOP1 INC AR0Hui ZhangLab39-11-12SECTION: 153944 MOV AL, *AR045 SUB AL, *AR146 B YES1, LT47 MOV AL, *AR048 MOV *AR1, AL49 YES1 DEC *AR3 ;decrement counter50 B LOOP1, NEQ51

11、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 MOV AL, *AR065 MOV *AR1, AL66 LOOP2 INC AR067 MOV AL, *AR068 SUB AL, *AR169 B YES2, GEQ70 MOV AL, *AR071 MOV *AR1, AL72 YES2 DEC *AR3 ;decrement counter73 B LOOP2, NEQ74 NOP75 NOP

Copyright © 2018-2021 Wenke99.com All rights reserved

工信部备案号浙ICP备20026746号-2  

公安局备案号:浙公网安备33038302330469号

本站为C2C交文档易平台,即用户上传的文档直接卖给下载用户,本站只是网络服务中间平台,所有原创文档下载所得归上传人所有,若您发现上传作品侵犯了您的权利,请立刻联系网站客服并提供证据,平台将在3个工作日内予以改正。