i using mplab and PICBASIC-PRO2.4.....and where i should i put the ASM file..
;----[Turn the Subroutines into Functions]----------------------------------
ASM
#Get2D macro X, Y
MOVE?BB X, _Xidx ; copy users X value to Xidx
MOVE?BB Y, _Yidx ; copy users Y value to Yidx
L?CALL _Get2D ; call the Get subroutine
endm ; value is returned in ArrayData
#define Get2D(X, Y) #Get2D X, Y ; allows paretheses in macro
;-----------------------
#Put2D macro X, Y ; value should be in ArrayData
MOVE?BB X, _Xidx ; copy users X value to Xidx
MOVE?BB Y, _Yidx ; copy users Y value to Yidx
L?CALL _Put2D ; call the Put subroutine
endm
#define Put2D(X, Y) #Put2D X, Y ; allows paretheses in macro
;-----------------------
#Clear2D macro
L?CALL _Clear2D ; call the Clear subroutine
endm
#define Clear2D() #Clear2D
ENDASM
Bookmarks