16 lines
350 B
NASM
16 lines
350 B
NASM
; basic.s - Simple 6502 assembly example for cc65
|
|
|
|
.segment "CODE"
|
|
.proc main
|
|
; Initialize some registers
|
|
ldx #0 ; X = 0
|
|
ldy #10 ; Y = 10
|
|
|
|
loop:
|
|
inx ; Increment X
|
|
dey ; Decrement Y
|
|
bne loop ; Branch if Y not equal to 0
|
|
|
|
rts ; Return from subroutine
|
|
.endproc
|