首页 > 其他分享 >Compiler Design Lab 实现过程

Compiler Design Lab 实现过程

时间:2023-05-09 09:03:56浏览次数:38  
标签:tests task run Lab Design test IBAN your Compiler


Programming 2 (SS 2023)
Saarland University
Faculty MI
Compiler Design Lab
Preparation
To be able to edit the project in Mars, you first have to checkout the repository and import the project:
1. Clone the project in any folder:
where $NAME has to be replaced with your CMS username.
2. Open the cloned directory in Mars.
Check that the settings Assemble all files in directory and Initialize Program Counter to global ‘main’ if defined
in the Settings menu in MARS are activated to compile the file src/main.asm and set the program entry point to
the label main.
In the following document, we refer to the term character as a single byte encoding of a character according to the
ASCII standard. The IBANs only contain ASCII upper case letters and digits. The KNRs and the BLZs consist of
ASCII digits only.
IBAN-Calculator (10 Points)
D E P P B B B B B B B B K K K K K K K K K K
Country code
Check digits
BLZ
KNR
In this project, you will implement an IBAN calculator that converts a bank account number (KNR) and a bank
code (BLZ) to a German IBAN according to the format shown above, or extracts the KNR and the BLZ from a
German IBAN. You can find a general introduction to IBANs in the Wikipedia (https://en.wikipedia.org/
wiki/International_Bank_Account_Number).
You will write the program in MIPS assembler. To make the project easier to handle, it is divided into several
tasks. Each task has its own file in which you will write the corresponding subroutine. Please also pay attention to
the hints at the end of the project description.
1 Extract BLZ and KNR (2 Points)
Write a subroutine 代 做iban2knr (file src/iban2knr.asm), which extracts the BLZ and the KNR from a German
IBAN. Your subroutine receives the following arguments:
1. A buffer with a German IBAN with 22 characters.
2. The target buffer for the BLZ with space for 8 characters.
3. The target buffer for the KNR with space for 10 characters.
2 Remainder calculation (4 Points)
Write a subroutine modulo_str (file src/moduloStr.asm), which calculates the remainder of a number given
as a string. Your subroutine receives the following arguments:
1. A buffer with a number.
1
2. The length of the number in the buffer.
3. The divisor.
The result is returned in the return register. The number in the buffer is the remainder of the division of the number
represented in the buffer by the divisor. The number in the buffer is a decimal number greater than zero represented
as a string of digits and has no sign. The least significant digit of the number is at position

标签:tests,task,run,Lab,Design,test,IBAN,your,Compiler
From: https://www.cnblogs.com/wolfjava/p/17383743.html

相关文章

  • 带中继节点的蜂窝小区通信系统matlab仿真,输出吞吐量,功耗以及能效等
    1.算法仿真效果matlab2022a仿真结果如下:     2.算法涉及理论知识概要        早期的移动通信是大区制,也就是在一个区域内建一个基站,且尽可能地提高该基站的信号覆盖范围,这种方法的好处是实现容易,设备简单,但由于受功率和频谱资源限制,系统容量有限,而且扩大......
  • m车载自组织网络(Vehicular Ad-hoc Network,VANET)通信系统的matlab仿真
     1.算法仿真效果 matlab2022a仿真结果如下:         2.算法涉及理论知识概要          这里根据那个fluiddynamicmodel和stochasticmodel模型,这里使用一种如下的车辆移动模型,能够反映出车辆移动的随机性和连续性。       ......
  • m基于BP译码的LDPC误码率matlab仿真,分析不同码长,码率,信道对译码性能的影响,对比卷
    1.算法仿真效果matlab2022a仿真结果如下:    2.算法涉及理论知识概要        LDPC(Low-densityParity-check,低密度奇偶校验)码是由Gallager在1963年提出的一类具有稀疏校验矩阵的线性分组码(linearblockcodes),然而在接下来的30年来由于计算能力的......
  • PowerDesigner15在生成SQL時報錯Generation aborted due to errors detected during t
    1.用PowerDesigner15建模,在Database—>GenerateDatabase(或者用Ctrl+G快捷鍵)來生產sql語句,卻提示“Generationabort1.用PowerDesigner15建模,在Database—>GenerateDatabase(或者用Ctrl+G快捷鍵)來生產sql語句,卻提示“Generationabortedduetoerrorsdetectedduringthe......
  • 自学c#基础第六课,常用控件label
    labellabel和linklabel控件,主要是设置里面可见属性、字体什么的,linklabel的话有点中后下划线样式LinkBehaviorlistbox主要介绍了里面的方法//清除listBox1列表//listBox1.Items.Clear();//添加listBox1元素//listBox1.......
  • 第6-1讲,Label的config属性
    在Tkinter中,Label组件的config属性可以用来设置或获取Label组件的各种属性。这些属性包括:text:用于设置或获取Label组件的文本内容。font:用于设置或获取Label组件的字体。fg:用于设置或获取Label组件的前景色(即文本颜色)。bg:用于设置或获取Label组件的背景色。w......
  • MATLAB/Simulink并网逆变器设计
    MATLAB/Simulink并网逆变器设计双向AC/DC变流器P-f和Q-U下垂控制直流电压750V,可修改交流线电压380V运行稳定,可靠性高,可塑性强ID:1666672467731022......
  • MATLAB/Simulink仿真
    MATLAB/Simulink仿真交直流微电网光伏、蓄电池、风机并离网切换、负载投切虚拟同步发电机技术想要的小伙伴快来点击''加好友''全新!可塑性强,抢手货ID:41800659246811653......
  • matlab绘制阴影误差带函数
    matlab误差带函数绘制效果函数的input:(x,y,errBar,varargin)%x:自变量x轴数据%y:数据矩阵y%errBar一般取y数据的均值和标准差,errBar可以是由两个函数句柄组成的cellArray。这个第一个定义了行应该是的统计信息,第二个定义了定义错误栏调用语句shadedErrorBar(x,y,{@mean,@s......
  • MATLAB/Simulink直流微电网
    MATLAB/Simulink直流微电网子单元:风、光、储、负载、逆变器风力发电和光伏发电采用MPPT控制储能单元采用双环控制逆变器采用PQ控制可塑性高ID:15521666154133311......