Specifications

2-10 Programmer’s Guide Sega
Psy-Q Development System
clearscr module
mov.l =AutoFill,r1 ;all these literals
will ;be pooled
mov.l =FBcont,r2 ;and this code will
;generate
mov.l =$100,r8 ;pc rel load
instructions
mov.l =$ff,r4 ;to reference the
literal table
mov.l =$ff00/$100,r7
mov r8,r3
mov.l =$8000,r5
@0 mov r4,r0
mov.w r0,@(0,r1) ;Size
mov r3,r0
mov.w r0,@(2,r1) ;Address
mov r5,r0
mov.w r0,@(4,r1) ;Data
add.l r8,r3
@1 mov.w @r2,r0
tst #2,r0
bf @1
dt r7
bf @0
rts
nop
littab ;literal table
will be built
modend here
You can also use the keyword LITS as an alternative to
LITTAB.
You can write most addressing modes in a 68000 style,
eg:-
mov r0,@r1 mov r0,(r1)
mov @(8,r1),r0 mov 8(r1),r0
etc.
You can use MOVE as an alternative to MOV, e.g:-
mov.w r1,@r2 move.w r1,@r2
You can omit the ‘/’ in the compare instructions,
e.g.:-
cmp/eq r1,r2 cmpeq r1,r2