Develop Assembly Language program (ALP) to find the largest number in a block of 10 numbers stored at location 40H onwards in internal RAM.

1 Answer

Answer :

ORG 0000H

MOV R1, #0AH ; Initialize Byte Counter

MOV R0, #40H ; Initialize source pointer R0 to 40H

DEC R1 ; decrement counter by one

MOV 60H, @R0 ;Read First Byte

UP: INC R0 ; Increment the contents of R0

MOV A, @R0 ; Read second number

CJNE A, 60H, DN ;compare the first two numbers, if not equal go to DN

AJMP LARGE ;else go to LARGE

DN: JC LARGE ;check carry

MOV 60H, A ;Store largest number to 60H

LARGE: DJNZ R1, UP ;decrement the counter by one, if count ≠ 0, then go to UP

END

Largest No. is saved in memory 60H. Assume any location to store the result.

OR

MOV R1, #0AH ; initialize the counter

MOV R0, #40H ; initialize the memory pointer

DEC R1 ; decrement counter by one

MOV A,@R0 ; load number in accumulator

MOV B, A ; move that number to register B

UP: INC R0 ; increment the memory pointer

MOV A,@R0 ; read the next number in A

CJNE A, B, DOWN ; compare the first two numbers, if not equal go to DOWN

AJMP NEXT ; else go to NEXT

DOWN: JC NEXT ; if number in A is greater then go to NEXT

MOV B, A ; else move the number in register B

NEXT: DJNZ R1, UP ; decrement the counter by one, if count ≠ 0, then go to UP

INC R0 ; increment the memory pointer

MOV A,B

MOV 50H, A ; store result at memory location 50H(Assume any location)

HERE: SJMP HERE

Related questions

Description : Find out the number of address lines required to access 4 KB of RAM

Last Answer : 12 address lines required to access 4 KB of RAM as  212 = 4KB 

Description : The first electronic general purpose digital computer built by Eckert and Mauchly called ENIAC did not work on the stored program concept. How many numbers could it store in its internal memory? A) 100 B) 20 C) 40 D) 80

Last Answer : Answer : B

Description : The first electronic general purpose digital computer built by Mauchly and Eckert called ENIA did not work on the stored program principle. How many numbers could it store in its internal memory? a. 100 b. 20 c. 40 d. 80

Last Answer : 20

Description : The first electronic general purpose digital computer built by Mauchly and Eckert called ENIA did not work on the stored program principle. How many numbers could it store in its internal memory? a. 100 b. 20 c. 40 d. 80

Last Answer : b. 20

Description : What is the address range of SFR Register bank? a) 00H-77H b) 40H-80H c) 80H-7FH d) 80H-FFH

Last Answer : c) 80H-7FH

Description : What is the address range of SFR Register bank? a) 00H-77H b) 40H-80H c) 80H-7FH d) 80H-FFH

Last Answer : d) 80H-FFH

Description : Draw and explain Internal port structure of Port 0 and Port 1 of 8051 microcontroller.

Last Answer : Port-0 can be configured as a normal bidirectional I/O port or it can be used for address/data interfacing for accessing external memory. When control is '1', the port is used for address/data ... is not able to sink the current the pin voltage may rise, leading to a possible wrong reading.

Description : When subroutine is called contents of program counter is location address of __ instruction following call instruction is stored on _ __and program execution is transferred to __ address. a. Non ... , Stack and Main program Cc. Executable, Queue and Subroutine d. Executable, Stack and Subroutine

Last Answer : d. Executable, Stack and Subroutine

Description : The first electronic general purpose digital computer built by Motley and Accrete called ENIAC did not work on the stored program concept. How many number s could it store in its internal memory? a. 100 b. 20 c. 40 d. 80

Last Answer : b. 20

Description : The first electronic general purpose digital computer built by Motley and Accrete called ENIAC did not work on the stored program concept. How many number s could it store in its internal memory? a. 100 b. 20 c. 40 d. 80

Last Answer : b. 20

Description : If 99% of the program is written in FORTRAN and the remaining 1% in assembly language, the percentage increase in the programming time compared to writing the entire program in FORTRAN and rewriting the 1% in assembly language is ? 10 5 13 8

Last Answer : 5

Description : To completely write the program in FORTRAN and rewrite the 1% code in assembly language, if the project needs 13 days, theteam consists of ? 13 programmers 10 programmers 8 programmers 100/13 programmers

Last Answer : 10 programmers

Description : A n `alpha`-particle of velocity `1.6xx10^(7) m s^(-1)` approaches a gold nucleii `(Z=79)`. Calculate the distance of closest approach. Mas of an `alp

Last Answer : A n `alpha`-particle of velocity `1.6xx10^(7) m s^(-1)` approaches a gold nucleii `(Z=79)`. Calculate ... of an `alpha`-particle `=6.6xx10^(-27) kg`.

Description : Which enzyme estimation will be helpful in differentiating the elevated serum ALP found in obstructive jaundice as well as bone disorders? (A) Serum AST (B) Serum ALT (C) Serum LDH (D) Serum γ-GT

Last Answer : Answer : D

Description : If results of the serum bilirubin, serum ALP, LDH and AST determinations suggest obstructive jaundice, the best confirmatory test would be the estimation of (A) Serum ALT (B) Serum 5’ nucleotidase (C) Serum Pseudo cholinesterase (D) None of these

Last Answer : Answer : B

Description : Patients with hepatocellular jaundice, as compared to those with purely obstructive jaundice tend to have (A) Lower serum ALP, LDH and AST activity (B) Lower serum ALP, Higher LDH and AST activity (C) Higher serum ALP, LDH and AST activity (D) Higher serum ALP, Lower LDH and AST activity

Last Answer : Answer : B

Description : Which of the following enzyme typically elevated in alcoholism? (A) Serum ALP (B) Serum GOT (C) Serum γ-GT (D) Serum acid phosphatase

Last Answer : Answer : C

Description : It is said that nucleotide phosphatase (NTP) is a better index of obstructive liver disease than alkaline phosphatase (ALP), why?

Last Answer : ALP level is increased in both liver and bone diseases, but NTP is only in liver diseases. 

Description : pregnant lady with hepatits, how to confirm dx : a- ALP B-SGOT C-WBC D-ESR E-………

Last Answer : E-………

Description : From the 9th century onwards people from denmark norway and sweeden were known as the?

Last Answer : Vikings?

Description : Should high level programming be a mandatory class next to learning writing and reading in primary school and onwards? Your arguments please.

Last Answer : No, because it is not a skill that everyone needs to have. The people who use it will learn it, but it isn’t equivalent to reading and writing.

Description : Highlight any three innovations which have improved the printing technology from 19th century onwards. -SST 10th

Last Answer : (i) By the mid-19th century, Richard M. Hoe of New York had perfected the power driven cylindrical press. This was capable of printing 8,000 sheets per hour. This press was particularly useful ... of the colour register were introduced. (v) The dust cover or the book jackets were introduced.

Description : What is new SEO strategy of Google from 2019 onwards?

Last Answer : It is never too early to begin preparing for the future. The year 2019 may very well be an innovative year for SEO. Between virtual reality and increased reality , or artificial intelligence and blockchain ... , we could see very big changes in the way, we as search engine optimizers, do things.

Description : Which phylum onwards all phyla show tube within tube body plan?

Last Answer : Which phylum onwards all phyla show tube within tube body plan?

Description : Why 100% winding protection is felt essential for main generator stator E/F protection? (Used in NAPS onwards?)  

Last Answer : At MAPS 4% of winding is not protected. Earlier felt that the Electro magnetic stress due high external fault currents near 4% of neutral may not be high to cause E/F here. But now felt that the mechanical stress can leads to E/F. 

Description : Which one of the following satisfactions helps our children from infancy onwards to adolescence, equipped them with a sense of achievement, recognition and independence (a) Affectionate, warm, security ... ) They gain satisfaction and love through close physical contact (d) None of the above

Last Answer : (a) Affectionate, warm, security giving satisfactions

Description : The most vulnerable period of pregnancy for the causation of foetal malformations due to drugs is: A. 18-55 days of gestation B. 56-84 days of gestation C. Second trimester D. 36 weeks onwards

Last Answer : A. 18-55 days of gestation

Description : The most vulnerable period of pregnancy for the causation of foetal malformations due to drugs is: A. 18-55 days of gestation B. 56-84 days of gestation C. Second trimester D. 36 weeks onwards

Last Answer : A. 18-55 days of gestation

Description : Which one of the following satisfactions helps our children from infancy onwards to adolescence, equipped them with a sense of achievement, recognition and independence? Options: A) Affectionate, warm, ... . C) They gain satisfaction and love through close physical contact D) None of these

Last Answer : A) Affectionate, warm, security giving satisfaction. 

Description : Faucet 'P' can fill the tank completely in12 hrs while faucet'q' can empty it by 24 hrs. By mistake, Anitha forgot to close the faucet q', As a result, both the faucet remained open. After 8 hrs, faucet realized the ... '. In how much time now onwards, would the tank be full? A) 4 B) 8 C) 12 D) 16 

Last Answer : Answer: B Explanation: Faucet P can fill the tank completely in 12 hours => In 1 hour, Faucet P can fill 1/12of the tank Faucet q can empty the tank completely in 24 hours => In 1 hour, Faucet q can empty ... tank. Time taken to fill the remaining (1−1/3)=2/3of the tank =(2/3)/(1/12) = 8 hours

Description : Assembly Language- 1) uses alphabetic codes in place of binary numbers used in machine language 2) is the easiest language to write programs 3) need not be translated into machine language

Last Answer : 1) uses alphabetic codes in place of binary numbers used in machine language

Description : Assembly Language 1 uses alphabetic codes in place of binary numbers used in machine language 2 is the easiest language to write programs 3 need not be translated into machine language 4 none of these

Last Answer : 1 uses alphabetic codes in place of binary numbers used in machine language

Description : Develop a program to swap two numbers using pointer and add swaped numbers also print their addition.

Last Answer : #include<stdio.h> void swap(int *a,int *b) {  int temp;  temp=*a;  *a=*b;  *b=temp; } void main() { int x,y,sum; printf("\n Enter value for x:"); scanf(" ... x); printf("\ny=%d",y); sum=x+y; printf("Sum of x+y = %d",sum); }

Description : Develop a simple ‘C’ program for addition and multiplication of two integer numbers.

Last Answer : #include<stdio.h> #include<conio.h> void main() { int a,b,add,mul; clrscr(); printf("Enter value for a and b:"); scanf("%d%d",&a,&b); add=a+b; ... b=%d\n",add); printf("\Multiplication of a and b=%d",mul); getch(); }

Description : In a RAM, information can be stored (A) By the user, number of times. (B) By the user, only once. (C) By the manufacturer, a number of times. (D) By the manufacturer only once.

Last Answer : Ans: A RAM is used by the user, number of times.

Description : Which device is used to convert the program written in assembly language into machine language? (a) Interpreter -Technology

Last Answer : (c) Assembler is used to convert the program written in assembly language into machine language because it is a language processor that converts the user defined language into a form which can be easily understood by the computer.

Description : Which of the following is not a feature of first generation computers A) They used vacuum tubes or valves as main electronic component B) They consumed lots of electricity and produced excessive heat C) They used machine language and assembly language to program the machine D) None of above

Last Answer : Answer : C

Description : Which language is directly understood by the computer without translation program? A) Machine language B) Assembly language C) High level language D) None of above

Last Answer : Answer : A

Description : What do you call the translator which takes assembly language program as input & produce machine language code as output? A) Compiler B) Interpreter C) Debugger D) Assembler

Last Answer : Answer : D

Description : The translator program used in assembly language is called A) Compiler B) Interpreter C) Assembler D) Translator

Last Answer : Answer : C

Description : Which of the following is machine independence program? A) High level language B) Low level language C) Assembly language D) Machine language

Last Answer : Answer : A

Description : Which language is directly understood by the computer without translation program? (A) BASIC (B) Assembly language (C) Machine language (D) C language

Last Answer : (C) Machine language

Description : Which language was used to program Second Generation computers? (A) Binary Coded language (B) Assembly language (C) Machine language (D) None of the Above

Last Answer : (B) Assembly language

Description : Assembler works to convert assembly language program into machine language : a. Before the computer can execute it b. After the computer can execute it c. In between execution d. All of these

Last Answer : a. Before the computer can execute it

Description : Assembly language program is called. a. Object program b. Source program c. Oriented program

Last Answer : b. Source program

Description : If 99% of the program is written in FORTRAN and the remaining 1% in assembly language the percentage increase in the execution time, compared to writing the 1% in assembly language is ? 0.9 0.1 1 0

Last Answer : 0

Description : If the entire program is written in FORTRAN, the percentage increase in the execution time, compared to writing the entire program in FORTRAN and rewriting the 1% in assembly language is ? 0.9 0.8 8 9

Last Answer : 0.8

Description : Which of the following is machine independence program? a. High level language b. Low level language c. Assembly language d. Machine language

Last Answer : High level language

Description : The translator program used in assembly language is called a. Compiler b. Interpreter c. Assembler d. Translator

Last Answer : Assembler