Code:
FILE_OK:
mov dx,OFFSET FNAME
mov ax,3D02H
int 21H
jc FOK_NZEND ;error opening file
......
mov ax,WORD PTR [FSIZE] ;
add ax,OFFSET ENDPROG - OFFSET PROG ;
jc FOK_NZEND ;c set if ax overflows (size > 64k)
cmp BYTE PTR [START_IMAGE],0E9H ;
jnz FOK_ZEND ;exit with z
cmp WORD PTR [START_IMAGE+3],4956H
jnz FOK_ZEND ;return with Z set
FOK_NZEND:
mov al,1 ;
or al,al ;return with z reset
ret
FOK_ZEND:
xor al,al ; return with z set
ret
Hi im unclear about the working of jump instructions above. What's the meaning of "c set if ax overflows" and "return with Z set"? whats the relationship with cmp and jnz here? how jc and jnz decide whether to jump to another function.
Dont know if my question is clear. anyway, thanks for any input.