view 3rdparty/utils/view/view_gifset.a @ 2488:00e35931156e

Updated
author boisy
date Wed, 31 Mar 2010 02:58:46 +0000
parents 37fd74e6fad8
children
line wrap: on
line source

*
* Setup for GIF
*
* Globals
*   SetGIF   -- Initialization. Reserves tables, sets format
*
 ifp1
 use  os9defs.d
 endc

 psect view_gifset_a,0,0,0,0,0

*
* GIF initialization
* Since GIF requires such large tables, we don't allocate them
* statically, but instead request them from the operating system at
* run time.
*
giftablesize equ 4096*3  3 bytes, 2^12 entries for 12-bit code size
gifstacksize equ 4096    Stack for reversing the pixel strings from table

SetGIF:
 pshs a,b,x
 tst  <format  If format already set, just ignore this.
 bne  SetGIF1
 sta  <format  Set format code.

 ldd  #giftablesize+gifstacksize  Allocate the memory
 lbsr malloc
 stx  <giftable

 leax giftablesize+gifstacksize,x
 stx  <gifstack
SetGIF1
 puls a,b,x,pc

*
* Return memory reserved by SetGIF.
*
EndGIF:
 lbsr unmalloc
 rts

 endsect