good morning .
I have fix the problem with BRK instruction. So please do some more tests for me .
After assemble (without errors ) the binary file will be created in source directory.
fixed version :
--- link deleted ---
Thanks allot for your help.
ps 1: this assembler is in very early state so please be patient .
ps 2:assembly listing, symbol table ( if you mean labels list , then is available under view ) will be added but first of all I need to test the "assembly engine"
ps 3: hire is some example code .
Code:
nop
nop
rep #$30
org $1000
StartAddress
Label
adc ($11,x) ; $79 (indirect,x)
adc $12,s ; $63 Stack relatve
adc $12 ; $65 zeropage/DirectPage
adc [$33] ; $67 Direct Page LONG 65816
adc #$20 ; $69 immediate
adc $1234 ; $6d absolute
adc $123456 ; $6d absolute LONG
adc ($22),y ; $71 (indirect),y
adc ($22) ; $72 (indirect) 65c02, 65816
adc ($22,s),y ; $73 SR Indirect Index Y 65816
adc $33,x ; $75 zeropage,x
adc [$33],y ; $77 Direct Page LONG indexed Y
adc $1234,y ; $61 absolute,y
adc $1234,x ; $7d absolute,x
adc $123456,x ; $7f absolute,x
and ($11,x) ; $21 (indirect,x)
and $12,s ; $23 Stack relatve 65816
and $12 ; $25 zeropage/DirectPage
and [$33] ; $27 Direct Page LONG 65816
and #$55 ; $29 immediate
and $1234 ; $2d absolute
and $123456 ; $2f absolute LONG 65816
and ($22),y ; $31 (indirect),y
and ($22) ; $32 (indirect) 65c02, 65816
and ($22,s),y ; $33 SR Indirect Index Y 65816
and $33,x ; $35 zeropage,x
and [$33],y ; $37 Direct Page LONG indexed Y 65816
and $1234,y ; $39 absolute,y
and $1234,x ; $3d absolute,x
and $123456,x ; $3f absolute,x 65816
asl ; $0a accumulator
asl $1234 ; $0e absolute
asl $00 ; $06 zeropage
asl $1234,x ; $1e absolute,x
asl $00,x ; $35 zeropage,x
dan1
bcc dan1 ; $90 Relative
bcs dan2 ; $b0 Relative
dan2 beq dan1 ; $f0 Relative
bit $1234 ; $2c absolute
bit $00 ; $24 zeropage
bmi dan1 ; $30 Relative
bne dan1 ; $d0 Relative;
bpl dan1 ; $10 Relative
brk ; $00 implied
bvc dan1 ; $50 Relative
bvs dan1 ; $70 Relative
clc ; $18 implied
cld ; $d8 implied
cli ; $58 implied
clv ; $b8 implied
cmp $1234 ; $cd absolute
cmp $00 ; $c5 zeropage
cmp #$00 ; $c9 immediate
cmp $1234,x ; $d0 absolute,x
cmp $1234,y ; $d9 absolute,y
cmp ($00,x) ; $c1 (indirect,x)
cmp ($00),y ; $d1 (indirect),y
cmp $00,x ; $d5 zeropage,x
cpx $1234 ; $ec absolute
cpx $00 ; $e4 zeropage
cpx #$00 ; $e0 immediate
cpy $1234 ; $cc absolute
cpy $00 ; $c4 zeropage
cpy #$00 ; $c0 immediate
dec $1234 ; $ce absolute
dec $00 ; $c6 zeropage
dec $1234,x ; $de absolute,x
dec $00,x ; $d6 zeropage,x
dex ; $ca implied
dey ; $88 implied
eor $1234 ; $4d absolute
eor $00 ; $45 zeropage
eor #$00 ; $49 immediate
eor $1234,x ; $5d absolute,x
eor $1234,y ; $59 absolute,y
eor ($00,x) ; $41 (indirect,x)
eor ($00),y ; $51 (indirect),y
eor $00,x ; $55 zeropage,x
inc $1234 ; $ee absolute
inc $00 ; $e6 zeropage
inc $1234,x ; $fe absolute,x
inc $00,x ; $f6 zeropage,x
inx ; $e8 implied
iny ; $c8 implied
jmp $1234 ; $4c absolute
jmp ($34) ; $6c (indirect)
jsr $1234 ; $20 absolute
lda $1234 ; $ad absolute
lda $00 ; $a5 zeropage
lda #$00 ; $a9 immediate
lda $1234,x ; $bd absolute,x
lda $1234,y ; $b9 absolute,y
lda ($00,x) ; $a1 (indirect,x)
lda ($00),y ; $b1 (indirect),y
lda $00,x ; $b5 zeropage,x
ldx $1234 ; $ae absolute
ldx $00 ; $a6 zeropage
ldx #$00 ; $a2 immediate
ldx $1234,y ; $be absolute,y
ldx $00,y ; $b6 zeropage,y
ldy $1234 ; $ac absolute
ldy $00 ; $a4 zeropage
ldy #$00 ; $a0 immediate
ldy $1234,x ; $bc absolute,x
ldy $00,x ; $b4 zeropage,x
lsr ; $4a accumulator
lsr $1234 ; $4e absolute
lsr $00 ; $46 zeropage
lsr $1234,x ; $5e absolute,x
lsr $00,x ; $56 zeropage,x
nop ; $ea implied
ora $1234 ; $0d absolute
ora $00 ; $05 zeropage
ora #$00 ; $09 immediate
ora $1234,x ; $1d absolute,x
ora $1234,y ; $19 absolute,y
ora ($00,x) ; $01 (indirect,x)
ora ($00),y ; $11 (indirect),y
ora $00,x ; $15 zeropage,x
pha ; $48 implied
php ; $08 implied
pla ; $68 implied
plp ; $28 implied
rol ; $2a accumulator
rol $1234 ; $2e absolute
rol $00 ; $26 zeropage
rol $1234,x ; $3e absolute,x
rol $00,x ; $36 zeropage,x
ror ; $6a accumulator
ror $1234 ; $6e absolute
ror $00 ; $66 zeropage
ror $1234,x ; $7e absolute,x
ror $00,x ; $76 zeropage,x
rti ; $40 implied
rts ; $60 implied
sbc $1234 ; $ed absolute
sbc $00 ; $e5 zeropage
sbc #$00 ; $e9 immediate
sbc $1234,x ; $fd absolute,x
sbc $1234,y ; $f9 absolute,y
sbc ($00,x) ; $e1 (indirect,x)
sbc ($00),y ; $f1 (indirect),y
sbc $00,x ; $f5 zeropage,x
sec ; $38 implied
sed ; $f8 implied
sei ; $78 implied
sta $1234 ; $8d absolute
sta $00 ; $85 zeropage
sta $1234,x ; $9d absolute,x
sta $1234,y ; $99 absolute,y
sta ($00,x) ; $81 (indirect,x)
sta ($00),y ; $91 (indirect),y
sta $00,x ; $95 zeropage,x
stx $1234 ; $8e absolute
stx $00 ; $86 zeropage
stx $00,y ; $96 zeropage,y
sty $1234 ; $8c absolute
sty $00 ; $84 zeropage
sty $00,x ; $94 zeropage,x
tax ; $aa implied
tay ; $a8 implied
tsx ; $ba implied
txa ; $8a implied
txs ; $9a implied
tya ; $98 implied
lda #$ff
adc #$55
and #$fe
cmp #$12
eor #$55
ora #$55
sbc #$55
bit #$55
ldx #$23
cpx #$55
ldy #$23
cpy #$55
lda #$ff12
adc #$5513
and #$fe43
cmp #$1223
eor #$5534
ora #$5534
sbc #$5534
bit #$5534
ldx #$2334
cpx #$5534
ldy #$2334
cpy #$5534
adc [$34]
adc [$34],y
and [$34]
and [$34],y
cmp [$34]
cmp [$34],y
eor [$34]
eor [$34],y
lda [$34]
lda [$34],y
ora [$34]
ora [$34],y
sbc [$34]
sbc [$34],y
sta [$34]
sta [$34],y
inc ; $1A implied
dec
.byte 0,0,0,0,0,0,0
adc $ffffff
adc $563412,x
and $ffffff
and $111111,x
cmp $ffffff
cmp $111111,x
eor $ffffff
eor $111111,x
jmp $7f3355
jsr $7f3355
lda $7f1234
lda $aaee55,x
ora $ffffff
ora $111111,x
sbc $ffffff
sbc $111111,x
sta $ffffff
sta $111111,x
.byte 0,0,0,0,0,0,0
adc ($55)
.byte 0,0,0,0,0,0,0
adc ($34)
and ($34)
cmp ($34)
eor ($34)
lda ($34)
ora ($34)
sbc ($34)
sta ($34)
jmp ($34,x)
jsr ($3422,x)
.byte 0,0,0,0,0,0,0
adc ($34,s),y
and ($34,s),y
cmp ($34,s),y
eor ($34,s),y
lda ($34,s),y
ora ($34,s),y
sbc ($34,s),y
sta ($34,s),y
.byte 0,0,0,0,0,0,0
adc $34,s
and $34,s
cmp $34,s
eor $34,s
lda $34,s
ora $34,s
sbc $34,s
sta $34,s
adc $ff,s
adc $00
bit $00,x
bit $1234,x
bit #$12
xce
.byte 0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0
mvn $40,$50
mvp $f4,$33