Assembly code skipping a line?

后端 未结 2 824
悲&欢浪女
悲&欢浪女 2021-01-29 11:56

Why is my assembly code skipping a line? It keeps skipping the line mov AX,A

org 100h
count equ 2
A DW 5
B DW 6
Y0 DW ?
Y1 DW ?    
mov AX,A     
ad         


        
2条回答
  •  一整个雨季
    2021-01-29 12:28

    The problem is that in your code you have mixed operation codes with data definitions. This is completely wrong, due to the fact that your Assembler is going to assume that these data definitions are mnemonics, messing around the code. To see it just download a Hex Editor and see the Hex format of your code. Then find a Disassembler and try to disassemble the hex formated code. You will see that the code shown by the Disassembler will be way more different from what you have typed in your code. In other words the linemov AX, A is not skipped, rather than assumed to be another op code.

提交回复
热议问题