EasyManua.ls Logo

Atari ST series - Page 404

Atari ST series
420 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
APPENDIX K
vblsem
1 1 0 6 - 1 1 0 7 < $ 4 5 2 -$ 4 5 3 )
A se m a p h ore fo r ve rtica l b lan k in te rru p t p ro ce ssin g . A va lu e of 0 h ere d is
ab les vb la nk p ro ce s sin g , w h ile a va lu e of 1 en ab les p ro cessin g .
nvbls
1 1 0 8 -1 1 0 9 ($ 4 5 4 - $ 4 5 5 )
T h e n u m b er of d efe rred ve rtica l blan k in terru p t h an dler v ecto rs in th e ta
ble p oin te d to b y
__
vb lqu eu e (se e below ). T h es e are slots w h ere ap p lica
tio ns ca n tack o n th eir o w n vertical blan k in te rru p t h an d le rs . T h e d efau lt
n u m b er o f slo ts th a t T O S allo ca tes is 8.
__
vblqueue
1 1 1 0 - 1 1 1 3 ( $ 4 5 6 - $ 4 5 9 )
T h e v e rtical b lank in terru p t (V BI) q u eu e. VBI p ro ce ssin g starts a t th e po in t
w h en th e v id eo d isp lay 's e lec tro n b eam h as fin ish ed u p d atin g th e last lin e
of th e scre en d isp lay , a n d fin ish es be fo re it sta rts u p d atin g th e first line of
th e n ex t scre en fram e. D e p en din g o n w h a t k ind of scre en is u se d , th is in
te rru p t w ill o cc u r e v e ry 1/5 0 se c o n d (E u ro p e an colo r m o n ito r), e v ery 1/60
se co n d (U .S . c o lo r m on ito r), o r e ve ry 1/70 se co n d (m on o ch ro m e m on ito r).
A n u m b er of ro u tin e sy ste m fu n ctio n s a r e carrie d o u t b y th e d efa ult ve rti
cal blan k in te rru p t ha n d ler. T h ese in clu d e blink in g th e cu rs o r, ch eck in g for
a sh ift b etw e en m o n o ch ro m e a n d co lo r m o n ito rs , an d o th er vid eo -rela ted
task s w h ich a re b es t p erfo rm ed w h en th e scre en is n o t be in g u p d ated .
B e cau se th e ve rtical b lan k in g in terv al is th e p erfect tim e for m a k in g
g ra p h ics ch an g e s, it is often de sirab le for a p p licatio n s to in sert th eir h an
d lers in to th e v ertica l blank in te rru p t h an d le r ch ain . T o this e nd , T O S su p
p o rts th e in stallatio n o f deferred VBI h an d le rs. T O S in itially allo cates a tab le
th at ca n ho ld th e a d d res ses of u p to e ig ht d eferred VBI slots (th e n u m b er
is s to re d in nv b ls, a b o v e). T h e a d d re ss of this table is sto re d in th is lo ca
tio n, v b lq u e u e . J u st b e fo re th e sy stem in te rru p t h an d ler ro u tin e retu rn s, it
ch eck s th e c on te n ts o f e a ch o f th e se e ig h t a d d re sse s in tu rn . If it fin ds a
n o n ze ro v alu e in th e first o n e , it a ssu m e s it to b e th e ad d re s s of a d eferre d
V BI ha n d ler, a n d p erfo rm s a JS R to th at a d d res s. W h en th e first su b ro u
tin e is co m p le te d , th e sy ste m in terru p t h an d le r c h eck s th e n e xt slot, an d
so o n , un til it e n co u n te rs a va lu e o f z e r o in th e vb lq u eu e tab le.
In o rd e r to in stall y o u r o w n in terru p t ha n d ler, y ou m u s t e xa m in e th e
en trie s in th e tab le p o in te d to b y vb lq ue u e. Y o u m ay in stall y o u r V BI h an
d ler a t th e first tab le e n try th at co n tain s a 0 . Y o u r h an dler m ay u se an y
re giste rs e xc ep t th e u s e r stack p o in te r. It sh o u ld retu rn w ith an R TS in
stru ctio n , n o t an R T E. Be s u re to cle ar th e a d d re ss o f y o u r h an d le r fro m
th e vb lq u eu e tab le before y o u r ap plication clo ses.
T h e ST s ys te m is n o t lim ited to eig h t d eferred V BI h an d le rs. If th e ta
ble p o in te d to b y vb lq u e u e is full, y o u m a y w ish to alloca te a larg er table,
co p y th e co n te n ts o f th e vb lq u eu e tab le to it, an d th en u p d ate nv b ls a n d
vb lq u eu e to reflect th e n ew tab le size a n d loca tio n . B e su re to re sto re th e
old tab le b efo re y o u r a pp licatio n ex its.
396