Coder Social home page Coder Social logo

easy6502's People

Contributors

baileyparker avatar benur21 avatar biged avatar gabrielsroka avatar gatesphere avatar hosza avatar isedwards avatar mortenaa avatar neauoire avatar ryukojiro avatar skilldrick avatar wahajenius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

easy6502's Issues

Disassembled code will not reassemble

I attempted to plug the disassembled code back into the assembler, at which point it will not run. Below is the disassembly of snake. it is throwing an error Syntax error line 38: BEQ $0660

JSR $0606 
JSR $0638 
JSR $060d 
JSR $062a 
RTS 
LDA #$02
STA $02
LDA #$04
STA $03
LDA #$11
STA $10
LDA #$10
STA $12
LDA #$0f
STA $14
LDA #$04
STA $11
STA $13
STA $15
RTS 
LDA $fe
STA $00
LDA $fe
AND #$03
CLC 
ADC #$02
STA $01
RTS 
JSR $064d 
JSR $068d 
JSR $06c3 
JSR $0719 
JSR $0720 
JSR $072d 
JMP $0638 
LDA $ff
CMP #$77
BEQ $0660
CMP #$64
BEQ $066b
CMP #$73
BEQ $0676
CMP #$61
BEQ $0681
RTS 
LDA #$04
BIT $02
BNE $068c
LDA #$01
STA $02
RTS 
LDA #$08
BIT $02
BNE $068c
LDA #$02
STA $02
RTS 
LDA #$01
BIT $02
BNE $068c
LDA #$04
STA $02
RTS 
LDA #$02
BIT $02
BNE $068c
LDA #$08
STA $02
RTS 
RTS 
JSR $0694 
JSR $06a8 
RTS 
LDA $00
CMP $10
BNE $06a7
LDA $01
CMP $11
BNE $06a7
INC $03
INC $03
JSR $062a 
RTS 
LDX $02
LDA $10,X
CMP $10
BNE $06b6
LDA $11,X
CMP $11
BEQ $06bf
INX 
INX 
CPX $03
BEQ $06c2
JMP $06aa 
JMP $0735 
RTS 
LDX $03
DEX 
TXA 
LDA $10,X
STA $12,X
DEX 
BPL $06c7
LDA $02
LSR A
BCS $06dc
LSR A
BCS $06ef
LSR A
BCS $06f8
LSR A
BCS $070b
LDA $10
SEC 
SBC #$20
STA $10
BCC $06e6
RTS 
DEC $11
LDA #$01
CMP $11
BEQ $0716
RTS 
INC $10
LDA #$1f
BIT $10
BEQ $0716
RTS 
LDA $10
CLC 
ADC #$20
STA $10
BCS $0702
RTS 
INC $11
LDA #$06
CMP $11
BEQ $0716
RTS 
DEC $10
LDA $10
AND #$1f
CMP #$1f
BEQ $0716
RTS 
JMP $0735 
LDY #$00
LDA $fe
STA ($00),Y
RTS 
LDX $03
LDA #$00
STA ($10,X)
LDX $00
LDA #$01
STA ($10,X)
RTS 
LDX $00
NOP 
NOP 
DEX 
BNE $082f
RTS 

Significant typo in index.markdown

As you describe the snake game, you have this paragraph:

"The hex value $03 is represented in binary as 00000111. The AND opcode performs a bitwise AND of the argument with the accumulator. For example, if the accumulator contains the binary value 01010101, then the result of AND with 00000111 will be 00000101."

The binary value of $03 is 00000011. This could be very confusing to people.

[Improvement] Enhance Monitor Output

The monitor is useful for debugging programs, but when stepping through a program it's often difficult to keep track of what is happening in memory.

I think it would be a nice enhancement if the monitor output had smart color coding to give some context to what is going on and where in memory you are. Examples include color coding locations read and written to by the previous instruction, where the special memory locations are, where the program is (and where the PC is), and where the display is.

Monitor hangs browser for addresses beyond $ffff with no warning

If you accidentally try to monitor beyond the address space of the 6502, the browser will hang (at least it does for me in Chrome/Ubuntu and Chrome/OSX).

This can be fixed with some simple guarding on the monitor function (and possible a nice error message). But I'd wait on #15 since this somewhat depends on that.

SBC (subtract with carry)

It seems that SBC is not calculating correctly

Address  Hexdump   Dissassembly
-------------------------------
$0600    a9 09     LDA #$09
$0602    e9 01     SBC #$01

0600: a9 09 e9 01

A=$07 X=$00 Y=$00
SP=$ff PC=$0605
NV-BDIZC
00110001

Dead Link Bro

The link for Western Design Center is dead on your tutorial FYI

Why does monitor accept start/length instead of start/end?

Is there a reason why monitor takes a starting address and a length instead of a starting address and an ending address? It seems to me the latter would make more sense since you often know the starting and ending address of where your program modifies memory. This eliminates the need to do some hex subtraction to figure out the appropriate length.

This also makes monitoring the entire memory more intuitive in my opinion, since currently $0000 with length $ffff is missing memory location $ffff. To see the last memory location you need a length of $10000, which doesn't make sense given that all 6502 addresses are 2 bytes.

This came about when I discovered the bug detailed in #16.

Reset doesn't completely reset? (program behaves differently first-run vs reset-run)

First, thanks so much for making Easy 6502! 🤩

I noticed something funny when trying to draw a single-pixel border around the edge of the "screen": my program has different behavior after a "Reset".

The first time I run the code, it works correctly:

Screen Shot 2021-06-06 at 1 03 23 AM

But if I then click "reset" and "run", my program behaves differently: it gets stuck in an infinite loop while trying to draw the right-hand border:

reset.mp4

If I then make a trivial change (e.g. add an extra space), I can click "Assemble" and "Run" and the program works again.

Is this a bug? I would have expected that "Reset" would perform a full reset, but it appears there is some leftover state which is causing my program to behave differently the second time around.

define does not work well for addresses over $ff

This code looks reasonable.

define Screen $200

LDY #$21
LDA #1
STA Screen,Y ; this works

LDA #<Screen
STA $2
LDA #>Screen
STA $3
LDA #4
STA ($2),Y ; this does not work

but the #> and #< both always appear to generate #0 constants

If you define the label as a memory address it does work, but this really should be equivalent.

*= $200
Screen:

this was the standard behavior of the EQU directive in most assemblers

Example overwrites program memory

In the Indexed indirect example you overwrite program memory with STY $0605. Also, you setup $01 $02 with #$0605 but then do not use it. I think the example needs a tweak.

###Indexed indirect: ($c0,X)###

This one’s kinda weird. It’s like a cross between zero page,X and indirect. Basically, you take the zero page address, add the value of the X register to it, then use that to look up a two-byte address. For example:

LDX #$01
LDA #$05
STA $01
LDA #$06
STA $02
LDY #$0a
STY $0605
LDA ($00,X)

https://skilldrick.github.io/easy6502/#addressing

Also, github apparently changed their markdown engine and your headers now need a space between the ### and the text to render properly.

###Indexed indirect: ($c0,X)###
###Indexed indirect: ($c0,X)###

### Indexed indirect: ($c0,X) ###

Indexed indirect: ($c0,X)

Tab Key in Editor Loses Focus

Tabbing is common in 6502 assembly since typically instructions and addresses are tab separated. However, the code editor loses focus when you press tab inside it. The editor should allow you to insert tab characters (in a way that is easier than copying and pasting a tab from another location!).

Easy Way to Mirror?

I hope this is not too trivial to ask. I would like to use Easy6502 for a course I am teaching, but I'd like to make sure that it stays accessible for the life of the assignments that I'll give. So I'd prefer to mirror the entire working Easy6502 site in a way to insulates me from changes. Can that be done in a straightforward way? Is it enough to just grab everything from the gh-pages that host the tutorial and slap it on my own server? Or is everything heavily tied into github specific things?

Open source licence

I'd like to adapt this to work on physical hardware.

Can you clarify which open source/creative commons licence(s) you'd like derivatives to be released under?

[REQUEST] Add cycle counter...

It would be nice if the approx clock cycles could be added up automatically and displayed somewhere during assembly. Would help with metrics when trying to learn to optimize code.

Typo in example - index.markdown

This table:

  0    1    2    3    4
Head                 Tail

[1,5][1,4][1,3][1,2][2,2]    Starting position

[1,5][1,4][1,3][1,2][1,2]    Value of (3) is copied into (4)

[1,5][1,4][1,3][1,2][1,2]    Value of (2) is copied into (3)

[1,5][1,4][1,3][1,2][1,2]    Value of (1) is copied into (2)

[1,5][1,4][1,3][1,2][1,2]    Value of (0) is copied into (1)

[0,4][1,4][1,3][1,2][1,2]    Value of (0) is updated based on direction

Should read as follows:

  0    1    2    3    4
Head                 Tail

[1,5][1,4][1,3][1,2][2,2]    Starting position

[1,5][1,4][1,3][1,2][1,2]    Value of (3) is copied into (4)

[1,5][1,4][1,3][1,3][1,2]    Value of (2) is copied into (3)

[1,5][1,4][1,4][1,3][1,2]    Value of (1) is copied into (2)

[1,5][1,5][1,4][1,3][1,2]    Value of (0) is copied into (1)

[0,5][1,5][1,4][1,3][1,2]    Value of (0) is updated based on direction

Note the changes on the last 4 lines.

Toggle hex/dec display

When digging through the source I discovered that the assembler allows you to input decimal numbers by simply not prefixing them with $. This is interesting (and not documented...PR to tutorial?), and it made me wonder if it would be helpful to toggle the interface between hex and dec mode.

After thinking about it, I've concluded that it could be useful to be able to toggle (at the least) the A, X, and Y debug output between hex and dec display. It might even be useful to even make this apply to the monitor (say for example, you are writing a program on an array of integers, such as a simple sort).

Thoughts?

RTS misbehaves when returning to an even page boundary

The RTS must increment the PC value which it pulls off the stack.

At present, that increment does not correctly carry from the low byte to the high byte - which can be seen if the high byte is even.

Test program:
jmp $7fd
*=$7fd
jsr tst
nop
tst:
rts

[REQUEST] integrate transistor-level 6502 simulator

Have you seen https://floooh.github.io/visual6502remix/index.html?highdpi=true ?

It would really add to the effect if it was in the corner flashing around while the page executed your programs. It can be very small, doesn't need to show all the wires or anything, just seeing it would be enough for a lot of people I think. You could add a full screen button to open the CPU in full screen. You'd need to figure out how to message pass the memory to the WASM and back though.

simple cursor

I'm just getting used to the built-in 6502 emulator. I'm having problems trying a code even a simple cursor. All I want is a single dot that could move up, down, left, and right by my command. What could I do to accomplish this?

Tetris Code

I wrote a code for rendering Tetris blocks:

define Angle $100
define BlockNumber $101
define ascii $ff
define rotateLeft $63
define rotateRight $76
define dropDown $7a
define PositionCounter $105
define moveLeft $61
define moveRight $73

Start:
ldy #$10
lda #$01
sta Angle
lda $fe
sta $102
FindBlockNumber:
jsr Compare2TBlock
jsr Compare2OBlock
jsr Compare2IBlock
jsr Compare2JBlock
jsr Compare2LBlock
jsr Compare2SBlock
jsr Compare2ZBlock
jmp Start

detectKeys:
lda ascii
jsr RightMove
jsr LeftMove
jsr RightRotate
jsr LeftRotate
jsr DownDrop
rts

RightMove:
cmp #moveRight
beq newRightPosition
rts
newRightPosition:
lda #$00
sta ascii
sta $200,y
sta $201,y
sta $202,y
sta $203,y
sta $220,y
sta $221,y
sta $222,y
sta $223,y
sta $240,y
sta $241,y
sta $242,y
sta $243,y
sta $260,y
sta $261,y
sta $262,y
sta $263,y
iny
rts

LeftMove:
cmp #moveLeft
beq newLeftPosition
rts
newLeftPosition:
lda #$00
sta ascii
sta $200,y
sta $201,y
sta $202,y
sta $203,y
sta $220,y
sta $221,y
sta $222,y
sta $223,y
sta $240,y
sta $241,y
sta $242,y
sta $243,y
sta $260,y
sta $261,y
sta $262,y
sta $263,y
dey
rts

RightRotate:
cmp #rotateRight
beq newRightAngle
rts
newRightAngle:
lda #$00
sta ascii
sta $200,y
sta $201,y
sta $202,y
sta $203,y
sta $220,y
sta $221,y
sta $222,y
sta $223,y
sta $240,y
sta $241,y
sta $242,y
sta $243,y
sta $260,y
sta $261,y
sta $262,y
sta $263,y
inc Angle
lda Angle
cmp #$05
bpl resetAngle
rts
resetAngle:
lda #$01
sta Angle
rts

LeftRotate:
cmp #rotateLeft
beq newLeftAngle
rts
newLeftAngle:
lda #$00
sta ascii
sta $200,y
sta $201,y
sta $202,y
sta $203,y
sta $220,y
sta $221,y
sta $222,y
sta $223,y
sta $240,y
sta $241,y
sta $242,y
sta $243,y
sta $260,y
sta $261,y
sta $262,y
sta $263,y
dec Angle
lda Angle
cmp #$01
bmi resetAngle2
rts
resetAngle2:
lda #$04
sta Angle
rts

DownDrop:
cmp #dropDown
beq newDownPosition
rts
newDownPosition:
lda #$00
sta ascii
sta $200,y
sta $201,y
sta $202,y
sta $203,y
sta $220,y
sta $221,y
sta $222,y
sta $223,y
sta $240,y
sta $241,y
sta $242,y
sta $243,y
sta $260,y
sta $261,y
sta $262,y
sta $263,y
upTo20:
iny
inc PositionCounter
lda PositionCounter
cmp #$20
bne upTo20
lda #$00
sta PositionCounter
rts

Compare2TBlock:
cmp #$01
beq TBlockPicked
rts

TBlockPicked:
lda #$01
sta BlockNumber
lda Angle
cmp #$01
beq TBlockAngle0
cmp #$02
beq TBlockAngle90
cmp #$03
beq TBlockAngle180
cmp #$04
beq TBlockAngle270

TBlockAngle0:
jsr TBlock1
jsr detectKeys
jmp TBlockPicked

TBlockAngle90:
jsr TBlock2
jsr detectKeys
jmp TBlockPicked

TBlockAngle180:
jsr TBlock3
jsr detectKeys
jmp TBlockPicked

TBlockAngle270:
jsr TBlock4
jsr detectKeys
jmp TBlockPicked

TBlock1:
lda #$01
sta $220,y
sta $221,y
sta $222,y
sta $241,y
rts

TBlock2:
lda #$01
sta $201,y
sta $221,y
sta $222,y
sta $241,y
rts

TBlock3:
lda #$01
sta $201,y
sta $221,y
sta $222,y
sta $220,y
rts

TBlock4:
lda #$01
sta $201,y
sta $220,y
sta $221,y
sta $241,y
rts

Compare2OBlock:
cmp #$02
beq OBlockPicked
rts
OBlockPicked:
lda #$02
sta BlockNumber
OBlocksubRoutines:
jsr OBlock
jsr detectKeys
jmp OBlocksubRoutines

OBlock:
lda #$03
sta $200,y
sta $201,y
sta $220,y
sta $221,y
rts

Compare2IBlock:
cmp #$03
beq IBlockPicked
rts
IBlockPicked:
lda #$03
sta BlockNumber
lda Angle
cmp #$01
beq IBlockAngle0
cmp #$02
beq IBlockAngle90
cmp #$03
beq IBlockAngle0
cmp #$04
beq IBlockAngle90

IBlockAngle0:
jsr IBlock1
jsr detectKeys
jmp IBlockPicked

IBlockAngle90:
jsr IBlock2
jsr detectKeys
jmp IBlockPicked

IBlock1:
lda #$04
sta $220,y
sta $221,y
sta $222,y
sta $223,y
rts

IBlock2:
lda #$04
sta $222,y
sta $202,y
sta $242,y
sta $262,y
rts

Compare2JBlock:
cmp #$04
beq JBlockPicked
rts

JBlockPicked:
lda #$01
sta BlockNumber
lda Angle
cmp #$01
beq JBlockAngle0
cmp #$02
beq JBlockAngle90
cmp #$03
beq JBlockAngle180
cmp #$04
beq JBlockAngle270

JBlockAngle0:
jsr JBlock1
jsr detectKeys
jmp JBlockPicked

JBlockAngle90:
jsr JBlock2
jsr detectKeys
jmp JBlockPicked

JBlockAngle180:
jsr JBlock3
jsr detectKeys
jmp JBlockPicked

JBlockAngle270:
jsr JBlock4
jsr detectKeys
jmp JBlockPicked

JBlock1:
lda #$05
sta $201,y
sta $221,y
sta $241,y
sta $240,y
rts

JBlock2:
lda #$05
sta $200,y
sta $220,y
sta $221,y
sta $222,y
rts

JBlock3:
lda #$05
sta $201,y
sta $202,y
sta $221,y
sta $241,y
rts

JBlock4:
lda #$05
sta $221,y
sta $220,y
sta $222,y
sta $242,y
rts

Compare2LBlock:
cmp #$05
beq LBlockPicked
rts

LBlockPicked:
lda #$01
sta BlockNumber
lda Angle
cmp #$01
beq LBlockAngle0
cmp #$02
beq LBlockAngle90
cmp #$03
beq LBlockAngle180
cmp #$04
beq LBlockAngle270

LBlockAngle0:
jsr LBlock1
jsr detectKeys
jmp LBlockPicked

LBlockAngle90:
jsr LBlock2
jsr detectKeys
jmp LBlockPicked

LBlockAngle180:
jsr LBlock3
jsr detectKeys
jmp LBlockPicked

LBlockAngle270:
jsr LBlock4
jsr detectKeys
jmp LBlockPicked

LBlock1:
lda #$07
sta $201,y
sta $221,y
sta $241,y
sta $242,y
rts

LBlock2:
lda #$07
sta $240,y
sta $220,y
sta $221,y
sta $222,y
rts

LBlock3:
lda #$07
sta $201,y
sta $200,y
sta $221,y
sta $241,y
rts

LBlock4:
lda #$07
sta $221,y
sta $220,y
sta $222,y
sta $202,y
rts

Compare2SBlock:
cmp #$06
beq SBlockPicked
rts

SBlockPicked:
lda #$01
sta BlockNumber
lda Angle
cmp #$01
beq SBlockAngle0
cmp #$02
beq SBlockAngle90
cmp #$03
beq SBlockAngle180
cmp #$04
beq SBlockAngle270

SBlockAngle0:
jsr SBlock1
jsr detectKeys
jmp SBlockPicked

SBlockAngle90:
jsr SBlock2
jsr detectKeys
jmp SBlockPicked

SBlockAngle180:
jsr SBlock1
jsr detectKeys
jmp SBlockPicked

SBlockAngle270:
jsr SBlock2
jsr detectKeys
jmp SBlockPicked

SBlock1:
lda #$08
sta $221,y
sta $201,y
sta $222,y
sta $242,y
rts

SBlock2:
lda #$08
sta $221,y
sta $220,y
sta $202,y
sta $201,y
rts

Compare2ZBlock:
cmp #$07
beq ZBlockPicked
rts

ZBlockPicked:
lda #$01
sta BlockNumber
lda Angle
cmp #$01
beq ZBlockAngle0
cmp #$02
beq ZBlockAngle90
cmp #$03
beq ZBlockAngle180
cmp #$04
beq ZBlockAngle270

ZBlockAngle0:
jsr ZBlock1
jsr detectKeys
jmp ZBlockPicked

ZBlockAngle90:
jsr ZBlock2
jsr detectKeys
jmp ZBlockPicked

ZBlockAngle180:
jsr ZBlock1
jsr detectKeys
jmp ZBlockPicked

ZBlockAngle270:
jsr ZBlock2
jsr detectKeys
jmp ZBlockPicked

ZBlock1:
lda #$0c
sta $221,y
sta $241,y
sta $222,y
sta $202,y
rts

ZBlock2:
lda #$0c
sta $221,y
sta $220,y
sta $242,y
sta $241,y
rts

I've got some things that I need to accomplish:

  1. To make the blocks descend further
  2. To make the blocks fall gradually.
    I'd like to help on this. Thanks!

Warning if Unable to Branch

Currently if you try to branch to an address (that I presume is more than 128 bytes away, although I'm not positive on this exact number), the simulator will just jump to some high memory address and everything will eventually fail.

On a real 6502, I realize that this is expected behavior, however since this is a simulator, I think it would be beneficial to display a warning message in the log indicating that a too distant branch was attempted.

I can (as before) submit a PR after I have a chance to comb through the responsible code if you agree that this would be a good feature to add.

Syntax error not thrown when using improper addressing mode

Love your emulator; it's the perfect learning tool for 6502. On the note of learning, I managed to write some impossible 6502 and the assembler didn't throw a syntax error. :^)

  LDA #$01
  LDX #$01
  LDY #$00
loop:
  EOR X         ; Nope
  STA $0200,Y
  INY
  CPY #$10
  BNE loop

Assembled output:

0600: a9 01 a2 01 a0 00 4d ff ff 99 00 02 c8 c0 10 d0 
0610: f5 

Expected output:
An error message calling me silly names for writing that.

How to run the MD site

The README.md fails to say how to run the gh-pages site, would you mind responding as to how to do so? node's md-server isn't enough.

This is more of a question than an issue.

Firstly, I think this assembler is amazing and I love that I can mess with an app that is actually fun in my spare time. Now, I have been trying to move a pixel on the screen up, down, left, and right. Sounds easy enough, but the amount of bytes that the addresses can store is only so much and I can only move the pixel on the top section of the screen, Obviously! XD I know that this was the case back then with the 6502, but I was wondering how I could add to my atrocious code to make the pixel move all over the screen I just don't think that I am getting how all the addressing modes work, actually a bit of clarification on how indirect and indirect indexed addressing modes work would be greatly appreciated in the tutorials because they are kind of confusing the way they are worded, the rest is great though, good work.

`;$01 is color of pixel
;$02 is empty for color black
;$03 is color for up and down's X increment
;$04 is counter for next set of pixels
LDA #$01
STA $01
JMP input

reset:
LDA $03
DEC $03
CMP #$00
BNE reset
DEC $ff
CMP #$00
BEQ input

input:
LDA $ff
CMP #$77 ;UP
BEQ up
LDA $ff
CMP #$61 ;LEFT
BEQ left
LDA $ff
CMP #$73 ;DOWN
BEQ down
LDA $ff
CMP #$64 ;RIGHT
BEQ right
JMP input

up:
LDA $02
STA $01ff, X
DEX
LDA $03
ADC #$01
STA $03
CMP #$20

BNE up
LDA $01
STA $01ff, X
JMP reset

left:
LDA $02
STA $01ff, X
DEX
LDA $02
STA $01ff, X
LDA $01
STA $01ff, X
JMP reset

down:
LDA $02
STA $01ff, X
INX
LDA $03
ADC #$01
STA $03
CMP #$20
BNE down

LDA $01
STA $01ff, X
JMP reset

right:
LDA $02
STA $01ff, X
INX
LDA $02
STA $01ff, X
LDA $01
STA $01ff, X
JMP reset`

Copy & Pasting Into Simulator

Currently, when you copy and paste code overtop of existing code into the simulator, it does not recognize that the code has changed and leaves the assemble button greyed out.

I imagine this is something to do with the event you are using to detect changes in the textfield. Certain events aren't thrown for pasting.

Similarly, if you delete a character, the assemble button still remains grey. Again, this is likely because the event used to watch for changes in the code does not fire when non character-producing keys are pressed.

I can dig into the source and submit a PR if need be.

Thanks,
Bailey

STA instruction is troubemaker

I tried the tutorial and I noted a bug with STA instruction. This is an example from tutorial (##Indexed indirect: ($c0,X)###):

Address  Hexdump   Dissassembly
-------------------------------
$0600    a2 01     LDX #$01
$0602    a9 05     LDA #$05
$0604    85 0a     STA $0a
$0606    a9 06     LDA #$06
$0608    85 02     STA $02
$060a    a0 0a     LDY #$0a
$060c    8c 05 06  STY $0605
$060f    a1 00     LDA ($00,X)

First run, value $05 was written to address $0001. It is a bug:

A=$0a X=$01 Y=$0a
SP=$ff PC=$0611
NV-BDIZC
00110000

0000: 00 05 06 00 00 00 00 00 00 00 00 00 00 00 00 00 
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

RESET:

A=$00 X=$00 Y=$00
SP=$ff PC=$0600
NV-BDIZC
00110000

0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

Second run, note that value $05 is written to memory $000a: That is OK:

A=$a2 X=$01 Y=$0a
SP=$ff PC=$0611
NV-BDIZC
10110000

0000: 00 00 06 00 00 00 00 00 00 00 05 00 00 00 00 00 
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.