Program translation sequence, Assembly Language

Assignment Help:

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. 
                               >

 


Related Discussions:- Program translation sequence

Merge Sort, Write a program to merge two sorted arrays to create a third so...

Write a program to merge two sorted arrays to create a third sorted array containing all values from the two original arrays. Merge is a key component to the mergesort algorithm.

Find out the content of program, a- Trace the following program fragment an...

a- Trace the following program fragment and find out the content of ax after the          the execution of the program.         X db   5,7  -3,-9,4,-7,9               Mov

Project, I need some guidance on which project to make in assembly language...

I need some guidance on which project to make in assembly language

Write a mips assembly language program, Write a MIPS/SPIM assembly language...

Write a MIPS/SPIM assembly language program that prints the smallest and largest values found in a non-empty table of N word-sized integers. The address of the first entry in your

Embeded programming, i want to develop traffic light system so which kind o...

i want to develop traffic light system so which kind of software is needed to develop this project?

Interrupt priority management-microprocessor, Interrupt Priority Management...

Interrupt Priority Management The interrupt priority management logic indicated in given figure can be implemented in several ways. It does not required to be present in system

Programming with an assembler-microprocessor, Programming with an assembler...

Programming with an assembler The procedure of hand-coding 8086 programs is somewhat tiresome; hence generally a programmer may find it hard to get a correct listing of the mac

Program, write a program assembly language for adding two 3*3 matrix

write a program assembly language for adding two 3*3 matrix

Motorola 68000 series, Motorola 68000 Series : 68000microprocessor is a...

Motorola 68000 Series : 68000microprocessor is a 16 bit processor that has addressing space of 65536 locations, each of which holds a 64-bits word; In order to address those lo

Write an assembly language program, Your assignment for this project is to ...

Your assignment for this project is to write an assembly language program that checks if the user's input is a valid ISBN number. A sample run of your program might look like:

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd