This is my printing function, it should output a 3digit result. I store my result in RES which is a dw. The push and pop fixed my problems with printing before now I don't know where it goes wrong.
XOR AX, AX
XOR BX, BX
;this divides my 3digit number by 100 giving me my, hundredth digit
MOV AX, RES
MOV BX, 100
DIV BX
;prints the hundredth digit
ADD AL, '0'
MOV DL, AL
PUSH AX ; save AX on the stack
MOV AH, 02h
INT 21h
POP AX ; restore ax
;divides the remainder by 10 giving me my tens digit
MOV BX, 10
DIV BX
;prints my tens digit
ADD AL, '0'
MOV DL, AL
PUSH AX ; save AX on the stack
MOV AH, 02h
INT 21h
POP AX ; restore ax
;print my last remainder which is my ones
ADD AH, '0'
MOV DL, AH
MOV AH, 02h
INT 21h