Program translation sequence, Assembly Language

Program Translation Sequence

Developing a software program to accomplish a particular task, the implementer chooses an appropriate language, develops the algorithm (a sequence of steps, which when carried out in the order prescribed, achieve the desired result), implements this algorithm in the chosen language (coding), then tests and debugs the final result. Here is also a probable maintenance phase also associated.

The chosen language will undoubtedly need to be converted into the appropriate binary bit-patterns which make sense to the target processor (the processor on which the software will be run). This process of conversion is called translation.

The following diagram illustrates the translation sequence necessary to generate machine code

 

1755_The Program Translation Sequence.png

 

from specific languages.

I propose you to see a very short program in C and Assembly language.

Program written in C Language

/*         HELLO.C -- Hello and welcome.*/

 

#include

 

main()

{

            printf("Hello and welcome.\n");

}

Program written in Assembly Language for '86 family machine(Personal Computer with INTEL Microprocessor)

/*     HELLO.ASM --Hello and welcome*/

               TITLE    Hello.asm                              ;Hello.asm source file 
               .MODEL                SMALL
               CR          equ          0ah          ;carriage return
               LF           equ          0dh         ;line feed
               EOSTR   equ          '$' 
 
               .stack 200h 
               .data
               message  db           'Hello and welcome.' 
                               db           CR, LF, EOSTR 
               .code
               print        proc        near 
                               mov        ah,9h                      ;PCDOS print function 
                               int           21h 
                               ret
               print endp 
               start:       mov        ax, @data
                               mov        ds, ax 
                               mov        dx, offset message 
                               call          print 
                               mov        ax, 4c00h 
                               int           21h 
                               end         start

The program is assembled by typing

                               > TASM HELLO.asm
                               Turbo Assembler V1.0 Copyright(c)1988 by Borland International 
                               Assembling file: HELLO.ASM 
                               Error messages: None 
                               Warning messages: None
                               Remaining memory: 257k 
                               >

This produces an object file named HELLO.OBJ which must be linked to create an executable file which can run under PCDOS.

                               > TLINK HELLO.obj 
                               Turbo LinkV2.0 Copyright (c) 1987, 1988 Borland International 
                               >

The program when run, produces the following output.

                               > HELLO 
                               Hello and welcome. 
                               >

 

Posted Date: 2/28/2013 2:22:32 AM | Location : United States







Related Discussions:- Program translation sequence, Assignment Help, Ask Question on Program translation sequence, Get Answer, Expert's Help, Program translation sequence Discussions

Write discussion on Program translation sequence
Your posts are moderated
Related Questions
SHORT  : The  SHORT operator denoted to the assembler that only one byte is needed to code the displacement for a jump (for example displacement is within -128 to +127 bytes fr

Architecture Of 8088 The register set of 8088 is accurately the same as in to 8086. The architecture of 8088 is also same to 8086 except for 2 changes; a) 8088 has 4-byte instr

give the explaination of timing diagram minimum mode memory write cycle

this is my first project i dont know where to start

Arithmetic Instruction :               These instructions are usually perform the arithmetic operations, like subtraction ,multiplication, addition, and division along with th

CMP: Compare: - This instruction compares the source operand, which can be a register or memory location an immediate data with a destination operand that might be a register or a

Program: Write a program to perform addition of a series of 8-bit numbers. The series have 100 (numbers). Solution : In the first program, we have been implemented the add

DIV: Unsigned Division:- This instruction performs unsigned division operation. It divides an unsigned word or double word by a 16-bit or 8-bit operand. The dividend might be in t

what will be the value of EAX after following instructions execute? mov bx, 0FFFFh and bx, 6Bh

write a programme the addition two 3*3 matrix and stored in from list