Answer the question
In order to leave comments, you need to log in
Laboratory in Assembler, model of educational computer. How to put a condition if = (a specific number), then the transition?
In the manual there are only conditional transitions, but it is not clear how to create such a condition. Maybe you can write something differently?
Answer the question
In order to leave comments, you need to log in
CMP AL, 1 ; сравниваем AL и конкретное число 1
JE <метка перехода> ; прыгаем если равно
You just need conditional jumps depending on the bits in the flag register.
And the commands are called like this JNE
- Jump Not Equal - jump if not equal (if the zero flag is not set). And before the jump, there is a type check CMP AX, 27h
that will set the flags.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question