非法指令:PRINTN

时间:2018-11-18 15:42:49

标签: assembly x86-16

我正在尝试构建一个程序来检查ax是否可以被7整除而没有余数。

org 100h   
  mov ax,14
  mov cl,7
  div cl
  cmp ah,0
  je positive
    PRINTN   "The number has a remainder"
  jmp finish
 positive:
    PRINTN   "The number has no remainder"
 finish:
     PRINTN   "After comparison"  
mov ah, 0
int 16h
ret

组装此程序会给我这些错误:

(7) illegal instruction: PRINTN   "The number has a remainder" or wrong parameters.
(10) illegal instruction: PRINTN   "The number has no remainder" or wrong parameters.
(12) illegal instruction: PRINTN   "After comparison" or wrong parameters.

0 个答案:

没有答案