CHAPTER 7
* * * adjust
blit param<
dc.w Init
move.w (aO),d0
cmp. w
#l,d0
bne
skip
move.w
#$50,nxln
skip:
lsl.w
#l,d0
move.w
do,nxwd
*** do the blit
lea
blit,a6
dc.w BitBlit
init line A
?
et number of bit planes
s it monochrome?
no, leave screen width alone
yes, change screen width value
bit planes *2
= value to place in nxwd
* address of parameter table in a6
* do Bit Blit
*** wait for key press, then end
* call conin() to wait for key press
move.w #l,-(sp)
trap #1
addg.l #2,sp
move.1
trap
#0,-(sp)
#1
GEMDOS terminate command
call GEMDOS and exit
*** Data for input is stored here
.data
blit:
screen:
nxwd:
nxln:
space:
alien:
dc.w
dc.w
dc.w
dc.w
dc.w
dc.l
dc.w
dc.w
dc.l
dc.w
dc.w
dc.w
dc.w
dc.w
dc.l
dc.w
dc.w
dc.w
dc. 1
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
$0020
$0017
$0001
$0001
$0000
$07070707
$0000
$0000
alien
$0002
$0004
$0002
$0080
$0080
$00000000
$0008
$00a0
$0002
$00000000
$0000
$0000
$0000
width of source image in pixels
height of source image in pixels
number of planes to blit
fg color (bit 1 of logic op index)
bg color (bit 0 of logic op index)
logic ops
source x
source y
base address of source image
byte offset to next word of source
source width = 4 bytes
source plane offset
destination x
destination y
screen address goes
byte offset to next
2 for hi, 4 for med,
byte offset to next
$50 for hi, $a0 for
byte offset to next
addr of pattern buf
byte offset to next
byte offset to next
pattern index mask
here
word in line
8 for lo
line in planes
med and lo
plane (always 2 )
(0=no pattern)
line in pattern
plane in pattern
* you must reserve 24 bytes here
$0000, $0000, $0000, $0000
$0000, $0000, $0000, $0000
$0000, $0000, $0000, $0000
* image data for space creature
$0030, $0C00, $001C, $3800
$0006, $6000, $0006, $6000
$001F, $F800, $003F, $FC00
$C0FF, $FF03, $C0FF, $FF03
$E3E3, $C7C7, $7FEB, $D7FE
$3FE7, $CFFC, $03FF, $FFC0
$03FF, $FFC0, $00F8, $1F00
$00FC, $3F00, $00FF, $FF00
$0077, $EE00, $0030, $0C00
$0030, $0C00, $0030, $0C00
$0060, $0600, $00C0, $0300
$0380, $01C0
.end
156