I have several pieces of Matlab script I have put into boxes using the below method. I want to be able to call them listings 1 2 3 4 etc. Preferably a command that will do it automatically for me. New to LaTeX so no idea I have searched and found very little. 

```
\documentclass[a4paper,12pt]{article}
    \usepackage{mdframed}
    \begin{document}
    \begin{mdframed}[skipabove=\topsep,skipbelow=\topsep]
    \begin{verbatim}
    S = 55; % Value of the underlying
   ...
    V =
        2.2147   %This is the value of our put option
    \end{verbatim}
    \end{mdframed}
    \end{document}

```