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

8086, to separate positive and negative numbers

to separate positive and negative numbers

The 486, The 486 Introduced in the year 1989 the 80486 did not feature ...

The 486 Introduced in the year 1989 the 80486 did not feature any radically new processor technology. Instead, it joints a 386 processor, a cache memory controller and a math c

Architecture of file transfer, Explain the architecture of the file transfe...

Explain the architecture of the file transfer protocol ftp in terms of clients, servers, sockets

Write policy-microprocessor, Write Policy A write policy determines how...

Write Policy A write policy determines how the cache deals with a write cycle. The 2 common write policies areWrite-Throughand Write-Back. In Write-Back policy, the cache behav

Program to move contents in memory-machine level programs, Example : Write...

Example : Write a program to move the contents of the memory location 0500H to BX and also to register CX. Add immediate byte 05H to the data residing in memory location, whose ad

Code, 1. Assembly code for the flow chart we did in the class about the sim...

1. Assembly code for the flow chart we did in the class about the simple I/O interface driver 2. Enhanced driver (flow chart and its assembly code) to cater for interruptions in th

Generating random number using 8086, I need to generate a random number bby...

I need to generate a random number bby using 8086 assembly language

Program to convert decimal to binary number, Program is written but has err...

Program is written but has errors returning values from the procedure.

Introduction to evaluation, This unit introduces the topic of evaluating in...

This unit introduces the topic of evaluating interactive products. It is a short unit as evaluation is discussed in more detail in Block 4. Its brevity should give you additional t

Counting Array Values(Programming exercises), Write an application that doe...

Write an application that does the following:(1) fill an array with 50 random integers; (2) loop through the array, displaying each value, and count the number of negative values;

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