Assembly language problem

Discussion in 'Embedded Systems and Microcontrollers' started by prashanth20, Feb 3, 2010.

  1. prashanth20

    Thread Starter New Member

    Dec 17, 2008
    Hi all,

    I have an assembly code,
    This program is written for temperature controller, using thermocouple(k type), I am writting programs in c,
    I am able to diplay the my own values, but failing to to display the temperature values getting from adc(sensor)
    when the sensor changes, the counter in the adc changes corresponding to the millivolt produced by the sensor(input to adc)
    i got the step value. now i am unable to convert this to the temperature,
    i am unable to design the formula. to conver the step value to the temperature.

    I am also finding difficulties in reading the old assembly language written for this,

    I am uploading the assembly file,
    there are 2 file, 1st half in 1 file, and second half in another file.
    can anybody help me find out the code written regarding adc in the file, and
    explain me what they have done to convert the step to temperature value??

    • a.txt
      File size:
      14.6 KB
    • b.txt
      File size:
      18.1 KB
  2. DumboFixer

    Active Member

    Feb 10, 2009
    If you are writing in C then why post assembly code ?

    The assembly code will be hard to sort out as it has no commenting so is difficult to follow.
  3. AlexR

    Well-Known Member

    Jan 16, 2008
    The code you have posted is dis-assembled machine code with no comments, no meaningful variable or label names and many many pages long.

    If you had plenty of time and a huge incentive it would be possible to unravel the code and find out what it is doing but I doubt that anyone here has either the time to do it or the inclination to spend days or weeks unravelling obscure code.
  4. prashanth20

    Thread Starter New Member

    Dec 17, 2008
    Thanks for the reply,
    I have written the program in c, i am finding difficulty in writing an algorithm to convert the step value to the desired value, i tried many formula, but all in vein.

    this was the oldcode, ya i disassemble it using a disassembler from hex,

    Please help me to design a formula to convert the step value to temperature value for the k type

  5. atferrari

    AAC Fanatic!

    Jan 6, 2004
    If you wrote it, could you try to retrieve / produce the flow diagram (flow chart?) that you followed?

    From there to assembler it should be easier to you. Well... that is the way I have been working in the last 20 yeras.
  6. prashanth20

    Thread Starter New Member

    Dec 17, 2008
    Hi thanks for the reply,

    This old code is written by the last employee of the company i am working in, he i am not getting the c program, all i have is the hex file of him,

    i am a fresher, this is my first project since 6 months,
    all i have learnt it to display the value in steps, i am stuck here,
    now i have to write a formula so that , instead of step, i can show the corresponding temperature

    so please help to find a suitable formula

  7. t06afre

    AAC Fanatic!

    May 11, 2009
    In C you have a floating point library why not use this.