Updated link in README file.
[Hack-Assembler.git] / ERRORS
blob7c824dce5e2bf8cd450088bc940b2583c369b084
1 This is a complete and detailed list of errors for the Hack Assembler.
3 It should provide assistance to the user in the correct and efficient use of the software.
5 The errors are listed in order. Each error entry contains a detailed explanation of the error as well as optional tips for reducing or eliminating its occurrence.
7 1: No Input Files.
8         Assembler does not have a file to assemble.
9         Retry command with a filename as an argument.
11 2: Too Many Files Listed.
12         Assembler may only work on one file at a time in this version.
13         Retry command with only one argument.
15 3: Cannot Open Input (Source) File.
16         There are several factors that can cause this error:
17                 A. File does not exist on system.
18                 B. Your account does not have permission to open file.
19                 C. File locked by either the operating system or another program.
21 4: Input Too Large for Input Buffer.
22         This assembler has a maximum filesize that can be read.
23         This filesize is probably large enough for even a very complex assembly program.
24         If this buffer is found to be too small, it can be adjusted in the source and recompiled.
26 5: Filename Extension Not Correct.
27         Assembler only accepts file extension "asm".  Uppercase letters in extension will not work.
29 6: Cannot Open Output (Destination) File.
30         There are several factors that can cause this error:
31                 A. File already exists but your account does not have permission to overwrite it.
32                 B. Your account does not have permission to create file at this location.
33                 C. File already exists but but is locked by either the operating system or another program.
35 7: Incorrect Command Type.
36         Command at this line has been observed as an invalid command type.
37         This usually happens when the syntax for the file is incorrect.
38         See documentation for correct syntax for this assembly language.
40 8: Symbol Function Called on Incorrect Command Type.
41         Internal function named Symbol has been called to decode a command type that the function
42         is not able to work with.
44 9: Command Does Not Contain Proper Delimiter.
45         Command parsed at this line should contain either a ';' or an '='.
46         Parser did not find either operator and exited.
48 10: Symbol Not Found In Dest Lookup Table.
49         Code generator could not find appropriate output based on command input.
50         Accepted command input values include:
51                 null, M, D, MD, A, AM, AD, AMD
53 11: Symbol Not Found In Jump Lookup Table.
54         Code generator could not find appropriate output based on command input.
55         Accepted command input values include:
56                 null, JGT, JEQ, JGE, JLT, JNE, JLE, JMP
58 12: Symbol Not Found In Encode Lookup Table.
59         Code generator could not find appropriate output based on command input.
60         Accepted command input values include:
61                 0
62                 1
63                 -1
64                 A
65                 -A
66                 !A
67                 A-1
68                 A+1
69                 A-D
70                 D
71                 -D
72                 !D
73                 D-1
74                 D+1
75                 d-A
76                 D|A
77                 D&A
78                 D+A
79                 D|M
80                 D-M
81                 D&M
82                 D+M
83                 M
84                 -M
85                 !M
86                 M-1
87                 M+1
88                 M-D
90 13: Symbol table full.
91         Error occurs when too many symbols have been listed in the Assembly code.
92         Two fixes are possible:
93                 A. Re-compile code with larger (prime) hash table.
94                 B. Reduce number of Symbols in current assembly program.
95         During normal use, this error should not occur.