Skip to content

Commit 7b7a342

Browse files
committed
CIT 593 HW13 dynamic memory
0 parents  commit 7b7a342

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1128
-0
lines changed

.codio

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"commands": {
3+
"Pre-submission tests": "clear; /home/codio/workspace/makefiletest.sh integration",
4+
"Test LC4 Makefile": "clear; /home/codio/workspace/makefiletest.sh lc4"
5+
},
6+
"preview": {
7+
"PennSim Window": "https://{{domain3000}}/",
8+
"Virtual Desktop": "https://{{domain3000}}/",
9+
"Project Index (static)": "https://{{domain}}/{{index}}",
10+
"Current File (static)": "https://{{domain}}/{{filepath}}",
11+
"Box URL": "http://{{domain3000}}/",
12+
"Box URL SSL": "https://{{domain3000}}/"
13+
},
14+
"autogradeTestScripts": [".guides/secure/autograde.sh",".guides/secure/autograder.py"]
15+
}

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.idea/
2+
.vscode/
3+
4+
*.class
5+
6+
.guides/secure/grading-config/*.cfg
7+
.guides/secure/test-libs/*
8+
9+
.guides/secure/test-cases/**/*.java
10+
.guides/secure/user-libs/*.jar
11+
.guides/secure/user-submissions/*.java
12+
*.txt
13+
14+
libs/*.jar
15+
submit/*.java
16+
tests/*
17+
!tests/.gitkeep
18+
19+
TEST-junit-*.xml

.settings

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
[editor]
2+
tab_size = 2
3+
; enter your editor preferences here...
4+
5+
[ide]
6+
; enter your ide preferences here...
7+
8+
[code-beautifier]
9+
; enter your code-beautifier preferences here...
10+
11+
[codio-filetree]
12+
; enter your codio-filetree preferences here...
13+
14+
[view-javascript-code]
15+
; enter your view-javascript-code preferences here...
16+
17+
[codio-lsp]
18+
; enter your codio-lsp preferences here...
19+
20+
[junit]
21+
; enter your junit preferences here...
22+
23+
[git]
24+
; enter your git preferences here...
25+
26+
[terminal]
27+
; enter your terminal preferences here...
28+
29+
[preview]
30+
; enter your preview preferences here...
31+
32+
[emmet]
33+
; enter your emmet preferences here...
34+
35+
[search]
36+
; enter your search preferences here...
37+
38+
[guides]
39+
; enter your guides preferences here...
40+
41+
[settings]
42+
; enter your settings preferences here...
43+
44+
[account]
45+
; enter your account preferences here...
46+
47+
[project]
48+
; enter your project preferences here...
49+
50+
[install-software]
51+
; enter your install-software preferences here...
52+
53+
[education]
54+
; enter your education preferences here...
55+
56+
[deployment]
57+
; enter your deployment preferences here...
58+
59+
[container]
60+
; enter your container preferences here...
61+
62+
[sync-structure]
63+
; enter your sync-structure preferences here...
64+
65+
[Codio Lexikon]
66+
; enter your Codio Lexikon preferences here...
67+

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
all:
2+
@echo 'remember to use the "cd submit" command before running make'
3+

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# CIT 593 HW13 dynamic memory代写
2+
# 加微信 powcoder
3+
4+
# [代做各类CS相关课程和程序语言](https://powcoder.com/)
5+
6+
# Programming Help Add Wechat powcoder
7+
8+
9+
10+
[成功案例](https://powcoder.com/tag/成功案例/)
11+
12+
[java代写](https://powcoder.com/tag/java/) [c/c++代写](https://powcoder.com/tag/c/) [python代写](https://powcoder.com/tag/python/) [drracket代写](https://powcoder.com/tag/drracket/) [MIPS汇编代写](https://powcoder.com/tag/MIPS/) [matlab代写](https://powcoder.com/tag/matlab/) [R语言代写](https://powcoder.com/tag/r/) [javascript代写](https://powcoder.com/tag/javascript/)
13+
14+
[prolog代写](https://powcoder.com/tag/prolog/) [haskell代写](https://powcoder.com/tag/haskell/) [processing代写](https://powcoder.com/tag/processing/) [ruby代写](https://powcoder.com/tag/ruby/) [scheme代写](https://powcoder.com/tag/drracket/) [ocaml代写](https://powcoder.com/tag/ocaml/) [lisp代写](https://powcoder.com/tag/lisp/)
15+
16+
- [数据结构算法 data structure algorithm 代写](https://powcoder.com/category/data-structure-algorithm/)
17+
- [计算机网络 套接字编程 computer network socket programming 代写](https://powcoder.com/category/network-socket/)
18+
- [数据库 DB Database SQL 代写](https://powcoder.com/category/database-db-sql/)
19+
- [机器学习 machine learning 代写](https://powcoder.com/category/machine-learning/)
20+
- [编译器原理 Compiler 代写](https://powcoder.com/category/compiler/)
21+
- [操作系统OS(Operating System) 代写](https://powcoder.com/category/操作系统osoperating-system/)
22+
- [计算机图形学 Computer Graphics opengl webgl 代写](https://powcoder.com/category/computer-graphics-opengl-webgl/)
23+
- [人工智能 AI Artificial Intelligence 代写](https://powcoder.com/category/人工智能-ai-artificial-intelligence/)
24+
- [大数据 Hadoop Map Reduce Spark HBase 代写](https://powcoder.com/category/hadoop-map-reduce-spark-hbase/)
25+
- [系统编程 System programming 代写](https://powcoder.com/category/sys-programming/)
26+
- [网页应用 Web Application 代写](https://powcoder.com/category/web/)
27+
- [自然语言处理 NLP natural language processing 代写](https://powcoder.com/category/nlp/)
28+
- [计算机体系结构 Computer Architecture 代写](https://powcoder.com/category/computer-architecture/)
29+
- [计算机安全密码学computer security cryptography 代写](https://powcoder.com/category/computer-security/)
30+
- [计算机理论 Computation Theory 代写](https://powcoder.com/category/computation-theory/)
31+
- [计算机视觉(Compute Vision) 代写](https://powcoder.com/category/计算机视觉compute-vision/)
32+

autograder_test/autograder_makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
autograder:
2+
@clang -g autograder.o autograder_helpers.o lc4_memory.o lc4_disassembler.o lc4_loader.o -o autograder

hw13.pdf

352 KB
Binary file not shown.

makefiletest.sh

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
https://powcoder.com
2+
代写代考加微信 powcoder
3+
Assignment Project Exam Help
4+
Add WeChat powcoder
5+
#!/bin/bash
6+
7+
remove_compiled () {
8+
rm -f autograder*
9+
rm -f lc4
10+
rm -f *.o
11+
}
12+
13+
ERR='\033[1;31m'
14+
NC='\033[0m' # No Color
15+
16+
cd submit
17+
18+
required_files=( "lc4.c" "lc4_disassembler.c" "lc4_disassembler.h" \
19+
"lc4_loader.c" "lc4_loader.h" "lc4_memory.c" "lc4_memory.h" "Makefile")
20+
21+
for file in "${required_files[@]}"
22+
do
23+
if [ ! -f $file ]; then
24+
echo -e "${ERR}Required file ${file} does not exist!${NC}"
25+
exit 1
26+
fi
27+
done
28+
29+
if [ $1 == "lc4" ]; then
30+
make lc4
31+
32+
if [ $? -ne 0 ]; then
33+
echo -e "${ERR}LC4 Makefile failed!${NC}"
34+
remove_compiled
35+
exit
36+
fi
37+
38+
echo -e "${NC}LC4 Makefile successful!${NC}"
39+
remove_compiled
40+
elif [ $1 == "integration" ]; then
41+
cp ../autograder_test/* .
42+
make lc4
43+
44+
echo -e "${NC}running lc4 on testone.obj and comparing results with correct solution${NC}"
45+
46+
cp ../obj*/testone.* .
47+
./lc4 testone.obj
48+
49+
if [ $? -ne 0 ]; then
50+
echo -e "${ERR}lc4 failed!${NC}"
51+
remove_compiled
52+
exit
53+
fi
54+
55+
cat testone.sol
56+
57+
make -f autograder_makefile autograder
58+
59+
if [ $? -ne 0 ]; then
60+
echo -e "${ERR}Compilation failed!${NC}"
61+
remove_compiled
62+
exit
63+
fi
64+
65+
./autograder reverse_assemble 999
66+
if [ $? -ne 0 ]; then
67+
echo -e "${NC}Compilation passed, but ${ERR}reverse assembler unit test failed!${NC}"
68+
remove_compiled
69+
exit
70+
fi
71+
72+
./autograder search_opcode 998
73+
if [ $? -ne 0 ]; then
74+
echo -e "${NC}Compilation passed, but ${ERR}search opcode unit test failed!${NC}"
75+
remove_compiled
76+
exit
77+
fi
78+
79+
./autograder add_to_list 999
80+
if [ $? -ne 0 ]; then
81+
echo -e "${NC}Compilation passed, but ${ERR}add to list unit test failed!${NC}"
82+
remove_compiled
83+
exit
84+
fi
85+
86+
87+
echo -e "${NC}Successfully compiled, sample unit tests passed!${NC}"
88+
echo -e "${NC}This is only a subset of the full tests. Remember to test your lc4 program with the sample .obj files${NC}"
89+
remove_compiled
90+
else
91+
echo -e "${ERR}Invalid or missing argument!${NC}"
92+
echo "Usage:"
93+
echo " ./makefiletest.sh <lc4|integration>"
94+
exit 1
95+
fi
240 Bytes
Binary file not shown.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<label> <address> <contents> <assembly>
2+
MAIN 0000 9420
3+
0001 D540
4+
0002 16A5 ADD R3, R2, #5
5+
FOR_LOOP 0003 2403
6+
0004 0603
7+
0005 4801
8+
0006 14A1 ADD R2, R2, #1
9+
0007 CFFB
10+
END_FOR_LOOP 0008 C81B
11+
SUB_FACTORIAL 0010 6080
12+
0011 2100
13+
0012 0A02
14+
0013 9201
15+
0014 C80D
16+
END_IF1 0015 0202
17+
0016 93FF
18+
0017 C80A
19+
END_IF2 0018 2107
20+
0019 0C02
21+
001A 93FF
22+
001B C806
23+
END_IF3 001C 1220 ADD R1, R0, #0
24+
LOOP 001D 2101
25+
001E 0C03
26+
001F 103F ADD R0, R0, #-1
27+
0020 1248 MUL R1, R1, R0
28+
0021 CFFB
29+
END_SUB_FACTORIAL 0022 7280
30+
0023 C1C0
31+
END 0024 0000
32+
VALUES 4020 0006
33+
4021 0005
34+
4022 0008
35+
4023 000A
36+
4024 FFFB

obj files for student testing/os.obj

967 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)