Microprocessor Simulator 0 Help



Download 1.18 Mb.
Page50/82
Date18.03.2021
Size1.18 Mb.
#56105
1   ...   46   47   48   49   50   51   52   53   ...   82
sms32v50 (3)
sms32v50 (3), sms32v50 (6)

CMP AL,0D


Compare the AL register with the hexadecimal number 0D. 0D is the ASCII code of the Enter key. This line is asking "Was the enter key pressed?" CMP works by subtracting 0D from AL. If they were equal then the subtraction gives an answer of zero. This causes the CPU zero or 'Z' flag to be set.

JZ Stop


Jump to the Stop label if the CPU 'Z' flag was set. This is a conditional jump.

MOV [BL],AL


Move the key press stored in AL into the RAM location that [BL] points to. INC BL is then used to make BL point to the next RAM location.

JMP Rep


Jump back to the Rep label. This is an unconditional jump. It always jumps and the CPU flags are ignored.

RET


Return from the procedure to the address stored on the stack. This is done by setting the instruction pointer IP in the CPU.



Download 1.18 Mb.

Share with your friends:
1   ...   46   47   48   49   50   51   52   53   ...   82




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

    Main page