'***************************************************************************
' P1 Symbol Definition File
' -------------------------
' Symbols are defined as "value type name", where value is a hex number,
' type is a deimal number and name is the ASCII string that represents
' the symbol.  Type defines what the symbol is used for, and its format.
' The types are defined as follows:
'
'  # Type  Example
'  - ----- -------
'  0 OP0   ret
'  1 OP1D  locknew  D
'  2 OP2   add      D,S
'  3 OP1S  jmp      S
'  4 BYTE  byte     n1,nn2,n3,n4
'  5 LONG  long     n
'  6 ORG   org      n
'  7 RES   res      n
'  8 CALL  call     S
'  9 OP1DN setptra  D/#n
' 10 OPREP rep      D/#n,#i
' 11 OP2DB isob     D.b
' 15 WORD  word     n1,n2
' 16 IF    if_nc
' 17 CON   true
' 18 WX    wc
' 19 NX    nr
' 20 ADDR  loop
' 21 FIT   fit      n
'***************************************************************************

' Hub Memory Access Instructions
00000000  2 wrbyte
00800000  2 rdbyte
04000000  2 wrword
04800000  2 rdword
08000000  2 wrlong
08800000  2 rdlong

' Hub Resource Access Instuctions
0c000000  2 hubop
0c400000  1 clkset
0cc00001  1 cogid
0c400002  1 coginit
0c400003  1 cogstop
0cc00004  1 locknew
0c400005  1 lockret
0c400006  1 lockset
0c400007  1 lockclr

' Shift and Rotate Instructions
20800000  2 ror
24800000  2 rol
28800000  2 shr
2c800000  2 shl
30800000  2 rcr
34800000  2 rcl
38800000  2 sar
3c800000  2 rev

' Min and Max Instructions
40800000  2 mins
44800000  2 maxs
48800000  2 min
4c800000  2 max
50800000  2 movs
54800000  2 movd
58800000  2 movi

' Jump and Call Instructions
5c400000  0 ret
5c000000  3 jmp
5c800000  8 call
5c800000  2 jmpret

' Logical and Math Instructions
60000000  2 test
60800000  2 and
64000000  2 testn
64800000  2 andn
68800000  2 or
6c800000  2 xor
70800000  2 muxc
74800000  2 muxnc
78800000  2 muxz
7c800000  2 muxnz
80800000  2 add
84000000  2 cmp
84800000  2 sub
88800000  2 addabs
8c800000  2 subabs
90800000  2 sumc
94800000  2 sumnc
98800000  2 sumz
9c800000  2 sumnz
a0800000  2 mov
a4800000  2 neg
a8800000  2 abs
ac800000  2 absneg
b0800000  2 negc
b4800000  2 negnc
b8800000  2 negz
bc800000  2 negnz
c0000000  2 cmps
c4000000  2 cmpsx
c8800000  2 addx
cc000000  2 cmpx
cc800000  2 subx
d0800000  2 adds
d4800000  2 subs
d8800000  2 addsx
dc800000  2 subsx
e0800000  2 cmpsub

' Decrement/test and jump Instructions
e4800000  2 djnz
e8000000  2 tjnz
ec000000  2 tjz

' Wait Instructions
f0000000  2 waitpeq
f4000000  2 waitpne
f8800000  2 waitcnt
fc000000  2 waitvid

' Conditional Execution Codes
00000000 16 if_never
00040000 16 if_nz_and_nc
00040000 16 if_nc_and_nz
00040000 16 if_a
00080000 16 if_z_and_nc
00080000 16 if_nc_and_z
000c0000 16 if_nc
000c0000 16 if_ae
00100000 16 if_nz_and_c
00100000 16 if_c_and_nz
00140000 16 if_nz
00140000 16 if_ne
00180000 16 if_z_ne_c
00180000 16 if_c_ne_z
001c0000 16 if_nz_or_nc
001c0000 16 if_nc_or_nz
00200000 16 if_z_and_c
00200000 16 if_c_and_z
00240000 16 if_z_eq_c
00240000 16 if_c_eq_z
00280000 16 if_z
00280000 16 if_e
002c0000 16 if_z_or_nc
002c0000 16 if_nc_or_z
00300000 16 if_c
00300000 16 if_b
00340000 16 if_nz_or_c
00340000 16 if_c_or_nz
00380000 16 if_z_or_c
00380000 16 if_c_or_z
00380000 16 if_be
003c0000 16 if_always

' Write Flag Codes
02000000 18 wz
01000000 18 wc
00800000 18 wr
02000000 19 nz
01000000 19 nc
00800000 19 nr

' Delimiters
00400000 17 #
00000000 17 ,
00000000 17 (

' Constants
ffffffff 17 true
0 17 false

' Registers
1f0 17 par
1f1 17 cnt
1f2 17 ina
1f3 17 inb
1f4 17 outa
1f5 17 outb
1f6 17 dira
1f7 17 dirb
1f8 17 ctra
1f9 17 ctrb
1fa 17 frqa
1fb 17 frqb
1fc 17 phsa
1fd 17 phsb
1fe 17 vcfg
1ff 17 vscl

' Psuedo Ops
0  0 nop
0  6 org
0  7 res
0  5 long
0  4 byte
0 15 word
0 21 fit
