It is currently Mon Oct 20, 2014 4:01 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Some suggestions
PostPosted: Wed Nov 17, 2010 1:26 am 
Offline
 Profile

Joined: Sat Sep 04, 2010 5:28 pm
Posts: 92
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...


Top
 
 Post subject: Re: Some suggestions
PostPosted: Mon Apr 25, 2011 5:17 pm 
Offline
User avatar
 Profile

Joined: Mon Jan 07, 2008 6:46 pm
Posts: 380
Location: Málaga, Spain
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!


Top
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron