PDA

View Full Version : macros tutoria



asterix
- 2nd May 2005, 19:39
Hi,

Thanks for read my question. I want to program some macros for mi own picbasic programs, but I don't know how to declare it an in which types of files included (*.INC; *.ASM; *.BAS), if anyone knows some tutorial o where get some information, i will be very gracefull.

Thanks

EDWARD
- 4th May 2005, 10:09
what do you mean macro?

you can use subroutines to execute differnt things.

program code idea *this is not a program
'---------------------------------------------------
GOSUB light
PAUSE 1000 '1 sec

GOSUB motor
PAUSE 1000

END


light:
high portb.0 'energize LED on pin portb.0
RETURN 'go back to line just below GOSUB light

motor:
high portb.1 ' energize MOTOR on pin portb.1
RETURN 'go back to line just below GOSUB motor

'--------------------------------------------------------

or do you mean like the configuration file?