.\(\displaystyle \text{MODEL SMALL}\)
.\(\displaystyle \text{STACK 100}\)h
.\(\displaystyle \text{DATA}\)
num\(\displaystyle 1\) \(\displaystyle \textcolor{darkblue}{\text{DB}} \ 3\)
num\(\displaystyle 2\) \(\displaystyle \textcolor{darkblue}{\text{DB}} \ 4\)
sum \(\displaystyle \textcolor{darkblue}{\text{DB}} \ 0\)
.\(\displaystyle \text{CODE}\)
MAIN \(\displaystyle \textcolor{blue}{\text{PROC}}\)
\(\displaystyle \textcolor{blue}{\text{MOV}}\) \(\displaystyle \textcolor{red}{\text{AX}}\), @\(\displaystyle \text{DATA}\)
\(\displaystyle \textcolor{blue}{\text{MOV}}\) \(\displaystyle \textcolor{darkred}{\text{DS}}\), \(\displaystyle \textcolor{red}{\text{AX}}\)
\(\displaystyle \textcolor{blue}{\text{MOV}}\) \(\displaystyle \textcolor{red}{\text{AL}}\), num\(\displaystyle 1\)
\(\displaystyle \textcolor{blue}{\text{ADD}}\) \(\displaystyle \textcolor{red}{\text{AL}}\), num\(\displaystyle 2\)
\(\displaystyle \textcolor{blue}{\text{MOV}}\) sum, \(\displaystyle \textcolor{red}{\text{AL}}\)
\(\displaystyle \textcolor{blue}{\text{ADD}}\) \(\displaystyle \textcolor{red}{\text{AL}}\), '\(\displaystyle \textcolor{purple}{0}\)'
\(\displaystyle \textcolor{blue}{\text{MOV}}\) \(\displaystyle \textcolor{red}{\text{DL}}\), \(\displaystyle \textcolor{red}{\text{AL}}\)
\(\displaystyle \textcolor{blue}{\text{MOV}}\) \(\displaystyle \textcolor{red}{\text{AH}}\), \(\displaystyle 02\)h
\(\displaystyle \textcolor{blue}{\text{INT}}\) \(\displaystyle 21\)h
\(\displaystyle \textcolor{blue}{\text{MOV}}\) \(\displaystyle \textcolor{red}{\text{AH}}\), \(\displaystyle 4\)Ch
\(\displaystyle \textcolor{blue}{\text{INT}}\) \(\displaystyle 21\)h
MAIN \(\displaystyle \textcolor{blue}{\text{ENDP}}\)
\(\displaystyle \textcolor{darkblue}{\text{END}}\) MAIN
\(\displaystyle \huge\textcolor{indigo}{\bold{Sample.}}\)
