mirror of
https://github.com/peterdell/wudsn-ide.git
synced 2024-12-21 03:29:32 +00:00
284 lines
2.3 KiB
NASM
284 lines
2.3 KiB
NASM
; Reference source file for MADS
|
|
|
|
; Single line comment
|
|
// Single line comment
|
|
* Single line comment
|
|
|
|
/*
|
|
Multiple lines comment
|
|
*/
|
|
|
|
; 6502 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
|
|
|
|
; 65816 opcodes
|
|
BRA
|
|
BRL
|
|
COP
|
|
DEA
|
|
INA
|
|
JML
|
|
JSL
|
|
MVN
|
|
MVP
|
|
PEA
|
|
PEI
|
|
PHB
|
|
PHD
|
|
PHK
|
|
PHX
|
|
PHY
|
|
PLB
|
|
PLD
|
|
PLX
|
|
PLY
|
|
REP
|
|
RTL
|
|
SEP
|
|
STP
|
|
STZ
|
|
TCD
|
|
TCS
|
|
TDC
|
|
TRB
|
|
TSB
|
|
TSC
|
|
TXY
|
|
TYX
|
|
WAI
|
|
WDM
|
|
XBA
|
|
XCE
|
|
|
|
|
|
; Illegal opcodes
|
|
|
|
; XASM Directives also supported by MADS
|
|
DTA
|
|
EIF
|
|
ELI
|
|
ELS
|
|
END
|
|
EQU
|
|
ERT
|
|
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C
|
|
.PUT
|
|
.REG
|
|
.RELOC
|
|
.REND
|
|
.REPT
|
|
.SAV
|
|
.SB
|
|
.SEND
|
|
.STRUCT
|
|
.SYMBOL
|
|
.TEND
|
|
.TEST
|
|
.USE
|
|
.USING
|
|
.VAR
|
|
.WEND
|
|
.WHILE
|
|
.WO
|
|
.WORD
|
|
.XOR
|
|
.ZPVAR
|
|
|
|
; MADS Pseudo Opcodes, XASM style
|
|
ADB
|
|
ADW
|
|
CPB
|
|
CPD
|
|
CPL
|
|
CPW
|
|
DED
|
|
DEL
|
|
DEW
|
|
IND
|
|
INL
|
|
PHR
|
|
PLR
|
|
SBB
|
|
SBW
|
|
|
|
; MADS Pseudo Opcodes, starting with "#"
|
|
#ELSE
|
|
#END
|
|
#IF
|
|
#WHILE
|
|
|
|
|
|
; Hyperlink relevant directives and pseudo opcodes
|
|
ICL "include/MADS-Reference-Source-Include" ;Suffix ".asm" appended automatically
|
|
ICL "include/MADS-Reference-Source-Include.asm"
|
|
INS "include/MADS-Reference-Binary-Include.bin"
|
|
.SAV "MADS-Reference-Binary-Output.bin"
|
|
|