mardi 31 mars 2015

IF Condition on Assembly not working

Hi guy's I have this code, on assembly using the assembler FASM (FlatAssembler)



;REQUEST THE VALUE (1 OR 2)
mov ah, 3Fh
mov bx, 0
mov cx, 1
mov dx, valor
int 21h

;THE NOT WORKING IF
cmp [size], '2'
jmp small
cmp [size], '1'
jmp e

;ONE OF THE LABELS TO WHERE THE IF MUST JUMP
small:
mov cx, 10
mov dx, 9
.....


;OTHER LABEL
e:
mov ah, 07h
int 21h


The program does not jump to the labels already tryed the cmp [size], 2 and subtracted 48 to get the decimal value but no luck


Any help?


Aucun commentaire:

Enregistrer un commentaire