; CS2011, A Term 1999
; Prof. Sergio A. Alvarez

.model small
.stack

.data
addbuffer dw ?

.code

.startup
; calling program starts here
; program prompts user to input an unsigned integer, stores it,
; then calls addonebyref with (the address of) this integer as its argument
; the incremented value is displayed to the user

   mov dx,offset addbuffer
   push dx
   call addonebyref

.exit


addonebyref proc
; input:  wordsized unsigned integer parameter passed by reference on the stack
; output: incoming parameter value has been incremented by 1


addonebyref endp

end
