Jump to content
IGNORED

XASM Question


Cybergoth

Recommended Posts

Hi there!

 

Asumming I did something like:

 

ORG $F000

 

LDA #$42

STA $80

 

ORG $F100

 

LDA #$77

STA $81

 

How could XASM generate one solid output block, with the space between $F003 and $F100 not skipped, but for example filled with $FF?

 

Greetings,

Manuel

Link to comment
Share on other sites

quote:


Originally posted by Fox/TQA:

ORG $F000

 

LDA #$42

STA $80

 

:$F100-* DTA $FF

 

LDA #$77

STA $81


 

Ah, I see. I'll try that.

Thanks.

 

Could you imagine adding some dort of a raw binary 'assemble to cartridge mode' to XASM, which would do this automatically?

 

Greetings,

Manuel

 

[ 06-10-2002: Message edited by: Cybergoth ]

Link to comment
Share on other sites

quote:


Originally posted by Fox/TQA:

There are several problems like: at what address the cart starts, what size it is, etc.

I don't think replacing orgs with
:x
-* dta is so problematic.


 

Well, that's all easy:

 

The cart starts at the first org where output is generated and ends after the last byte.

 

It's not too problematic to do the :x-* dta thing, you're right. But consider that a lot of data in 2600 VCS games needs to be aligned to pages and it's no fun job to deal with stuff like this everytime you change some code, when actually the assembler could do this work for you.

 

Greetings,

Manuel

 

[ 06-10-2002: Message edited by: Cybergoth ]

 

[ 06-10-2002: Message edited by: Cybergoth ]

Link to comment
Share on other sites

Hi there!

 

Just found another oddity:

 

XASM won't accept neither:

 

dta [less than]start, >start

 

nor:

 

dta start ;(word)

 

but:

 

dta [less than]start

dta >start

 

 

 

Greetings,

Manuel

 

[ 06-10-2002: Message edited by: Cybergoth ]

 

[ 06-10-2002: Message edited by: Cybergoth ]

Link to comment
Share on other sites

The cart starts at the first org where output is generated and ends after the last byte.

Ok, what byte use to fill ($FF or $00) ?

 

Hi Fox!

 

To be compatible with DASM it should best be $FF.

Thanks for the tip with the missing space.

 

BTW: Thanks a lot to your help, I got everything going with XASM last night, here's a ZIP that containes the XASM compatible source of my Atari 2600 VCS game Gufight:

 

http://www.biglist.com/lists/stella/archiv...06/zip00000.zip

 

Greetings,

Manuel

Link to comment
Share on other sites

  • 1 month later...

Hi Fox!

 

I've been busy last days...

Gunfight is cool!!  8)

 

Thanks for that...

 

There are new options in xasm, see http://xasm.atari.org

 

... and thanks for that!!!

 

I'll start toying around with it soon!

 

Hm... since you seem to be somewhat supportive towards us poor 2600 developers, maybe I should start thinking about more features, to make live easier for us... :D

 

No, really - if you ever get bored with other stuff, tell me and I'll post you parts of my wishlist for the perfect 6502 assembler with 2600 support! :)

 

Greetings,

Manuel

Link to comment
Share on other sites

I'm not bored, but I'd like to see it now (just curious). :)

 

Uhm... ok. You asked for it :D

 

Here's two for example:

 

This is a sprite of a 2600 game, the number '7':

 

.byte $18 ; ...xx...

.byte $18 ; ...xx...

.byte $18 ; ...xx...

.byte $0C ; ....xx..

.byte $06 ; .....xx.

.byte $42 ; .x....x.

.byte $7E ; .xxxxxx.

 

As you can see, it is turned upside down. That is,

because it is displayed with a decrementing loop to save

cycles. Now I thought it'd be cool to have some

assembler directive like that:

 

.VERTSWAP

.byte $7E ; .xxxxxx.

.byte $42 ; .x....x.

.byte $06 ; .....xx.

.byte $0C ; ....xx..

.byte $18 ; ...xx...

.byte $18 ; ...xx...

.byte $18 ; ...xx...

.VERTSWAPEND

 

So one could *paint* the graphics as one sees them and

the compiler would turn it upside down. When I now for

any reason switch to an incrementing loop, all I'd have

to do was deleting the directives.

 

The second thing is similar:

 

The Atari 2600 VCS has registers that are read in reversed order.

(Only god knows why... :roll: )

 

To get the '7' to display there, you'd have to make your

data look like this:

 

.byte $7E ; .xxxxxx.

.byte $42 ; .x....x.

.byte $06 ; .xx.....

.byte $0C ; ..xx....

.byte $18 ; ...xx...

.byte $18 ; ...xx...

.byte $18 ; ...xx...

 

It'd of course be cool to have some directive like this:

 

.HORSWAP

.byte $7E ; .xxxxxx.

.byte $42 ; .x....x.

.byte $06 ; .....xx.

.byte $0C ; ....xx..

.byte $18 ; ...xx...

.byte $18 ; ...xx...

.byte $18 ; ...xx...

.HORSWAPEND

 

Which would make the assembler horizontally reverse every byte.

 

Best would be of course if you could even combine .VERTSWAP and

.HORSWAP :D

 

Well, my wishlist for the perfect assembler is longer of course, but it should do for a start :)

 

Other strange things I'm wondering, include amongst others why all pure accumulator targeting opcodes like 'LSR' for example would need an '@' as operator, when using XASM as compiler. Most other compilers I know recognise themselves that a plain 'LSR' is targeting the accumulator and don't force one to type that useless byte all the time :)

 

Greetings,

Manuel

Link to comment
Share on other sites

hehehehe...manuel...

 

the 1st question i raised to fox in 1997 was... why the f... LSR @ instead of LSR??? i guess one reason was backwards compatibility to Quickass on atari 8bit.... but i thought it is now possible to have lsr without the @...

 

it drives you mad when importing/converting sources from other assemblers...

 

another wishlist is to have labels in oneline without a command...

f.e.

 

loop:

lda #00

...

dex

bne loop

 

there are other small things...but when you are familiar with...it is ok...

 

hve

Link to comment
Share on other sites

If it's compatible with DASM I might use it, else to many sources wouldn't work anymore.

 

I think that's be quite some work to do for fox.

 

XASM is an excellent assembler, offering all DASM does and probably way more. It's just: Some things are handled a little different.

 

For example, DASM does STA.w and XASM does STA a:

 

If fox'd change that, all other 8-Bit Atari stuff wouldn't work anymore.

Only maybe, if he could just 'add' what we are used too, i.e. offering both ways.

 

On the other hand, it took me less than an hour with Textpads 'Search & Replace' to make Gunfight compile into a BIN that matches 1:1 the DASM one.

 

And Fox already added a 'Raw BIN' switch, so that we can work with ORGs as usual. -> See the beginning of this thread.

 

The cool thing about using XASM would be, that from then on all Atari 8-Bit programmers could use the same assembler, no matter if they're targetting the 2600, 5200, 7800 or the 8-Bitters.

 

The other cool thing is of course that XASM is *living* wheras DASM is *dead* since '93...

 

Greetings,

Manuel

Link to comment
Share on other sites

For example, DASM does STA.w and XASM does STA a:

 

If fox'd change that, all other 8-Bit Atari stuff wouldn't work anymore.

Only maybe, if he could just 'add' what we are used too, i.e. offering both ways.

That would be ok for me.

 

On the other hand, it took me less than an hour with Textpads 'Search & Replace' to make Gunfight compile into a BIN that matches 1:1 the DASM one.

Ok, but who will convert all the various sources spread around the web (e.g. The Dig! and Stella Archive)?

 

The other cool thing is of course that XASM is *living* wheras DASM is *dead* since '93...

Sure, but we have the source, and we have added "illegal opcodes" quite recently. Not really dead, I would say. :)

Link to comment
Share on other sites

Hi Thomas!

 

Ok, but who will convert all the various sources spread around the web (e.g. The Dig! and Stella Archive)?

 

Oh. I think the sources *worth* to be converted will be there & ready rather quick. And we'd possibly get rid of tons of useless crap for free :D

 

I even think just porting all available reverse-engineerings would be good enough for a start. Every homebrew author spending another hour converting his own source, and we'd be done for the most.

 

Sure, but we have the source, and we have added "illegal opcodes" quite recently. Not really dead, I would say. :)

 

Well, you know that there's this strange license of DASM and the copyright owner of it is long gone.

 

But here is XASM, a living assembler in the hands of the guy who originally wrote it, who can just legally release a bugfix or update any time. He is *here* and talking with us and, most of all - he's using the assembler himself, so he'll probably understand certain needs and suggestions more than most other people.

 

Greetings,

Manuel

Link to comment
Share on other sites

Oh. I think the sources *worth* to be converted will be there & ready rather quick. And we'd possibly get rid of tons of useless crap for free :D

That might be a good point. :)

 

I even think just porting all available reverse-engineerings would be good enough for a start. Every homebrew author spending another hour converting his own source, and we'd be done for the most.

Most of those authors are on the Stella Mailing List, so as soon as XASM fits our needs and the most annoying syntax differences are gone, then we should ask them to convert their sources. Or maybe somebody can write a converting macro?

 

Well, you know that there's this strange license of DASM and the copyright owner of it is long gone.

I've simply ignored that. :)

 

But here is XASM, a living assembler in the hands of the guy who originally wrote it, who can just legally release a bugfix or update any time. He is *here* and talking with us and, most of all - he's using the assembler himself, so he'll probably understand certain needs and suggestions more than most other people.

I think, being experienced as you are, you can handle all the standard stuff with XASM. And when that is finished, I'll step in and might make some minor additional suggestions. ;)

Link to comment
Share on other sites

the 1st question i raised to fox in 1997 was... why the f... LSR @ instead of LSR??? i guess one reason was backwards compatibility to Quickass on atari 8bit.... but i thought it is now possible to have lsr without the @...

 

Atari Macro Assembler, I used years ago, used LSR A syntax. I'm not sure about MAC 65, wasn't it LSR A too? Of course it is the poorest possible syntax (consider a label named A).

@ is Quick Assembler syntax. Unfortunately I can't simply support LSR without @, because QA's standard is that no special character is required for a comment. So you can write:

lda #0 a comment comes here

It's not that bad, because that's whythings like that work:

lda:tax #0

I can think of adding another option, that would turn "standard" mode: comments must be preceeded by ';', and then you might have your LSR without @ (anyway, I don't think it's better, you might not meant acc mode, but just forget an argument ;) ).

 

it drives you mad when importing/converting sources from other assemblers...

 

another wishlist is to have labels in oneline without a command...

f.e.

 

loop:

  lda #00

  ...

  dex

  bne loop

 

It works and I use it all the time. Just skip ':'. :)

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...
  • Recently Browsing   0 members

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