鱼C论坛

 找回密码
 立即注册
查看: 5622|回复: 1

求助汇编程序为什么不能通过编译

[复制链接]
发表于 2013-5-25 16:31:35 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
本帖最后由 s0512 于 2013-5-27 12:07 编辑

assume cs:code,ds:data,ss:stack

stack segment
dw 0,0,0,0,0,0,0,0
stack ends

data segment
db '1. display      '
db '2. browe        '
db '3. replace      '
db '4. modify       '
data ends

code segment
start:  mov ax,data
         mov ds,ax
         mov bx,0
         mov cx,4
s0:    push cx
         mov si,0
         mov cx,4
s1:    mov al,[bx+3+si]
         and al,11011111B
         mov [bx+3+si],al
         inc si
         loop s1
         add bx,16
         pop cx
         loop s0

         mov ax,4c00H
         int 21h
code ends
end start

编译结果为
Assembling: 11.asm
error A4910: cannot open file: C:\ML.err
11.asm(22) : error A2070:
11.asm(24) : error A2070:
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2013-5-27 12:11:23 | 显示全部楼层
转发~
把下面的内容复制到文本文件中
  1. -------------------------------------------------------内容---------------------------------------
  2. FATAL
  3. cannot open file
  4. I/O error closing file
  5. I/O error writing file
  6. I/O error reading file
  7. out of memory
  8. assembler limit : macro parameter name table full
  9. invalid command-line option
  10. nesting level too deep
  11. unmatched macro nesting
  12. line too long
  13. unmatched block nesting
  14. directive must be in control block
  15. error count exceeds 100; stopping assembly
  16. invalid numerical command-line argument
  17. too many arguments
  18. statement too complex
  19. Internal Assembler Error
  20. missing source filename
  21. COFF error writing file
  22. invalid debug and browser data; file exceeds line limit
  23. cannot find link.exe
  24. cannot find cvpack.exe
  25. SEVERE
  26. memory operand not allowed in context
  27. immediate operand not allowed
  28. cannot have more than one ELSE clause per IF block
  29. extra characters after statement
  30. symbol type conflict
  31. symbol redefinition
  32. undefined symbol
  33. non-benign record redefinition
  34. syntax error
  35. syntax error in expression
  36. invalid type expression
  37. distance invalid for word size of current segment
  38. PROC, MACRO, or macro repeat directive must precede LOCAL
  39. .MODEL must precede this directive
  40. cannot define as public or external
  41. segment attributes cannot change
  42. expression expected
  43. operator expected
  44. invalid use of external symbol
  45. operand must be RECORD type or field
  46. identifier not a record
  47. record constants may not span line breaks
  48. instruction operands must be the same size
  49. instruction operand must have size
  50. invalid operand size for instruction
  51. operands must be in same segment
  52. constant expected
  53. operand must be a memory expression
  54. expression must be a code address
  55. multiple base registers not allowed
  56. multiple index registers not allowed
  57. must be index or base register
  58. invalid use of register
  59. invalid INVOKE argument
  60. must be in segment block
  61. DUP too complex
  62. too many initial values for structure
  63. statement not allowed inside structure definition
  64. missing operand for macro operator
  65. line too long
  66. segment register not allowed in context
  67. string or text literal too long
  68. statement too complex
  69. identifier too long
  70. invalid character in file
  71. missing angle bracket or brace in literal
  72. missing single or double quotation mark in string
  73. empty (null) string
  74. nondigit in number
  75. syntax error in floating-point constant
  76. real or BCD number not allowed
  77. text item required
  78. forced error
  79. forced error : value equal to 0
  80. forced error : value not equal to 0
  81. forced error : symbol not defined
  82. forced error : symbol defined
  83. forced error : string blank
  84. forced error : string not blank
  85. forced error : strings equal
  86. forced error : strings not equal
  87. [ELSE]IF2/.ERR2 not allowed : single-pass assembler
  88. expression too complex for .UNTILCXZ
  89. can ALIGN only to power of 2
  90. structure alignment must be 1, 2, 4, 8, or 16
  91. expected
  92. incompatible CPU mode and segment size
  93. LOCK must be followed by a memory operation
  94. instruction prefix not allowed
  95. no operands allowed for this instruction
  96. invalid instruction operands
  97. initializer magnitude too large for specified size
  98. cannot access symbol in given segment or group
  99. operands have different frames
  100. cannot access label through segment registers
  101. jump destination too far
  102. jump destination must specify a label
  103. instruction does not allow NEAR indirect addressing
  104. instruction does not allow FAR indirect addressing
  105. instruction does not allow FAR direct addressing
  106. jump distance not possible in current CPU mode
  107. missing operand after unary operator
  108. cannot mix 16- and 32-bit registers
  109. invalid scale value
  110. constant value too large
  111. instruction or register not accepted in current CPU mode
  112. reserved word expected
  113. instruction form requires 80386/486
  114. END directive required at end of file
  115. too many bits in RECORD
  116. positive value expected
  117. index value past end of string
  118. count must be positive or zero
  119. count value too large
  120. operand must be relocatable
  121. constant or relocatable label expected
  122. segment, group, or segment register expected
  123. segment expected
  124. invalid operand for OFFSET
  125. invalid use of external absolute
  126. segment or group not allowed
  127. cannot add two relocatable labels
  128. cannot add memory expression and code label
  129. segment exceeds 64K limit
  130. invalid type for a data declaration
  131. HIGH and LOW require immediate operands
  132. N/A
  133. cannot have implicit far jump or call to near label
  134. use of register assumed to ERROR
  135. only white space or comment can follow backslash
  136. COMMENT delimiter expected
  137. conflicting parameter definition
  138. PROC and prototype calling conventions conflict
  139. invalid radix tag
  140. INVOKE argument type mismatch : argument
  141. invalid coprocessor register
  142. instructions and initialized data not allowed in AT segments
  143. /AT switch requires the TINY memory model
  144. cannot have segment address references with TINY model
  145. language type must be specified
  146. PROLOGUE must be macro function
  147. EPILOGUE must be macro procedure
  148. alternate identifier not allowed with EXTERNDEF
  149. text macro nesting level too deep
  150. N/A
  151. missing macro argument
  152. EXITM used inconsistently
  153. macro function argument list too long
  154. N/A
  155. VARARG parameter must be last parameter
  156. VARARG parameter not allowed with LOCAL
  157. VARARG parameter requires C calling convention
  158. ORG needs a constant or local offset
  159. register value overwritten by INVOKE
  160. structure too large to pass with INVOKE : argument
  161. not overriding private proc as public
  162. too many arguments to INVOKE
  163. too few arguments to INVOKE
  164. invalid data initializer
  165. N/A
  166. RET operand too large
  167. too many operands to instruction
  168. cannot have more than one .ELSE clause per .IF block
  169. expected data label
  170. cannot nest procedures
  171. EXPORT must be FAR
  172. procedure declared with two visibility attributes
  173. macro label not defined
  174. invalid symbol type in expression
  175. byte register cannot be first operand
  176. word register cannot be first operand
  177. special register cannot be first operand
  178. coprocessor register cannot be first operand
  179. cannot change size of expression computations
  180. syntax error in control-flow directive
  181. cannot use 16-bit register with a 32-bit address
  182. constant value out of range
  183. missing right parenthesis
  184. type is wrong size for register
  185. structure cannot be instanced
  186. non-benign structure redefinition: label incorrect
  187. non-benign structure redefinition: too few labels
  188. OLDSTRUCTS/NOOLDSTRUCTS state cannot be changed
  189. non-benign structure redefinition: incorrect initializers
  190. non-benign structure redefinition: too few initializers
  191. non-benign structure redefinition: label has incorrect offset
  192. structure field expected
  193. unexpected literal found in expression
  194. N/A
  195. divide by zero in expression
  196. directive must appear inside a macro
  197. cannot expand macro function
  198. too few bits in RECORD
  199. macro function cannot redefine itself
  200. N/A
  201. invalid qualified type
  202. floating-point initializer on an integer variable
  203. nested structure improperly initialized
  204. invalid use of FLAT
  205. structure improperly initialized
  206. improper list initialization
  207. initializer must be a string or single item
  208. initializer must be a single item
  209. initializer must be a single byte
  210. improper use of list initializer
  211. improper literal initialization
  212. extra characters in literal initialization
  213. must use floating-point initializer
  214. cannot use .EXIT for OS_OS2 with .8086
  215. invalid combination with segment alignment
  216. INVOKE requires prototype for procedure
  217. cannot include structure in self
  218. symbol language attribute conflict
  219. non-benign COMM redefinition
  220. COMM variable exceeds 64K
  221. parameter or local cannot have void type
  222. cannot use TINY model with OS_OS2
  223. expression size must be 32 bits
  224. .EXIT does not work with 32-bit segments
  225. .STARTUP does not work with 32-bit segments
  226. ORG directive not allowed in unions
  227. D/T
  228. illegal use of segment register
  229. cannot declare scoped code label as PUBLIC
  230. .MSFLOAT directive is obsolete : .MSFLOAT ignored
  231. ESC instruction is obsolete : ESC ignored
  232. missing operator in expression
  233. missing right parenthesis in expression
  234. missing left parenthesis in expression
  235. reference to forward macro definition
  236. 16 bit segments not allowed with /coff option
  237. FAR not allowed in flat model comm variables
  238. invalid .model parameter for flat model
  239. ALIAS name is empty
  240. GROUP directive not allowed with /coff option
  241. .FPO is not compatible with nested procedures
  242. LEVEL 1
  243. cannot modify READONLY segment
  244. N/A
  245. non-unique STRUCT/UNION field used without qualification
  246. start address on END directive ignored with .STARTUP
  247. cannot ASSUME CS
  248. unknown default prologue argument
  249. too many arguments in macro call
  250. option untranslated, directive required
  251. invalid command-line option value, default is used
  252. insufficent memory for /EP : /EP ignored
  253. expected '>' on text literal
  254. multiple .MODEL directives found : .MODEL ignored
  255. line number information for segment without class 'CODE'
  256. instructions and initialized data not supported in AT segments
  257. instructions and initialized data not supported in BSS segments
  258. directive ignored with /coff switch
  259. /Gc switch incompatible with flat model
  260. /AT switch incompatible with flat model
  261. invalid command-line option
  262. directive ignored without /coff switch
  263. directive ignored outside a procedure
  264. LOADDS ignored in flat model
  265. debug information too complex for
  266. with /coff switch, leading underscore required for start address
  267. LEVEL 2
  268. @@: label defined but not referenced
  269. expression expected, assume value 0
  270. EXTERNDEF previously assumed to be external
  271. length of symbol previously assumed to be different
  272. symbol previously assumed to not be in a group
  273. types are different
  274. calling convention not supported in flat model
  275. LEVEL 3
  276. N/A
  277. no return from procedure
  278. N/A
  279. conditional jump lengthened
  280. procedure argument or local not referenced
  281. expression may be pass-dependent
  282. structure contains no members
  283. -------------------------------------------内容--------------------------------------
  284. 然后保存为ML.err并放到所提示的目录中即可
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-7-22 17:48

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表