Horje
Perimeter of a rectangle Code Example
Perimeter of a rectangle
DATA SEGMENT
LEN DB ?
BRE DB ?
RES DB 10 DUP ('$')
MSG1 DB 10,13,"ENTER LENGTH OF RECTANGLE : $"
MSG2 DB 10,13,"ENTER BREADTH OF RECTANGLE : $"
MSG3 DB 10,13,"SQUARE OF NUMBER IS : $"
DATA ENDS
CODE SEGMENT
ASSUME DS:DATA,CS:CODE
START:
MOV AX,DATA
MOV DS,AX
LEA DX,MSG1
MOV AH,9
INT 21H
MOV AH,1
INT 21H
SUB AL,30H
MOV AH,0
MOV BL,2
MUL BL
MOV LEN,AL
LEA DX,MSG2
MOV AH,9
INT 21H
MOV AH,1
INT 21H
SUB AL,30H
MOV AH,0
MOV BL,2
MUL BL
MOV BRE,AL
ADD AL,LEN
LEA SI,RES
CALL HEX2DEC
LEA DX,MSG3
MOV AH,9
INT 21H
LEA DX,RES
MOV AH,9
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
HEX2DEC PROC NEAR
MOV CX,0
MOV BX,10
LOOP1: MOV DX,0
DIV BX
ADD DL,30H
PUSH DX
INC CX
CMP AX,9
JG LOOP1
ADD AL,30H
MOV [SI],AL
LOOP2: POP AX
INC SI
MOV [SI],AL
LOOP LOOP2
RET
HEX2DEC ENDP
END START




Whatever

Related
unity find disabled gameobject Code Example unity find disabled gameobject Code Example
What is distillation Code Example What is distillation Code Example
cannot open source file bits/stdc++.h Code Example cannot open source file bits/stdc++.h Code Example
pyspark alias Code Example pyspark alias Code Example
how to find last element in array Code Example how to find last element in array Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8