65Org16 Assembler (16-bit bytes, 32-bit address space)
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
- BitWise
- In Memoriam
- Posts: 996
- Joined: 02 Mar 2004
- Location: Berkshire, UK
- Contact:
If you can program in Java then the code is quite easy to fix. For example here a link to the patch for the last bug fix
http://dev65.svn.sourceforge.net/viewvc ... pathrev=16
You'd need a Subversion client, a copy of the Eclipse IDE with the 'Subclipse' plug in installed, a sourceforge account and access permission to commit changes back to repository -- All these are free downloads and registrations + me granting you repository access.
http://dev65.svn.sourceforge.net/viewvc ... pathrev=16
You'd need a Subversion client, a copy of the Eclipse IDE with the 'Subclipse' plug in installed, a sourceforge account and access permission to commit changes back to repository -- All these are free downloads and registrations + me granting you repository access.
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
- BitWise
- In Memoriam
- Posts: 996
- Joined: 02 Mar 2004
- Location: Berkshire, UK
- Contact:
ElEctric_EyE wrote:
Not so easy, heh...
Are you sure that's the update? I'm getting all zero page opcodes again, even LDA$xxxxxxxx which was fixed before... I'll try the ! expression.
Are you sure that's the update? I'm getting all zero page opcodes again, even LDA$xxxxxxxx which was fixed before... I'll try the ! expression.
Code: Select all
FFFFF000 00BD8000FFFF : LDA $FFFF8000,X
FFFFF003 00BD8000FFFF : LDA !$FFFF8000,X
FFFFF006 00BD8000FFFF : LDA |$FFFF8000,X
FFFFF009 00B58000 : LDA $00008000,X
FFFFF00B 00BD80000000 : LDA !$00008000,X
FFFFF00E 00BD80000000 : LDA |$00008000,X
FFFFF011 00EE8000FFFF : INC $FFFF8000
FFFFF014 00EE8000FFFF : INC !$FFFF8000
FFFFF017 00EE8000FFFF : INC |$FFFF8000
FFFFF01A 00E68000 : INC $00008000
FFFFF01C 00EE80000000 : INC !$00008000
FFFFF01F 00EE80000000 : INC |$00008000Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
It works. I forgot it optimizes $00000001 to $0001...
Some more observations as I am testing more opcodes on my .b core:
1) STA $xxxx,Y ($0091) is observed as STA $xxxxxxxx,Y ($0099). In fact, all odd opcodes in column 1 have this problem, i.e. ($0011,$0031,$0051,$0071... observed as $0019,$0039,$0059,$0079, etc.)
Thanks for your continued support!
Some more observations as I am testing more opcodes on my .b core:
1) STA $xxxx,Y ($0091) is observed as STA $xxxxxxxx,Y ($0099). In fact, all odd opcodes in column 1 have this problem, i.e. ($0011,$0031,$0051,$0071... observed as $0019,$0039,$0059,$0079, etc.)
Thanks for your continued support!
- BitWise
- In Memoriam
- Posts: 996
- Joined: 02 Mar 2004
- Location: Berkshire, UK
- Contact:
ElEctric_EyE wrote:
It works. I forgot it optimizes $00000001 to $0001...
Some more observations as I am testing more opcodes on my .b core:
1) STA $xxxx,Y ($0091) is observed as STA $xxxxxxxx,Y ($0099). In fact, all odd opcodes in column 1 have this problem, i.e. ($0011,$0031,$0051,$0071... observed as $0019,$0039,$0059,$0079, etc.)
Thanks for your continued support!
Some more observations as I am testing more opcodes on my .b core:
1) STA $xxxx,Y ($0091) is observed as STA $xxxxxxxx,Y ($0099). In fact, all odd opcodes in column 1 have this problem, i.e. ($0011,$0031,$0051,$0071... observed as $0019,$0039,$0059,$0079, etc.)
Thanks for your continued support!
Code: Select all
FFFFF02B 009980000000 : STA $00008000,Y
FFFFF02E 009980000000 : STA !$00008000,Y
FFFFF031 009980000000 : STA |$00008000,Y
FFFFF034 00910001 : STA ($0001),Y
FFFFF036 00110001 : ORA ($0001),Y
FFFFF038 00B61234 : LDX $1234,Y
FFFFF03A 00961234 : STX $1234,Y
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
Re: 65Org16 Assembler (16-bit bytes, 32-bit address space)
In As65, I am using simple macro's like for instance:
And so when I write the assembly I have to do this:
What is the syntax of the macro have to look like to have the assembly abit more agreeable to the eyes? or or something along these lines.
Ideally, it would look like Is this possible?
Code: Select all
LDBi .MACRO ;LDB #$xxxx
.BYTE $01A9
.ENDMCode: Select all
LDBi
.BYTE $00FFCode: Select all
LDBi, $00FFCode: Select all
LDBi $00FFIdeally, it would look like
Code: Select all
LDBi #$00FF- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: 65Org16 Assembler (16-bit bytes, 32-bit address space)
In that case, with the three commercial assemblers I've worked with, you would put the name of a macro variable in the macro definition line:
Something I liked about the 2500AD assembler is that you could have any number of parameters, and have, in essence, "If there is a fourth parameter, do this; if there is a fifth one, do that," etc..
For different address modes, you would probably have to use another parameter to tell it which addressing mode you want, or put it in the mnemonic, which is what I did in my super-simple Forth assembler, so it takes for example, LDA# or LDA_ZP or LDA_ZP,X etc.. Not being familiar with As65 though, I suspect the range of characters it lets you put in a label (as for macro names) is more limited.
Code: Select all
LDBi: .MACRO param
.BYTE $1A9, param
.ENDM
;---------------------
For different address modes, you would probably have to use another parameter to tell it which addressing mode you want, or put it in the mnemonic, which is what I did in my super-simple Forth assembler, so it takes for example, LDA# or LDA_ZP or LDA_ZP,X etc.. Not being familiar with As65 though, I suspect the range of characters it lets you put in a label (as for macro names) is more limited.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BitWise
- In Memoriam
- Posts: 996
- Joined: 02 Mar 2004
- Location: Berkshire, UK
- Contact:
Re: 65Org16 Assembler (16-bit bytes, 32-bit address space)
As65 accepts named or numbered arguments. So you can write either
or
In both cases you invoke it with
If you wanted to extend the assembler to understand a new opcode the you would add a block like the following but change the constants in the switch to the correct values of the LDB opcodes
You have to make a couple of other small tweaks but that's the most of it.
Code: Select all
LDBi .MACRO param
.BYTE $1A9,param
.ENDM
Code: Select all
LDBi .MACRO
.BYTE $1A9,\0
.ENDM
Code: Select all
LDBi $1234
Code: Select all
/**
* An <CODE>Opcode</CODE> that handles the LDA instruction.
*/
protected final Opcode LDA = new Opcode (KEYWORD, "LDA")
{
/**
* {@inheritDoc}
*/
public boolean compile ()
{
switch (parseMode ()) {
case IMMD: genImmd (0x00A9, arg); break;
case DPAG: genDpag (0x00A5, arg); break;
case ABSL: genAbsl (0x00AD, arg); break;
case DPGX: genDpag (0x00B5, arg); break;
case ABSX: genAbsl (0x00BD, arg); break;
case DPGY:
case ABSY: genAbsl (0x00B9, arg); break;
case INDX: genDpag (0x00A1, arg); break;
case INDY: genDpag (0x00B1, arg); break;
case INDI: genDpag (0x00B2, arg); break;
default:
error (ERR_ILLEGAL_ADDR);
}
return (true);
}
};
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
Re: 65Org16 Assembler (16-bit bytes, 32-bit address space)
Code: Select all
LDBi .MACRO param ;LDB #$xxxx
.BYTE $01A9, param
.ENDM- BitWise
- In Memoriam
- Posts: 996
- Joined: 02 Mar 2004
- Location: Berkshire, UK
- Contact:
Re: 65Org16 Assembler (16-bit bytes, 32-bit address space)
ElEctric_EyE wrote:
Code: Select all
LDBi .MACRO param ;LDB #$xxxx
.BYTE $01A9, param
.ENDMCode: Select all
FFFFF03C LDBi .MACRO param
.BYTE $01A9,param
.ENDM
.EXTERN fred
LDBi $00ff
FFFFF03C 01A900FF + .BYTE $01A9,$00ff
LDBi fred
FFFFF03E 01A90000 + .BYTE $01A9,fred
LDBi 1+2*3
FFFFF040 01A90007 + .BYTE $01A9,1+2*3
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
Re: 65Org16 Assembler (16-bit bytes, 32-bit address space)
Ok. Thanks for checking...
Is this sufficient for the beginning of a 65016 boot.asm file, or am I missing something?
I'm running NMAKE from a DOS command window under Windows XP SP3.
NMAKE is giving me 13 of these identical errors if this is any clue.
Is this sufficient for the beginning of a 65016 boot.asm file, or am I missing something?
Code: Select all
.CODE
.ORG $FFFFC000NMAKE is giving me 13 of these identical errors if this is any clue.
- BitWise
- In Memoriam
- Posts: 996
- Joined: 02 Mar 2004
- Location: Berkshire, UK
- Contact:
Re: 65Org16 Assembler (16-bit bytes, 32-bit address space)
Send me a copy of your boot.asm file
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
Re: 65Org16 Assembler (16-bit bytes, 32-bit address space)
Ah, I am dense. It works. I didn't realize when I change the macro parameters, I need to change the way the macro's are invoked. The errors were all the times the macro was improperly invoked, using the old syntax. Sorry about that.
Now, extending your assembler seems interesting, where would I add that block? You made provisions for $B2, the indirect indexed W addressing mode? Although it seems like more work, it may be worth it in order to get the assembly looking exactly as it should. I'd like to experiment with this.
Now, extending your assembler seems interesting, where would I add that block? You made provisions for $B2, the indirect indexed W addressing mode? Although it seems like more work, it may be worth it in order to get the assembly looking exactly as it should. I'd like to experiment with this.