building own library with include-files?


Closed Thread
Results 1 to 26 of 26

Hybrid View

  1. #1
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Darrel,

    Darrel>>I'm sure I can come up with something for an example.

    But first, I'm preparing another program for the Code Examples forum that is somewhat similar. Except that it assigns variables to EEPROM instead of RAM.

    It uses some of the same concepts, yet is very different from doing it in RAM.<<

    I like the idea of using a label to access RAM or EEPROM... I guess I could write a Subroutine quite easily to accomplish this task to the EEPROM...Since all it is, is a Read/Write and a integer value placement of the EEPROM position. I am not good enough in PBP to know all the ins and outs of the language.

    Something simple such as:

    Pseudo Code:

    Placement var byte
    Value var byte

    for s= 1 to 100
    Placement = Random 5
    GoSub ReadRoutine
    LCDOUT Value
    next s

    ReadRoutine:
    Read Placement, value
    return


    Thus this will give a Pseudo kind of Variable Passing, and you can put the ReadRoutine in a Include statement of somekind. But this is kinda Hokey <g>

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Dwayne,

    Look te thread Embedded string in your codespace. It use MPASM DA directive to define labels. For the EEPROM we will use DE instead with few modification to the previous Macro... well per the book. I should have a look to this too.. one day

    It's interesting to set Labels to EEPROM when you use many Constants or Array OR if you just want to store Text String directly to the EEPROM and keep your codespace for what it's suppose to be, OR, ... OR, ... once again possibility are endless.

    I suggest to everyone to read and study the MPASM book. Really usefull stuff. i have a feeling about the popularity of this reading but...

    YES it use some assembler line, YES ASSEMBLER. But as i know, nobody died after using Assembler.
    Last edited by mister_e; - 21st September 2005 at 23:31.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    For your inspection,

    EEPROM Variables (EE_Vars.pbp)
    http://www.picbasic.co.uk/forum/showthread.php?t=2444
    <br>
    DT

  4. #4
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Darrel,

    Why don't you put a copy of this is in the FAQ section....
    Good stuff on these Macro's...

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  5. #5
    bot402's Avatar
    bot402 Guest


    Did you find this post helpful? Yes | No

    Default

    To quote

    "I do not like Delphi, because it is not as powerful as C/C++."

    This has to be one of the most idiotic statements I've read on this forum for a long time.

    Delphi is one of the most powerful languages that is available on the PC and in some cases far outways what can be done in C++ (it certainly produces smaller, faster code). Did you realise that a lot of Borland Builder C++ VCLs are written using the "inferior" Delphi language?

    It's C and C++ that is the sloppy language compared to Pascal (Delphi). Pascal was first written as a training aid, to show how a correctly formatted and structured program should be written. And to teach some discipline while writing, as opposed to C and C++ which has been created by comittee over the years and now has so many flavours and versions that the portability aspect has virtually dissapeared, unless it is a small set of functions or procedures.

    You've just insulted every Delphi user out there! even the professional programmers who use it to create programs that are simply staggering in their complexity.
    Last edited by bot402; - 22nd September 2005 at 15:07.

  6. #6
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Bot402,

    Dr>>"I do not like Delphi, because it is not as powerful as C/C++."

    Bot>>This has to be one of the most idiotic statements I've read on this forum for a long time.<<

    This is not a forum for fighting matches ;-}

    Bot>>Delphi is one of the most powerful languages that is available on the PC and in some cases far outways what can be done in C++ (it certainly produces smaller, faster code). Did you realise that a lot of Borland Builder C++ VCLs are written using the "inferior" Delphi language? <<

    I have programmed for 25 years... I have programmed in Delphi, C/C++, Pascal, Assembly, ADA, Basic, RPG, and a few others. I know what Delphi does, and I know what C/C++ does.

    Bot>>It's C and C++ that is the sloppy language compared to Pascal (Delphi).<<

    It is what some people call a sloppy language. Yes, I agree, but it is only sloppy, because it is up to the programmer and the programmers knowledge to control what the program is doing. As I said before, you can overwrite Memory space quite easily in C/C++... This can be a advantage on security issues as well as a disadvantage to those who are not able to write good code.


    Bot>> Pascal was first written as a training aid, to show how a correctly formatted and structured program should be written.<<

    Nothing new to me. I even have a few older versions of Pascal. I believe it is called Turbo Pascal 3 (the version I have), and maybe Turbopascal 5 before I stopped purchasing it. I liked Turbo C/C++ from Borland better, to each their own.

    Bot>>You've just insulted every Delphi user out there! even the professional programmers who use it to create programs that are simply staggering in their complexity.<<

    No, I Have not insulted every Delphi user out there. I have only stated facts... Dephi is great for its field, it is a much easier and MUCH more forgivng language than C/C++ is. Unless a person knows how to keep control of their memory, stacks, variables, and initializations, C/C++ is not going to be easy for them.


    This issue has been a long time running issue between the C/C++ and Delphi folks for years. <g>. The only thing I say ... To each their own. You like Delphi, (which I like also, and own 2 versions of it, and if I want to use it, I can click on the yellow 3 piller delphi32 icon and use it). I like C/C++ with or without the Builder, and own 5 versions of it. Thus it is my more preferred language to work with.

    I do like the way they integerated Delphi into the Builder though!...Thus Borlands Builder will accept Delphi's object code too, and compile it. (quite nice IMO). There are *more* Delphi Programmers than Bolands Builders C/C++ too. I think in time, they will be meshing Delphi and C/C++ Builder into one huge IDE/Progamming platform.

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  7. #7
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Thanks Dwayne.

    Why don't you put a copy of this is in the FAQ section....
    Well, from the number of "I can't get my PIC to blink an LED", and "How do I set the config Fuses" posts we still get here, apparently, nobody reads them.

    But, as long as this thread remains active, almost everyone will see it.<hr>

    Now then, to reiterate my post prior to the BOT bursting into flames.

    For your Perusal,

    EEPROM Variables (EE_Vars.pbp)
    http://www.picbasic.co.uk/forum/showthread.php?t=2444
    <br>
    DT

Similar Threads

  1. Continuous Interrupts when using DT_INTS and an INCLUDE file
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 15th January 2010, 21:42
  2. Can't seem to add AllDigital to the include files
    By ozarkshermit in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 12th November 2009, 04:21
  3. Missing 16F882 family include files :-(
    By campmdabt in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 27th December 2007, 01:17
  4. include files 8k limit
    By skimask in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th January 2006, 06:35
  5. Replies: 2
    Last Post: - 13th December 2005, 00:11

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts