Friday, May 22, 2020
Witty Mothers Day Quotes
A chuckle and good humorââ¬âthat could be your gift to your mother on Mothers Day. Use these witty Mothers Day quotes to crack her up. Pin up posters with witty Mothers Day quotes to pack a punch. She will appreciate your sense of humor and your tactful expression. Roseanne BarrI know how to do anythingââ¬âIm a mom. Rodney DangerfieldMy mother never breast-fed me; she told me she only liked me as a friend. Erma BombeckWhen your mother asks, Do you want a piece of advice? it is a mere formality. It doesnt matter if you answer yes or no. Youre going to get it anyway. Larisa OleynikIf my mom reads that I am grammatically incorrect, I will have hell to pay. Phyllis DillerI want my children to have all the things I could not afford. Then I want to move in with them. Milton BerleIf evolution really works, how come mothers only have two hands? Bob MonkhouseMy mother tried to kill me when I was a baby. She denied it. She said she thought the plastic bag would keep me fresh. Peter De VriesA suburban mothers role is to deliver children obstetrically once, and by car for ever after. Buddy HackettMy mothers menu consisted of two choices: Take it or leave it. Nora EphronWhat my mother believed about cooking is that if you worked hard and prospered, someone else would do it for you.
Tuesday, May 19, 2020
Mammal Species Characteristics
Have you ever thought about what makes mammal species different from other vertebrates? If not, Im sure that you have noticed the differences between a snake, which is a reptile, and an elephant. Being a mammal myself, I have always found this particular class of vertebrates very interesting. As you will see, mammals have certain characteristics that differentiate them from other vertebrates. Lets take a look at some of these characteristics. Mammal Characteristics To begin with, mammal species are in the Class Mammalia, within the Subphylum Vertebrata, under the Phylum Chordata, in the Kingdom Animalia. Now that you have that straight, lets look at some specific traits of mammals. One main characteristic that mammals have is a feature that usually stands on end in frightening situations. Can you guess what it is? Yes, its hair or fur, whichever the case may be. This trait is useful in maintaining the constant body temperature that is important to all endothermic animals. Another characteristic is the ability to produce milk. This comes in handy while nourishing babies which are usually born fully developed (exceptions are the monotremes and the marsupials). Fertilization occurs within the reproductive tract of the female and most have a placenta that provides nutrients to the developing embryo. Mammalian young are usually slow to leave the nest, which allows for a longer period of time for the parents to teach skills that are necessary for survival. Respiratory and circulatory features of mammals include a diaphragm for proper lung ventilation and a heart that has four chambers to ensure that blood is circulated appropriately. Mammals can comprehend and learn things, which can be attributed to a larger brain size as compared to vertebrates of similar size. Finally, the existence of teeth that are different in size and function is a trait that is seen among mammals. All of these characteristics (hair, maintaining a constant body temperature, production of milk, internal fertilization, young born fully developed, highly developed circulatory and respiratory systems, larger brain size, and differences in the size and function of teeth) make mammal species unique among the vertebrates.
Saturday, May 9, 2020
Diabetes Mellitus Type 1, Type 2, And Gestational Diabetes
Introduction Diabetes Mellitus, also known commonly as diabetes, is a chronic condition in which the body doesnââ¬â¢t produce or misuses insulin in the body. There are different classifications of diabetes: Type 1, Type 2, and gestational diabetes. Type 1 is when the body does not produce any insulin. It is usually diagnosed in children and young adults. Type 2 is when the body doesnââ¬â¢t use insulin properly and can develop in anyone and seen at any age. Both types require strict management which can range from medications to diet. If itââ¬â¢s not managed correctly, it can lead to a diabetic coma or even death (Diabetes Basics, n.d.). Definition of the disease According to the American Diabetes Association, Type 2 diabetes is insulin resistant, or your body does not use insulin properly (Facts About Type 2, 2014). The bodyââ¬â¢s pancreas over produces insulin to make up for the misusage of it but overtime pancreas over works and canââ¬â¢t keep up with regulating normal blood glucose levels. History of the Disease Diabetes mellitus was first discovered in 1910 by Sir Edward Albert Sharper-Schafer after studying the pancreas. In 1949, insulin is discovered to help in the transporting process of glucose into the cells and in the same year the insulin syringe is designed and approved. A year later, the American Dietetic Association and the U.S. Public Health Service develop a meal planner and food exchanges. Type 2 diabetes isnââ¬â¢t recognize until 1959 when two doctors realize the someShow MoreRelatedDiabetes Mellitus : A Lifelong Disease935 Words à |à 4 PagesDiabetes mellitus is a lifelong disease that lessens the bodyââ¬â¢s ability to use energy found in food. There are three major types of diabetes including type 1, type 2, and gestational diabetes. People with diabetes cannot break down the sugars and carbohydrates found in food. The main type of sugar the body uses for energy is glucose; Glucose is the special sugar that fuels the cells in your body. The se cells also need insulin, which is a hormone that uses glucose to turn into energy for cells. WithRead MoreWomen s Prevalence Of Diabetes1487 Words à |à 6 Pagesprevalence of diabetes is 3 to 5 times higher in First Nations than in the general populationâ⬠(Introduction section, para. 1). Gestational diabetes mellitus is just one of the many types of diabetes Aboriginal people are faced with. It is a type of diabetes that occurs during pregnancy; when your body is unable to produce an adequate amount of insulin to cope with fluctuating hormones and a growing baby (Harris, Bhattacharyya, Dyck, Hayward, Toth, 2013). Although gestational diabetes mellitus (GMD)Read MoreTaking a Look at Diabetes636 Words à |à 3 PagesDiabetes is a disease that affects millions of people around the world. Diabetes has become a rapidly growing issue that has drawn concern from both doctors and patients alike. Around 25 million people in the United States have diabetes mellitus, commonly known as diabetes. Also around 80 million people have pre-diabetes mellitus. There are almost two million people who are diagnosed with diabetes each year. If diabetes rates donââ¬â¢t soon begin to drop, an estimated one in every three adults will haveRead MoreDiabetes Mellitus As A Disability1555 Words à |à 7 PagesThe amount of patients being diagnosed with Diabetes Mellitus has sky-rocketed these past few years. ââ¬Ëâ⬠In 2010 the figures were 25.8 million and 8.3%â⬠â⬠and has increased in ââ¬Ëâ⬠2012 to 29.1 million Americans, or 9.3%.â⬠(American Diabetes Association, 2014); it is seen nationwide, and has now even begun to affect our youth. In South Texas Diabetes Mellitus seems to be the number one thriving disease affecting its general population. Diabetes Mellitus is now one of the most widely known diseases thatRead MoreThe Prevalence Of Gestational Diabetes1325 Words à |à 6 PagesGestational diabetes is a glucose intolerance that devel ops during pregnancy. Early diagnosis and effective treatment are important because gestational diabetes can cause serious maternal and fetal complications. Diet and exercise are the first line treatment options of gestational diabetes, while insulin therapy is the first line medical treatment option. Nursesââ¬â¢ play an important role in education and support of gestational diabetes because they provide day-to-day care for their patients. In thisRead MoreThe Chronic Illness Of Diabetes Mellitus1164 Words à |à 5 Pagespeace of mind, emotional health, and family dynamics. Diabetes Mellitus is the chronic disease I chose to focus on due to the personal nature in my family, the high prevalence among Hispanics like myself, and for the large arena of educational improvements that can be made. I believe that increasing education and awareness among the high risk population can bring great strides in prevention and compliant treatment. Diabetes Mellitus Diabetes mellitus is the chronic illness that I have chosen due toRead MoreDiabetes Mellitus : A Disease1369 Words à |à 6 PagesDiabetes Mellitus Diabetes is a disease that afflicts approximately 29.1 million American people and is ranked as the 7th leading cause of death in America (ââ¬Å"Statistics About Diabetesâ⬠). Thus, understanding and studying this disease has the potential to help better many lives. A patient living with diabetes, or a parent of a child with diabetes all benefit from understanding and learning how to live with this disease, what risk factors to look for and how to adjust life style choices to help preventRead MoreDiabetes Mellitus : The Leading Chronic Disease1102 Words à |à 5 PagesDiabetes Mellitus Diabetes mellitus is one of the leading chronic diseases that can cause high rates of morbidity and mortality worldwide. Diabetes mellitus is characterized by hyperglycemia due to a lack of insulin, insulin resistance, or both. The four main types of diabetes mellitus include type 1 diabetes mellitus, type 2 diabetes mellitus, gestational diabetes mellitus, and other specific types (Darby, 2015, 824). A high rate of periodontal disease has been reported with type 1 and 2 diabetesRead MoreDiabetes Mellitus And Type 2 Diabetes Essay1301 Words à |à 6 PagesDiabetes mellitus, known as ââ¬Å"diabetesâ⬠is a grouping of metabolic diseases that present, over a long period of time, levels of high blood sugar. There are two main forms of diabetes: Type 1 Diabetes Mellitus and Type 2 Diabetes Mellitus. In addition to these two, there is also what is called Gestational Diabetes. In all cases, insulin is somehow not doing its job: Insulin is a hormone produced by beta cells of the pancreas, and is needed to allow glucose to enter the cells and produce energy. IfRead MoreThe Disease Known as Diabetes1089 Words à |à 4 Pages 8.3 percent of Americans have a disease called diabetes mellitus, also known as diabetes. It is characterized by high blood sugar, brought on either because the pancreas is not producing enough of a hormone called insulin, which helps remove glucose from the blood, or because the cells are unresponsive to the insulin that is being produced. Three symptoms that result from this high blood sugar are polyuria, or frequent urination, polydipsia, or increased thirst, and polyphagia, or increased appetite
Wednesday, May 6, 2020
The Real Estate Market Barre, Massachusetts Is A Small...
Barre, Massachusetts is located in the center of the state, a small town of approximately 5,000 people. The real estate market there is average, with some new homes being built and families being drawn to the area for its small-town charm. Though it is a smaller community, routes 32, 122, and 62 are easily accessible and provide access to many larger cities including Worcester and Leominster. Many families that live in town have family members that travel to work in the larger cities. There are currently sixty homes for sale in Barre, MA, with the majority of them in the $250,000 to $300,000 range. Most homes in this range have three bedrooms and from à ½ to 2 acres of land. Styles of homes in Barre include antique homes and farmhouses as well as newer, modern construction. The homes are located in neighborhoods for the most part, with a few located on busier routes on the main streets. While most homes for sale are in this middle range there are a few homes with more acreage and f our bedrooms for sale upwards of $500,000. At the other end of the market there are a three houses for sale under $150,000. These homes are smaller, with two bedrooms, and are in need of some repairs and upkeep. While Barre is small, the town does have a small grocery store, the IGA, as well as a hardware store, a pharmacy, two gas stations and two banks. There are plenty of restaurants including an Uncle Sam s, a Dunkin Donuts and a Subway. The Barre Mill is an informal, family restaurant with
Preparation and Reactions of Boric Acid Free Essays
To prepare boric acid from sodium deteriorate (borax) To carry out tests on the prepared sample of boric acid To study the physical and chemical properties of boric acid Introduction: Boron is an element in the p-block of the periodic table. It has the electron configuration of 1s22s22p1 and is in group 3 or coup 13 (PUPAS classification). In nature, it consists of two isotopes BIB (19. We will write a custom essay sample on Preparation and Reactions of Boric Acid or any similar topic only for you Order Now 6%) and BIB (80. 4%). Boron is bonded to the oxygen in nature. The important sources of Boron are borax and kerning. Boron sides and their derivatives are technologically important and are relatively inexpensive to produce. Boron oxides is very difficult to crystallite and normally exists in a glassy state (d=l . CACM-1). Molten boron oxide has a high melting point of 450 degree Celsius that is readily dissolves metal oxides to form colored borate glasses as one of the main commercial uses of boric oxide. Particularly, borosilicate glasses find wide applications in glassblowing and the production of glass objects. On top of the boric acid, it is also known as hydrogen borate as a weak monobasic Lewis acid. At room temperature, it exists as white powder or colorless crystals with a chemical formula of HOBBS or B(OH)3. Apparatus and materials: ;Sodium deteriorate ;Concentrated hydrochloric acid ;Concentrated sulfuric acid ;Methyl red indicator ;Imitation ;Beaker ;Methanol ;Distilled water ;Electric heater ;Test tube ;Test tube rack ;Glass rod ;Suction funnel ;Suction pump ;Filter flask ;Filter paper ;Spatula ;Watch glass ;Splint Procedures: 1 . About log of sodium deteriorate (borax) is dissolved in CACM of water in a beaker. 2. The mixture is boiled and CACM of concentrated hydrochloric is added into the solution. 3. The beaker is immersed into a container with ice and water to cool down the temperature. 4. After the solution is cooled down, the boric acid is crystallized out by using the Boucher funnel, 2 layers of filter papers, suction pump and a filtering flask. 5. The remaining crystals in the beaker and on the glass rod are washed well with ice-cold water for a few times and filtered off with the Boucher funnel. 6. The yield is left aside to be dried and the weight is measured and recorded. Test 1 1. A little boric acid is inserted into a test tube. 2. Small amount of distilled water is added to dissolve the acid in the test tube. 3. A drop of methyl red indicator is added. 4. Test tube is labeled as A. 5. Steps 1 to 3 are repeated again by replacing the acid with the imitation and the test tube is labeled as B. 6. Half of each solution in test tube A and B are mixed in a test tube labeled as C. 7. All results and observation are recorded. -rest 2 1. A small amount of boric acid crystals is inserted into a Tyrant boiling tube. 2. A little ethanol is added into the boiling tube Just to cover the acid. 3. Some concentrated sulfuric acid is then added into the tube. 4. The boiling tube is held by a test tube holder and heated on a Bunsen burner. 5. The vapor produced is ignited by using a burning wooden splinter. 6. All observations are recorded. Discussion: First and foremost, we managed to yield 4. Egg of HOBBS. According to our calculation, the theoretical mass that we are supposed to obtain is 6. Egg. This means that our percentage of yield is 74. 64%. According to Vogueââ¬â¢s Textbook of Practical Organic Chemistry, yields around 100% are called quantitative, whereas yields above 70% are good. This means that our team did quite a great Job. Boric acid is a Lewis acid that is able to interact with the water molecules to give out hydrogen ions and dehydrogenation ion in the solution. In test 1, the methyl red indicator is used to determine the acidity of the each solution in different test tubes. The indicator can show the pH range at around 4. 4 ââ¬â 6. 2. At pH 4. 4, the solution with the indicator will appear to be in red in color and whereas at pH 6. , it will show allow. On test tube A, solution turns from colorless to pink color. This shows that boric acid is a relatively weak acid with pH around 4-5. Next on test tube B, the methyl red indicator is added into a imitation solution. The color of the solution seemed to remain unchanged. It is colorless. In fact, the solution is supposed to change from colorless to yellow. Perhaps, we accidentally made some mist akes by adding the wrong reactant in the experiment or we were a bit of too rush deciding the color of the solution without looking at it carefully. Thirdly, when we mix both he solutions from A and B, an intense pink solution is formed. This means that a stronger acid is formed. It can be simply explained by the stronger acid complex formed in between imitation and boric acid. The pH is less than 4 for sure. According to the test 2 results, a beautiful green flame is formed when we ignite the vapor with a burning wooden splinter. By mixing the alcohol (methanol) and acid (conch HOSTS) will create ester (CHI)BIBB. An alcohol flame itself is usually, ordinarily colorless. The presence of the green in the flame is indicating the ester formed contains boron element. A strong acid like concentrated sulfuric acid is needed to propionate the HOBBS and this will create the electroplate which attacks the O atom of the methanol. Without the existence of a strong acid, an intense green flame might not be formed. This is because ester may not formed and even if it is formed, it will exist in equilibrium with the alcohol boric acid. Thus, making the green flame not really intense. There are a few precautionary steps that should be taken during this experiment. Firstly, suction pump used in test 1 is powerful and thus, 2 layers of filter papers are seed to cover the holes of the Boucher funnel. From our experience, the suction pump will cause the filter paper to be torn if only a piece of filter paper is used. Furthermore, we shall always pour the solution slowly on the rod, so that the solution will flow slowly without causing any wastage. By using this method, we can make sure the crystals are accumulated in the middle of the filter paper and it eases our Job to take out the filter paper from the funnel. On top of the safety, all acids are corrosive. In this experiment, we use concentrated hydrochloric acid and concentrated elliptic acid. We shall wear gloves and handle them with extra care to prevent and avoid any accident to occur. In addition, a tyrant boiling tube is used instead of a test tube in test 2 (flame test). A boiling tube can withstand strong heat without breakage. Test 2 (flame test) has to be carried out in the fume hood as the vapor released from the boiling tube is toxic. Therefore, we shall remain our distance with the vapor, although the green flame is beautiful. Last but not least, we shall discard the excess boric acid into the waste bottle instead of basin as to prevent water pollution. How to cite Preparation and Reactions of Boric Acid, Papers
Assembly Language free essay sample
In other words, assembly language programs are specific to a particular hardware. Assembly language programs for a Mac will not work on a PC. But this can be an advantage for programmers who are targeting a specific platform and need full control over the hardware. Table of Contents:| 1. Introduction 2. Basic Concepts Assembler language Basic concepts Using debug program| | 3. Assembler programming Assembly process More assembler programs Types of instructions 4. Assembler language instructions Transfer instructions Loading instructions Stack instructions Logic instructions Arithmetic instructions Jump instructions Instructions for cycles: loop Counting Instructions Comparison Instructions Flag Instructions 5. Interruptions and file managing Internal hardware interruptions External hardware interruptions Software interruptions Most Common interruptions 6. Macros and procedures| INTRODUCTION In the introductory section some of the elemental concepts regarding computer systems are mentioned, along with the concepts of the assembly language itself, and continues with the tutorial itself. Why learn assembler language The first reason to work with assembler is that it provides the opportunity of knowing more the operation of your PC, which allows the development of software in a more consistent manner. The second reason is the total control of the PC which you can have with the use of the assembler. Another reason is that the assembly programs are quicker, smaller, and have larger capacities than ones created with other languages. Lastly, the assembler allows an ideal optimization in programs, be it on their size or on their execution. Assembler language Basic conceptsInformation UnitsIn order for the PC to process information, it is necessary that this information be in special cells called registers. The registers are groups of 8 or 16 flip-flops. A flip-flop is a device capable of storing two levels of voltage, a low one, regularly 0. 5 volts, and another one, commonly of 5 volts. The low level of energy in the flip-flop is interpreted as off or 0, and the high level as on or 1. These states are usually known as bits, which are the smallest information unit in a computer. A group of 16 bits is known as word; a word can be divided in groups of 8 bits called bytes, and the groups of 4 bits are called nibbles. Numeric systemsThe numeric system we use daily is the decimal system, but this system is not convenient for machines since the information is handled codified in the shape of on or off bits; this way of codifying takes us to the necessity of knowing the positional calculation which will allow us to express a number in any base where we need it. It is possible to represent a determined number in any base through the following formula:Where n is the position of the digit beginning from right to left and numbering from zero. D is the digit on which we operate and B is the used numeric base. TOPConverting binary numbers to decimalsWhen working with assembly language we come on the necessity of converting numbers from the binary system, which is used by computers, to the decimal system used by people. The binary system is based on only two conditions or states, be it on(1) or off(0), thus its base is two. For the conversion we can use the positional value formula:For example, if we have the binary number of 10011, we take each digit from right to left and multiply it by the base, elevated to the new position they are:Binary: 1 1 0 0 1Decimal: 1*2^0 + 1*2^1 + 0*2^2 + 0*2^3 + 1*2^4= 1 + 2 + 0 + 0 + 16 = 19 decimal. The ^ character is used in computation as an exponent symbol and the * character is used to represent multiplication. Converting decimal numbers to binaryThere are several methods to convert decimal numbers to binary; only one will be analyzed here. Naturally a conversion with a scientific calculator is much easier, but one cannot always count with one, so it is convenient to at least know one formula to do it. The method that will be explained uses the successive division of two, keeping the residue as a binary digit and the result as the next number to divide. Let us take for example the decimal number of 43. 43/2=21 and its residue is 121/2=10 and its residue is 110/2=5 and its residue is 05/2=2 and its residue is 12/2=1 and its residue is 01/2=0 and its residue is 1Building the number from the bottom , we get that the binary result is 101011Hexadecimal systemOn the hexadecimal base we have 16 digits which go from 0 to 9 and from the letter A to the F, these letters represent the numbers from 10 to 15. Thus we count 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E, and F. The conversion between binary and hexadecimal numbers is easy. The first thing done to do a conversion of a binary number to a hexadecimal is to divide it in groups of 4 bits, beginning from the right to the left. In case the last group, the one most to the left, is under or less than 4 bits, the missing places are filled with zeros. Taking as an example the binary number of 101011, we divide it in 4 bits groups and we are left with:10;1011Filling the last group with zeros (the one from the left):0010;1011Afterwards we take each group as an independent number and we consider its decimal value:0010=2;1011=11But since we cannot represent this hexadecimal number as 211 because it would be an error, we have to substitute all the values greater than 9 by their respective representation in hexadecimal, with which we obtain:2BH, where the H represents the hexadecimal base. In order to convert a hexadecimal number to binary it is only necessary to invert the steps: the first hexadecimal digit is taken and converted to binary, and then the second, and so on. Data representation methods in a computer. ASCII codeASCII is an acronym of American Standard Code for Information Interchange. This code assigns the letters of the alphabet, decimal digits from 0 to 9 and some additional symbols a binary number of 7 bits, putting the 8th bit in its off state or 0. This way each letter, digit or special character occupies one byte in the computer memory. We can observe that this method of data representation is very inefficient on the numeric aspect, since in binary format one byte is not enough to represent numbers from 0 to 255, but on the other hand with the ASCII code one byte may represent only one digit. Due to this inefficiency, the ASCII code is mainly used in the memory to represent text. BCD MethodBCD is an acronym of Binary Coded Decimal. In this notation groups of 4 bits are used to represent each decimal digit from 0 to 9. With this method we can represent two digits per byte of information. Even when this method is much more practical for number representation in the memory compared to the ASCII code, it still less practical than the binary since with the BCD method we can only represent digits from 0 to 99. On the other hand in binary format we can represent all digits from 0 to 255. This format is mainly used to represent very large numbers in mercantile applications since it facilitates operations avoiding mistakes. Floating point representationThis representation is based on scientific notation; this is, to represent a number in two parts: its base and its exponent. As an example, the number 1234000, can be represented as 1. 23*10^6, in this last notation the exponent indicates to us the number of spaces that the decimal point must be moved to the right to obtain the original result. In case the exponent was negative, it would be indicating to us the number of spaces that the decimal point must be moved to the left to obtain the original result. Using Debug programP rogram creation processFor the creation of a program it is necessary to follow five steps: * Design of the algorithm, stage the problem to be solved is established and the best solution is proposed, creating squematic diagrams used for the better solution proposal. Coding the algorithm, consists in writing the program in some programming language; assembly language in this specific case, taking as a base the proposed solution on the prior step. * Translation to machine language is the creation of the object program, in other words, the written program as a sequence of zeros and ones that can be interpreted by the processor. * Test the program, after the translation the program into machine language, execute the program in the computer machine. * The last stage is the elimination of detected faults on the program on the test stage. The correction of a fault normally requires the repetition of all the steps from the first or second. CPU RegistersThe CPU has 4 internal registers, each one of 16 bits. The first four, AX, BX, CX, and DX are general use registers and can also be used as 8 bit registers, if used in such a way it is necessary to refer to them for example as: AH and AL, which are the high and low bytes of the AX register. This nomenclature is also applicable to the BX, CX, and DX registers. The registers known by their specific names:AX Accumulator BX Base register CX Counting register DX Data register DS Data segment register ES Extra segment register SS Battery segment register CS Code segment register BP Base pointers register SI Source index register DI Destiny index register SP Battery pointer register IP Next instruction pointer register F Flag registerDebug programTo create a program in assembler two options exist, the first one is to use the TASM or Turbo Assembler, of Borland, and the second one is to use the debugger on this first section we will use this last one since it is found in any PC with the MS-DOS, which makes it available to any user who has access to a machine with these characteristics. Debug can only create files with a . COM extension, and because of the characteristics of these kinds of programs they cannot be larger than 64 kb, and they also must start with displacement, offset, or 0100H memory direction inside the specific segment. Debug provides a set of commands that lets you perform a number of useful operations:A Assemble symbolic instructions into machine code D Display the contents of an area of memory E Enter data into memory, beginning at a specific location G Run the executable program in memory N Name a program P Proceed, or execute a set of related instructions Q Quit the debug program R Display the contents of one or more registers T Trace the contents of one instruction U Unassembled machine code into symbolic code W Write a program onto diskIt is possible to visualize the values of the internal registers of the CPU using the Debug program. To begin working with Debug, type the following prompt in your computer:C:/gt;Debug [Enter]On the next line a dash will appear, this is the indicator of Debug, at this moment the instructions of Debug can be introduced using the following command:-r[Enter]AX=0000 BX=0000 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000 DS=0D62 ES=0D62 SS=0D62 CS=0D62 IP=0100 NV EI PL NZ NA PO NC 0D62:0100 2E CS: D62:0101 803ED3DF00 CMP BYTE PTR [DFD3],00 CS:DFD3=03All the contents of the internal registers of the CPU are displayed; an alternative of viewing them is to use the r command using as a parameter the name of the register whose value wants to be seen. For example:-rbx BX 0000 :This instruction will only display the content of the BX register and the Debug indicator changes from - to :When the prompt is like this, it is possible to change the value of the register which was seen by typing the new value and [Enter], or the old value can be left by pressing [Enter] without typing any other value. TOPAssembler structureIn assembly language code lines have two parts, the first one is the name of the instruction which is to be executed, and the second one are the parameters of the command. For example: add ah bhHere add is the command to be executed, in this case an addition, and ah as well as bh are the parameters. For example:mov al, 25In the above example, we are using the instruction mov, it means move the value 25 to al register. The name of the instructions in this language is made of two, three or four letters. These instructions are also called mnemonic names or operation codes, since they represent a function the processor will perform. Sometimes instructions are used as follows:add al,[170]The brackets in the second parameter indicate to us that we are going to work with the content of the memory cell number 170 and not with the 170 value, this is known as direct addressing. Creating basic assembler programThe first step is to initiate the Debug, this step only consists of typing debug[Enter] on the operative system prompt. To assemble a program on the Debug, the a (assemble) command is used; when this command is used, the address where you want the assembling to begin can be given as a parameter, if the parameter is omitted the assembling will be initiated at the locality specified by CS:IP, usually 0100h, which is the locality where programs with . COM extension must be initiated. And it will be the place we will use since only Debug can create this specific type of programs. Even though at this moment it is not necessary to give the a command a parameter, it is recommendable to do so to avoid problems once the CS:IP registers are used, therefore we type:a 100[enter] mov ax,0002[enter] mov bx,0004[enter] add ax,bx[enter] nop[enter][enter]What does the program do? , move the value 0002 to the ax register, move the value 0004 to the bx register, add the contents of the ax and bx registers, the instruction, no operation, to finish the program. In the debug program. After to do this, appear on the screen some like the follow lines:C:\gt;debug -a 100 0D62:0100 mov ax,0002 0D62:0103 mov bx,0004 0D62:0106 add ax,bx 0D62:0108 nop 0D62:0109Type the command t (trace), to execute each instruction of this program, example:-tAX=0002 BX=0000 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000 DS=0D62 ES=0D62 SS=0D62 CS=0D62 IP=0103 NV EI PL NZ NA PO NC 0D62:0103 BB0400 MOV BX,0004You see that the value 2 move to AX register. Type the command t (trace), again, and you see the second instruction is executed. tAX=0002 BX=0004 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000 DS=0D62 ES=0D62 SS=0D62 CS=0D62 IP=0106 NV EI PL NZ NA PO NC 0D62:0106 01D8 ADD AX,BXType the command t (trace) to see the instruction add is executed, you will see the follow lines:-tAX=0006 BX=0004 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000 DS=0D62 ES=0D62 SS=0D62 CS=0D62 IP=0108 NV EI PL NZ NA PE NC 0D62:0108 90 NOPThe possibility that the registers contain different values exists, but AX and BX must be the same, since they are the ones we just modified. To exit Debug use the q (quit) command. TOPStoring and loading the programsIt would not seem practical to type an entire program each time it is needed, and to avoid this it is possible to store a program on the disk, with the enormous advantage that by being already assembled it will not be necessary to run Debug again to execute it. The steps to save a program that it is already stored on memory are:Obtain the length of the program subtracting the final address from the initial address, naturally in hexadecimal system. Give the program a name and extension. Put the length of the program on the CX register. Order Debug to write the program on the disk. By using as an example the following program, we will have a clearer idea of how to take these steps:When the program is finally assembled it would look like this:0C1B:0100 mov ax,0002 0C1B:0103 mov bx,0004 0C1B:0106 add ax,bx 0C1B:0108 int 20 0C1B:010ATo obtain the length of a program the h command is used, since it will show us the addition and subtraction of two numbers in hexadecimal. To obtain the length of ours, we give it as parameters the value of our programs final address (10A), and the programs initial address (100). The first result the command shows us is the addition of the parameters and the second is the subtraction. h 10a 100 020a 000aThe n command allows us to name the program. -n test. comThe rcx command allows us to change the content of the CX register to the value we obtained from the size of the file with h, in this case 000a, since the result of the subtraction of the final address from the initial address. -rcx CX 0000 :000aLastly, the w command writes our pr ogram on the disk, indicating how many bytes it wrote. -w Writing 000A bytesTo save an already loaded file two steps are necessary:Give the name of the file to be loaded. Load it using the l (load) command. To obtain the correct result of the following steps, it is necessary that the above program be already created. Inside Debug we write the following:-n test. com -l -u 100 109 0C3D:0100 B80200 MOV AX,0002 0C3D:0103 BB0400 MOV BX,0004 0C3D:0106 01D8 ADD AX,BX 0C3D:0108 CD20 INT 20The last u command is used to verify that the program was loaded on memory. What it does is that it disassembles the code and shows it disassembled. The parameters indicate to Debug from where and to where to disassemble. Debug always loads the programs on memory on the address 100H, otherwise indicated. | | Assembler programming| Table of ContentsBuilding Assembler programs Assembly process More assembler programs Types of instructionsBuilding Assembler programsIn order to be able to create a program, several tools are needed:First an editor to create the source program. Second a compiler, which is nothing more than a program that translates the source program into an object program. And third, a linker that generates the executable program from the object program. The editor can be any text editor at hand, and as a compiler we will use the TASM macro assembler from Borland, and as a linker we will use the Tlink program. The extension used so that TASM recognizes the source programs in assembler is . ASM; once translated the source program, the TASM creates a file with the . OBJ extension, this file contains an intermediate format of the program, called like this because it is not executable yet but it is not a program in source language either anymore. The linker generates, from a . OBJ or a combination of several of these files, an executable program, whose extension usually is . EXE though it can also be .COM, depending of the form it was assembled. Assembler ProgrammingTo build assembler programs using TASM programs is a different program structure than from using debug program. Its important to include the following assembler directives:. MODEL SMALL Assembler directive that defines the memory model to use in the program. CODE Assembler directive that defines the program instructions. STACK Assembler directive that reserves a memory space for program instructions in the stackEND Assembler directive that finishes the assembler programLets programFirst stepuse any editor program to create the source file. Type the following lines:TOPfirst example; use ; to put comments in the assembler program . MODEL SMALL; memory model .STACK; memory space for program instructions in the stack .CODE; the following lines are program instructions mov ah,1h; moves the value 1h to register ah mov cx,07h;moves the value 07h to register cx int 10h;10h interruption mov ah,4ch;moves the value 4 ch to register ah int 21h;21h interruption END; finishes the program codeThis assembler program changes the size of the computer cursor. Second stepSave the file with the following name: examp1. sm Dont forget to save this in ASCII format. Third stepUse the TASM program to build the object program. Example:C:\gt;tasm exam1. asm Turbo Assembler Version 2. 0 Copyright (c) 1988, 1990 Borland InternationalAssembling file: exam1. asm Error messages: None Warning messages: None Passes: 1 Remaining memory: 471kThe TASM can only create programs in . OBJ format, which are not executable by themselves, but rather it is necessa ry to have a linker which generates the executable code. Fourth stepUse the TLINK program to build the executable program example:C:\gt;tlink exam1. bj Turbo Link Version 3. 0 Copyright (c) 1987, 1990 Borland InternationalC:\gt;Where exam1. obj is the name of the intermediate program, . OBJ. This generates a file directly with the name of the intermediate program and the . EXE extension. Fifth stepExecute the executable programC:\gt;exam1[enter]Remember, this assembler program changes the size of the cursor. Assembly process. TOPSEGMENTSThe architecture of the x86 processors forces to the use of memory segments to manage the information, the size of these segments is of 64kb. The reason of being of these segments is that, considering that the maximum size of a number that the processor can manage is given by a word of 16 bits or register, it would not be possible to access more than 65536 localities of memory using only one of these registers, but now, if the PCs memory is divided into groups or segments, each one of 65536 localities, and we use an address on an exclusive register to find each segment, and then we make each address of a specific slot with two registers, it is possible for us to access a quantity of 4294967296 bytes of memory, which is, in the present day, more memory than what we will see installed in a PC. In order for the assembler to be able to manage the data, it is necessary that each piece of information or instruction be found in the area that corresponds to its respective segments. The assembler accesses this information taking into account the localization of the segment, given by the DS, ES, SS and CS registers and inside the register the address of the specified piece of information. It is because of this that when we create a program using the Debug on each line that we assemble, something like this appears:1CB0:0102 MOV AX,BXWhere the first number, 1CB0, corresponds to the memory segment being used, the second one refers to the address inside this segment, and the instructions which will be stored from that address follow. The way to indicate to the assembler with which of the segments we will work with is with the . CODE, . DATA and . STACK directives. The assembler adjusts the size of the segments taking as a base the number of bytes each assembled instruction needs, since it would be a waste of memory to use the whole segments. For example, if a program only needs 10kb to store data, the data segment will only be of 10kb and not the 64kb it can handle. SYMBOLS CHARTEach one of the parts on code line in assembler is known as token, for example on the code line:MOV AX,Varwe have three tokens, the MOV instruction, the AX operator, and the VAR operator. What the assembler does to generate the OBJ code is to read each one of the tokens and look for it on an internal equivalence chart known as the reserved words chart, which is where all the mnemonic meanings we use as instructions are found. Following this process, the assembler reads MOV, looks for it on its chart and identifies it as a processor instruction. Likewise it reads AX and recognizes it as a register of the processor, but when it looks for the Var token on the reserved words chart, it does not find it, so then it looks for it on the symbols chart which is a table where the names of the variables, constants and labels used in the program where their addresses on memory are included and the sort of data it contains, are found. Sometimes the assembler comes on a token which is not defined on the program, therefore what it does in these cased is to pass a second time by the source program to verify all references to that symbol and place it on the symbols chart. There are symbols which the assembler will not find since they do not belong to that segment and the program does not know in what part of the memory it will find that segment, and at this time the linker comes into action, which will create the structure necessary for the loader so that the segment and the token be defined when the program is loaded and before it is executed. TOPMore assembler programsAnother examplefirst stepuse any editor program to create the source file. Type the following lines:;example11 . model small .stack .code mov ah,2h ;moves the value 2h to register ah mov dl,2ah ;moves de value 2ah to register dl ;(Its the asterisk value in ASCII format) int 21h ;21h interruption mov ah,4ch ;4ch function, goes to operating system int 21h ;21h interruption nd ;finishes the program codesecond stepSave the file with the following name: exam2. asm Dont forget to save this in ASCII format. third stepUse the TASM program to build the object program. C:\gt;tasm exam2. asm Turb o Assembler Version 2. 0 Copyright (c) 1988, 1990 Borland International Assembling file: exam2. asm Error messages: None Warning messages: None Passes: 1 Remaining memory: 471kfourth stepUse the TLINK program to build the executable programC:\gt;tlink exam2. obj Turbo Link Version 3. 0 Copyright (c) 1987, 1990 Borland InternationalC:\gt;fifth stepExecute the executable programC:\gt;ejem11[enter] * C:\gt;This assembler program shows the asterisk character on the computer screenTOPTypes of instructions. Data movementIn any program it is necessary to move the data in the memory and in the CPU registers; there are several ways to do this: it can copy data in the memory to some register, from register to register, from a register to a stack, from a stack to a register, to transmit data to external devices as well as vice versa. This movement of data is subject to rules and restrictions. The following are some of them:*It is not possible to move data from a memory locality to another directly; it is necessary to first move the data of the origin locality to a register and then from the register to the destiny locality. *It is not possible to move a constant directly to a segment register; it first must be moved to a register in the CPU. It is possible to move data blocks by means of the movs instructions, which copies a chain of bytes or words; movsb which copies n bytes from a locality to another; and movsw copies n words from a locality to another. The last two instructions take the values from the defined addresses by DS:SI as a group of data to move and ES:DI as the new localization of the data. To move data there are also structures called batteries, where the data is introduced with the push instruction and are extracted with the pop instruction. In a stack the first data to be introduced is the last one we can take, this is, if in our program we use these instructions:PUSH AX PUSH BX PUSH CXTo return the correct values to each register at the moment of taking them from the stack it is necessary to do it in the following order:POP CX POP BX POP AXFor the communication with external devices the out command is used to send information to a port and the in command to read the information received from a port. The syntax of the out command is:OUT DX,AXWhere DX contains the value of the port which will be used for the communication and AX contains the information which will be sent. The syntax of the in command is:IN AX,DXWhere AX is the register where the incoming information will be kept and DX contains the address of the port by which the information will arrive. Logic and arithmetic operationsThe instructions of the logic operations are: and, not, or and xor. These work on the bits of their operators. To verify the result of the operations we turn to the cmp and test instructions. The instructions used for the algebraic operations are: to add, to subtract sub, to multiply mul and to divide div. Almost all the comparison instructions are based on the information contained in the flag register. Normally the flags of this register which can be directly handled by the programmer are the data direction flag DF, used to define the operations about chains. Another one which can also be handled is the IF flag by means of the sti and cli instructions, to activate and deactivate the interruptions. Jumps, loops and proceduresThe unconditional jumps in a written program in assembler language are given by the jmp instruction; a jump is to moves the flow of the execution of a program by sending the control to the indicated address. A loop, known also as iteration, is the repetition of a process a certain number of times until a condition is fulfilled. | |
Subscribe to:
Posts (Atom)