It is currently Mon Dec 11, 2017 12:11 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: syntax
PostPosted: Sat Apr 01, 2006 7:05 pm 
Offline
User avatar

Joined: Wed Sep 07, 2005 9:55 am
Posts: 304
Location: Phoenix, AZ
what is the proper way to infer accumulator addressing. asl is used as an example:

asl
or
asl A


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 01, 2006 7:14 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19328
Location: NE Indiana, USA (NTSC)
A robust assembler should accept both 'asl' and 'asl a' and assemble them to the same opcode. A particular assembler might accept one or the other; read its documentation. Which assembler are you working with?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 01, 2006 7:18 pm 
Offline
User avatar

Joined: Wed Sep 07, 2005 9:55 am
Posts: 304
Location: Phoenix, AZ
im wrting an assembler and i was just wondering if both were valid or just one.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 01, 2006 7:45 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19328
Location: NE Indiana, USA (NTSC)
The assembler I use most often (ca65) accepts at least 'asl a', and this appears to be the official syntax, but the Apple mini-assembler used 'asl'. I'd recommend following Postel's law by accepting both syntaxes; it won't hurt anything.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 01, 2006 8:53 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
I personally prefer "ASL A" as it distinguishes between Accumulator mode and Implied mode (ASL obviously isn't an implied instruction, therefore in my mind it would need the following 'A' to indicate Accumulator mode)

However from an assembler point of view -- I'll have to agree with what's been said. Just accept both.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 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