When I want to debug my .asm file how do I do it line by line? Do I have to go into debug mode and enter the lines each one at a time? If that is the only way then how do I enter the labels in the code that I want to jump to at the debug prompt. When I enter labels it gives an error. for instance
if I enter SEND: it will give an error and I am still trying to get this to work.
; 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 AX,Y1 ;LOOK FOR MATCH 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 CX,10 ;setting up 10x MUL CX ;compute 10X MOV AL,32 ; placing 50 dec into AL SUB AX,CX ; perform y=50-10x RET QUAD ENDP END
Last edited by shabbir; 27Nov2006 at 10:30.. Reason: Code formating.