Atari ST series Technical Reference Manual page 80

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

*** Get pointer to 1st (default) screen in a4
2
move.w
#
,-(sp)
trap
#14
2
addg.l
#
,sp
move.l
d0,a4
*** Set logical screen base to 2nd screen, and fill with X's
m o v e .w
#-l,-(sp)
.1
m o v e
#-l,-(sp)
.1
a5,-(sp)
mo v e
move.w
#5,-(sp)
trap
#14
1
1 2
add.
#
,sp
m o v e .w
#'X',d4
jsr
fill
<
Set logical screen base
mo v e .w
#-l,-(sp)
.1
m o v e
#-l,-(sp)
.1
a4,-(sp)
m o v e
#5 ,- (sp)
move.w
trap
#14
1 2
#
,sp
add.l
# '+ ',d4
m o v e .w
jsr
fill
*** use register d
0
move.b
#
,d
*** wait for key press
mainloop:
2
#
,— (sp)
move.w
2
m o v e .w
#
,-(sp)
#13
trap
. 1
#4,sp
ad d q
testspace:
#' ' ,d0
cmp.b
beq
toggle
testend:
9
#'
cmp.b
bne
mainloop
#$80,d6
m o v e .b
*** if it's a space, wait ft
toggle:
#36,-(sp)
m o v e .w
trap
#14
2
. 1
#
, sp
a ddq
.1
m o v e
a4 ,d0
0
#
,d
cmp.b
oldscreen
bne
.1
a5,d0
mo v e
oldscreen:
move.w
#-l,-(sp)
0
1
mo v e .
d
,-(sp)
1
#-l,-(sp)
m o v e .
#5,-(sp)
move.w
trap
#14
1 2
1
#
add.
eor.b
#l,d
mainloop
bpl
72
CHAPTER 4
* push XBIOS function # for Physbase()
* call XBIOS
* clean stack
* store pointer to default screen in a4
*
*
*
*
ction # for Setscreen( )
*
1 XBIOS
*
an stack
*
* fill screen with X's
1
base to
st screen, and fill with + 's
*
*
*
*
*
*
*
* fill screen with + 's
6
a flag to tell what screen you're on
as
6
* start on the default screen
r check if it's a space or 'q'
* device number for console keyboard
* function # for Bconin()
* call BIOS
* clean stack
* was the space bar pressed?
* yes, toggle screen
*
',do
*
iiw
f
*
yes, now flag signals you're at end
*
*
call XBIOS
*
clean stack
*
*
6
*
no,change to screen
*
yes, change to screen
*
keep resolution the same
*
toggle the physical screen base
*
keep logical screen base the same
*
function # for Setscreen()
*
call XBIOS
*
clean stack
,sp
*
6
toggle flag
*
and get next key (if not at end)
ueAb acj
1
2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents