Jump to content
IGNORED

Source code conversion between assemblers help


Recommended Posts

I have an unnamed assembler source code that I am trying to convert to MADS. The problem is I am new to MADS. What experience I've had with assembly language on the Atari 8bit was with the MAC/65.

There's a splash screen that displays until the program completely loads, then the main program starts. I've isolated the transition to this code snippet.

*= $02E2
.word ADVERT
;
*= $02E0
.word MAIN

 

How would I do this in MADS?

Link to comment
Share on other sites

I think the * represents the current address, so that is the equivalent of an ORG statement.
I don't use MADS but it may expect .org or .ORG
The .word statements may be labels or variables.
So it could be like this:
.org $02E2
.word ADVERT
;
.org $02E0
.word MAIN

or like this. I've had people ask me why I use the colons, so those can probably be omitted. Just a habit I started with another assembler that most don't seem to mind.


.org $02E2
ADVERT:
;
.org $02E0
MAIN:

Link to comment
Share on other sites

The other differences are:

 

sed 's/asl\.w/aslw/' |\
sed 's/rol\.w/rolw/' |\
sed 's/lsr\.w/lsrw/' |\
sed 's/ror\.w/rorw/' |\
sed 's/ASL\.W/aslw/' |\
sed 's/ROL\.W/rolw/' |\
sed 's/LSR\.W/lsrw/' |\
sed 's/ROR\.W/rorw/' |\
sed 's/asl a/asl/' |\
sed 's/asl A/asl/' |\
sed 's/lsr a/lsr/' |\
sed 's/rol a/rol/' |\
sed 's/ror a/ror/' |\
sed 's/ror A/ror/' |\
sed 's/ROR A/ror/' |\
sed 's/\.include#\(.*\)/icl \"\1\"/' |\
sed 's/\.sbyte "/dta d"/' |\
sed 's/\.SBYTE "/dta d"/' |\
sed 's/\.byte >display\+ \(.*\)/.byte \>(display\1)/' |\
sed 's/\.byte <display\+ \(.*\)/.byte \<(display\1)/' |\
sed 's/.*\.opt .*//' |\
sed 's/.*\.OPT .*//' |\
sed 's/\[/(/g;s/\]/)/g'
  • Like 1
Link to comment
Share on other sites

@Pirx: Nice

 

Check out the section in the WUDSN IDE FAQ. Describes it for ATASM which is MAC/65 compatible.

 

http://www.wudsn.com/index.php/ide/faq#Compiling

 

Esp. notable is the difference in using single/double quotes. Maybe that's in Pirx' magic script, too - I don't speak SEDish :-)

Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...