Re: [cc65] Macros in ca65

From: Karri Kaksonen <>
Date: 2011-12-12 07:07:52
On 12/12/2011 01:03 AM, Ullrich von Bassewitz wrote:
> On Sun, Dec 11, 2011 at 10:02:07PM +0200, Karri Kaksonen wrote:
>> It would help me a lot to have at least most of the BLL macros
>> available. Right now I have to include BLL code as binary blobs.
>> Having similar macros would allow me to include them as source. It
>> would help a lot to make compilation carts this way.
> Why do you need them builtin instead of just an include file? How Lynx
> specific are they?
> Regards
>          Uz

Well, they should not be Lynx specific at all. I just hope someone would 
implement structural code like if, else, then, while, switch/case etc.

Here are some examples taken from my Ottelo asm game (a 1k programming 

FlipFlag ds 1

   .. code to do something
   _IFNE FlipFlag
     bra .loop

lda sound_channel_busy
   lda #<abcmusic0
   ldy #>abcmusic0
   ldx #0

cmp pos
   lda #CursorBkg
   lda #PegBkg

lda board,x
   lda #PlayerCol
_CASE #1
   lda #ComputerCol
   ... lots of code

   lda #2
   sta $fff9
   brk #0

cmp sound_channel_max_volume,x
   ; attack time
   adc abc_instrument_incr,x

lda length
   ... code
   dec length

For me it is not important that the commands have exactly this syntax. 
But I really hope to have a good set of structural macros available to 
make assembler coding easier for me. My thoughts are closer to 
structural C-programming than pure assembler. I understand my own code 
much better if I can use macros like these.

In normal coding I will stick to C. But sometimes I want to participate 
in 1k competitions and then it would be nice to be able to code 
efficiently in asm.


To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Dec 12 07:08:06 2011

This archive was generated by hypermail 2.1.8 : 2011-12-12 07:08:10 CET