📄 err.doc
字号:
(6) Diagnostics The assembler will only print out a screenful of diagnostics (24) beforeit stops. When applicable, the file and line number where the error occurredare given. An attempt is made to indicate the line where the error actuallyoccurred, rather than where its effects were first seen. Assembly is stopped at certain points if errors have been detected, since itwould make no sense to go on past the given point. The following is an alphabetized listing of diagnostics classified bywhether they are fatal or non-fatal. Assembly always stops after the formerbut will continue after the latter (until the error limit is reached). Internal errors should be reported to me, see the README file at the FTPsite csd4.csd.uwm.edu in the directory /pub/8051 or /pub/micro/8051 for moreinformation. If you get an internal error, you should display the object fileusing the object file display program provided with the assembler. If youwant me to resolve the bugs (if any exist) I would need to see this as well. Alternatively, the source for the assembler is yours. If you want to makemodifications, try your hand at it, and if something significant results leteveryone know by placing it in the public domain. (a) Fatal Errors These diagnostics will cause assembly to stop immediately, they usuallyrepresent serious inconsistencies or serious points of confusion for theassembler that makes further processing impossible or pointless.Address <Decimal Number> out of range The location counter points to the indicated address, which lies outside the address space of the current segment. These address spaces are as follows: Type Low High code 0 65535 (or ffff hexadecimal) xdata 0 65535 (or ffff hexadecimal) data 0 255 (or ff hexadecimal)Attempting to write to a non-code segment. This happens if you try to use any image generating statement (db/byte, dw/word, or any opcode) in a data or xdata segment. Only code segments will accept these statements.Bad opcode initialization. This is an internal error you should never see. It indicates an internal inconsistency in the assembler's opcode tables. These tables are used to process the 8051 mnemonics.Cannot fit segment. The linker tries its best to fit all the relatively addressed segment in the tightest fitting space it can. It may fail to pack them all in, if they can only fit real tightly, or your segments may actually not fit at all. Use the object file display program that accompanies this assembler to look at your object files in some detail.Cannot open <FILE> An file was lost sometime during processing, or the file named probably does not exist, or is not readible.Cannot open object file for <FILE>. The object file for the source file indicated was somehow lost or made inaccessible between the time it was created and the time it was processed by the linker.Cannot open output file. For some unexpected reason, the assembler could not create an .hex output file. If you're running this on a UNIX, then you're probably assembling output into a directory where you have no write access. Also possible: you ran out of disk space.Cannot reopen <FILE> A failure to reopen the current file after processing an include file occurred. This indicates either an internal flaw in the assembler or that something happened to the file during assembly.Corrupt object file <NAME>. A rudimentary check are made on object files. The file indicated didn't pass that check. It's was either corrupted, or the assembler itself has an internal flaw that made it produce corrupt object files.Could not restore <FILE>'s position. A failure to resume processing the current file past the most recent include statement occurred. This indicates either an internal flaw in the assembler or that the file undergoing processing was corrupted during assembly.Could not save <FILE>'s position. A transient error occurred while setting up to include another file. This is either a serious system flaw, or an internal flaw in the assembler.Expression too complex ... aborting. If you see this, you must be Lieutenant Commander Data. An expression has to be pretty complicated before it confuses the assembler. Break it up, by symbolically defining subexpressions first.Internal error (0). An inconsistency was detected by the linker in the object file undergoing processing. A relocation item of undefined type was found.Internal error (1). An inconsistency was detected by the linker in the object file undergoing processing. An undefined expression was found.Internal error (2). A flaw in the assembler made it lose track of all the code segments, even though at least one was defined.Internal error (3). A flaw in the assembler made it think that a ds/rb, or rw statement was reserving memory outside the segment where it was defined.Internal error (4). A flaw in the assembler caused it to try and relocate two or more items to the same address. This can also be caused by a corrupt object file.Internal error (5). A flaw in the assembler caused it to have trouble resolving an expression during linking. This can also be caused by a corrupt object file.Internal error (6). A flaw in the assembler made it fail to sort the list of items to be relocated. A corrupt object file can cause this too.Internal error (7). A flaw in the assembler made it think it was trying to patch up a hole of size other than 1 or 2 bytes. This can also be caused by a corrupt object file.Internal error (8). The assembler is expecting an object file larger than what it sees. This is the result of either an internal flaw or corrupt object file.Invalid object file <NAME>. The first type bytes of all object files are 55 and aa (hexadecimal). The object file undergoing processing doesn't show this. It's was either corrupted, or the assembler itself has an internal flaw that made it produce corrupt object files.Invalid option: -<OPTION> Only -c and -o are recognized.Missing ';' after include statement. The include statement (like all other statements) needs to be followed by a semicolon, or otherwise be the last statement on the line.Missing filename in 'include' The include statement has the form: include "FILE", with the file name enclosed in double-quotes, as indicated.Out of memory. The assembler's resources exceeded the system's available space. If this happens during linking it may point to the high degree of interconnectivity between modules thereby indicating a need to make the interfaces between modules more clean-cut. If it happens during assembly it may point to a need to break the assembly-language file into smaller modules.Overlapping segments: <FILE> [<LINE>] and <FILE> [<LINE>]. The segments in the indicated places have overlapping ranges of addresses. Move one or both of them, if possible.Overlapping segments at [<LINE>] <FILE> and [<LINE>] <FILE>. This one is actually an internal error.Statement too complex If you see this, you must be Lieutenant Commander Data. An statement has to be pretty complicated with many layers of if's and else's and brackets '{' and '}' before it confuses the assembler. There is no direct recourse here other than to try and simplify your program.Too many nested include files. Up to 5 levels of nested includes are allowed.Too many segments. Up to 32 segments can be defined per file. Any occurrence of the org/at or seg statements will start a new segment. The first 5 segments are defined by and used internally by the assembler, which leaves you with 27.Undefined segment type. Only the types: code, xdata, or data can be used with the seg statement.Unexpected EOF. Attempted to read past the end of an object file. The object file is corruptUse: <CAS> -c File... to assemble. At least one input file should be listed with the -c option.Use: <CAS> -o Output File... to link. At least one source or object file should be listed with the -o option.Use: <CAS> [-o Output] File... to link. At least one source or object file should be listed with the -o option or with no options. (b) Non-Fatal Errors These are errors the assembler will attempt to recover from and continueprocessing after.Address <NAME> redeclared as number: <FILE> <FILE> The symbol indicated was declared as a global number in the first indicated files and as a global address in the second.Address cannot appear in: x? x: x. Addresses cannot be used as conditions of conditionals in the combination address? x: x. Only numeric values can be used there.Address cannot be used with infix operator. The only allowable combinations of addresses involving infix operations are pretty much like in C: number + address address + number address - number In addition, the combination reg.bit can be used for bit addressible registers "reg" and values of 0 to 7 for "bit".Address cannot be used with prefix operator. Prefix operators other than + (-, !, ~, high, low) can only be used with numeric values, not addresses.Address of wrong type in reg.pos Only data or sfr addresses can be used in the place referred to ("reg").Address type mismatch. Rudimentary type-checking is done for operations involving bit addresses, data and sfr addresses, or code addresses. Type checking is not done on xdata addresses, as there are not 8051 operations that directly involve such addresses.Addresses of different types cannot be subtracted. Addresses must be of the same type in order to be subtracted. They can be of different segments, however, as long as the segments have the same type.Attempting to make local label global. Local (numeric) labels cannot be made global.Attempting to redefine <NAME> The label indicated was used in the context LABEL:, but is already defined,Bad hexadecimal character. A hexadecimal character takes the form: \xHK or \XHK, where H and K are hexadecimal digits. Exactly two hex digits must be seen. An \x by itself without any following hexadecimal digits is interpreted as just x.Binary number has non-binary digits. A number with a binary prefix (0b, 0B) or binary suffix (b, B) can only contain the digits 0 and 1.Bit address out of range. Bit addresses range only from 0 to ff hex (0 to 255 decimal).Bit position out of range. The operation reg.pos only allows values of 0 to 7 for "pos".Byte value out of range (hex value). An immediate byte value in the range -80 (hex) to ff (hex) (or -128 to 255) is required in this context.Cannot use @A+A Only @A+DPTR, and @A+PC can be used with the 8051 language.Cannot use @A+AB. Only @A+DPTR, and @A+PC can be used with the 8051 language.Cannot use @A+C. Only @A+DPTR, and @A+PC can be used with the 8051 language.Cannot use @A+Rn Only @A+DPTR, and @A+PC can be used with the 8051 language.Cannot use @A. The only valid combinations using @ are @R0, @R1, @DPTR, @A+DPTR, and @A+PC.Cannot use @AB. The only valid combinations using @ are @R0, @R1, @DPTR, @A+DPTR, and @A+PC.Cannot use @C. The only valid combinations using @ are @R0, @R1, @DPTR, @A+DPTR, and @A+PC.Cannot use @PC. The only valid combinations using @ are @R0, @R1, @DPTR, @A+DPTR, and @A+PC.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -