MYSEG SEGMENT
      ASSUME CS:MYSEG

HAUPT PROC
      MOV  AX,CS
      MOV  DS,AX
      MOV  DX,OFFSET ANFANG
      MOV  AH,9
      INT  21h
      CALL OUT0
      CALL UP1
      CALL OUT0
      MOV  DX,OFFSET ENDE
      MOV  AH,9
      INT  21h
      MOV  AX,4C00h
      INT  21h
HAUPT ENDP

ANFANG DB "Hier geht es los",13,10,"$"
ENDE   DB 13,10,"Jetzt ist Feierabend$"

UP1   PROC
      CALL OUT1
      CALL UP2
      CALL OUT1
      RET
UP1   ENDP

UP2   PROC
      CALL OUT2
      CALL UP3
      CALL OUT2
      RET
UP2   ENDP

UP3   PROC
      CALL OUT3
      RET
UP3   ENDP

OUT0  PROC
      PUSH AX
      PUSH DX
      MOV  AH,2
      MOV  DL,'0'
      INT  21h
      POP  DX
      POP  AX
      RET
OUT0  ENDP

OUT1  PROC
      PUSH AX
      PUSH DX
      MOV  AH,2
      MOV  DL,'1'
      INT  21h
      POP  DX
      POP  AX
      RET
OUT1  ENDP

OUT2  PROC
      PUSH AX
      PUSH DX
      MOV  AH,2
      MOV  DL,'2'
      INT  21h
      POP  DX
      POP  AX
      RET
OUT2  ENDP

OUT3  PROC
      PUSH AX
      PUSH DX
      MOV  AH,2
      MOV  DL,'3'
      INT  21h
      POP  DX
      POP  AX
      RET
OUT3  ENDP

MYSEG ENDS

SSEG  SEGMENT STACK
      DW 1024 DUP (?)
SSEG  ENDS

      END HAUPT