
include  mac.lib
data segment
    char="y"
    array  dw "y"
    char=char-1
    rept 19
       dw  char
       char=char-1
    endm 
    dw  "$" 
data ends

code segment
assume  ds:data,cs:code
main proc far
start:
    push ds
    sub  ax,ax
    push  ax
    mov  ax,data
    mov  ds,ax

    init_macs
    mov  bx,0
    while bx,l,40
       mov  ax,array[bx]
       mov bp,bx
       sub bp,2
       while ds:array[bp],g,ax
          push ds:array[bp]
          pop  ds:array[bp+2]
          sub  bp,2
          cmp  bp,0
          jl   exit_while
       wend
 exit_while:
       add bx,2
    wend
    mov bx,0
    while  bx,l,40
       mov dl,byte ptr array[bx]
       mov  ah,2
       int  21h
       add  bx,2
    wend
    ret   
main endp
code ends
end start


