GCD
GCD
MODEL SMALL
.STACK 100H
.DATA
PROMPT_1 DB 'Enter the value of M = $'
PROMPT_2 DB 13,10,'Enter the value of N = $'
PROMPT_3 DB 13,10,'The GCD of M and N is = $'
.CODE
MAIN PROC
MOV AX, @DATA ; initialize DS
MOV DS, AX
;**************************************************************************;
;**************************************************************************;
;------------------------- Procedure Definitions ------------------------;
;**************************************************************************;
;**************************************************************************;
;**************************************************************************;
;------------------------------- INDEC ----------------------------------;
;**************************************************************************;
INDEC PROC
; this procedure will read a number in decimal form
; input : none
; output : store binary number in AX
; uses : MAIN
;**************************************************************************;
;-------------------------------- OUTDEC --------------------------------;
;**************************************************************************;
OUTDEC PROC
; this procedure will display a decimal number
; input : AX
; output : none
; uses : MAIN
;**************************************************************************;
;--------------------------------------------------------------------------;
;**************************************************************************;
END MAIN
;**************************************************************************;
;**************************************************************************;
;------------------------------ THE END ---------------------------------;
;**************************************************************************;
;**************************************************************************;