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

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?

Program, 2. Write a program to separate out positive and negative numbers f...

2. Write a program to separate out positive and negative numbers from a given series of 16-bit hexadecimal numbers.

Assembly assignment help, Problems: 1. Write a single program. Each of th...

Problems: 1. Write a single program. Each of the problems (2-4) should be written within a procedure. Your “main” procedure should call each procedure. Before calling each proc

Scas-string manipulation instruction-microprocessor, SCAS : Scan String By...

SCAS : Scan String Byte or String Word:- This instruction scans a string of words or byte for an operand word or byte specified in the register AL or  register AX. The string i

Program to add 8-bit series numbers-assembly language, Program: Write a pr...

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

Assignment, Write an assembly program that adds the elements in the odd ind...

Write an assembly program that adds the elements in the odd indices of the following array. Use LOOP. What is the final value in the register?

Hex , what is the hex value in ax after executing the instructions ax= 1E8...

what is the hex value in ax after executing the instructions ax= 1E8A bx=4080 add al,bl sub ah,bh

Dq-dt-assemblers directive-microprocessor, DQ:   Define  Quad word:-  Th...

DQ:   Define  Quad word:-  This directive is taken in use to direct the assembler to reserve 4 words (8 bytes) of memory for the specified variable and can initialise it having

Entering a program-microprocessor, Entering a Program In this section, ...

Entering a Program In this section, we will explain the procedure for entering a small program on IBM PC with DOS operating system. Assume a program of addition of 2 bytes, as

Assembly language assignment, The main objective of the assignment is to ex...

The main objective of the assignment is to explore the knowledge regarding parallel ports of a computer system. You can read and write datato/from the parallel port using IN and OU

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