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

CONSTANTS, Ask question #MinimuWHAT ARE CONSTANTS AND WHAT DO THEY DO?m 100...

Ask question #MinimuWHAT ARE CONSTANTS AND WHAT DO THEY DO?m 100 words accepted#

Dma hardware (8237 dmac)-microprocessor, DMA Hardware (8237 DMAC) : ...

DMA Hardware (8237 DMAC) :   1)Processor contain HOLD/HOLD Acknowledge lines to interact with 8237 o   DMAC can achieve control of ISA bus by asserting HOLD o   P

Program to perform one byte bcd addition-assembly program, Program : Write...

Program : Write a program to perform a one byte BCD addition. Solution : It is consider that the operands are in BCD form, but the CPU considers it as hexadecimal and acco

Fourth generation microprocessor, Fourth  Generation Microprocessor : T...

Fourth  Generation Microprocessor : The single chip 32-bit microprocessor was introduced in 1981 by Intel as iAPX 432. The other 4th generation  microprocessors  were;  Hewlett

The intel processors , The Intel Processors :         The Intel Co...

The Intel Processors :         The Intel Corporation is the biggest manufacturer  of microchips  in the world,  in addition  to being  the leading provider of chips for PCs. I

Memory address decoding-microprocessor, Memory Address Decoding Binary ...

Memory Address Decoding Binary Decoders - Decoders have 2n-inputs and n outputs, each input combination results in a single output line contain a 1, and all other lines contain

The real time system (rts)-microprocessor, The real time System (RTS) : ...

The real time System (RTS) : Calling the clock real-time is somewhat of a misnomer because it only shows the time setting it has been given. The RTC is the other half of chip

Program for game by using microcontroller 8051, I want to do a program as a...

I want to do a program as a game by using the Microcontroller 8051 with the assembly language, by using 4*4 keypad and its matrix display. I have to use the keypad for playing the

Interrupt system based on multiple 8259as-microprocessor, Interrupt System ...

Interrupt System Based on Multiple 8259As A multiple 8259A interrupt system is diagrammed in given figure in this figure data bus drivers are not indicated, but they could be i

Assume-assemblers directive-microprocessor, ASSUME: Assume Logical Segment...

ASSUME: Assume Logical Segment Name:- The ASSUME directive which is used to inform the assembler, the specified names of the logical segments to be consider for different segme

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