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

Updated
author boisy
date Wed, 31 Mar 2010 02:58:46 +0000
parents 37fd74e6fad8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1706
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
1 *
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
2 * Setup for GIF
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
3 *
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
4 * Globals
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
5 * SetGIF -- Initialization. Reserves tables, sets format
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
6 *
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
7 ifp1
1912
37fd74e6fad8 Now assembles with rma, uses os9defs.d in c3
boisy
parents: 1777
diff changeset
8 use os9defs.d
1706
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
9 endc
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
10
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
11 psect view_gifset_a,0,0,0,0,0
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
12
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
13 *
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
14 * GIF initialization
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
15 * Since GIF requires such large tables, we don't allocate them
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
16 * statically, but instead request them from the operating system at
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
17 * run time.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
18 *
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
19 giftablesize equ 4096*3 3 bytes, 2^12 entries for 12-bit code size
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
20 gifstacksize equ 4096 Stack for reversing the pixel strings from table
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
21
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
22 SetGIF:
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
23 pshs a,b,x
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
24 tst <format If format already set, just ignore this.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
25 bne SetGIF1
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
26 sta <format Set format code.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
27
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
28 ldd #giftablesize+gifstacksize Allocate the memory
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
29 lbsr malloc
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
30 stx <giftable
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
31
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
32 leax giftablesize+gifstacksize,x
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
33 stx <gifstack
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
34 SetGIF1
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
35 puls a,b,x,pc
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
36
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
37 *
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
38 * Return memory reserved by SetGIF.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
39 *
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
40 EndGIF:
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
41 lbsr unmalloc
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
42 rts
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
43
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
44 endsect
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
45