The document discusses memory segmentation and registers in the 8086 processor. Memory is divided into 64K segments identified by a 16-bit number, and locations within segments are specified with a 16-bit offset. There are 14 registers for data, addresses, segments, pointers, indexes, status flags, and instructions. The registers are used for arithmetic, logic, and flow control operations. Instructions include data transfer, arithmetic, logic, shifts, and flow control. Memory addressing uses segment and offset addresses, and the stack uses push and pop instructions.
The document summarizes data transfer and arithmetic instructions for the 8086 instruction set. It describes instructions such as MOV, XCHG, LEA, LDS, LES, ADD, SUB, MUL, DIV, INC, DEC and DAA. For each instruction, it provides details on the operation, operands, flags affected and examples of usage. It also explains considerations when using different data types as operands for instructions.
The document summarizes data transfer, arithmetic, and other instructions for the 8086 processor. It describes instructions such as MOV, XCHG, LEA, LDS, LES, ADD, SUB, MUL, DIV, INC, DEC, and DAA. For each instruction, it provides details on the operation performed, valid operands, and examples of usage. It also explains considerations for operating on bytes versus words and signed versus unsigned numbers.
The document describes several data transfer and arithmetic instructions for the 8086 processor. The MOV instruction copies data between registers and memory locations. The XCHG instruction exchanges the contents of two registers or a register and memory. The ADD, SUB, MUL, and DIV instructions perform arithmetic operations on operands in registers or memory, with results stored in registers. Flags are set to indicate conditions like carry, overflow, or zero results.
The document discusses various instruction types and data transfer instructions in the 8086 microprocessor. It provides details on different categories of instructions like data transfer, arithmetic, logical, string, and program flow instructions. Examples are given for common instructions like MOV, ADD, AND, SHIFT, CALL, RET. Addressing modes, operand types, flags affected are explained for many fundamental instructions.
Mastering Assembly Language: Programming with 8086sravanithonta79
Â
Unlock the secrets of 8086 assembly language programming with this comprehensive document. Delve into the intricacies of low-level coding, understand the architecture, and harness the full potential of the 8086 processor. From foundational concepts to advanced techniques, this guide empowers you to craft efficient and powerful programs for the 8086 platform.
The document describes various arithmetic instructions in the Intel 8086 microprocessor, including ADD, SUB, MUL, DIV, INC, DEC, CMP, NEG, CBW, CWD, AAA, and DAA. It provides details on the syntax, operation, examples and effects on flags for each instruction. A total of 20 arithmetic instructions are discussed that perform operations like addition, subtraction, multiplication, division, incrementing, decrementing and adjusting results.
The document describes various arithmetic instructions in the Intel 8086 microprocessor, including ADD, SUB, MUL, DIV, INC, DEC, CMP, NEG, CBW, CWD, AAA, and DAA. It provides details on the syntax, operation, examples and effects on flags for each instruction. A total of 20 arithmetic instructions are discussed that perform operations like addition, subtraction, multiplication, division, incrementing, decrementing and adjusting results.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
The document summarizes data transfer and arithmetic instructions for the 8086 instruction set. It describes instructions such as MOV, XCHG, LEA, LDS, LES, ADD, SUB, MUL, DIV, INC, DEC and DAA. For each instruction, it provides details on the operation, operands, flags affected and examples of usage. It also explains considerations when using different data types as operands for instructions.
The document summarizes data transfer, arithmetic, and other instructions for the 8086 processor. It describes instructions such as MOV, XCHG, LEA, LDS, LES, ADD, SUB, MUL, DIV, INC, DEC, and DAA. For each instruction, it provides details on the operation performed, valid operands, and examples of usage. It also explains considerations for operating on bytes versus words and signed versus unsigned numbers.
The document describes several data transfer and arithmetic instructions for the 8086 processor. The MOV instruction copies data between registers and memory locations. The XCHG instruction exchanges the contents of two registers or a register and memory. The ADD, SUB, MUL, and DIV instructions perform arithmetic operations on operands in registers or memory, with results stored in registers. Flags are set to indicate conditions like carry, overflow, or zero results.
The document discusses various instruction types and data transfer instructions in the 8086 microprocessor. It provides details on different categories of instructions like data transfer, arithmetic, logical, string, and program flow instructions. Examples are given for common instructions like MOV, ADD, AND, SHIFT, CALL, RET. Addressing modes, operand types, flags affected are explained for many fundamental instructions.
Mastering Assembly Language: Programming with 8086sravanithonta79
Â
Unlock the secrets of 8086 assembly language programming with this comprehensive document. Delve into the intricacies of low-level coding, understand the architecture, and harness the full potential of the 8086 processor. From foundational concepts to advanced techniques, this guide empowers you to craft efficient and powerful programs for the 8086 platform.
The document describes various arithmetic instructions in the Intel 8086 microprocessor, including ADD, SUB, MUL, DIV, INC, DEC, CMP, NEG, CBW, CWD, AAA, and DAA. It provides details on the syntax, operation, examples and effects on flags for each instruction. A total of 20 arithmetic instructions are discussed that perform operations like addition, subtraction, multiplication, division, incrementing, decrementing and adjusting results.
The document describes various arithmetic instructions in the Intel 8086 microprocessor, including ADD, SUB, MUL, DIV, INC, DEC, CMP, NEG, CBW, CWD, AAA, and DAA. It provides details on the syntax, operation, examples and effects on flags for each instruction. A total of 20 arithmetic instructions are discussed that perform operations like addition, subtraction, multiplication, division, incrementing, decrementing and adjusting results.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
The instruction set of the 8086 microprocessor can be classified into several groups, including data transfer instructions, arithmetic instructions, and processor control instructions. The data transfer instructions include general purpose instructions to move bytes or words between registers and memory locations. Common instructions are MOV, PUSH, POP, and XCHG. The arithmetic instructions perform operations like addition, subtraction, and comparison and affect the processor's flags. Common instructions are ADD, SUB, INC, and CMP. The 8086 instruction set also includes instructions for bit manipulation, string operations, and transferring program execution.
The instruction set of the 8086 microprocessor can be classified into several groups, including data transfer instructions, arithmetic instructions, and processor control instructions. The data transfer instructions include general purpose instructions to move bytes or words between registers and memory locations. Common instructions are MOV, PUSH, POP, and XCHG. The arithmetic instructions perform operations like addition, subtraction, and comparison and affect the processor's flags. Common instructions are ADD, SUB, INC, and CMP. The 8086 instruction set supports both integer and BCD arithmetic through specialized instructions like AAA and DAA.
The document provides details about basic assembly language instructions for the 8086 microprocessor. It discusses data transfer instructions like MOV, PUSH, POP, IN and OUT. Arithmetic instructions such as ADD, SUB, INC, DEC, MUL, DIV are described. Bit manipulation and logic instructions including AND, OR, XOR, TEST, SHR and SHL are covered. String manipulation using MOVS, LODS, STOS and CMPS is explained. The lecture also outlines program flow instructions like CALL, RET, LOOP, JMP and conditional jumps. Examples are provided to illustrate the usage of each instruction type.
The document provides details about basic assembly language instructions for the 8086 microprocessor. It discusses data transfer instructions like MOV, PUSH, POP, IN and OUT. Arithmetic instructions such as ADD, SUB, INC, DEC, MUL, DIV are described. Bit manipulation and logic instructions including AND, OR, XOR, TEST, SHR and SHL are covered. String manipulation using MOVS, LODS, STOS and CMPS is explained. The lecture also outlines program flow instructions like CALL, RET, LOOP, JMP and conditional jumps. Examples are provided to illustrate the usage of each instruction type.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
The document discusses several topics related to computer architecture and assembly language programming:
1. It describes the von Neumann architecture model and key components like the ALU, control unit, and memory.
2. It summarizes Moore's Law and how increasing transistor density has allowed for higher performance chips over time.
3. It provides an overview of some early Intel processors like the 8086 and techniques used to increase processor speed like pipelining.
4. It includes brief explanations of common assembly language concepts like registers, memory addressing, and arithmetic and logical instructions.
The 8086 CPU is a 16-bit microprocessor with a 16-bit data bus, 20-bit address bus, and includes an ALU, BIU, and EU. The BIU fetches instructions and data from memory using segment registers and address pointers, while the EU decodes and executes instructions using general purpose registers like AX, BX, CX, DX, and flags. Memory is divided into segments of up to 64KB that can overlap. The 8086 supports various addressing modes to access memory locations.
The document provides details about the architecture of SIC and SIC/XE machines. It describes the memory, registers, data formats, instruction formats, addressing modes, instruction set, and input/output for both machines. It also provides example programs to illustrate different instructions and addressing modes. Additionally, it explains CISC machines in general and provides details about the VAX and Pentium Pro architectures as examples of CISC instruction set architectures.
The document provides information about the instruction sets of the 8086 microprocessor. It defines what an instruction set is and describes the different instruction formats used by the 8086. The main types of 8086 instructions are then outlined, including data transfer instructions, arithmetic instructions, bit manipulation instructions, branch instructions, and others. Specific instructions like MOV, ADD, SUB, and MUL are explained through examples of their syntax and operation.
This document discusses the 16-bit 68000 microprocessor architecture. It describes the 68000's 16-bit external data bus, 32-bit registers including 8 data registers and 7 address registers. It covers the register organization, 24-bit address space of 16MB, and functions of registers like the program counter, stack pointer, and status register.
The document explains the instruction word format and different instruction types. It details the addressing modes like direct, register indirect, autoincrement, autodecrement, and absolute. Assembly language syntax and directives like ORG, EQU, and DS are outlined. Logic instructions, condition codes, conditional and unconditional branching, subroutines, and the stack are summarized. The document also provides
This document outlines the basics of assembly language, including basic elements, statements, program data, variables, constants, instructions, translation to assembly language, and program structure. It discusses statement syntax, valid names, operation and operand fields. It also covers common instructions like MOV, ADD, SUB, INC, DEC, and NEG. Finally, it discusses program segments, memory models, and how to define the data, stack, and code segments.
This document outlines the course outcomes and content for a Microprocessor and Programming course. The five course outcomes cover describing microprocessor architecture and organization, functional blocks and instruction set of the 8086 microprocessor, memory and addressing modes, using different instruction types and interrupts, and developing assembly language programs. The content includes details on the 8086 instruction format, operation codes, addressing modes, instruction types like data transfer, arithmetic, and flow control, and assembly programming tools.
The document discusses the architecture of the 8086 microprocessor. It describes the 8086 as a 16-bit processor that can access external memory using a 20-bit address bus. The 8086 uses memory segmentation to map the larger 20-bit physical addresses to the smaller 16-bit registers. Each segment is defined by a base address stored in a 16-bit segment register. The 20-bit physical address is calculated by combining the segment register value and offset. The document provides details on the various memory segments and addressing modes supported by the 8086 architecture.
This document describes a lecture on the Intel 8086 instruction set. It discusses writing real-mode 8086 assembly language programs that include data transfer between registers and memory, arithmetic/logic instructions, conditional jumps, subroutine calls, segment/offset addressing, and interrupts. The goal is to learn enough of the 8086 instruction set to write simple routines to service interrupts and read/write I/O ports. An example program is provided to demonstrate various 8086 features.
Here are the steps:
1. MUL BL
- AL (85H) is multiplied by BL (35H)
- The 16-bit result (1B89H) is stored in AX, with the lower byte in AL and the higher byte in AH
So after the multiplication, AX = 1B89H.
Ex2: Assume that each instruction starts from these values:
DX:AX = 1234H, BX = 57H
1. DIV BX â Quotient in AX, Remainder in DX
instruction set of 8086 microprocessor has following categories:
-Data transfer instructions
-Arithmetic instructions
-Logical instructions
-Flag manipulation instructions
-shift and rotate instructions
-String instructions
-8086 assembler directives
The document discusses assembly language instructions and directives. It explains that instructions tell the processor what to do and are assembled into machine code, while directives tell the assembler what to do and are not part of the instruction set. Common directives include EQU to define constants, and data definition directives like DB, DW and DD to define memory for data storage. The document also covers instruction operands like registers, immediates, and memory. It provides examples of basic instructions, and arithmetic instructions like ADD, SUB, MUL and DIV.
The document provides details about the various instructions in the 8085 instruction set. It describes 3 categories of instructions - data transfer instructions, arithmetic instructions, and logical/branching instructions. The data transfer instructions include instructions to move data between registers and memory, load/store registers from/to memory. The arithmetic instructions cover addition, subtraction, increment/decrement operations. The logical/branching instructions include compare, logical (AND, OR, XOR) and conditional/unconditional branch instructions. Each instruction is described in terms of its opcode, operands, functionality and examples.
Himalaya Cystone for Urinary Tract Infections1.pptxezaldeen2013
Â
This document discusses urinary tract infections (UTIs), including causes, symptoms, types, and treatment. It then provides an overview of Himalaya Cystone, an herbal supplement for managing UTIs. Cystone contains herbs like Saxifraga ligulata, Stone Flower, and Punarnava that help reduce kidney stone formation, support UTI treatment, and promote urinary tract health. It works by renormalizing pH, fighting bacteria, reducing inflammation, and increasing urinary flow. Cystone is a safe and natural option to help prevent recurrent UTIs and support overall urinary health.
The instruction set of the 8086 microprocessor can be classified into several groups, including data transfer instructions, arithmetic instructions, and processor control instructions. The data transfer instructions include general purpose instructions to move bytes or words between registers and memory locations. Common instructions are MOV, PUSH, POP, and XCHG. The arithmetic instructions perform operations like addition, subtraction, and comparison and affect the processor's flags. Common instructions are ADD, SUB, INC, and CMP. The 8086 instruction set also includes instructions for bit manipulation, string operations, and transferring program execution.
The instruction set of the 8086 microprocessor can be classified into several groups, including data transfer instructions, arithmetic instructions, and processor control instructions. The data transfer instructions include general purpose instructions to move bytes or words between registers and memory locations. Common instructions are MOV, PUSH, POP, and XCHG. The arithmetic instructions perform operations like addition, subtraction, and comparison and affect the processor's flags. Common instructions are ADD, SUB, INC, and CMP. The 8086 instruction set supports both integer and BCD arithmetic through specialized instructions like AAA and DAA.
The document provides details about basic assembly language instructions for the 8086 microprocessor. It discusses data transfer instructions like MOV, PUSH, POP, IN and OUT. Arithmetic instructions such as ADD, SUB, INC, DEC, MUL, DIV are described. Bit manipulation and logic instructions including AND, OR, XOR, TEST, SHR and SHL are covered. String manipulation using MOVS, LODS, STOS and CMPS is explained. The lecture also outlines program flow instructions like CALL, RET, LOOP, JMP and conditional jumps. Examples are provided to illustrate the usage of each instruction type.
The document provides details about basic assembly language instructions for the 8086 microprocessor. It discusses data transfer instructions like MOV, PUSH, POP, IN and OUT. Arithmetic instructions such as ADD, SUB, INC, DEC, MUL, DIV are described. Bit manipulation and logic instructions including AND, OR, XOR, TEST, SHR and SHL are covered. String manipulation using MOVS, LODS, STOS and CMPS is explained. The lecture also outlines program flow instructions like CALL, RET, LOOP, JMP and conditional jumps. Examples are provided to illustrate the usage of each instruction type.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
The document discusses several topics related to computer architecture and assembly language programming:
1. It describes the von Neumann architecture model and key components like the ALU, control unit, and memory.
2. It summarizes Moore's Law and how increasing transistor density has allowed for higher performance chips over time.
3. It provides an overview of some early Intel processors like the 8086 and techniques used to increase processor speed like pipelining.
4. It includes brief explanations of common assembly language concepts like registers, memory addressing, and arithmetic and logical instructions.
The 8086 CPU is a 16-bit microprocessor with a 16-bit data bus, 20-bit address bus, and includes an ALU, BIU, and EU. The BIU fetches instructions and data from memory using segment registers and address pointers, while the EU decodes and executes instructions using general purpose registers like AX, BX, CX, DX, and flags. Memory is divided into segments of up to 64KB that can overlap. The 8086 supports various addressing modes to access memory locations.
The document provides details about the architecture of SIC and SIC/XE machines. It describes the memory, registers, data formats, instruction formats, addressing modes, instruction set, and input/output for both machines. It also provides example programs to illustrate different instructions and addressing modes. Additionally, it explains CISC machines in general and provides details about the VAX and Pentium Pro architectures as examples of CISC instruction set architectures.
The document provides information about the instruction sets of the 8086 microprocessor. It defines what an instruction set is and describes the different instruction formats used by the 8086. The main types of 8086 instructions are then outlined, including data transfer instructions, arithmetic instructions, bit manipulation instructions, branch instructions, and others. Specific instructions like MOV, ADD, SUB, and MUL are explained through examples of their syntax and operation.
This document discusses the 16-bit 68000 microprocessor architecture. It describes the 68000's 16-bit external data bus, 32-bit registers including 8 data registers and 7 address registers. It covers the register organization, 24-bit address space of 16MB, and functions of registers like the program counter, stack pointer, and status register.
The document explains the instruction word format and different instruction types. It details the addressing modes like direct, register indirect, autoincrement, autodecrement, and absolute. Assembly language syntax and directives like ORG, EQU, and DS are outlined. Logic instructions, condition codes, conditional and unconditional branching, subroutines, and the stack are summarized. The document also provides
This document outlines the basics of assembly language, including basic elements, statements, program data, variables, constants, instructions, translation to assembly language, and program structure. It discusses statement syntax, valid names, operation and operand fields. It also covers common instructions like MOV, ADD, SUB, INC, DEC, and NEG. Finally, it discusses program segments, memory models, and how to define the data, stack, and code segments.
This document outlines the course outcomes and content for a Microprocessor and Programming course. The five course outcomes cover describing microprocessor architecture and organization, functional blocks and instruction set of the 8086 microprocessor, memory and addressing modes, using different instruction types and interrupts, and developing assembly language programs. The content includes details on the 8086 instruction format, operation codes, addressing modes, instruction types like data transfer, arithmetic, and flow control, and assembly programming tools.
The document discusses the architecture of the 8086 microprocessor. It describes the 8086 as a 16-bit processor that can access external memory using a 20-bit address bus. The 8086 uses memory segmentation to map the larger 20-bit physical addresses to the smaller 16-bit registers. Each segment is defined by a base address stored in a 16-bit segment register. The 20-bit physical address is calculated by combining the segment register value and offset. The document provides details on the various memory segments and addressing modes supported by the 8086 architecture.
This document describes a lecture on the Intel 8086 instruction set. It discusses writing real-mode 8086 assembly language programs that include data transfer between registers and memory, arithmetic/logic instructions, conditional jumps, subroutine calls, segment/offset addressing, and interrupts. The goal is to learn enough of the 8086 instruction set to write simple routines to service interrupts and read/write I/O ports. An example program is provided to demonstrate various 8086 features.
Here are the steps:
1. MUL BL
- AL (85H) is multiplied by BL (35H)
- The 16-bit result (1B89H) is stored in AX, with the lower byte in AL and the higher byte in AH
So after the multiplication, AX = 1B89H.
Ex2: Assume that each instruction starts from these values:
DX:AX = 1234H, BX = 57H
1. DIV BX â Quotient in AX, Remainder in DX
instruction set of 8086 microprocessor has following categories:
-Data transfer instructions
-Arithmetic instructions
-Logical instructions
-Flag manipulation instructions
-shift and rotate instructions
-String instructions
-8086 assembler directives
The document discusses assembly language instructions and directives. It explains that instructions tell the processor what to do and are assembled into machine code, while directives tell the assembler what to do and are not part of the instruction set. Common directives include EQU to define constants, and data definition directives like DB, DW and DD to define memory for data storage. The document also covers instruction operands like registers, immediates, and memory. It provides examples of basic instructions, and arithmetic instructions like ADD, SUB, MUL and DIV.
The document provides details about the various instructions in the 8085 instruction set. It describes 3 categories of instructions - data transfer instructions, arithmetic instructions, and logical/branching instructions. The data transfer instructions include instructions to move data between registers and memory, load/store registers from/to memory. The arithmetic instructions cover addition, subtraction, increment/decrement operations. The logical/branching instructions include compare, logical (AND, OR, XOR) and conditional/unconditional branch instructions. Each instruction is described in terms of its opcode, operands, functionality and examples.
Similar to Topic 6 - Programming in Assembly Language_230517_115118.pdf (20)
Himalaya Cystone for Urinary Tract Infections1.pptxezaldeen2013
Â
This document discusses urinary tract infections (UTIs), including causes, symptoms, types, and treatment. It then provides an overview of Himalaya Cystone, an herbal supplement for managing UTIs. Cystone contains herbs like Saxifraga ligulata, Stone Flower, and Punarnava that help reduce kidney stone formation, support UTI treatment, and promote urinary tract health. It works by renormalizing pH, fighting bacteria, reducing inflammation, and increasing urinary flow. Cystone is a safe and natural option to help prevent recurrent UTIs and support overall urinary health.
Filtration sterilization involves passing liquids or gases through filters with pores too small for microorganisms to pass through, removing them without exposure to heat. Common filter materials include asbestos, diatomaceous earth, porcelain, and membranes. The most used filter has 0.22 micrometer pores, retaining bacteria but not necessarily viruses. Filtration is useful for heat-sensitive substances like antibiotics and intravenous solutions.
Hookworms infect over 1 billion people worldwide, with Ancylostoma duodenale and Necator americanus being the two species that commonly infect humans. The lifecycle of both species involves eggs being passed in feces and hatching into larvae, which can survive for weeks outside the host. The larvae penetrate human skin and travel to the lungs and intestines, where they mature into adults that attach to the intestinal wall and feed on blood, potentially causing anemia and other symptoms. While infections are often asymptomatic, heavy infections can stunt growth in children. Diagnosis is via stool sample and treatment involves anthelmintic drugs.
Hyperlipidemia is caused by high levels of lipids in the blood. It has several causes such as genetics, diet, obesity, diabetes, and medications. Untreated hyperlipidemia increases the risk of atherosclerosis, heart attack, and stroke. It is classified by which lipoproteins are elevated. Treatment involves lifestyle changes like diet and exercise as well as medications to lower cholesterol and triglycerides such as statins, fibrates, bile acid sequestrants, nicotinic acid, ezetimibe, and probucol. Each drug works by a different mechanism but aims to reduce cardiovascular risk.
This document discusses drugs used to treat bronchial asthma. It defines asthma as a long-term inflammatory disease that causes airway narrowing and swelling. It lists the main types of asthma medications as inhaled corticosteroids, leukotriene modifiers, long-acting beta agonists, and short-acting bronchodilators. The purpose and examples of each type are described, with inhaled corticosteroids and leukotriene modifiers used for long-term control of symptoms and prevention of attacks, and short-acting bronchodilators prescribed to treat acute asthma attacks.
This document summarizes drugs used to treat congestive heart failure. It defines heart failure as a condition where the heart does not pump blood efficiently. It describes two main treatments: 1) ACE inhibitors which open blood vessels to improve blood flow, listing several specific ACE inhibitors; 2) It cautions that ACE inhibitors should not be taken with potassium-sparing diuretics, potassium supplements, or NSAIDs without consulting a doctor due to potential adverse reactions.
pathogenesis of periodontal diseases_a5d682428760a16d328ef7976e71287b.pdfezaldeen2013
Â
This document discusses the pathogenesis of periodontal disease. It begins by describing the normal inflammatory cells in healthy gingiva, then explains how bacterial plaque accumulation leads to increased inflammation and recruitment of leukocytes. It details the host defense factors that maintain equilibrium, and how changes in these factors can lead to gingivitis or periodontitis. The document outlines the non-specific immune response and role of inflammatory mediators like histamine. It discusses the vascular and cellular reactions, including the roles of neutrophils, macrophages, T-cells and B-cells in the immune response. Finally, it covers matrix metalloproteinases and reparative growth factors involved in wound healing.
The document summarizes different types of research including quantitative, qualitative, and mixed methods research. It provides details on non-experimental and experimental quantitative research designs, as well as survey research, correlation research, causal comparative research, and secondary data research. Descriptions of true experimental, pre-experimental, and quasi-experimental designs are also given. The summary highlights key aspects of research methodology discussed in the document.
This document summarizes a report on drug promotion that reviews existing research on four topics: attitudes toward promotion; the impact of promotion on attitudes and knowledge; the impact on behavior; and interventions to counter promotion and their results. The report finds that promotion influences doctors more than they realize, and that industry funded research tends to show favorable results. It concludes that while a wide range of evidence suggests promotion affects attitudes and behaviors, more high-quality studies are still needed to establish causal relationships and better understand interventions.
This document provides an overview of quantitative data analysis techniques for research. It describes the different levels of measurement (nominal, ordinal, interval, ratio) and key descriptive statistics like measures of central tendency, frequency distributions, and measures of dispersion. It also discusses inferential statistics and common tests like t-tests, ANOVA, correlation, and chi-squared tests. The purpose of statistical analysis is to summarize and make inferences about data to either support or reject research hypotheses.
This document provides an overview of interpreting quantitative research results. It discusses that statistical results must be interpreted to be useful. The key tasks of interpretation include considering the credibility, precision, magnitude, meaning, generalizability, and implications of results. Credibility refers to trustworthiness, and can be impacted by proxies, validity, bias, and corroboration. Precision concerns how close estimates are, while magnitude examines effect sizes. Inferences must make meaning of credible, precise, and important results, while considering causality. Researchers should acknowledge limitations and their impact on interpreting results.
This document provides an overview of key concepts in temperature and pressure from the textbook for the Introduction to Chemical Engineering Calculations course. It defines temperature and pressure, discusses different temperature and pressure scales, and provides examples of converting between scales and calculating pressure. It also covers measuring absolute and gauge pressure, differential pressure measurements, and relating pressure to units like atmospheres, psi, and mmHg.
This chapter introduces fundamental concepts of dimensions, units, and conversions used in chemical engineering calculations. It defines dimensions as basic concepts of measurement like length, time, mass etc. and units as means of expressing dimensions like feet for length. The SI and American Engineering systems of units are described. Operations with units like addition, multiplication and conversions between units using conversion factors are covered. The concept of dimensional homogeneity and significant figures in calculations are also introduced. Validation of problem solutions through repeated calculations, checking assumptions and comparing with experimental data is discussed.
The document defines key concepts and terminology related to databases and DBMS. It discusses what a database is comprised of (tables with rows and columns of data), database terminology (fields, records, cells), database objects (tables, queries, forms, reports), database instances and schemas, and categories of data models and DBMS languages. It provides examples to illustrate database concepts.
This chapter introduces material balances, which apply the law of conservation of mass to accounting for material entering and leaving a chemical engineering system. It discusses open and closed systems, steady-state and unsteady-state systems, and how to perform material balances on single and multiple component systems as well as batch and semi-batch processes. The key concepts covered are the definitions of a system, open vs closed systems, steady-state vs unsteady-state systems, and how to approach material balances for different process types.
Fueling AI with Great Data with Airbyte WebinarZilliz
Â
This talk will focus on how to collect data from a variety of sources, leveraging this data for RAG and other GenAI use cases, and finally charting your course to productionalization.
Dive into the realm of operating systems (OS) with Pravash Chandra Das, a seasoned Digital Forensic Analyst, as your guide. đ This comprehensive presentation illuminates the core concepts, types, and evolution of OS, essential for understanding modern computing landscapes.
Beginning with the foundational definition, Das clarifies the pivotal role of OS as system software orchestrating hardware resources, software applications, and user interactions. Through succinct descriptions, he delineates the diverse types of OS, from single-user, single-task environments like early MS-DOS iterations, to multi-user, multi-tasking systems exemplified by modern Linux distributions.
Crucial components like the kernel and shell are dissected, highlighting their indispensable functions in resource management and user interface interaction. Das elucidates how the kernel acts as the central nervous system, orchestrating process scheduling, memory allocation, and device management. Meanwhile, the shell serves as the gateway for user commands, bridging the gap between human input and machine execution. đģ
The narrative then shifts to a captivating exploration of prominent desktop OSs, Windows, macOS, and Linux. Windows, with its globally ubiquitous presence and user-friendly interface, emerges as a cornerstone in personal computing history. macOS, lauded for its sleek design and seamless integration with Apple's ecosystem, stands as a beacon of stability and creativity. Linux, an open-source marvel, offers unparalleled flexibility and security, revolutionizing the computing landscape. đĨī¸
Moving to the realm of mobile devices, Das unravels the dominance of Android and iOS. Android's open-source ethos fosters a vibrant ecosystem of customization and innovation, while iOS boasts a seamless user experience and robust security infrastructure. Meanwhile, discontinued platforms like Symbian and Palm OS evoke nostalgia for their pioneering roles in the smartphone revolution.
The journey concludes with a reflection on the ever-evolving landscape of OS, underscored by the emergence of real-time operating systems (RTOS) and the persistent quest for innovation and efficiency. As technology continues to shape our world, understanding the foundations and evolution of operating systems remains paramount. Join Pravash Chandra Das on this illuminating journey through the heart of computing. đ
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Â
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Donât worry, we can help with all of this!
Weâll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. Weâll provide examples and solutions for those as well. And naturally weâll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
Have you ever been confused by the myriad of choices offered by AWS for hosting a website or an API?
Lambda, Elastic Beanstalk, Lightsail, Amplify, S3 (and more!) can each host websites + APIs. But which one should we choose?
Which one is cheapest? Which one is fastest? Which one will scale to meet our needs?
Join me in this session as we dive into each AWS hosting service to determine which one is best for your scenario and explain why!
Generating privacy-protected synthetic data using Secludy and MilvusZilliz
Â
During this demo, the founders of Secludy will demonstrate how their system utilizes Milvus to store and manipulate embeddings for generating privacy-protected synthetic data. Their approach not only maintains the confidentiality of the original data but also enhances the utility and scalability of LLMs under privacy constraints. Attendees, including machine learning engineers, data scientists, and data managers, will witness first-hand how Secludy's integration with Milvus empowers organizations to harness the power of LLMs securely and efficiently.
Ivantiâs Patch Tuesday breakdown goes beyond patching your applications and brings you the intelligence and guidance needed to prioritize where to focus your attention first. Catch early analysis on our Ivanti blog, then join industry expert Chris Goettl for the Patch Tuesday Webinar Event. There weâll do a deep dive into each of the bulletins and give guidance on the risks associated with the newly-identified vulnerabilities.
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Â
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
Skybuffer SAM4U tool for SAP license adoptionTatiana Kojar
Â
Manage and optimize your license adoption and consumption with SAM4U, an SAP free customer software asset management tool.
SAM4U, an SAP complimentary software asset management tool for customers, delivers a detailed and well-structured overview of license inventory and usage with a user-friendly interface. We offer a hosted, cost-effective, and performance-optimized SAM4U setup in the Skybuffer Cloud environment. You retain ownership of the system and data, while we manage the ABAP 7.58 infrastructure, ensuring fixed Total Cost of Ownership (TCO) and exceptional services through the SAP Fiori interface.
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfChart Kalyan
Â
A Mix Chart displays historical data of numbers in a graphical or tabular form. The Kalyan Rajdhani Mix Chart specifically shows the results of a sequence of numbers over different periods.
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Jeffrey Haguewood
Â
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on automated letter generation for Bonterra Impact Management using Google Workspace or Microsoft 365.
Interested in deploying letter generation automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfflufftailshop
Â
When it comes to unit testing in the .NET ecosystem, developers have a wide range of options available. Among the most popular choices are NUnit, XUnit, and MSTest. These unit testing frameworks provide essential tools and features to help ensure the quality and reliability of code. However, understanding the differences between these frameworks is crucial for selecting the most suitable one for your projects.
Building Production Ready Search Pipelines with Spark and MilvusZilliz
Â
Spark is the widely used ETL tool for processing, indexing and ingesting data to serving stack for search. Milvus is the production-ready open-source vector database. In this talk we will show how to use Spark to process unstructured data to extract vector representations, and push the vectors to Milvus vector database for search serving.
Building Production Ready Search Pipelines with Spark and Milvus
Â
Topic 6 - Programming in Assembly Language_230517_115118.pdf
1. Programming in Assembly Language
Memory Segmentation
īˇ Memory segments are a direct consequence of using a 20 bit address in a 16 bit processor
īˇ Memory is partitioned into 64K (216
) segments
īˇ Each segment is identified by a 16-bit segment number ranging from 0000h-FFFFh
īˇ Within a segment, a memory location is specified by a 16-bit offset (the number of bytes from the
beginning of the segment)
īˇ The Segment:Offset address is a logical address
Segment:Offset Addresses
īˇ A4FB:4872h means offset 4872h within segment A4FBh
īˇ To get the physical address, the segment number is multiplied by 16 (shifted 4 bits to the left) and the offset
is added
īˇ A4FB0h + 4872h = A9822h (20 bit physical address)
īˇ There is a lot of overlap between segments; a new segment begins every 16 bytes (addresses ending in 0h)
īˇ We call these 16 bytes a paragraph
īˇ Because segments may overlap, the segment:offset address is not unique
8086 Registers
īˇ Information inside the microprocessor is stored in registers (fourteen 16-bit registers)
īˇ data registers hold data for an operation
īˇ address registers hold the address of an instruction or data
īˇ The address registers are divided into segment, pointer, and index registers
īˇ a status register (called FLAGS) keeps the current status of the processor
Data Registers: AX, BX, CX, and DX
īˇ Available to the programmer for general data manipulation
īˇ Some operations require a particular register
īˇ High and low bytes of data registers can be accessed separately, i.e., AX is divided into AH and AL
īˇ AX (accumulator) is preferred for arithmetic, logic, and data transfer operations
īˇ BX (base register) serves as an address register
īˇ CX (count register) frequently serves as a loop counter
īˇ DX (data register) is used in multiplication and division
Pointer and Index Registers: SP, BP, SI, DI
īˇ SP (stack pointer) points to the top of the processor's stack
īˇ BP (base pointer) usually accesses data on the stack
īˇ SI (source index) used to point to memory locations in the data segment
īˇ DI (destination index) performs same functions as SI.
īˇ DI and SI are often used for string operations
Segment Registers: CS, DS, SS, ES
īˇ CS (code segment) addresses the start of the program's machine code in memory
īˇ DS (data segment) addresses the start of the program's data in memory
2. īˇ SS (stack segment) addresses the start of the program's stack space in memory
īˇ ES (extra segment) addresses and additional data segment, if necessary
Instruction Pointer: IP
īˇ 8086 uses registers CS and IP to access instructions
īˇ CS register contains the segment number of the next instruction and the IP contains the offset
īˇ The IP is updated each time an instruction is executed so it will point to the next instruction
īˇ The IP is not directly accessible to the user
The FLAGS register
īˇ Indicates the status of the microprocessor
īˇ Two kinds of flag bits: status flags and control flags
īˇ Status flags reflect the result of an instruction, e.g., when the result of an arithmetic operation is 0, ZF (zero
flag) is set to 1 (true)
īˇ Control flags enable or disable certain operations of the processor, e.g., if the IF (interrupt flag) is cleared
(set to 0), inputs from the keyboard are ignored by the processor
Instructions Groups and Concepts
īˇ Data Transfer Instructions
īˇ Arithmetic Instructions
īˇ Logic Instructions
īˇ Flow-control Instructions
īˇ Processor Control Instructions
īˇ String Instructions
Data Transfer Instructions
īˇ General instructions
o mov, pop, push, xchg, xlat/xlatb
īˇ Input/Output instructions
o in, out
īˇ Address instructions
o lds, lea, les
īˇ Flag instructions
o lahf, popf, pushf, sahf
General Instructions
īˇ mov destination, source
īˇ pop destination
īˇ push source
īˇ xchg destination, source
īˇ xlat(b)table
īˇ Note that the destination comes first, just as in an assignment statement in C
Examples
3. īˇ mov ax, [word1]
o "Move word1 to ax"
o Contents of register ax are replaced by the contents of the memory location word1
o The brackets specify that the contents of word1 are stored -- word1==address,
[word1]==contents
īˇ xchg ah, bl
o Swaps the contents of ahand bl
īˇ Illegal: mov [word1], [word2]
o can't have both operands be memory locations
The Stack
īˇ A data structure in which items are added and removed only from one end (the "top")
īˇ A program must set aside a block of memory to hold the stack by declaring a stack segment
stack 256
īˇ SS will contain the segment number of the stack segment -- SP will be initialized to 256 (100h)
īˇ The stack grows from higher memory addresses to lower ones
PUSH and POP
īˇ New words are added with push
īˇ push source
o SP is decreased by 2
o a copy of the source contents is moved to SS:SP
īˇ Items are removed with pop
īˇ pop destination
o Content of SS:SP is moved to the destination
o SP is increased by 2
Stack example
push ax ;Save ax and bx
push bx ; on the stack
mov ax, -1 ;Assign test values
mov bx, -2
mov cx, 0
mov dx, 0
push ax ;Push ax onto stack
push bx ;Push bx onto stack
pop cx ;Pop cx from stack
pop dx ;Pop dx from stack
pop bx ;Restore saved ax and bx
pop ax ; values from stack
Arithmetic Instructions
īˇ Addition instructions
o aaa, adc, add, daa, inc
īˇ Subtraction instructions
o aas, cmp, das, dec, neg, sbb, sub
īˇ Multiplication instructions
o aam, imul, mul
4. īˇ Division instructions
o aad, cbw, cwd, div, idiv
Addition Instructions
īˇ aaa
o ASCII adjust for addition
īˇ adc destination, source
o Add with carry
īˇ add destination, source
o Add bytes or words
īˇ daa
o Decimal adjust for addition
īˇ inc destination
o Increment
ADD and INC
īˇ ADD is used to add the contents of
o two registers
o a register and a memory location
o a register and a constant
īˇ INC is used to add 1 to the contents of a register or memory location
Examples
īˇ add ax, [word1]
o "Add word1to ax"
o Contents of register ax and memory location word1 are added, and the sum is stored in ax
īˇ inc ah
o Adds one to the contents of ah
īˇ Illegal: add [word1], [word2]
o can't have both operands be memory locations
Subtraction instructions
īˇ aas
o ASCII adjust for subtraction
īˇ cmp destination, source
o Compare
īˇ das
o Decimal adjust for subtraction
īˇ dec destination
o Decrement byte or word
īˇ neg destination
o Negate (two's complement)
īˇ sbb destination, source
o Subtract with borrow
īˇ sub destination, source
o Subtract
Examples
5. īˇ sub ax, [word1]
o "Subtract word1 from ax"
o Contents of memory location word1 is subtracted from the contents of register ax, and the sum is
stored in ax
īˇ dec bx
o Subtracts one from the contents of bx
īˇ Illegal: sub [byte1], [byte2]
o can't have both operands be memory locations
Multiplication instructions
īˇ aam
o ASCII adjust for multiply
īˇ imul source
o Integer (signed) multiply
īˇ mul source
o Unsigned multiply
Byte and Word Multiplication
īˇ If two bytes are multiplied, the result is a 16-bit word
īˇ If two words are multiplied, the result is a 32-bit doubleword
īˇ For the byte form, one number is contained in the source and the other is assumed to be in al -- the product
will be in ax
īˇ For the word form, one number is contained in the source and the other is assumed to be in ax -- the most
significant 16 bits of the product will be in dx and the least significant 16 bits will be in ax
Examples
īˇ If ax contains 0002h and bx contains 01FFh
mul bx
dx = 0000h ax = 03FEh
īˇ If ax contains 0001h and bx contains FFFFh
mul bx
dx = 0000h ax = FFFFh
imul bx
dx = FFFFh ax = FFFFh
Division instructions
īˇ aad
o ASCII adjust for divide
īˇ cbw
o convert byte to word
īˇ cwd
o convert word to doubleword
īˇ div source
o unsigned divide
īˇ idiv source
o integer (signed) divide
6. Byte and Word Division
īˇ When division is performed, there are two results, the quotient and the remainder
īˇ These instructions divide 8 (or 16) bits into 16 (or 32) bits
īˇ Quotient and remainder are same size as the divisor
īˇ For the byte form, the 8 bit divisor is contained in the source and the dividend is assumed to be in ax -- the
quotient will be in al and the remainder in ah
īˇ For the word form, the 16 bit divisor is contained in the source and the dividend is assumed to be in dx:ax -
- the quotient will be in ax and the remainder in dx
Examples
īˇ If dx = 0000h, ax = 00005h, and bx = 0002h
div bx
ax = 0002h dx = 0001h
īˇ If dx = 0000h, ax = 0005h, and bx = FFFEh
div bx
ax = 0000h dx = 0005h
idiv bx
ax = FFFEh dx = 0001h
Divide Overflow
īˇ It is possible that the quotient will be too big to fit in the specified destination (al or ax)
īˇ This can happen if the divisor is much smaller than the dividend
īˇ When this happens, the program terminates and the system displays the message "Divide Overflow"
Sign Extension of the Dividend
īˇ Word division
o The dividend is in dx:ax even if the actual dividend will fit in ax
o For div, dx should be cleared
o For idiv, dx should be made the sign extension of ax using cwd
īˇ Byte division
o The dividend is in ax even if the actual dividend will fit in al
o For div, ah should be cleared
o For idiv, ah should be made the sign extension of al using cbw
Logic Instructions
īˇ and destination, source
o Logical AND
īˇ not destination
o Logical NOT (one's complement)
īˇ or destination, source
o Logical OR
īˇ test destination, source
o Test bits
īˇ xor destination, source
o Logical Exclusive OR
7. īˇ The ability to manipulate bits is one of the advantages of assembly language
īˇ One use of and, or, and xor is to selectively modify the bits in the destination using a bit pattern (mask)
īˇ The and instruction can be used to clear specific destination bits
īˇ The or instruction can be used to set specific destination bits
īˇ The xor instruction can be used to complement specific destination bits
Examples
īˇ To clear the sign bit of al while leaving the other bits unchanged, use the and instruction with 01111111b
=7Fh as the mask
and al,7Fh
īˇ To set the most significant and least significant bits of al while preserving the other bits, use the or
instruction with 10000001b = 81h as the mask
or al,81h
īˇ To change the sign bit of dx, use the xor instruction with a mask of 8000h
xor dx,8000h
The NOT instruction
īˇ The not instruction performs the one's complement operation on the destination
īˇ The format is
o not destination
īˇ To complement the bits in ax:
o not ax
īˇ To complement the bits in WORD1
o not [WORD1]
The TEST instruction
īˇ The test instruction performs an and operation of the destination with the source but does not change the
destination contents
īˇ The purpose of the test instruction is to set the status flags (discussed later)
Status Flags
Bit Name Symbol
0 Carry flag cf
2 Parity flag pf
4 Auxiliary carry flag af
6 Zero flag zf
7 Sign flag sf
11 Overflow flag of
The Carry Flag (CF)
īˇ CF = 1 if there is a carry out from the msb (most significant bit) on addition, or there is a borrow into the
msb on subtraction
īˇ CF = 0 otherwise
8. īˇ CF is also affected by shift and rotate instructions
The Parity Flag (PF)
īˇ PF = 1 if the low byte of a result has an even number of one bits (even parity)
īˇ PF = 0 otherwise (odd parity)
The Auxiliary Carry Flag (AF)
īˇ AF = 1 if there is a carry out from bit 3 on addition, or there is a borrow into the bit 3 on subtraction
īˇ AF = 0 otherwise
īˇ AF is used in binary-coded decimal (BCD) operations
The Zero Flag (ZF)
īˇ ZF = 1 for a zero result
īˇ ZF = 0 for a non-zero result
The Sign Flag (SF)
īˇ SF = 1 if the msb of a result is 1; it means the result is negative if you are giving a signed interpretation
īˇ SF = 0 if the msb is 0
The Overflow Flag (OF)
īˇ OF = 1 if signed overflow occurred
īˇ OF = 0 otherwise
Shift Instructions
īˇ Shift and rotate instructions shift the bits in the destination operand by one or more positions either to the
left or right
īˇ The instructions have two formats:
o opcode destination, 1
o opcode destination, cl
īˇ The first shifts by one position, the second shifts by N positions, where cl contains N (cl is the only register
which can be used)
Left Shift Instructions
īˇ The SHL (shift left) instruction shifts the bits in the destination to the left.
īˇ Zeros are shifted into the rightmost bit positions and the last bit shifted out goes into CF
īˇ Effect on flags:
o SF, PF, ZF reflect the result
o AF is undefined
o CF = last bit shifted out
o OF = 1 if result changes sign on last shift
SHL example
īˇ dh contains 8Ah and cl contains 03h
9. īˇ dh = 10001010, cl = 00000011
īˇ after shl dh,cl
o dh = 01010000, cf = 0
The SAL instruction
īˇ The shl instruction can be used to multiply an operand by powers of 2
īˇ To emphasize the arithmetic nature of the operation, the opcode sal (shift arithmetic left) is used in
instances where multiplication is intended
īˇ Both instructions generate the same machine code
Right Shift Instructions
īˇ The SHR (shift right) instruction shifts the bits in the destination to the right.
īˇ Zeros are shifted into the leftmost bit positions and the last bit shifted out goes into CF
īˇ Effect on flags:
o SF, PF, ZF reflect the result
o AF is undefined
o CF = last bit shifted out
o OF = 1 if result changes on last shift
SHR example
īˇ dh contains 8Ah and cl contains 02h
īˇ dh = 10001010, cl = 00000010
īˇ after shr dh,cl
o dh = 001000010, cf = 1
The SAR instruction
īˇ The sar (shift arithmetic right) instruction can be used to divide an operand by powers of 2
īˇ sar operates like shr, except the msb retains its original value
īˇ The effect on the flags is the same as for shr
īˇ If unsigned division is desired, shr should be used instead of sar
Rotate Instructions
īˇ Rotate Left
o The instruction rol (rotate left) shifts bits to the left
o The msb is shifted into the rightmost bit
o The cf also gets the the bit shifted out of the msb
īˇ Rotate Right
o ror (rotate right) rotates bits to the right
o the rightmost bit is shifted into the msb and also into the cf
Rotate through Carry
īˇ Rotate through Carry Left
o The instruction rcl shifts bits to the left
o The msb is shifted into cf
o cf is shifted into the rightmost bit
īˇ Rotate through Carry Right
10. o rcr rotates bits to the right
o The rightmost bit is shifted into cf
o cf is shifted into the msb
īˇ See SHIFT.ASM for an example
Flow-Control Instructions
%TITLE "IBM Character Display -- XASCII.ASM"
IDEAL
MODEL small
STACK 256
CODESEG
Start: mov ax, @data ; Initialize DS to address
mov ds, ax ; of data segment
mov ah, 02h ; display character function
mov cx,256 ; no. of chars to display
mov dl, 0 ; dl has ASCII code of null char
Ploop: int 21h ; display a character
inc dl ; increment ASCII code
dec cx ; decrement counter
jnz Ploop ; keep going if cx not zero
Exit: mov ah, 04Ch ; DOS function: Exit program
mov al, 0 ; Return exit code value
int 21h ; Call DOS. Terminate program
END Start ; End of program / entry point
Conditional Jumps
īˇ jnz is an example of a conditional jump
īˇ Format is
jxxx destination_label
īˇ If the condition for the jump is true, the next instruction to be executed is the one at destination_label.
īˇ If the condition is false, the instruction immediately following the jump is done next
īˇ For jnz, the condition is that the result of the previous operation is not zero
Range of a Conditional Jump
īˇ Table 4.6 (and Table 16.4) shows all the conditional jumps
īˇ The destination_label must precede the jump instruction by no more than 126 bytes, or follow it by no
more than 127 bytes
īˇ There are ways around this restriction (using the unconditional jmp instruction)
The CMP Instruction
īˇ The jump condition is often provided by the cmp (compare) instruction:
cmp destination, source
īˇ cmp is just like sub, except that the destination is not changed -- only the flags are set
īˇ Suppose ax = 7FFFh and bx = 0001h
cmp ax, bx
jg below
11. zf = 0 and sf = of = 0, so control transfers to label below
Types of Conditional Jumps
īˇ Signed Jumps:
o jg/jnle, jge/jnl, jl/jnge, jle/jng
īˇ Unsigned Jumps:
o ja/jnbe, jae/jnb, jb/jnae, jbe/jna
īˇ Single-Flag Jumps:
o je/jz, jne/jnz, jc, jnc, jo, jno, js, jns, jp/jpe, jnp/jpo
Signed versus Unsigned Jumps
īˇ Each of the signed jumps has an analogous unsigned jump (e.g., the signed jump jg and the unsigned jump
ja)
īˇ Which jump to use depends on the context
īˇ Using the wrong jump can lead to incorrect results
īˇ When working with standard ASCII character, either signed or unsigned jumps are OK (msb is always 0)
īˇ When working with the IBM extended ASCII codes, use unsigned jumps
Conditional Jump Example
īˇ Suppose ax and bx contained signed numbers. Write some code to put the biggest one in cx:
mov cx,ax ; put ax in cx
cmp bx,cx ; is bx bigger?
jle NEXT ; no, go on
mov cx,bx ; yes, put bx in cx
NEXT:
The JMP Instruction
īˇ jmp causes an unconditional jump
īˇ jmp destination
īˇ jmp can be used to get around the range restriction of a conditional jump
īˇ e.g, (this example can be made shorter, how?)
TOP: TOP:
; body of loop ; body of loop
; over 126 bytes dec cx
dec cx jnz BOTTOM
jnz TOP jmp EXIT
mov ax, bx BOTTOM:
jmp TOP
EXIT:
mov ax, bx
Branching Structures
īˇ IF-THEN
īˇ IF-THEN-ELSE
īˇ CASE
īˇ AND conditions
īˇ OR conditions
IF-THEN structure
12. īˇ Example -- to compute |ax|:
if ax < 0 then
ax = -ax
endif
īˇ Can be coded as:
; if ax < 0
cmp ax, 0 ; ax < 0 ?
jnl endif ; no, exit
; then
neg ax ; yes, change sign
; endif
IF-THEN-ELSE structure
īˇ Example -- Suppose al and bl contain extended ASCII characters. Display the one that comes first in the
character sequence:
if al <= bl then
display the character in al
else
display the character in bl
endif
īˇ This example may be coded as:
mov ah, 2 ; prepare for display
; if al <= bl
cmp al, bl ; al <= bl ?
jnbe else ; no, display bl
; then ; al <= bl
mov dl, al ; move it to dl
jmp display
else: ; bl < al
mov dl, bl
display:
int 21h ; display it
; endif
The CASE structure
īˇ Multi-way branch structure with following form:
case expression
value1 : statement1
value2 : statement2
īŋŊ
valuen : statementn
endcase
īˇ Example -- If ax contains a negative number, put -1 in bx; if 0, put 0 in bx; if positive, put 1 in bx:
13. case ax
< 0: put -1 in bx
= 0: put 0 in bx
> 0: put 1 in bx
endcase
īˇ This example may be coded as:
; case ax
cmp ax, 0 ; test ax
jl neg ; ax < 0
je zero ; ax = 0
jg pos ; ax > 0
neg:
mov bx, -1
jmp endcase
zero:
xor bx,bx ; put 0 in bx
jmp endcase
pos:
mov bx, 0
endcase:
īˇ Only one cmp is needed, because jump instructions do not affect the flags
AND conditions
īˇ Example -- read a character and display it if it is uppercase:
read a character into al
if char >= 'A' and char <= 'Z' then
display character
endif
; read a character
mov ah, 1 ;prepare to read
int 21h ;char in al
; if char >= 'A' and char <= 'Z'
cmp al,'A' ;char >= 'A'?
jnge endif ;no, exit
cmp al,'Z' ;char <= 'Z'?
jnle endif ;no, exit
;then display character
mov dl,al ;get char
mov ah,2 ;prep for display
int 21h ;display char
endif:
OR conditions
īˇ Example -- read a character and display it if it is 'Y' or 'y':
read a character into al
if char = 'y' or char = 'Y' then
display character
endif
14. ; read a character
mov ah, 1 ;prepare to read
int 21h ;char in al
; if char = 'y' or char = 'Y'
cmp al,'y' ;char = 'y'?
je then ;yes, display it
cmp al,'Y' ;char = 'Y'?
je then ;yes, display it
jmp endif ;no, exit
then:
mov ah,2 ;prep for display
mov dl,al ;move char
int 21h ;display char
endif:
Looping Structures
īˇ FOR loop
īˇ WHILE loop
īˇ REPEAT loop
The FOR Loop
īˇ The loop statements are repeated a known number of times (counter-controlled loop)
for loop_count times do
statements
endfor
īˇ The loop instruction implements a FOR loop:
loop destination_label
īˇ The counter for the loop is the register cx which is initialized to loop_count
īˇ The loop instruction causes cx to be decremented, and if cxš 0, jump to destination_label
īˇ The destination label must precede the loop instruction by no more than 126 bytes
īˇ A FOR loop can be implemented as follows:
;initialize cx to loop_count
TOP:
;body of the loop
loop TOP
FOR loop example
īˇ a count-controlled loop to display a row of 80 stars
mov cx,80 ; # of stars
mov ah,2 ; disp char fnctn
mov dl,'*' ; char to display
TOP:
int 21h ; display a star
loop TOP ; repeat 80 times
FOR loop "gotcha"
15. īˇ The FOR loop implemented with the loop instruction always executes at least once
īˇ If cx = 0 at the beginning, the loop will execute 65536 times!
īˇ To prevent this, use a jcxz before the loop
jcxz SKIP
TOP:
; body of loop
loop TOP
SKIP:
The WHILE Loop
while condition do
statements
endwhile
īˇ The condition is checked at the top of the loop
īˇ The loop executes as long as the condition is true
īˇ The loop executes 0 or more times
WHILE example
īˇ Count the number of characters in an input line
count = 0
read char
while char <> carriage_return do
increment count
read char
endwhile
mov dx,0 ;DX counts chars
mov ah,1 ;read char fnctn
int 21h ;read char into al
WHILE_:
cmp al,0Dh ;ASCII CR?
je ENDWHILE ;yes, exit
inc dx ;not CR, inc count
int 21h ;read another char
jmp WHILE_ ;loop back
ENDWHILE:
īˇ The label WHILE_ is used because WHILE is a reserved word
The REPEAT Loop
repeat
statements
until condition
īˇ The condition is checked at the bottom of the loop
īˇ The loop executes until the condition is true
īˇ The loop executes 1 or more times
REPEAT example
īˇ read characters until a blank is read
16. repeat
read character
until character is a blank
mov ah,1 ;read char fnctn
REPEAT:
int 21h ;read char into al
;until
cmp al,' ' ;a blank?
jne REPEAT ;no, keep reading
īˇ Using a while or a repeat is often a matter of personal preference. The repeat may be a little shorter
because only one jump instruction is required, rather than two
Digression: Displaying a String
īˇ We've seen INT 21h, functions 1 and 2, to read and display a single character
īˇ INT 21h, function 9 displays a character string
o Input: dx = offset address of string
o The string must end with a '$' character -- The '$' is not displayed
The LEA Instruction
īˇ INT 21h, function 9, expects the offset address of the string to be in dx
īˇ To get it there, use the lea (load effective address) instruction
lea destination,source
īˇ destination is a register, and source is a memory location
īˇ For example, lea dx, msg puts the offset address of the variable msg into dx
A digression from our digression -- program segment prefix (PSP)
īˇ DOS prefaces each program it loads with a PSP
īˇ The PSP contains information about the program, including any command line arguments
īˇ The segment number of the PSP is loaded in ds, so ds does not contain the segment number of the
DATASEG
īˇ To correct this
mov ax,@data
mov ds,ax
īˇ The assembler translates@data into a segment number
īˇ Two instructions are necessary since a number cannot be moved directly into a segment register
So, back to printing a string...
%TITLE "Print String Program -- PRTSTR.ASM"
IDEAL
MODEL small
STACK 256
DATASEG
msg DB "Hello!$"
CODESEG
Start:
17. mov ax,@data ;Initialize DS to address
mov ds,ax ; of data segment
lea dx,[msg] ;get message
mov ah,09h ;display string function
int 21h ;display message
Exit:
mov ah,4Ch ;DOS function: Exit program
mov al,0 ;Return exit code value
int 21h ;Call DOS. Terminate program
END Start ;End of program / entry point