www.retrosoftware.co.uk
http://www.retrosoftware.co.uk/forum/

Some suggestions
http://www.retrosoftware.co.uk/forum/viewtopic.php?f=17&t=537
Page 1 of 1

Author:  tautology [ Wed Nov 17, 2010 1:26 am ]
Post subject:  Some suggestions

All of these are not required, just nice to haves. I quite like BeebAsm, it reminds me of Script Assembler, an ARM assembler that I coded back in the day, but never released (I've still got the source somewhere).

Anyway; some nice to haves:
  • = as a synonym for equb (a common thing in the ARM world)
  • A macro facillity, e.g. if I have a piece of code I use commonly, for example 16 manipulation, we can have:
    Code:
    macro add16(location,value)
       if value
          lda location
          adc #value
          sta location
          bcc next
       else
          inc location
          bne next
       endif
       inc location+1
       .next
    endmacro
  • function prototypes, not a real function, but a more convenient way of setting up a jsr, for example
    Code:
       findmessage('A',messageblock)
       ...
       ; Accumulator = message
       ; X = buffer lo
       ; Y = buffer hi
       def findmessage(A,YX)
          ; code goes here
       enddef

    This would compile to be:
    Code:
       lda #'A'
       ldx #messageblock MOD 256
       ldy #messageblock DIV 256
       jsr findmessage

I'll probably think of more...

Author:  RichTW [ Mon Apr 25, 2011 5:17 pm ]
Post subject:  Re: Some suggestions

Hey... yeah, I hadn't realised you'd also requested macros :)

Anyway BeebAsm 1.05 should do the trick. Your second request is kinda redundant I think, as it can be done with macros just as easily -

Code:
MACRO FINDMESSAGE char, block
    LDA #char
    LDX #LO(block)
    LDY #HI(block)
    JSR findmessage
ENDMACRO
Code:
FINDMESSAGE 'A', messageblock

Hope this works ok for you!

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/