CSEG  SEGMENT
      ASSUME CS:CSEG,DS:DATEN

HAUPT PROC
      MOV  AX,DATEN
      MOV  DS,AX
      MOV  A,10   ; Example: A:=10
      MOV  B,20   ; Example: B:=20
      MOV  AX,B   ; Example: CC:=B
      MOV  CC,AX
      MOV  AX,B   ; Example: D:=B+A
      ADD  AX,A
      MOV  D,AX
      MOV  AX,0
      MOV  CX,10
      MOV  SI,0
LOOPI:
      ADD  AX,G[SI]
      ADD  SI,2
      LOOP LOOPI
      CALL AUSGABE
      MOV  AX,4C00h
      INT  21h
HAUPT ENDP

AUSGABE PROC
      PUSH AX
      PUSH BX
      PUSH CX
      PUSH DX 
      MOV  BX,10
      MOV  CX,0
DIVI:
      MOV  DX,0  
      DIV  BX
      PUSH DX
      INC  CX
      CMP  AX,0
      JNZ  DIVI
POPI:
      POP  DX
      ADD  DL,'0'
      MOV  AH,2
      INT  21h
      LOOP POPI
      POP  DX
      POP  CX
      POP  BX
      POP  AX
      RET
AUSGABE ENDP

CSEG  ENDS

DATEN SEGMENT
A     DW ?
B     DW ?
CC    DW ?        ; MASM mag keinen Bezeicher C :-)
D     DW ?
G     DW 10,20,30,40,50,60,70,80,90,100
DATEN ENDS

SSEG  SEGMENT STACK
      DW 1024 DUP (?)
SSEG  ENDS

      END HAUPT