PDA

View Full Version : Is modedefs.bas still required for pbp3 ?



longpole001
- 19th July 2014, 00:52
just looking to trim stuff from programs that may not have the need for the files and wondered if the modedefs.bas is required for pbp3 still ?

Demon
- 19th July 2014, 02:07
I'm still on 2.60C and haven't used it.

Robert

EDIT: When I use a segment of code that uses it, I just copy the specific variables in my program.

Archangel
- 19th July 2014, 02:50
Modedefs.bas is just a file full of alias s and is not required at all. You could write the particular alias or just learn which mode to use, or look it up.

longpole001
- 19th July 2014, 05:17
i have included it for shiftin/out and some serial stuff , adding the alisis can be done in the program , but by including it does the same , but if pbp3 has these built in then i can drop the alias lists

EarlyBird2
- 19th July 2014, 05:50
i have included it for shiftin/out and some serial stuff , adding the alisis can be done in the program , but by including it does the same , but if pbp3 has these built in then i can drop the alias lists

From the manual for PBP3


The Mode names (e.g. MSBPRE) are defined in the file MODEDEFS.BAS. To use them, add the line:
Include "modedefs.bas"
to the top of the PICBASIC PRO program.

which tells us that they are not included in PBP3. As Archangel said in #3 use the mode numbers instead of the mode alias to save space.

Archangel
- 19th July 2014, 19:07
I am not certain using the mode numbers will change the size of the compiled code by much or any, it will reduce the source code size. I simply have not compared them.

HenrikOlsson
- 20th July 2014, 06:33
Hi,
The file does not contain any runtime code what so ever. Including it does in no way change the size of generated .hex file so there's nothing to be gained by not including it if you're aiming to reduce the footprint of the actual .hex

/Henrik.

longpole001
- 20th July 2014, 23:24
thanks guys