1、 第一,就是要新建一个记事本。然后想好实现这个功能的算法。这个算法就是:扫描输入的数字,通过比较,如果是5,就输出ok。如果不是,就结束。

2、 第二,进行扫描输入的数字,其中代码为: mov ah,01h int 21h

3、 第三,如果输入数字为5,就输出ok,其中代码为“ cmp al,35h jz next jmp go next: mov ah,02h mov dl,4fh int 21h mov ah,02h mov dl,4Bh int 21h”

4、 第四,如果输入不是5,就跳转,然后结束。代码为“ go: mov al,0 mov ah,4ch int 21h”

5、 第五,保存,然后打开命令提示符,进行汇编,连接,运行。最后,输入5,就可以看到显示出ok。
