;; FORMULA ;; CS312 Summer ;; Program 6.1 ;; Adam Smyth include pcmac.inc .MODEL SMALL .STACK 0h .DATA Msg1 DB 'A = $' Msg2 DB 'B = $' Msg3 DB 'C = $' Msg4 DB 'X = $' X DW ? A DW ? B DW ? Cc DW ? .CODE Form PROC EXTRN PutDec : NEAR, GetDec : NEAR mov ax, @data mov ds, ax _PutStr Msg1 call GetDec mov A, ax _PutStr Msg2 call GetDec mov B, ax _PutStr Msg3 call GetDec mov Cc, ax mov ax, 5 imul B mov bx, A sub bx, ax move ax, bx ; sub ax, A ; neg ax cwd idiv Cc mov X, ax _PutStr Msg4 call PutDec mov al, 0 ; Return code of 0 mov ah, 4ch ; Exit back to MS/PCDOS int 21h Form ENDP END Form