mirror of
https://github.com/peterdell/wudsn-ide.git
synced 2024-12-21 18:29:40 +00:00
455 lines
4.5 KiB
NASM
455 lines
4.5 KiB
NASM
// The Directives:
|
|
|
|
.align
|
|
.assert
|
|
.asserterror
|
|
.by
|
|
.byte
|
|
.const
|
|
.define
|
|
.dw
|
|
.dword
|
|
.easteregg
|
|
else
|
|
.enum
|
|
.error
|
|
.eval
|
|
.filenamespace
|
|
.fill
|
|
.for
|
|
.function
|
|
.if
|
|
.import
|
|
.importonce
|
|
.label
|
|
.macro
|
|
.namespace
|
|
.pc
|
|
.print
|
|
.printnow
|
|
.pseudocommand
|
|
.pseudopc
|
|
.return
|
|
.struct
|
|
.te
|
|
.text
|
|
.var
|
|
.wo
|
|
.word
|
|
|
|
|
|
|
|
// Opcodes
|
|
adc
|
|
and
|
|
asl
|
|
bcc
|
|
bcs
|
|
beq
|
|
bit
|
|
bmi
|
|
bne
|
|
bpl
|
|
brk
|
|
bvc
|
|
bvs
|
|
clc
|
|
cld
|
|
cli
|
|
clv
|
|
cmp
|
|
cpx
|
|
cpy
|
|
dec
|
|
dex
|
|
dey
|
|
eor
|
|
inc
|
|
inx
|
|
iny
|
|
jmp
|
|
jsr
|
|
lda
|
|
ldx
|
|
ldy
|
|
lsr
|
|
nop
|
|
ora
|
|
pha
|
|
php
|
|
pla
|
|
plp
|
|
rol
|
|
ror
|
|
rti
|
|
rts
|
|
sbc
|
|
sec
|
|
sed
|
|
sei
|
|
sta
|
|
stx
|
|
sty
|
|
tax
|
|
tay
|
|
tsx
|
|
txa
|
|
txs
|
|
tya
|
|
|
|
// Illegal Opcodes
|
|
? ahx $93 $9f
|
|
? alr $4b
|
|
|
|
anc $0b
|
|
anc2 $2b
|
|
arr $6b
|
|
axs $cb
|
|
dcp $c7 $d7 $c3 $d3 $cf $df $db
|
|
isc $e7 $f7 $e3 $f3 $ef $ff $fb
|
|
las $bb
|
|
lax $ab $a7 $b7 $a3 $b3 $af $bf
|
|
rla $27 $37 $23 $33 $2f $3f $3b
|
|
rra $67 $77 $63 $73 $6f $7f $7b
|
|
sax $87 $97 $83 $8f
|
|
? sbc2 $eb
|
|
? shx $9e
|
|
? shy $9c
|
|
slo $07 $17 $03 $13 $0f $1f $1b
|
|
sre $47 $57 $43 $53 $4f $5f $5b
|
|
tas $9b
|
|
xaa $8b
|
|
|
|
// DTV Opcodes
|
|
bra
|
|
sac
|
|
sir
|
|
|
|
// Default macros:
|
|
:BasicUpstart(address)
|
|
:BasicUpstart2(address)
|
|
|
|
|
|
// Default Constants:
|
|
PI
|
|
E
|
|
|
|
AT_ABSOLUTE
|
|
AT_ZEROPAGE
|
|
AT_ABSOLUTEX
|
|
AT_ABSOLUTEY
|
|
AT_IMMEDIATE
|
|
AT_INDIRECT
|
|
AT_IZEROPAGEX
|
|
AT_IZEROPAGEY
|
|
AT_NONE
|
|
|
|
BLACK
|
|
WHITE
|
|
RED
|
|
CYAN
|
|
PURPLE
|
|
GREEN
|
|
BLUE
|
|
YELLOW
|
|
ORANGE
|
|
BROWN
|
|
LIGHT_RED
|
|
DARK_GRAY
|
|
DARK_GREY
|
|
GRAY
|
|
GREY
|
|
LIGHT_GREEN
|
|
LIGHT_BLUE
|
|
LIGHT_GRAY
|
|
LIGHT_GREY
|
|
|
|
BF_C64FILE
|
|
BF_KOALA
|
|
BF_FLI
|
|
BF_BITMAP_SINGLECOLOR
|
|
|
|
PLA
|
|
SAC_IMM
|
|
SLO_ZP
|
|
SLO_ZPX
|
|
SLO_IZPX
|
|
SLO_IZPY
|
|
SLO_ABS
|
|
SLO_ABSX
|
|
SLO_ABSY
|
|
PHA
|
|
BVC_REL
|
|
BRK
|
|
CLC
|
|
CLD
|
|
PLP
|
|
EOR_IMM
|
|
EOR_ZP
|
|
EOR_ZPX
|
|
EOR_IZPX
|
|
EOR_IZPY
|
|
EOR_ABS
|
|
EOR_ABSX
|
|
EOR_ABSY
|
|
INC_ZP
|
|
INC_ZPX
|
|
INC_ABS
|
|
INC_ABSX
|
|
PHP
|
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ZP
|
|
ORA_ZPX
|
|
ORA_IZPX
|
|
ORA_IZPY
|
|
ORA_ABS
|
|
ORA_ABSX
|
|
ORA_ABSY
|
|
SEC
|
|
ANC2_IMM
|
|
BCS_REL
|
|
SBC2_IMM
|
|
LDY_IMM
|
|
LDY_ZP
|
|
LDY_ZPX
|
|
LDY_ABS
|
|
LDY_ABSX
|
|
LDX_IMM
|
|
LDX_ZP
|
|
LDX_ZPY
|
|
LDX_ABS
|
|
LDX_ABSY
|
|
|
|
// Default functions
|
|
abs
|
|
acos
|
|
asin
|
|
atan
|
|
atan2
|
|
cbrt
|
|
ceil
|
|
cos
|
|
cosh
|
|
exp
|
|
expm1
|
|
floor
|
|
hypot
|
|
IEEEremainder
|
|
log
|
|
log10
|
|
log1p
|
|
max
|
|
min
|
|
pow
|
|
random
|
|
round
|
|
signum
|
|
sin
|
|
sinh
|
|
sqrt
|
|
tan
|
|
tanh
|
|
toDegrees
|
|
toRadians
|
|
mod
|
|
toIntString
|
|
toHexString
|
|
toOctalString
|
|
toBinaryString
|
|
Vector
|
|
Vector
|
|
Matrix
|
|
RotationMatrix
|
|
ScaleMatrix
|
|
MoveMatrix
|
|
PerspectiveMatrix
|
|
createFile
|
|
List
|
|
List
|
|
Hashtable
|
|
CmdArgument
|
|
LoadSid
|
|
LoadPicture
|
|
LoadBinary
|
|
asmCommandSize
|
|
|
|
// Include directives
|
|
.import "KICKASS-Reference-Source-Include.asm"
|
|
|
|
LoadSid("KICKASS-Reference-Binary-Include.bin")
|
|
LoadPicture("KICKASS-Reference-Binary-Include.bin")
|
|
LoadBinary("KICKASS-Reference-Binary-Include.bin")
|
|
|
|
createFile("KICKASS-Reference-Binary-Output.bin") |