6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 16, 2024 5:54 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: help me!
PostPosted: Mon Jun 13, 2005 9:52 am 
Offline

Joined: Sat Jun 11, 2005 11:58 am
Posts: 2
why?

error:
let .macro num1,num2
lda num2
sta num1
.endm

.org $5500
let $40,#$65

right:
let .macro num1,num2
lda #num2
sta num1
.endm

.org $5500
let $40,$65

If the first one is right,that is very useful.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Jun 13, 2005 1:56 pm 
Offline

Joined: Tue Mar 09, 2004 3:43 pm
Posts: 44
Location: Bristol, UK
Looks like your assembler is interpreting the macro arguments numerically, instead of making a verbatim text substitution. So, the "#" makes a syntax error in the first case but is legal in the second. I'd have expected an assembler to use simple text substitution in a macro, but perhaps that's not how this one works.

Could you tell us which assembler you're using, please? And could you also show us the complete error message that you got from the assembler?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jun 14, 2005 1:14 am 
Offline

Joined: Sat Jun 11, 2005 11:58 am
Posts: 2
Oh,I am using "6502 Macroassembler & Simulator "
I downloaded it's source code and wanted to change it,but my C++ is very poor~~


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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: