美女扒开腿免费视频_蜜桃传媒一区二区亚洲av_先锋影音av在线_少妇一级淫片免费放播放_日本泡妞xxxx免费视频软件_一色道久久88加勒比一_熟女少妇一区二区三区_老司机免费视频_潘金莲一级黄色片_精品国产精品国产精品_黑人巨大猛交丰满少妇

CIT 593代做、代寫Java/c++語言編程

時間:2024-07-24  來源:  作者: 我要糾錯


CIT 593 – Module 11 Assignment Instructions  
CIT 593 – Module 11 Assignment  
Making the LC4 Assembler Instructions  
Contents  
Assignment Overview 3  
Learning Objectives 3  
Advice 3  
Getting Started 4  
Codio Setup 4  
Starter Code 4  
Object File Format Refresher 4  
Requirements 5  
General Requirements 5  
Assembler 5  
assembler.c: main 5  
asm_parser.c: read_asm_file 6  
asm_parser.c: parse_instruction 6  
asm_parser.c: parse_add 6  
asm_parser.c: parse_xxx 6  
asm_parser.c: str_to_bin 7  
asm_parser.c: write_obj_file 7  
Extra Credit 8  
Suggested Approach 8  
High Level Overview 8  
Great High Level Overview, but I really need a Slightly More Detailed Overview 10  
Part 0: Setup the main Function to Read the Arguments 10  
Part 1: Read the .asm File 10  
Part 2: Parse an Instruction 1  
Part 3: Parse an ADD Instruction 1  
Part 4: Converting the binary string to an hexadecimal formatted integer 1  
Part 5: Writing the .obj object file 1  
Testing 1  
Validate Output with PennSim 1  
Files for Testing 1  
Unit Testing 1  
GDB for Debugging 1  
Submission 1  
Submission Checks 1  
The Actual Submission 1  
Page 1 of 24CIT 593 – Module 11 Assignment Instructions  
Grading 1  
Assembler 1  
Extra Credit 1  
An Important Note of Plagiarism 1  
FAQ 1  
Quick Hints 1  
Formatting 1  
Endianness 1  
Resources 1  
Page 2 of 24CIT 593 – Module 11 Assignment Instructions  
Assignment Overview  
From lecture you’ve learned that C is file-oriented and that working with files represents I/O  
devices in C.  
C files fall into two categories: "text" and "binary". In this assignment you’ll work with both types  
by reading in a text file and writing out a binary file.  
You will read an arbitrary .asm file (a text file intended to be read by PennSim) and write a .obj  
file (the same type of binary file that PennSim would write out).  
Aside from reading and writing out the files, your task will be to make a mini-LC4- Assembler!  
An assembler is a program that reads in assembly language and generates its machine  
equivalent.  
This assignment will require a bit more programming rigor than we’ve had thus far, but now that  
you’ve gained a good amount of programming skill in this class and in others, it is the perfect  
time to tackle a large programming assignment (which is why the instructions are so many  
pages).  
Learning Objectives  
This assignment will cover the following topics:  
● Review the LC4 Object File Format  
● Read text files and process binary files  
● Assemble LC4 programs into executable object files  
● Use debugging tools such as GDB  
Advice  
● Start early  
● Ask for help early  
● Do not try to do it all in one day  
Page 3 of 24CIT 593 – Module 11 Assignment Instructions  
Getting Started  
Codio Setup  
Open the Codio assignment via Canvas. This is necessary to link the two systems.  
You will see many directories and files. At the top-level workspace directory, the mail files are  
asm_parser.h, asm_parser.c, assembler.c, and PennSim.jar.  
Do not modify any of the directories or any file in any of the directories.  
Starter Code  
We have provided a basic framework and several function definitions that you must implement.  
assembler.c - must contain your main function.  
asm_parser.c - must contain your asm_parser functions.  
asm_parser.h - must contain the definition for ROWS and COLS  
- must contain function declarations for read_asm_file,  
parse_instruction, parse_reg, parse_add, parse_mul,  
str_to_bin, write_obj_file, and any helper function you  
implement in asm_parser.c  
test1.asm - example assembly file  
PennSim.jar - a copy of PennSim to check your assembler  
Object File Format Refresher  
The following is the format for the binary .obj files created by PennSim from your .asm files. It  
represents the contents of memory (both program and data) for your assembled LC-4 Assembly  
programs. In a .obj file, there are 3 basic sections indicated by 3 header “types” = Code , Data,  
and Symbol:  
● Code: 3-word header (xCADE, <address>, <n>), n-word body comprising the instructions.  
○ This corresponds to the .CODE directive in assembly.  
● Data: 3-word header (xDADA, <address>, <n>), n-word body comprising the initial data  
values.  
○ This corresponds to the .DATA directive in assembly.  
● Symbol: 3-word header (xC3B7, <address>, <n>), n-character body comprising the  
symbol string. These are generated when you create labels (such as “END”) in  
assembly. Each symbol is its own section.  
○ Each character in the file is 1 byte, not 2 bytes.  
○ There is no NULL terminator.  
Page 4 of 24CIT 593 – Module 11 Assignment Instructions  
Requirements  
General Requirements  
● You MUST NOT change the filenames of any file provided to you in the starter code.  
● You MUST NOT change the function declarations of any function provided to you in the  
starter code.  
● You MAY create additional helper functions. If you do, you MUST correctly declare the  
functions in the appropriate header file and provide an implementation in the appropriate  
source file.  
● Your program MUST compile when running the command make.  
● You MUST NOT have any compile-time errors or warnings.  
● You MUST remove or comment out all debugging print statements before submitting.  
● You MUST NOT use externs or global variables.  
● You MAY use string.h, stdlib.h, and stdio.h.  
● You SHOULD comment your code since this is a programming best practice.  
● Your program MUST be able to handle .asm files that PennSim would successfully  
assemble. We will not be testing with invalid .asm files.  
● Your program MUST NOT crash/segmentation fault.  
● You MUST provide a makefile with the following targets:  
○ assembler  
○ asm_parser.o  
○ all, clean, clobber  
Assembler  
assembler.c: main  
● You MUST not change the first four instructions already provided.  
● The main function:  
○ MUST read the arguments provided to the program.  
■ the user will use your program like this:  
./assembler test1.asm  
○ MUST store the first argument into filename.  
○ MUST print an error1 message if the user has not provided an input filename.  
○ MUST call read_asm_file to populate program[][].  
○ MUST parse each instruction in program[][] and store the binary string equivalent  
into program_bin_str[][].  
○ MUST convert each binary string into an integer (which MUST have the correct  
value when formatted with "0x%X") and store the value into program_bin[].  
○ MUST write out the program into a .obj object file which MUST be loadable by  
PennSim's ld command.  
Page 5 of 24CIT 593 – Module 11 Assignment Instructions  
asm_parser.c: read_asm_file  
This function reads the user file.  
● It SHOULD return an error2 message if there is any error opening or reading the file.  
● It MAY try to check if the input program is too large for the defined variables, but we will  
not be testing outside the provided limits.  
● It MUST read the exact contents of the file into memory, and it MUST remove any  
newline characters present in the file.  
● It MUST work for files that have an empty line at the end and also for files that end on an  
instruction (i.e. do not assume there will always be an empty line at the end of the file).  
● It MUST return 0 on success, and it MUST return a non-zero number in the case of  
failure (it SHOULD print a useful error message and return 2 on failure).  
asm_parser.c: parse_instruction  
This function parses a single instruction and determines the binary string equivalent.  
● It SHOULD use strtok to tokenize the instruction, using spaces and commas as the  
delimiters.  
● It MUST determine the instruction function and call the appropriate parse_xxx helper  
function.  
● It MUST parse ADD, MUL, SUB, DIV, AND, OR, XOR instructions.  
○ It MUST parse ADD IMM and AND IMM if attempting that extra credit.  
● It MUST return 0 on success, and it MUST return a non-zero number in the case of  
failure (it SHOULD print a useful error message and return 3 on failure).  
asm_parser.c: parse_add  
This function parses an ADD instruction and provides the binary string equivalent.  
● It MUST correctly update the opcode, sub-opcode, and register fields following the LC4  
ISA.  
● It SHOULD call a helper function parse_reg, but we will not be testing this function.  
● It MUST return 0 on success, and it MUST return a non-zero number in the case of  
failure (it SHOULD print a useful error message and return 4 on failure).  
asm_parser.c: parse_xxx  
You MUST create a helper function similar to parse_add for the other instruction functions  
required in parse_instruction.  
● They MUST correctly update the opcode, sub-opcode, and register fields following the  
LC4 ISA.  
● They SHOULD call a helper function parse_reg, but we will not be testing this function.  
● They MUST return 0 on success, and they MUST return a non-zero number in the case  
of failure (it SHOULD print a useful error message and return a unique error number on  
failure).  
Page 6 of 24CIT 593 – Module 11 Assignment Instructions  
asm_parser.c: str_to_bin  
This function converts a C string containing 1s and 0s into an unsigned short integer  
● It MUST correctly convert the binary string to an unsigned short int which can be verified  
using the "0x%X" format.  
● It SHOULD use strtol to do the conversion.  
asm_parser.c: write_obj_file  
This function writes the program, in integer format, as a LC4 object file using the LC4 binary  
format.  
● It MUST output the program in the LC4 binary format described in lecture and in the  
Object File Format Refresher section.  
● It MUST create and write an empty file if the input file is empty  
● It MUST change the extension of the input file to .obj.  
● It MUST use the default starting address 0x0000 unless you are attempting the .ADDR  
extra credit.  
● It MUST close the file with fclose.  
● It MUST return 0 on success, and they MUST return a non-zero number in the case of  
failure (it SHOULD print a useful error message and return 7 on failure).  
● The generated file MUST load into PennSim (and you MUST check this before  
submitting), and the contents MUST match the .asm assembly program  
 Page 7 of 24CIT 593 – Module 11 Assignment Instructions  
Extra Credit  
You may attempt any, all, or none of these extra credit options. You MUST test using your own  
generated examples (we will not provide any).  
Option 1: modify your read_asm_file function to ignore comments in .asm files. You MUST  
handle all types of comments for credit.  
Option 2: modify your program to handle ADD IMM and AND IMM instructions. Both MUST work  
completely for credit.  
Option 3: modify your program to handle the .CODE and .ADDR directives.  
Option 4: modify your program to handle the .DATA, .ADDR, and .FILL directives.  
Suggested Approach  
This is a suggested approach. You are not required to follow this approach as long as you  
follow all of the other requirements.  
High Level Overview  
Follow these high-level steps and debug thoroughly before moving on to the next.  
1. Initialize all arrays to zero or '美女扒开腿免费视频_蜜桃传媒一区二区亚洲av_先锋影音av在线_少妇一级淫片免费放播放_日本泡妞xxxx免费视频软件_一色道久久88加勒比一_熟女少妇一区二区三区_老司机免费视频_潘金莲一级黄色片_精品国产精品国产精品_黑人巨大猛交丰满少妇
欧美高清性xxxx| 18深夜在线观看免费视频| 99视频只有精品| 看黄色录像一级片| 在线观看天堂av| 波多野结衣爱爱视频| 四虎永久免费在线| 97精品人人妻人人| 日本女人性视频| 久久久久久久久久97| 日韩无码精品一区二区| 国产探花在线视频| 538精品在线观看| 久久久久亚洲av成人网人人软件| 老熟女高潮一区二区三区| 女性生殖扒开酷刑vk| 双性尿奴穿贞c带憋尿| 亚洲AV无码国产成人久久| www.xx日本| 在线中文字日产幕| 一区二区三区在线观看免费视频| 婷婷国产成人精品视频| 日本xxxx免费| 一区二区三区久久久久| 国产三级国产精品国产国在线观看 | 5566中文字幕| 亚洲一区二区三区综合| 啪啪一区二区三区| 丰满大乳奶做爰ⅹxx视频| 亚洲欧洲综合网| 一区二区免费在线观看视频| 麻豆av免费观看| 免费人成视频在线播放| www.av天天| 久久无码专区国产精品s| 久久久久久国产免费a片| 国产人妻精品午夜福利免费| 97在线观看免费视频| 在线黄色免费网站| 欧美性猛交xxxxx少妇| 老熟妇一区二区| v天堂中文在线| 蜜桃色一区二区三区| 极品久久久久久久| 中国毛片在线观看| 亚洲激情 欧美| 少妇极品熟妇人妻无码| 国产极品国产极品| 欧美成人短视频| 少妇av片在线观看| 九色porny自拍视频| 国产精品无码在线| 97精品人妻一区二区三区蜜桃| 免费在线观看一级片| 国产精品suv一区二区88| 欧美xxxooo| 天天做夜夜爱爱爱| 卡通动漫亚洲综合| jizz亚洲少妇| 国产情侣久久久久aⅴ免费| 久久久久无码精品| 在线播放av网址| 国产麻豆xxxvideo实拍| 国产精品无码一区二区三区| 国产熟妇搡bbbb搡bbbb| 99久久人妻无码精品系列| 国产美女喷水视频| 成人免费无遮挡无码黄漫视频| 日韩在线免费观看av| 一级免费黄色录像| 人妻巨大乳一二三区| 日本一区二区在线免费观看| 日本黄色网址大全| 国产第一页精品| 亚洲欧美一区二区三区四区五区| 少妇献身老头系列| 91网站免费入口| 久久国产美女视频| 爱爱免费小视频| 少妇的滋味中文字幕bd| 911亚洲精选| 69视频在线观看免费| 麻豆明星ai换脸视频| 中文文字幕文字幕高清| 亚洲一级片在线播放| 性生交大片免费看l| 男人舔女人下部高潮全视频| www欧美com| 欧美激情 一区| 亚洲色图欧美另类| 蜜乳av中文字幕| 婷婷五月精品中文字幕| 日韩一级av毛片| 懂色av粉嫩av蜜乳av| 国产精品无码电影| 91禁男男在线观看| 超碰男人的天堂| 国产亚洲色婷婷久久| 99久久久无码国产精品衣服| 挪威xxxx性hd极品| 全网免费在线播放视频入口| 亚洲а∨天堂久久精品2021| 在线中文字日产幕| 色欲无码人妻久久精品| 天堂在线中文视频| 法国空姐电影在线观看| 亚洲欧美日韩色| 最新国产精品自拍| av电影中文字幕| 亚洲性图第一页| 欧美熟妇另类久久久久久多毛| 成人免费视频入口| 久久一级免费视频| 在线免费看视频| 一级片久久久久| 国产三级短视频| 国产小视频自拍| 精品亚洲aⅴ无码一区二区三区| 欧产日产国产精品98| 日本黄色片在线播放| 国产美女精品久久| 91精品国自产在线| 青青青视频在线播放| 又色又爽的视频| 日本天堂中文字幕| 欧产日产国产精品98| 精品无码人妻一区| 在线免费看视频| 国产精品偷伦视频免费观看了| 国产香蕉精品视频| 人妻大战黑人白浆狂泄| 天天摸日日摸狠狠添| 成人免费毛片xxx| 337p日本欧洲亚洲大胆张筱雨 | 国产手机在线观看| 一二三四在线观看视频| 久久久久99人妻一区二区三区| 好吊操视频这里只有精品| 国产xxxxxxxxx| av资源在线免费观看| 原创真实夫妻啪啪av| 亚洲调教欧美在线| 免费黄色激情视频| 东京热av一区| 国产中文字幕久久| 强迫凌虐淫辱の牝奴在线观看| 纪美影视在线观看电视版使用方法| 午夜精品久久久久99蜜桃最新版| 乱码一区二区三区| 美女福利视频网| 亚洲制服丝袜在线播放| 三级在线观看免费大全| 手机在线看片日韩| 两女双腿交缠激烈磨豆腐| 一级片手机在线观看| 人妻av一区二区三区| 日本xxxxxxxxx18| 男人的天堂影院| 天天操天天操天天操天天操天天操| 中文字幕 亚洲一区| 男插女视频网站| 久久国产高清视频| 国产精品一二三区在线观看| 精品伦一区二区三区| 夫妻性生活毛片| 日本视频在线免费| 中文字幕免费高清| 亚洲av无码一区二区三区观看| 亚洲熟女乱综合一区二区| 2014亚洲天堂| www.超碰97| 国产麻豆剧传媒精品国产av| 台湾佬美性中文| 欧美卡一卡二卡三| 国产黄a三级三级| 香蕉视频久久久| japanese中文字幕| 国产人妻大战黑人20p| 色婷婷av777| 国产 欧美 在线| 成年人看的免费视频| 女人裸体性做爰全过| 国产视频123区| 特一级黄色录像| 91视频免费入口| 日本一级大毛片a一| av漫画在线观看| 亚洲av无码一区二区三区观看| yy6080午夜| 久久久精品成人| 国产色无码精品视频国产| 国产午夜手机精彩视频| 成人一级黄色大片| 四虎精品免费视频| 黄色av电影网站| 加勒比一区二区| 成人免费精品动漫网站| 日本不卡视频一区| 日韩乱码人妻无码中文字幕久久| 成年人网站免费在线观看|