;quad.asm Chuck Lillie ;use this as the template to do quad ;the final value must be stored in the variable sum jmp begin ;jump to the first line of code ;variables x1 dw ? a1 dw ? b1 dw ? c1 dw ? sum dw ? ;place to store the results msgx db "Enter the x value: " lenMsgx = $ - msgx msgs db "The result of ax^2+bX+c is " lenMsgs = $ - msgs msga db "Enter the a value: " lenMsga = $ - msga msgb db "Enter the b value: " lenMsgb = $ - msgb msgc db "Enter the c value: " lenMsgc = $ - msgc begin: ;prompt for the x value mov si, offset msgx mov cx, lenMsgx call putStrng ;accept x value call getDec mov x1, ax call crlf ;prompt for the a value mov si, offset msga mov cx, lenMsga call putStrng ;accept a value call getDec mov a1, ax call crlf ;prompt for the b value mov si, offset msgb mov cx, lenMsgb call putStrng ;accept b value call getDec mov b1, ax call crlf ;prompt for the c value mov si, offset msgc mov cx, lenMsgc call putStrng ;accept c value call getDec mov c1, ax call crlf ;your code to calcualte ax^2 + bx + c goes here ;do not forget to put your final answer in the variable sum ;end of your code ;display the result mov si, offset msgs mov cx, lenMsgs call putStrng mov ax, sum call putDec ;exit to DOS gracefully mov ah, 04c int 021 include io033099.inc