Farba Research Product Examples

On this page we provide some samples of our work. We do a lot of consulting, and obviously we cannot show samples of that here. Therefore, all of these samples are program code.

As we hope you will notice when looking at our sample code, we are firm believers in program comments. We have always believed that there should be a meaningful comment on every single line of source code (to be grabbed by our proprietary auto-documenter, if nothing else). We do not employ anyone who does not subscribe to this belief.

A note concerning the FORTRAN examples: For all platforms (x86, VAX, PDP-11), we have always used a custom in-house preformatter program, just before the compilation step. The preformatter auto-indents the source code, based on the program comments (for instance "IF" and "DOCASE"), so that the logical indentation in the compiler listings is always perfect, without the programmer having to waste time indenting the code himself. Similarly, a custom in-house auto-documenter is used to auto-extract the whole lines of comments, to generate highly readable structured English for the programming documentation. What we are saying here is please don't be immediately put off by the fact that our FORTRAN may look "funny" at first glance. We hope that you will see, on looking a little closer, that there are some very good ideas at work here. (We are not adamant about using these structured techniques; we realize that some customers simply do not like GOTOs -- even if they were automatically generated.)

We have not substantially retouched these examples by adding copious comments after the fact, although we have changed a few comments here and there that contained customer-proprietary information.

XMEGA Native Language

Click here to see an example Farba Research native language routine for initializing an Atmel AtXMega64A1U microcontroller. (Note that getting an XMEGA started is a lot more complicated than starting up an AVR, particularly where the system clock is concerned.) Please feel free to utilize this startup code in your own products.

AVR Assembly Language

Click here to see an example Farba Research assembly language subroutine for use in Atmel AVR microcontrollers. Note that this example is useful for communications over Dallas Semiconductor's "Dallas One-Wire (tm)" [DOW] networks, to include communications with their nifty iButton(tm) devices.

x86 Assembly Language

Click here to see an example Farba Research assembly language device driver for use in DOS systems. This is one of the very simplest of device drivers, but it demonstrates how DOS drivers work.

x86 C Language

Click here to see a typical Farba Research C language function for use in DOS systems. If you look closely, you will see that this is a particularly useful routine.

x86 Fortran

Click here to see a Farba Research FORTRAN language program for use in DOS systems. This is just a test program used to debug the Farba Research low-level graphics library. Since the graphics library is written in assembly language for maximum speed, a FORTRAN-to-assembler interface was required, and you can see that by clicking here.

VAX Assembly Language

Ah yes, VAX assembly language -- the good old days! Here was the machine that truly defined the "C" in "CISC". Click here to see a sample of Farba Research VAX assembly language. (We regret that this is such a modest example; somewhere around here we have a truly mindbending assembly language interface to the LIB$TPARSE parsing state-machine, but that will have to wait until the webmaster has more free time.)

VAX Fortran

Click here to see a Farba Research FORTRAN language program for use in VAX/VMS systems. This is just a rather mundane initialization subroutine, and it looks pretty much like any other FORTRAN code.

PDP-11 Assembly Language

Here we have a real relic! This is just a simple Julian date routine from 1976, written in PDP-11 assembly language. Click here to see that our longstanding belief in commenting every single line of program source code is, well, longstanding.

Farba Products WORK