| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 760 人关注过本帖
标题:请问这个程序错在哪
取消只看楼主 加入收藏
flyfx1989
Rank: 1
等 级:新手上路
帖 子:23
专家分:0
注 册:2010-12-1
结帖率:85.71%
收藏
 问题点数:0 回复次数:1 
请问这个程序错在哪

       1 0000                DATA SEGMENT
       2 0000  50 6C 65 61 73 65 20    STR1 DB 'Please input X',0DH,0AH,'$'
       3       69 6E 70 75 74 20 58   
       4       0D 0A 24            
       5 0011  50 6C 65 61 73 65 20    STR2 DB 'Please input Y',0DH,0AH,'$'
       6       69 6E 70 75 74 20 59   
       7       0D 0A 24            
       8 0022  4B 20 69 73 20 30 0D    F0   DB 'K is 0',0DH,0AH,'$'
       9       0A 24            
      10 002B  4B 20 69 73 20 31 0D    F1   DB 'K is 1',0DH,0AH,'$'
      11       0A 24            
      12 0034  4B 20 69 73 20 32 0D    F2   DB 'K is 2',0DH,0AH,'$'
      13       0A 24            
      14 003D  4B 20 69 73 20 33 0D    F3   DB 'K is 3',0DH,0AH,'$'
      15       0A 24            
      16 0046  4B 20 69 73 20 34 0D    F4   DB 'K is 4',0DH,0AH,'$'
      17       0A 24            
      18 004F  14               X DB 20
      19 0050  ??                 DB ?
      20 0051  0014[              DB 20 DUP(?)
      21        ??            
      22             ]   
      23               
      24 0065  14               Y DB 20
      25 0066  ??                 DB ?
      26 0067  0014[              DB 20 DUP(?)
      27        ??            
      28             ]   
      29               
      30 007B                DATA ENDS
      31 0000                CODE SEGMENT
      32                     ASSUME CS:CODE,DS:DATA,ES:DATA
      33 0000  B8 ---- R        START: MOV AX,DATA
      34 0003  8E D8                   MOV DS,AX
      35 0005  8E C0                   MOV ES,AX
      36 0007  8D 16 0000 R               LEA DX,STR1
      37 000B  B4 09                   MOV AH,9
      38 000D  CD 21                   INT 21H
      39 000F  8D 16 004F R               LEA DX,X
      40 0013  B4 0A                   MOV AH,0AH
      41 0015  CD 21                   INT 21H
      42 0017  8B DA                   MOV BX,DX
      43                 
      44 0019  8D 16 0011 R               LEA DX,STR2
      45 001D  B4 09                   MOV AH,9
      46 001F  CD 21                   INT 21H
      47 0021  8D 16 0065 R               LEA DX,Y
      48 0025  B4 0A                   MOV AH,0AH
      49 0027  CD 21                   INT 21H
      50 0029  8B CA                   MOV CX,DX
      51                 
      52 002B  80 7F 02 2D               CMP BYTE PTR [BX+2],'-'
      53 002F  74 1F                   JZ K23
      54 0031  80 7F 02 30               CMP BYTE PTR [BX+2],'0'
 Microsoft (R) Macro Assembler Version 5.00                  12/3/10 20:54:03
                                                             Page     1-2


      55 0035  74 32                   JZ K0
      56                 
      57 0037  80 BE 0002 2D        K14:   CMP BYTE PTR [CX+2],'-'
33.ASM(42): error A2048: Must be index or base register
      58 003C  74 41                   JZ K4
      59 003E  80 BE 0002 30               CMP BYTE PTR [CX+2],'0'
33.ASM(44): error A2048: Must be index or base register
      60 0043  74 24                   JZ K0
      61 0045  8D 16 002B R               LEA DX,F1
      62 0049  B4 09                   MOV AH,9
      63 004B  CD 21                   INT 21H
      64 004D  EB 38 90                   JMP EXIT
      65                 
      66 0050  80 BE 0002 2D        K23:   CMP BYTE PTR [CX+2],'-'
33.ASM(51): error A2048: Must be index or base register
      67 0055  74 1D                   JZ K3
      68 0057  80 BE 0002 30               CMP BYTE PTR [CX+2],'0'
33.ASM(53): error A2048: Must be index or base register
      69 005C  74 0B                   JZ K0
      70 005E  8D 16 0034 R               LEA DX,F2
2010-12-03 20:56
flyfx1989
Rank: 1
等 级:新手上路
帖 子:23
专家分:0
注 册:2010-12-1
收藏
得分:0 
好吧我自己给自己回答吧,我应该应基址寄存器或变址寄存器,而不能用CX
2010-12-04 00:05
快速回复:请问这个程序错在哪
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016425 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved