EasyManua.ls Logo

Atari ST series - Page 188

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...
Setexec
Read/Change Exception Vector
Setexec() Opcode = 5
T his fu nction allo w s y o u to rea d or c h a n ge on e o f th e 6 80 00 ex ce p tio n v e c
to rs.
C macro format
in t v e cn u m ;
lo ng v e ca d d r, old ad d r;
old a d d r = S ete x e c(v e cn u m , v eca d d r);
Machine language format
m o v e.l
m o v e .w
m o v e .w
tra p
ad d q .l
Inputs
v ec ad d r
v ecn u m
Results
DO o ld ad d r
v e ca d d r, - (sp )
v e cn u m , - (sp )
# 5 , - (sp )
# 1 3
# 8 ,s p
lo n g
w o rd
T h e ad d re ss o f th e n ew e xce p tio n h an d le r
ro u tin e to u se for th is v e cto r. A va lu e o f
- 1 in dica tes th a t y ou ju st w ish to rea d
th e c u rre n t v e cto r a d d re ss.
T h e n u m b er of th e v ec to r to rea d o r
ch an g e. S ince each v e c to r is fou r b y tes
lo n g , th e ad d re ss = 4 * v ec to r n u m b er
lo n g T h e ad d re s s sto re d in th e v ec to r before th e call w a s
m a d e. T his a d d res s sh o u ld b e sa v ed , so y o u r p ro
g ram can re sto re it b efore te rm in atin g.
180

Related product manuals