I am having a problem with my code working. Any ideas why I can not get my code to display the pass message?

; TESTQUAD.ASM: TEST MY PROGRAM
;
.MODEL SMALL
.DATA
X1 DB 4 ;TEST CASE FOR VALUE 4
Y1 DW 10 ; Y SHOULD BE 10
PASS DB 'Procedure passes.',0DH,0AH,'$'
FAIL DB 'Procedure fails.',0DH,0AH,'$'

.CODE
.STARTUP
MOV AL,X1 ;LOAD MY FIRST VALUE
CALL QUAD ;COMPUTE RESULTS
CMP DX,Y1 ;LOOK FOR MATCH see if y=50-10X
JNZ BAD
LEA DX,PASS ;SETUP POINTER
JMP SEND ;OUTPUT MESSAGE
BAD: LEA DX,FAIL ;SETUP POINTER TO FAIL MESSAGE
SEND: MOV AH,9 ;DISPLAY STRING FUNCTION
INT 21H ;DOS CALL
.EXIT

QUAD PROC NEAR
MOV BL,AL ;save a copy of input value
MOV CL,10 ;setting up 10x
MUL CL          ;compute 10X
MOV DL,AL ;save my answer in DX
MOV AL,32H ; placing 50 dec into AL
SUB DL,AL ; perform 50-10x
RET
QUAD ENDP

END


I keep changing my input values and it keeps saying 'procedure fails

33w
Posted on 2006-12-02 21:46:59 by 33w
I guess it would help if I included in the code a pass message.

I got it to work

Thanks

33w
Posted on 2006-12-02 22:37:40 by 33w