Jump to content
Sign in to follow this  
Dutchman2000

6502 assembly conversion help LDA#HIGH MYVEC

Recommended Posts

Hello-

 

I am currently trying to convert some old 6502 source code to compile with DASM. One of the commands keeps getting a syntax error and I can't figure out what to change it to.

 

The commands are currently:

 

LDA #HIGH MYVEC

 

LDA #LOW MYVEC

 

MYVEC is the label of a subroutine.

 

Anyone know the proper DASM conversion?

Share this post


Link to post
Share on other sites

I think DASM uses greater/less than symbols to break up a word. I'm surprised how difficult it's been to verify this with a quick Internet search, though...

 

try lda >myvec, lda <myvec.

Share this post


Link to post
Share on other sites

Thanks guys! That worked!

 

Another question, I know that DB converts to BYTE but does DW convert to WORD?

Share this post


Link to post
Share on other sites

I believe (again, I'm not 100% sure) that DASM supports dc.(type). So bytes are injected into the code with dc.b and words (saved little endian) with dc.w.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...