New Version Of DASM released 7 April 2008

You need an actual VIC.

Moderator: Moderators

Post Reply
Richard James
Vic 20 Devotee
Posts: 269
Joined: Mon Feb 04, 2008 6:06 am

New Version Of DASM released 7 April 2008

Post by Richard James »

We just released the first update to DASM in 4 years, DASM 2.20.11! A lot of things are new about this release, including a slightly more Unix-oriented distribution (that can still be built in Windows). Several bugs have been fixed, several features have been added, see the extensive NEWS and ChangeLog files for details. We hope this release will convince everybody that DASM is alive and kicking.
Quote from http://sourceforge.net/forum/forum.php?forum_id=808727

Download page http://sourceforge.net/project/showfile ... _id=222381

Project Page http://dasm-dillon.sourceforge.net/
Change is inevitable except from a vending machine.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Interesting. I'll have to check that out later. Perhaps it is time to propose the vararg macros, and try to find a reliable implementation. I hacked my own DASM to accept macros with a variable number of arguments but am not sure my way of doing it is so good.
Anders Carlsson

Image Image Image Image Image
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

Someone has compiled the sources for DOS/win ?
Mega-Cart: the cartridge you plug in once and for all.
Richard James
Vic 20 Devotee
Posts: 269
Joined: Mon Feb 04, 2008 6:06 am

Post by Richard James »

nbla000 wrote:Someone has compiled the sources for DOS/win ?
I have compiled a version for WinXP this might work on older versions of Windows. It is on my website.
Plus here is a direct link.
http://richardjames13.110mb.com/vic20/d ... .11-XP.zip
Hopefully it does not set your dog on fire or anything. PM me if you have troubles.
It will not work in DOS, I don't have a compiler/target for DOS or Windows 9x. Getting one would take me a while I forget what the name of the compiler was dgpp or something.
Change is inevitable except from a vending machine.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

I think you mean djgpp. Which compiler did you use: MinGW gcc, Cygwin, Visual Studio, other compiler? I'm quite sure MinGW gcc generates binaries that run in all Win32 environments, including the command shell while running inside the Windows OS.
Anders Carlsson

Image Image Image Image Image
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

Thanks for binary.
Mega-Cart: the cartridge you plug in once and for all.
Six
Vic 20 Newbie
Posts: 1
Joined: Sat Nov 19, 2005 9:55 pm

Post by Six »

8) SWEEET!

Now if only we could get 65816 processor support, it'd be the only assembler you ever need.
Richard James
Vic 20 Devotee
Posts: 269
Joined: Mon Feb 04, 2008 6:06 am

Post by Richard James »

carlsson wrote:I think you mean djgpp. Which compiler did you use: MinGW gcc, Cygwin, Visual Studio, other compiler? I'm quite sure MinGW gcc generates binaries that run in all Win32 environments, including the command shell while running inside the Windows OS.
Yes djgpp that is it's name. http://www.delorie.com/djgpp/
I used for the record
"Dev-C++ 5.0 beta 9.2 (4.9.9.2) with Mingw/GCC 3.4.2"
Hey maybe I should put that on my web page :wink:
Change is inevitable except from a vending machine.
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Post by nippur72 »

Is there any way to make macros recognize the type of parameters? For example if I want to write a MOV macro, how can I set different code for

MOV a, #$00 ; a meaning accumulator

and

MOV $100, #$00

something like this:

Code: Select all

mac MOV
   if {1} is accumulator then
      lda {2}
   else 
      lda {2}
      sta {1}
   end if
endm
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Perhaps if {1} == "a" ?

In my music player, I wrote macros such as these:

Code: Select all

mac block
if ({2} > 6 || {3} > 1)
.byte {1}+224,{2}+({3}-1)*16
else
.byte {1}+({2}*32)
endif
endm
It is not quite what you ask about, but perhaps arguments to a macro can be compared in more ways than numeric.
Anders Carlsson

Image Image Image Image Image
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Post by nippur72 »

carlsson wrote:Perhaps if {1} == "a" ?
it works only if you call it with: MOV "a", $00

if you remove the quotes it still looks for an 'a' symbol.

I think in a 6502 assembler the symbols a,x,y should be reserved for keywords usage.

I am dreaming of an assembler where you can specify the type of data (byte, word, long and float) and have macros behave accordingly in different ways.

For example it would be nice to extend the istruction set to floating point support, e.g.:

Code: Select all

MOV FAC, 2.0
MUL FAC, 3.14
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

There is a Channel F extention to DASM, and a planned one for Atari 2600 too. Your suggestions about floating point in particular would be Commodore extentions, as other 6502 computers may not implement floating point in the same way or at least not have a FAC as the VIC and 64 have.

I suppose you'd have to traverse into the source code to implement more advanced changes. I get the feeling that the literal a without quotes gets translated into a label reference (i.e. an address) when you assemble a such macro. Therefore, you could try something like this:

a eqm $10000 ; outside of memory range

mac mov
if {1} = a then ...
endmac

code:
mov a,65
mov 7168,81
...

I haven't verified this approach at all, but it may be worth checking.
Anders Carlsson

Image Image Image Image Image
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Post by nippur72 »

...and there's a way to tell if the parameter is indirect or immediate ("#" symbol)...? e.g. how to tell the difference between

mov a, #81

and

mov a, 81

so that differnent code is triggered ? (am I asking too much?)

I'm writing DASM macros for floating point support, just to make easier the coding of complex math formulas. BTW, I just discovered that the float data type in CBM Basic is 5 bytes and not 4 as I supposed. Nice discover!
Post Reply