Hardware Programming

    Hardware programming is probably the most important and time-consuming task when dealing with robots and other similar stuff.
            One thing that is important with hardware programming is what you are programming on. If it is a standard computer and your hardware is via USB, RS232, FireWire, etc. then you will have to resort to OS-specific libraries and this is really like regular programming but often these OS APIs are based on C.
       If you're dealing with a embedded PC or microcontroller, then you have to check if it is powerful enough to run an operating system like FreeRTOS or micro-Linux. Then you need to look at "cross-compiling" in order to write, compile and test your programs on a PC. Micro-controllers often offer only C run-time libraries, but if you can run an operating system then it usually comes with all the standard libraries, but you have to set up the environment for cross-compiling.
Assembly language is the most basic programming language available for any processor. In assembly language, a programmer works only with operations implemented directly on a physical CPU. It is a low-level programming language for a computer, or other programmable device, where there is a strong correspondence between the language and the architecture's machine code instructions.
Each PC has a microprocessor that manages the arithmetical, logical and control activities and each family of processors has its own set of instructions for handling various operations. These set of instructions are referred to as 'machine language instructions'. Processor understands only machine language instructions which are strings of 1s and 0s. But machine language is too complex and obscure for using in software development. Hence, low level assembly language is designed for a specific family of processors that represents various instructions in symbolic code and a more understandable form.
As compared to most of the high-level programming languages, each assembly language is specific to a particular computer architecture, which are generally portable across multiple architectures, but require interpreting or compiling.
An Assembly language is converted into executable machine code by a utility program referred to as an assembler; the conversion process is referred to as assembly, or assembling the code. Assembly language uses a mnemonic form to represent each low-level machine instruction or operation. Each operations require one or more operands in order to form a complete instruction and most assemblers can therefore take symbols, labels and expressions as operands to represent addresses and other constants. Macro assemblers include a macro-instruction facility so that assembly language text can be represented by a name and that name can be used to insert the expanded text into other code.

Hardware Programs

Micro-Processor Programs