P
P
pepl2132018-10-31 16:29:11
assembler
pepl213, 2018-10-31 16:29:11

Why can't I compare two operands?

cmp si,al     ; si - счетчик в массиве; al - длина массива

Mistake:
processed: cmp si,al
error: operand sizes do not match.

What to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2018-10-31
@pepl213

Because SI is 16-bit and AL is 8-bit. Compare SI with AX.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question