Microprocessor Simulator 0 Help



Download 1.18 Mb.
Page45/82
Date18.03.2021
Size1.18 Mb.
#56105
1   ...   41   42   43   44   45   46   47   48   ...   82
sms32v50 (3)
sms32v50 (3), sms32v50 (6)

CMP AL,0D


Compare the AL register with the ASCII code of the Enter key. The ASCII code of the Enter key is 0Dhex.

CMP AL,BL works as follows. The processor calculates AL - BL. If the result is zero, the 'Z' flag in the status register SR is set. If the result is negative, the 'S' flag is set. If the result is positive, no flags are set. The 'Z' flag is set if AL and BL are equal. The 'S' flag is set if BL is greater then AL. No flag is set if AL is greater than BL.


JNZ Rep


JNZ stands for Jump Not Zero. Jump if the 'Z' flag is not set. The program will jump forwards or back to the address that Rep marks.

A related command is JZ. This stands for Jump Zero. Jump if the zero flag is set. In this program, the CMP command sets the flags. Arithmetic commands also set the status flags.



Download 1.18 Mb.

Share with your friends:
1   ...   41   42   43   44   45   46   47   48   ...   82




The database is protected by copyright ©ininet.org 2024
send message

    Main page