I an trying to write a macro to replace several PBP statements.
I want to replace this:

Code:
gl_x1 = 30
gl_y1 = 45
gl_x2 = 60
gl_y2 = 45
gosub gl_line
with this:
Code:
@ glcdline(30,45,60,45)
using this macro:

Code:
ASM	; glcdLine	'@ GLCD_line x1,y1,x2,y2
#glcdline	macro x1,y1,x2,y2
		MOVE?WW x1, _gl_x1
		MOVE?WW y1, _gl_y1
		MOVE?WW x2, _gl_x2
		MOVE?WW y2, _gl_y2
        L?CALL _gl_line
		endm
#define glcdline(x1,y1,x2,y2)  #glcdline x1, y1, x2, y2  ; allows paretheses in macro
ENDASM
all vars are words.

The PBP code works giving me a cross centered at x=45 y=45

the macro gives me horizontal and vertical line of full screen size crossing about x=10, y = 10

Thanks

Dave