• Advertisement
  • entries
    222
  • comments
    608
  • views
    589256

Intelligent macro-matching, VS icon nicking

Sign in to follow this  

858 views

Brass has got a new macro preprocessor, that hopefully makes the work of people writing things like the macro-driven TI ASM API easier, and will generate less redundant code.
TASM only supports simple find-and-replace macros; so, for example:
#define draw_sprite(x,y,sprite) ld a,x\ ld b,y\ ld hl,sprite\ call put_sprite

draw_sprite(10,43,my_sprite)
; Generates the following:
ld a,10
ld b,43
ld hl,my_sprite
call put_sprite

draw_sprite(a,43,hl)
; Generates the following:
ld a,a ; Rubbish!
ld b,43
ld hl,hl ; Not going to work...
call put_sprite


Brass, however, supports more intelligent macros - like this example shows. It will switch between a variety of different macros, depending on the arguments passed in.

Latenite is still in development - nothing particularily visible, barring the new tooltips and worrying familiar icons.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement