        assume  cs:cseg, ds:dseg, ss:sseg

        ; code
cseg    segment
start:
      mov  ax,dseg
      mov  ds,ax
      mov  es,ax

      mov    ah,0
      mov    al,0dh
      int    10h
      mov    ah,5
      mov    al,0
      int    10h
      mov    ah,10h
      mov    al,2
      lea    dx,tabl_pal
      int    10h
      mov    cx,16
      mov    dx,25
cycle: mov   al,cl
       dec   al
       mov   ah,0ch
       int   10h
       loop  cycle
       mov     ah,0
       int     16h
       mov   ah,0
       mov   al,3
       int   10h
        mov     ax, 4C00h
        int     21h

cseg    ends


        ; data
dseg    segment byte
tabl_pal  db    0,1,1,3,4,5,6,7,56,57,58,59,60,61,61,63,40
dseg    ends


        ; stack
sseg    segment stack

        db      100h    dup(?)

sseg    ends
end start
