I have just started learning 6502 Assembly and am not yet well versed. I have attempted to run a test program to check my dev environment is set up correctly, however I get an error with a particular program I am not sure what to do about. Code follows:
Code: Select all
.segment "HEADER"
.byte $4e, $45, $53, $1a, $02, $01, $00, $00
.segment "CODE"
.proc irq_handler
RTI
.endproc
.proc nmi_handler
RTI
.endproc
.proc reset_handler
SEI
CLD
LDX #$00
STX $2000
STX $2001
vblankwait:
BIT $2002
BPL vblankwait
JMP main
.endproc
.proc main
LDX $2002
LDX #$3f
STX $2006
LDX #$00
STX $2006
LDA #$29
STA $2007
LDA #%00011110
STA $2001
forever:
JMP forever
.endproc
.segment "VECTORS"
.addr nmi_handler, reset_handler, irq_handler
.segment "CHARS"
.res 8192
.segment "STARTUP"
Code: Select all
ld65: Warning: C:\cc65\cfg/nes.cfg:18: Segment 'VECTORS' overflows memory area 'ROMV' by 6 bytes
ld65: Error: Cannot generate most of the files due to memory area overflow
The terminal process "C:\Windows\SysNative\WindowsPowerShell\v1.0\powershell.exe -Command C:\cc65\bin\cl65 "c:\NESDev\ExampleCode\AssemblyCrashCourse-main\examples\Helloworld.asm" --verbose --target nes wrapper.s" terminated with exit code: 1.
The program was taken from the Famicom party book found here: https://famicom.party/book/03-gettingstarted/