代写EECS 113、Python/Java程序代做
Processor Hardware/Software Interface
EECS 113
Assignment 2
University of California, Irvine
Assigned: April, 21, 2024
Due: April, 30, 2024 by 11:59PM
1 8051 Microcontroller Programming using Edsim51
If you have not already installed Edsim51 simulator, follow these instructions:
http://www.edsim51.com/installationInstructions.html
To see a list of all assembly commands, visit the following link:
https://www.keil.com/support/man/docs/is51/is51_opcodes.htm
To see a list of all characters, visit the following link:
where each element is an 8-bit number, you are required to write a program
that computes the sum of products of the elements in each row, i.e. find (a*b)+(c*d) and store the result
in the memory. The matrix should be added in code memory starting from location 30H as strings
in ASCII format. To make the computations easier, the elements of the 2x2 matrix
a b
c d
should be
stored in a single array as follows: a,b,c,d. Use the following template to put the individual test cases
in your code memory:
ORG 0
SJMP MAIN
ORG 30H
N1: DB ”10,04,20,01” ;a=10, b=04, c=20, d=01
DB 0
ORG 50H
MAIN: ...
1
To run arithmetic operations on numbers in string format, you have to convert the strings to decimal
numbers. For instance, the {0x36H,0x34H,0x39H,0x30H} sequence represents the number 6490. Check
the ASCII table for full details on ASCII representation. Each character in this string (including the
commas) will be stored in an 8-bit memory location, so for the example given above, the code memory
starting address 30H will look as follows:
(30H)=0x31H, (31H)=0x30H, (32H)=0x2cH, (33H)=0x30H, (34H)=0x34H, (35H)=0x2cH,
(36H)=0x32H, (37H)=0x30H, (38H)=0x2cH, (39H)=0x30H, (3AH)=0x31H.
You can use the DPTR to point to data in your code memory. The steps that your program needs to
go through are:
1. Initialize the DPTR to N1 and initialize any registers that you might need.
2. loop over the digits one-by-one by increasing DPTR until you reach a comma to find the value of
the first element a and store it in the register R2.
3. go through another round of loading the digits one-by-one until you reach a comma to find the
second element b and store it in register R3.
4. multiply a and b and save the 16-bit output in locations 50H (MSB) 51H (LSB) in data memory.
5. repeat the previous process for c and d, and add the result from a*b and store it back in memory
locations 50H and 51H. Keep in mind that this addition operation should be computed on 16-bit
values, so you can use what you learned in Assignment 1!
You can use the comma and null characters, along with conditional jumps to determine if you have
reached the end of the ASCII representation of an element and jump to the next step in your program.
Store the 16-bit output result on location 50H(MSB) and 51H(LSB) on the data memory as regular
hexadecimal numbers. You do not need to convert the output to string! The input numbers are 8 bits
or less than 256.
Test your code for the following cases:
Case1: a=02, b=12, c=15, d=03
EXPECTED OUTPUT: 50H=00H , 51H=45H (2*12+15*3 = 69 which is 45H in hex system)
Case2: a=40, b=07, c=36, d=10
EXPECTED OUTPUT: 50H=02H, 51H=80H (40*07+36*10 = 640 which is 280H in hex system)
2 Bonus point (10%)
Save the output in decimal system and in ASCII format, i.e. convert each digit to ASCII representation
and save them on data memory, starting from 60H. The most significant digit should be stored in 60H.
You can assume the output is always less than 256 (8 bits).
Case1: a=02, b=12, c=15, d=03,
EXPECTED OUTPUT: (50H)=00H, (51H)=45H, (60H)=30H, (61H)=30H, (62H)=34H, (63H)=35H
(0045 in ASCII is 00003435H)
Case2: a=40, b=07, c=36, d=10
EXPECTED OUTPUT: (50H)=02H, (51H)=80H (60H)=30H, (61H)=32H, (62H)=38H, (63H)=30H
(0280 in ASCII is 00323830H)
2
3 Assignment Deliverable
- To facilitate the grading process, submit a .txt file for the code and a .pdf file for the report.
- Your code should be commented and easy to read.
- Your report should contain brief details on how the code works, plus the screenshots showing the final
memory and register values for each test case.
- Submit the assignment before the deadline through Canvas.
请加QQ:99515681 邮箱:99515681@qq.com WX:codinghelp
- 商业腾飞的关键 WhatsApp拉群工具揭示潮流趋势 让你的业务脱颖而出
- Telegram超好用的批量群发营销软件,电报群发工具推荐
- 并购重组税收政策(归纳)
- Ins引流营销助手,Instagram拉群群发软件,助你快速壮大粉丝团!
- Ins高效筛选助手,Instagram群发代发工具,让你的营销更高效!
- Instagram推广软件推荐,ins引流工具吸客攻略,ig群发软件
- Instagram自动登录 - ins群发工具/ig营销助手/ins引流神器/ig独家引流
- 代写 COMP27112: Visual Computing
- 全球通证:博主推荐,LINE营销工具line云控如何引领我业务走向国际巅峰
- 小区电动车安全整治,碧桂园服务在行动!
- 西部数据存储产品助力物联时代数字创新
- Alpha系统重大更新,公司主体库性能再创新高
- 双城双展|光子易PhotonPay荣获CHWE“千帆奖”,亮相福州&深圳两大跨境电商展
- 嘉木遵生国宝茶色素:自然之韵,健康之选
- 全球营销专家 : telepram 群发协议助力商家,品牌曝光再不是难题
- 微软将Copilot扩展到个人消费者和小型公司 月费20美元
- Applications Manager — Oracle数据库监控最佳实践
- 人民网专访:华胜天成以算力、场景、生态为三大抓手 加速企业AI转型
- 业务航海家的选择:海外营销大师对WhatsApp拉群工具的推崇,让业务体验闪耀新光芒
- 需轻点智能中控的屏幕,就能轻松控制家里所有的智能产品
- iOS首次出现木马病毒 苹果“安全”神话破灭?!
- Instagram营销软件 - ins群发工具/ig营销助手/ins引流神器
- Instagram涨粉引流方式推荐,Ins出海引流博主营销新助手!
- 仲景宛西制药荣获“头部力量·医药高质量发展成果企业”
- WhatsApp营销软件/ws群发助手/ws协议号/ws一手机房
- Ins群发群控营销软件,Instagram多开云控群发,助你实现营销目标!
- Instagram群发软件 - ins自动登录/ig采集指定地区/ins群发软件
- instagram精准引流黑科技,一分钟引爆您的ins账号
- Instagram批量养号工具,Ins自动登录软件,ig群发营销软件
- Instagram营销群发软件,Ins引流工具,让你的营销事半功倍!
推荐
- 老杨第一次再度抓握住一瓶水,他由此产生了新的憧憬 瘫痪十四年后,老杨第一次再度抓握住一瓶水,他 科技
- 创意驱动增长,Adobe护城河够深吗? Adobe通过其Creative Cloud订阅捆绑包具有 科技
- 升级的脉脉,正在以招聘业务铺开商业化版图 长久以来,求职信息流不对称、单向的信息传递 科技
- 全力打造中国“创业之都”名片,第十届中国创业者大会将在郑州召开 北京创业科创科技中心主办的第十届中国创业 科技
- 苹果罕见大降价,华为的压力给到了? 1、苹果官网罕见大降价冲上热搜。原因是苹 科技
- 丰田章男称未来依然需要内燃机 已经启动电动机新项目 尽管电动车在全球范围内持续崛起,但丰田章男 科技
- 如何经营一家好企业,需要具备什么要素特点 我们大多数人刚开始创办一家企业都遇到经营 科技
- 智慧驱动 共创未来| 东芝硬盘创新数据存储技术 为期三天的第五届中国(昆明)南亚社会公共安 科技
- B站更新决策机构名单:共有 29 名掌权管理者,包括陈睿、徐逸、李旎、樊欣等人 1 月 15 日消息,据界面新闻,B站上周发布内部 科技
- 疫情期间 这个品牌实现了疯狂扩张 记得第一次喝瑞幸,还是2017年底去北京出差的 科技