It is currently Wed Dec 13, 2017 6:20 am

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: help me ca65 for snes
PostPosted: Sat Aug 26, 2006 3:48 pm 
Offline
User avatar

Joined: Tue May 30, 2006 10:11 am
Posts: 29
x816
.mem
.index

Ca65 Without these instructions!
help me!

example:
ldx #lable

error: range over


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 26, 2006 4:07 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19335
Location: NE Indiana, USA (NTSC)
The NES has a 6502, not a 65C02 or 65C816. Put the .p02 keyword at the top of source to specify that you are coding for a 6502.

The 6502 has only 8-bit registers. You'll need to load an address into two labels, using the < (get bits 7-0) and > (get bits 15-8) operators:
Code:
  lda #<label
  sta 0
  lda #>label
  sta 1
  ldy
  lda (0),y


If you want Super NES help, please ask in SNESdev.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 26, 2006 8:18 pm 
Offline
User avatar

Joined: Tue May 30, 2006 10:11 am
Posts: 29
Ca65 support 65816 !
"all valid 65618 mnemonics when in 65816 mode (after the .P816 command was given)."

B:\SFC开发>.\bin\ca65 --cpu 65816 demo.asm
demo.asm(14): Error: Range error (4660 not in [0..255])


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 26, 2006 8:57 pm 
Offline
User avatar

Joined: Tue May 30, 2006 10:11 am
Posts: 29
I already solved!
.A16
.A8
.I16
.I8


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Stef and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group