[cc65] Version 2.5 final beta available

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2000-07-15 13:32:49


									  
I have copied the final beta for version 2.5 cc65-sources-beta-2.5-03.tar.gz
to the ftp server a few minutes ago. The new version is feature complete. This
means I will not add any new features, just fix bugs if there are any new
ones.

The differences to beta-02 are:

  a. New GEOS resource compiler code from Maciek.

  b. Added GEOS documentation and GEOS sample code, included new versions
     from Maciek.

  c. More token handling function for the assembler.

  d. Some other, minor changes.


With the new functions mentioned under c., it is now possible to write macros
that look like real instructions. One problem with macros implementations for
common 6502 assemblers is that they don't handle this stuff very well. As an
example, have a look at the following ldax macro, that loads a 16 bit value
into a/x. Without the new features, it must be implemented several times under
different names, to get different addressing modes right:

	; ldax immidiate
	.macro	ldaxim	arg
		lda	#<(arg)
		ldx	#>(arg)
	.endm

	; ldax absolute
	.macro	ldaxabs	arg
		lda	(arg)
		ldx	1+(arg)
	.endm

Now you can do things like this with the builtin functions, which make use of
the macro much more intuitive:

	; ldax implementation for immidiate and absolute loads
	.macro	ldax	arg

 		.if (.match(.left(1,arg), #))
		; Immidiate addressing
		lda	#<(.right (.tcount (arg)-1, arg))
	 	ldx	#>(.right (.tcount (arg)-1, arg))
		.else
       	       	; Absolute addressing
		lda	arg
		ldx	1+(arg)
		.endif

	.endm

This allows use of the macro as

	ldax	#1234
or
  	ldax	$1234

Of course a real implementation would have better error checking and more
features in the macro itself (using lda/tax if low and high byte are identical
for example), the version used above is very simple to show the concept.

---

One thing to note is that I have been very careful with more builtin
functions. It is easy to find more functions that seem to be required.
Unfortunately, it is far easier to add new functions, than to remove them once
they are in use. I cannot foresee every use of the new token handling
functions (which are some sort of programming language inside the assembler),
and there seem to be a few problems that should get addressed in the future if
they cause real pain (you will find one these inconsistencies of you try to
add indirect Y addressing to the macro above). So I will wait until I get some
feedback before adding more such stuff.

This is also the reason, I did not add a .REPEAT instruction as promised. On
one side, .REPEAT is easily emulated using recursive macros, so there's no
*real* need for it. On the other side, having a real implementation would have
involved adding mutable symbols (which are const right now). I'm not sure
about all consequences of having mutable symbols, so I delayed this until it
is proven that there is a definite need for it.

---

The beta package includes the full GEOS docs from Maciek, so you should be
able to write GEOS programs with it without any need for other packages. For
this reason I have removed the GEOSLib archive on the FTP server. The same is
true for the Atari stuff (which was already in a working state in the last
beta).

The only open stuff for the final 2.5 release are fixes for two known problems
in the library. Once this is done, I will release version 2.5. So keep the
feedback coming:-)

Have fun!


   	Uz


--
Ullrich von Bassewitz                                  uz_at_musoftware.de



---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:36 CET