assembly language

Discussion in 'Embedded Systems and Microcontrollers' started by MIRINGU, Oct 15, 2008.

  1. MIRINGU

    Thread Starter Active Member

    Mar 18, 2007
    75
    0
    hi,may be if told to write a program to subtract 630 from 830 and store in register B and H ,how do i go about the problem ? new in this field. pls help
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    One place to begin the coding of a program is to write down the steps involved in accomplishing the task as simple sentences. This allows the programmer to better visualize the process before starting to code it. This technique is referred to as pseudo-coding. The first cut at pseudo-coding a process will often need a couple of iterations before there is enough detail to begin programming.

    Once the pseudocode is complete, then the actual programming can begin. At this point, it does not matter what language is being used to write the program. It is just a matter of translating the operations written in pseudocode into the programming language of choice.

    There are a number of links to tutorials on pseudocoding on the Internet. Here is just one very quick sample.

    hgmjr
     
  3. mindmapper

    Active Member

    Aug 17, 2008
    34
    0
    Assembler programing is very close to the hardware. Therefore you should tell which MCU you are using.
     
  4. JohanKrava

    New Member

    Oct 11, 2008
    2
    0
    In general, you load 830 to first register, then you load 630 to the second one and then you subtract them and store result somewhere.

    In practice IT DEPENDS on you hardware (microcontroller)!!
    Maybe you should start with some assembler tutorial.
     
  5. MIRINGU

    Thread Starter Active Member

    Mar 18, 2007
    75
    0
    actually not in practice but its the program segment on how to carry out the process
     
  6. funa

    New Member

    May 28, 2008
    8
    0
    Well, it depends on the microcontroller you are using and the program itself.
     
Loading...