AWork In Progress (ASM)

This commit is contained in:
Rémy GIBERT 2015-10-16 17:35:11 +02:00
parent a9b7399902
commit 2ec85716eb
5 changed files with 1749 additions and 278 deletions

View File

@ -1,264 +1,368 @@
PR#3
PR# 3
PREFIX /A2OSX.SRC
NEW
INC 1
AUTO 6
.TF /A2OSX.BOOT/BIN/ASM.T.6502
.LIST OFF
.OR $2000
.TF /A2OSX.BOOT/BIN/ASM.T.6502
*---------------------------------------
.MA AMS AMSID,"Pattern"
.DA #]1
.AS ]2
.DA #0
.AS ]3
.DA #0
.AS ]4
.DA #0
.MA PSTR
.DA #:1-*-1
.AS "]1"
:1 .EQ *
.EM
*---------------------------------------
.DA T.ADDR.MODES.SYNTAX
.MA AM
.DA ]1
>PSTR "]2"
.EM
*---------------------------------------
.DA T.ADDR.MODES
.DA T.REGISTERS
.DA T.OPCODES
*---------------------------------------
T.ADDR.MODES.SYNTAX .AS "1 Implicit
>AMS 2,"#?1",$1","" Imm8
>AMS 3,"$2","$1=$2-@+1","-127,128" rel8
>AMS 4,"$1","$1","" abs8
>AMS 5,"$1,X","$1","" abs8,x
>AMS 6,"$2","$2","" abs16
>AMS 7,"$2,X","$2","" abs16,x
>AMS 8,"$2,Y","$2","" abs16,y
>AMS 9,"($2)","$2","" (abs16)
>AMS 10,"($1)","$1","" (abs8)
>AMS 11,"($1,X)","$1","" (abs8,x)
>AMS 12,"($1),Y","$1","" (abs8),y
.HS 0
*---------------------------------------
T.OPCODES .AS "ADC"
.HS 0
.HS 2,$69,4,$65,5,$75,6,$6D,7,$7D,8,$79,11,$61,12,$71
.HS 0
.AS "AND"
.HS 0
.HS
.HS 0
.AS "ASL"
.HS 0
.HS
.HS 0
.AS "BCC"
.HS 0
.HS 3,$90
.HS 0
.AS "BCS"
.HS 0
.HS 3,$B0
.HS 0
.AS "BEQ"
.HS 0
.HS
.HS 0
.AS "BIT"
.HS 0
.HS
.HS 0
.AS "BMI"
.HS 0
.HS
.HS 0
.AS "BNE"
.HS 0
.HS
.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AS "TAX"
.HS 0
.HS
.HS 0
.AS "TAY"
.HS 0
.HS
.HS 0
.AS "TSX"
.HS 0
.HS
.HS 0
.AS "TXA"
.HS 0
.HS
.HS 0
.AS "TXS"
.HS 0
.HS
.HS 0
.AS "TYA"
.HS 0
.HS
.HS 0
T.ADDR.MODES .EQ *
>PSTR "(a),Y"
>PSTR "(a,X)"
>PSTR "a"
>PSTR "a,X"
>PSTR "aa"
>PSTR "aa,X"
>PSTR "aa,Y"
>PSTR "i"
>PSTR "r"
>PSTR "(aa)"
>PSTR "a,Y"
.HS 00
*---------------------------------------
T.REGISTERS .EQ *
>PSTR "Y"
>PSTR "X"
.HS 00
*---------------------------------------
T.OPCODES .EQ *
.DA #E.ADC-*
>PSTR "ADC"
>AM 0,"71a"
>AM 1,"61a"
>AM 2,"65a"
>AM 3,"75a"
>AM 4,"6Daa"
>AM 5,"7Daa"
>AM 6,"79aa"
>AM 7,"69i"
E.ADC .HS 00
.DA #E.AND-*
>PSTR "AND"
>AM 0,"31a"
>AM 1,"21a"
>AM 2,"25a"
>AM 3,"35a"
>AM 4,"2Daa"
>AM 5,"3Daa"
>AM 6,"39aa"
>AM 7,"29i"
E.AND .HS 00
.DA #E.ASL-*
>PSTR "ASL"
>AM 2,"06a"
>AM 3,"16a"
>AM 4,"0Eaa"
>AM 5,"1Eaa"
>AM 255,"0A"
E.ASL .HS 00
.DA #E.BCC-*
>PSTR "BCC"
>AM 8,"90r"
E.BCC .HS 00
.DA #E.BCS-*
>PSTR "BCS"
>AM 8,"B0r"
E.BCS .HS 00
.DA #E.BEQ-*
>PSTR "BEQ"
>AM 8,"F0r"
E.BEQ .HS 00
.DA #E.BIT-*
>PSTR "BIT"
>AM 2,"24a"
>AM 4,"2Caa"
E.BIT .HS 00
.DA #E.BMI-*
>PSTR "BMI"
>AM 8,"30r"
E.BMI .HS 00
.DA #E.BNE-*
>PSTR "BNE"
>AM 8,"D0r"
E.BNE .HS 00
.DA #E.BPL-*
>PSTR "BPL"
>A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.DA #E.ROR-*
>PSTR "ROR"
>AM 2,"66a"
>AM 3,"76a"
>AM 4,"6Eaa"
>AM 5,"7Eaa"
>AM 255,"6A"
E.ROR .HS 00
.DA #E.RTI-*
>PSTR "RTI"
>AM 255,"40"
E.RTI .HS 00
.DA #E.RTS-*
>PSTR "RTS"
>AM 255,"60"
E.RTS .HS 00
.DA #E.SBC-*
>PSTR "SBC"
>AM 0,"F1a"
>AM 1,"E1a"
>AM 2,"E5a"
>AM 3,"F5a"
>AM 4,"Edaa"
>AM 5,"Fdaa"
>AM 6,"F9aa"
>AM 7,"E9i"
E.SBC .HS 00
.DA #E.SEC-*
>PSTR "SEC"
>AM 255,"38"
E.SEC .HS 00
.DA #E.SED-*
>PSTR "SED"
>AM 255,"F8"
E.SED .HS 00
.DA #E.SEI-*
>PSTR "SEI"
>AM 255,"78"
E.SEI .HS 00
.DA #E.STA-*
>PSTR "STA"
>AM 0,"91a"
>AM 1,"81a"
>AM 2,"85a"
>AM 3,"95a"
>AM 4,"8Daa"
>AM 5,"9Daa"
>AM 6,"99aa"
E.STA .HS 00
.DA #E.STX-*
>PSTR "STX"
>AM 2,"86a"
>AM 10,"96a"
>AM 4,"8Eaa"
E.STX .HS 00
.DA #E.STY-*
>PSTR "STY"
>AM 2,"84a"
>AM 3,"94a"
>AM 4,"8Caa"
E.STY .HS 00
.DA #E.TAX-*
>PSTR "TAX"
>AM 255,"AA"
E.TAX .HS 00
.DA #E.TAY-*
>PSTR "TAY"
>AM 255,"A8"
E.TAY .HS 00
.DA #E.TSX-*
>PSTR "TSX"
>AM 255,"BA"
E.TSX .HS 00
.DA #E.TXA-*
>PSTR "TXA"
>AM 255,"8A"
E.TXA .HS 00
.DA #E.TXS-*
>PSTR "TXS"
>AM 255,"9A"
E.TXS .HS 00
.DA #E.TYA-*
>PSTR "TYA"
>AM 255,"98"
E.TYA .HS 00
.HS 00
*---------------------------------------
.HS 0
MAN
SAVE BIN/ASM.T.6502.S
ASM

0
BIN/ASM.T.65816.S.txt Normal file
View File

102
BIN/ASM.T.65R02.S.txt Normal file
View File

@ -0,0 +1,102 @@
PR#3
PREFIX /A2OSX.SRC
NEW
INC 1
AUTO 6
.TF /A2OSX.BOOT/BIN/ASM.T.65R02
.OR $2000
*---------------------------------------
.MA AMS AMSID,"Syntax",0,"Operand",0,"Rule",0
.DA #]1
.AS ]2
.DA #0
.AS ]3
.DA #0
.AS ]4
.DA #0
.EM
*---------------------------------------
T.ADDR.MODES.SYNTAX >AMS 1,"","","" Implicit
>AMS 2,"#$1",$1","" Immediate
>AMS 3,"$2","$1=$2-@+1","-127<$1<128" rel
>AMS 4,"$1","$1","" zp
>AMS 5,"$1,X","$1","" zp,x
>AMS 6,"$2","$2","" abs
>AMS 7,"$2,X","$2","" abs,x
>AMS 8,"$2,Y","$2","" abs,y
>AMS 9,"($2)","$2","" (abs)
>AMS 10,"($1)","$1","" (zp)
>AMS 11,"($1,X)","$1","" (zp,x)
>AMS 12,"($1),Y","$1","" (zp),y
T.OPCODES .AS "ADC"
.HS 0
.HS 2,$69,4,$65,5,$75,6,$6D,7,$7D,8,$79,11,$61,12,$71
.HS 0
.AS "AND"
.AS "ASL"
.AS "BCC"
.HS 0
.HS 3,$90
.HS 0
.AS "BCS"
.HS 0
.HS 3,$B0
.HS 0
.AS "BEQ"
.AS "BIT"
.AS "BMI"
.AS "BNE"
.AS "BPL"
.AS "BRK"
.AS "BVC"
.AS "BVS"
.AS "CLC"
.AS "CLD"
.AS "CLI"
.AS "CLV"
.AS "CMP"
.AS "CPX"
.AS "CPY"
.AS "DEC"
.AS "DEX"
.AS "DEY"
.AS "EOR"
.AS "INC"
.AS "INX"
.AS "INY"
.AS "JMP"
.AS "JSR"
.AS "LDA"
.AS "LDX"
.AS "LDY"
.AS "LSR"
.AS "NOP"
.AS "NOP"
.AS "ORA"
.AS "PHA"
.AS "PHP"
.AS "PLA"
.AS "ROL"
.AS "ROR"
.AS "RTI"
.AS "RTS"
.AS "SBC"
.AS "SEC"
.AS "SED"
.AS "SEI"
.AS "STA"
.AS "STX"
.AS "STY"
.AS "TAX"
.AS "TAY"
.AS "TSX"
.AS "TXA"
.AS "TXS"
.AS "TYA"
*---------------------------------------
.HS 0
MAN
SAVE BIN/ASM.T.65R02.S
ASM

File diff suppressed because it is too large Load Diff

BIN
BIN/ASM.T.xlsm Normal file

Binary file not shown.