Write an assembly language program to find the largest number from the given ten numbers?
org 100h
L2: mov bh,x(si)
mov ah, x(si)
L1:
cmp si,7
je L
inc si
cmp ah, x(si)
jg L1
jl L2
L:ret
x db 1,3,7,8,6,9,5
However you want!
Pseudo code is not a well defined programming language. The idea is to write something that looks like code, but doesn't necessarily have to run in any specific language.
For example, you could write:
for all values in some_array:
if value is empty:
fill value
without defining at this point what exactly it means for a value to be empty, or how to fill a value.
What is the best programming language to make an MMORPG with?
There are many options; the best language is probably the one you know best. Some languages may be better than others, but no language is inherently superior to all others, whether you want to make an MMORPG, or any other task.
Which is the unary operator used to dereference a pointer and return the value stored in it?
The asterisk (*) operator dereferences a pointer and returns the value stored in the memory pointed to by the pointer.
It is much easier to discover errors in a program that is well analyzed and well designed. Furthermore, a thoroughly analyzed and carefully designed program is much easier to follow and modify.Even the most experienced programmers spend a considerable amount of time analyzing a problem and designing an algorithm
Program to find roots of quadratic equation using switch?
include <stdio.h>
#include <math.h>
/* Prototypes */
void realRoots(double, double, double);
void imaginaryRoots(double, double, double);
int main() {
/* Local variables */
int option;
double a, b, c, d;
printf(" Quadratic Equation ax^2+bx+c=0 \n");
printf("******************* *******************\n");
/* Print list */
printf("\n1) Real roots\n");
printf("2) Imaginary roots\n");
printf("3) Repeated roots\n");
printf("4) Exit\n");
scanf("%d", &option);
printf("************* *************************\n");
/* Get a, b, and c from user */
printf("\na = ");
scanf("%lf", &a);
printf("b = ");
scanf("%lf", &b);
printf("c = ");
scanf("%lf", &c);
/* Calculate determinant */
d = (b * b) - (4 * a * c);
/* Use switch statement */
switch(option) {
/* If 1 was selected */
case 1:
realRoots(a, b, sqrt(d));
break;
/* If 2 was selected */
case 2:
imaginaryRoots(a, b, sqrt(-d));
break;
/* If 3 was selected */
case 3:
break;
/* If 4 was selected */
case 4:
break;
}
/* End program */
return 0;
}
/* Evaluate real roots */
void realRoots(double a, double b, double d) {
/* Calculate */
double firstRoot = (-b/(2 * a)) + (d/(2 * a));
double secondRoot = (-b/(2 * a)) - (d/(2 * a));
/* Print */
printf("\nFirst Real Root: \t%lf\n", firstRoot);
printf("\nSecond Real Root: \t%lf\n", secondRoot);
}
/* Evaluate imaginary roots */
void imaginaryRoots(double a, double b, double d) {
/* Calculate */
double x = 2 * a;
double first_term = (-b)/x;
double second_term = (d)/x;
/* Print */
if(second_term >= 0) {
printf("\nFirst Imaginary Root: \t%lf + %lfi\n", first_term, second_term);
printf("\nSecond Imaginary Root: \t%lf - %lfi\n", first_term, second_term);
}else {
second_term = -(second_term);
printf("\nFirst Imaginary Root: \t%lf + %lfi\n", first_term, second_term);
printf("\nSecond Imaginary Root: \t%lf - %lfi\n", first_term, second_term);
}
}
Your computer's processor is its brain. Sometimes called a central processing unit, or CPU, your processor manipulates data in response to your instructions. Together with the memory and video card, the CPU determines your computer's overall performance. An understanding of how processor speed works can help you purchase the right computer for your business or evaluate an existing computer's performance.
If a hacker has gotten into your computer once, they will get in again. If you are unable to track down any programs that they left behind, you should seek professional help. As a last resort, backing up your important data and reformatting your computer will guarantee removal of these programs.
Remember to always use strong passwords and to be suspicious of any programs you download from the internet.
Binary search program for 8085?
Res db " position",13,10,"$"
msg2 db 'key not found!!!!!!!!!!!!!. $'
.code
mov ax,@data
mov ds,ax
mov bx,00
mov dx,len
mov cx,key
again:cmp bx,dx
ja fail
mov ax,bx
add ax,dx
shr ax,1
mov si,ax
add si,si
cmp cx,arr[si]
jae big
dec ax
mov dx,ax
jmp again
big:je success
inc ax
mov bx,ax
jmp again
success:add al,01
add al,'0'
mov res,al
lea dx,msg1
jmp disp
fail:lea dx,msg2
disp:mov ah,09h
int 21h
mov ah,4ch
Why is assembly language called a low level language?
x86 assembly language is crucial to be able to do any serious security or reverse engineering work. In addition, it allows one to write well optimized code. It also gives the opportunity to understand how things really work inside the computer, which is by itself very important if you want to become a competent programmer.
x86 assembly language is not very hard to learn. In fact, if you know basic math (The one that you learn in elementary school), you could learn it yourself.
I recorded an online video course for x86 assembly (paid) and exercises (Open source).
You can find it at the address xorpd dot net.
This course will teach you x86 assuming that you know nothing. It only assumes
that you know how to add numbers. (In base 10).
In the end of the course you will be able to write fully working x86 assembly
programs on the Fasm assembler over the Windows operation system.
xorpd.
What are the disadvantages and advantages of windows application?
•A program or group of programs designed for end users. Software can be divided into two general classes: systems softwareand applications software. Systems software consists of low-level programs that interact with the computer at a very basic level. This includes operating systems, compilers, and utilitiesfor managing computer resources. In contrast, applications software (also called end-userprograms) includes database programs, word processors, and spreadsheets.Figuratively speaking, applications software sits on top of systems software because it is unable to runwithout the operating system and systemutilities.•A program or group of programs designed for end users. Software can be divided into two general classes: systems software and applications software. Systems software consists of low-level programs that interact with thecomputer at a very basic level. This includesoperating systems, compilers, andutilities for managing computerresources. In contrast, applications software (also called end-user programs) includes databaseprograms, word processors, andspreadsheets. Figuratively speaking, applications software sits on top of systems software because it is unable to run without the operating system andsystem utilities.
Draw a flowchart to find greater and smaller number from given two numbers?
It's not easy to show a flow chart using a text-based forum. Instead, I'll show the algorithm using pseudocode. You should be able to draw a flowchart from this.
What is derived class in brief?
A derived class is any class that inherits from one or more other classes, known as base classes. The derived class inherits the sum total of all public and protected members of all its base classes, including their base classes. The derived class is a more specialised form of its base classes. Any members of the base classes that are declared virtual can be overridden, such that calling the base class method directly actually invokes the derived class method, thus enabling polymorphic behaviour.
What kind of job can you get with a BSIT degree?
You mean a BS in Information Technology? (It's usually not very artistic ;) My BS degree in Computer Information Systems included a lot of IT stuff. IT is very generalized. Most IT people I know wear many hats: setting up new computers; installing software; occasionally, some programming; administrative ("admin") tasks, like assigning and maintaining user permissions; coordinating system functions, such as EDI communications with the business systems. It can be very stressful, but, if you like holding a company's heart in your hand, it can be very rewarding.
Can a friend function of derived class access private data of base class?
In some computer languages it is possible to do so, but I would not even think or design any application in this way.
A base class SHOULD NEVER know what the derived classes are. Perhaps it was created by generalizing some classes. Even at that point, this new base class should have no knowledge of the derived classes whatsoever.
To do a good OO design, the base class should have a method like getPrivatePartOfDerivedClass() as abstract, then force the derived class to provide the implementation of this method.
How can you guess the right password in someones account?
I don't think trying to guess someone's password is a good idea, as it might get you into a lot of trouble, but most normal people usually use words or phrases to do with their life or someone close to them, and occasionally strings of numbers like 123.
Computer ethics is a body of principles/behaviors that are considered as acceptable for all parties in the computing world to follow. Computer ethics are rules of law but some rules are derived from them.
Why constructor does not have return type?
Constructors cannot have return types. The main job of the constructor is to create new instance of its class and return that instance. So the default return type of all constructor is the object of its class.
What is the difference between array and hash?
An array stores elements in a sequential order from zero (or one) up to the size of the array (possibly minus one, if starting from zero). Arrays come from the classic days of computer programming performed with assembler code, where one would often have a base pointer (BP or BX) plus an index (SI or DI) plus a constant offset, if any.
To address the fourth element in an array, one would specify the BP of the array's initial index (index 0), then add an index to it. For example, add [bp+di], ax would add the contents of AX (a 16-bit register) to the memory location referenced by BP with DI added to it, both also 16-bit registers in classic assembler. Some languages, such as BASIC, ignored the zero index or used it for other purposes.
Arrays are generally fixed in size-- reallocation is necessary to increase or decrease the size of the array. They must also be initially allocated with some amount of memory before they can be used. Newer languages offer dynamic arrays, sometimes called vectors (a point with a line that has an infinite length) to represent arrays that automatically scale capacity as it is filled.
Hashes, in contrast, do not use traditional indexes; they are not represented by the bp + di model, but instead use objects as their indices. This leads to certain inconveniences, because objects are not necessarily sorted from smallest to largest, or lexicographical order, but simply by computed indexes based on the key's hash. Most languages smooth out this limitation by using b-trees (binary trees) to store the keys and their indices, so that iterations over the values of the hash are in key order, but this is not strictly a requirement.
Hashes have no maximum size, unlike traditional arrays. Increasing the size of the hash is a simple as assigning a new key a value. In this respect, they are similar to vectors, but they answer an important question: how does one find an element in a vector in constant time? The answer, of course, is that vectors must be traversed from the first index to the target index in order to find the value, so searches require linear time to find a value.
By using keys, the search complexity is reduced from linear time to constant time, offering a significant advantage on looking up data versus using a vector, linked list, or even an array of objects. Hashes use constant time look ups, just like an array does, but gives the added flexibility of specifying how the data is indexed, instead of just a number. This is especially useful for algorithms involving translating data (ETL) or looking up data that meets a certain criteria repeatedly in constant time, which can have a savings factor of hundreds or thousands times more than an array.
How do you input programs into your computer?
If by program you mean OS, your available options depends on your OS. If you have a PC (aka Windows), you can install Ubuntu, Kubuntu, and other Linux OSs to run alongside Windows. If you have a Mac, you can install Windows and Linux. Virtual Machine software allows you to do this without rebooting your computer to change the OS. There are many different applications that can let you do this. Some you have to pay for, like Parallels Desktop or VMWare Fusion. There are also open source (free) ones, like Oracle VirtualBox.
A couple scenarios:
Install Windows on a Mac: You can use Boot Camp, a preinstalled application that walks you through the installation process. You can also use any of the VM apps listed above.
Install Ubuntu on a PC: You can use the Wubi installer provided with all versions of Ubuntu when you download them in the related link, or you can use a VM app.
Install Ubuntu on a Mac: You cannot use the Wubi on a Mac, you will need to create a bootable USB drive (steps in the related link). You can also run Ubuntu as a VM.