.286
  w equ word ptr
  b equ byte ptr
code segment public
assume cs:code,ds:code
  extrn insthand:near
  extrn loadgif:near
  extrn setpal:near
  extrn p13_2_modex:near
  extrn squeeze:near
  extrn blackpal:near
  extrn init_modex:near
  extrn reslim:byte
  extrn oldint21:dword
  extrn oldint65:dword
  extrn ID:dword
  extrn makecopy:near
  public resident
  public drawgif
  public deinst
resident proc near
  call insthand
  mov ax,word ptr ds:[2ch]
  mov es,ax
  mov ah,49h
  int 21h
  lea dx,reslim
  inc dx
  int 27h
	ret
resident endp
drawgif proc near
  call init_modex
  call blackpal
  call setpal

  call loadgif
  call p13_2_modex pascal,8001,7999
;	call setpal
  call squeeze

  mov ah,1
  int 21h
  ret
drawgif endp
deinst proc near
  mov ah,49h
  int 21h
  mov dx,es:w oldint21
  mov ax,es:w oldint21 + 2
  mov ds,ax
  mov ax,2521h
  int 21h
  mov dx,es:w oldint65
  mov ax,es:w oldint65 + 2
  mov ds,ax
  mov ax,2565h
  int 21h
  int 20h
deinst endp
code ends
end
