Skip to content

Commit dd7a0fe

Browse files
authored
Merge pull request #8 from RomanR-dev/release
prepare for delivery
2 parents ae61299 + dc5c6e5 commit dd7a0fe

35 files changed

+197
-67
lines changed

.github/workflows/CI.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ jobs:
2121
echo building project
2222
rm -f assembler
2323
make
24-
./assembler ps ps2 ps3 ps4 ps5 ps6 ps7
25-
echo compare tester/ps.ob tester/main_tester
26-
cmp tester/ps.ob tester/main_tester
24+
./assembler ps
25+
echo compare ps.ob input_output_results/main_tester
26+
diff ps.ob input_output_results/main_tester.ob -s
2727
- uses: actions/upload-artifact@v3
2828
with:
2929
name: assembler.zip
3030
path: |
3131
misc
3232
passes
33-
tester
33+
input_output_results
3434
assembler
3535
assembler.c
3636
Makefile
@@ -45,9 +45,9 @@ jobs:
4545
echo building project
4646
rm -f assembler
4747
make
48-
./assembler ps ps2 ps3 ps4 ps5 ps6 ps7
49-
echo compare tester/ps.ob tester/main_tester
50-
cmp tester/ps.ob tester/main_tester
48+
./assembler ps
49+
echo compare ps.ob input_output_results/main_tester
50+
diff ps.ob input_output_results/main_tester.ob -s
5151
5252
build_and_test_macos-latest:
5353
runs-on: macos-latest
@@ -59,4 +59,4 @@ jobs:
5959
echo building project
6060
rm -f assembler
6161
make
62-
./assembler ps ps2 ps3 ps4 ps5 ps6 ps7
62+
./assembler ps

assembler

48 Bytes
Binary file not shown.

assembler.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@ void mainRunner(int argc, char **argv) {
4141
lineNum = 1;
4242
firstPass(line, outP, &errors, outPutFileName);
4343
} else {
44-
fclose(outP);
4544
fclose(inp);
4645
remove(outPutFileName);
47-
printError("due to errors not continuing with flow on current file, continue with next file...");
46+
printError("due to errors not continuing with flow on current file, continue with next file");
4847
}
4948
printf("===>>>>>> Finished file: %s <<<<<<===\n", outPutFileName);
5049
printf("======================================================================\n\n");
File renamed without changes.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Received 3 files, starting assembler process.
2+
3+
Processing: ps7.as
4+
===>>>>>> Pre assembler finished: Errors: 0
5+
1 --->Too many commas in 1 line
6+
1 --->Too many commas in 1 line
7+
1 --->Too many commas in 1 line
8+
2 --->Wrong number of operands for command: clr
9+
3 --->Error: CMD: [ ... ] not found.
10+
4 --->Error: CMD: [ #$%#@$%@#$#@ ] not found.
11+
5 --->Error: CMD: [ r1 ] not found.
12+
6 --->Undefined label: MAIN:
13+
7 --->Wrong number of operands for command: jsr
14+
8 --->expected regs between 10 and 15
15+
9 --->reg: r32, wrong number
16+
===>>>>>> First pass finished: Errors: 11
17+
18+
-->due to errors not continuing with flow on current file, continue with next file...
19+
===>>>>>> Finished file: tester/ps7.am <<<<<<===
20+
======================================================================
21+
22+
Processing: ps4.as
23+
===>>>>>> Pre assembler finished: Errors: 0
24+
1 --->Error: CMD: [ mow ] not found.
25+
2 --->Error: CMD: [ wom ] not found.
26+
3 --->Error: CMD: [ step ] not found.
27+
4 --->Error: CMD: [ jpr ] not found.
28+
5 --->Error: CMD: [ ABC ] not found.
29+
7 --->Operand: 1, did not find matching sort type
30+
31+
9 --->String not declared properly
32+
===>>>>>> First pass finished: Errors: 7
33+
34+
-->due to errors not continuing with flow on current file, continue with next file...
35+
===>>>>>> Finished file: tester/ps4.am <<<<<<===
36+
======================================================================
37+
38+
Processing: ps3.as
39+
===>>>>>> Pre assembler finished: Errors: 0
40+
1 --->Undefined label: LIST:
41+
2 --->Wrong number of operands for command: lea
42+
3 --->Wrong number of operands for command: mov
43+
5 --->Too many commas in 1 line
44+
6 --->Wrong number of operands for command: mov
45+
7 --->Undefined label: MAIN:
46+
8 --->Wrong number of operands for command: mov
47+
8 --->Too many commas in 1 line
48+
9 --->Wrong number of operands for command: clr
49+
10 --->Wrong number of operands for command: dec
50+
11 --->Wrong number of operands for command: bne
51+
12 --->Wrong number of operands for command: lea
52+
13 --->No data after .data declaration
53+
14 --->Undefined label: LABEL:
54+
55+
14 --->No characters after .string declaration or string undeclared properly
56+
===>>>>>> First pass finished: Errors: 15
57+
58+
-->due to errors not continuing with flow on current file, continue with next file...
59+
===>>>>>> Finished file: tester/ps3.am <<<<<<===
60+
======================================================================
61+
62+
Finished processing - 3 file(s) that were received.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Received 0 files, starting assembler process.
2+
3+
Finished processing - 0 file(s) that were received.

tester/ps.am renamed to input_output_results/ps.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dec K
1313
.entry MAIN
1414
sub LOOP[r10] ,r14
1515
END: stop
16-
STR: .string abcd
16+
STR: .string "abcd"
1717
LIST: .data 6, -9
1818
.data -100
1919
.entry K

tester/ps.as renamed to input_output_results/ps.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dec K
1717
.entry MAIN
1818
sub LOOP[r10] ,r14
1919
END: stop
20-
STR: .string abcd
20+
STR: .string "abcd"
2121
LIST: .data 6, -9
2222
.data -100
2323
.entry K
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)