Code For Program That Will Read A Decimal Number and Print It On The Next Line Using Procedures For DECIMAL Input and Output in Assembly Language
Code For Program That Will Read A Decimal Number and Print It On The Next Line Using Procedures For DECIMAL Input and Output in Assembly Language
Code For Program That Will Read A Decimal Number and Print It On The Next Line Using Procedures For DECIMAL Input and Output in Assembly Language
.DATA
PROMPT_1 DB 'Enter a Decimal number (-32767 to 32767) : $'
PROMPT_2 DB 0DH,0AH,'The given Decimal number is : $'
ILLEGAL DB 0DH,0AH,'Illegal character. Try again : $'
.CODE
MAIN PROC
MOV AX, @DATA ; initialize DS
MOV DS, AX
;***********************************************************************
***;
;***********************************************************************
***;
;------------------------- Procedure Definitions
------------------------;
;***********************************************************************
***;
;***********************************************************************
***;
;***********************************************************************
***;
;--------------------------- DECIMALY_INPUT
------------------------------;
;***********************************************************************
***;
DECIMAL_INPUT PROC
; this procedure will read a number indecimal form
; input : none
; output : store binary number in BX
; uses : MAIN
;***********************************************************************
***;
;--------------------------- DECIMAL_OUTPUT
-----------------------------;
;***********************************************************************
***;
DECIMAL_OUTPUT PROC
; this procedure will display a decimal number
; input : BX
; output : none
; uses : MAIN
;***********************************************************************
***;
;----------------------------------------------------------------------
----;
;***********************************************************************
***;
END MAIN