QUESTIONS AND PROBLEMS 1. Does the inline assembler support assembly language macro sequences? 2. Can a byte be defined in the inline assembler by using the DB directive? 3. How are labels defined in the inline assembler? 4. Which registers can be used in assembly language (either inline or linked modules) without saving? 5. What […]
Continue reading…
Uncategorized
USING ASSEMBLY LANGUAGE WITH C/C++:MIXED ASSEMBLY AND C++ OBJECTS.
MIXED ASSEMBLY AND C++ OBJECTS As mentioned in the prior sections, the inline assembler is limited because it cannot use MACRO sequences and the conditional program flow directives presented in Chapter 6. In some cases, it is better to develop assembly language modules that are then linked with C++ for more flexibility. This is especially […]
Continue reading…
SUMMARY OF USING ASSEMBLY LANGUAGE WITH C/C++.
SUMMARY 1. The inline assembler is used to insert short, limited assembly language sequences into a C++ program. The main limitation of the inline assembler is that it cannot use macro sequences or conditional program flow instructions. 2. Two versions of C++ language are available. One is designed for 16-bit DOS console applications and the […]
Continue reading…
USING ASSEMBLY LANGUAGE WITH C/C++:USING ASSEMBLY LANGUAGE WITH VISUAL C/C++ FOR 32-BIT APPLICATIONS.
USING ASSEMBLY LANGUAGE WITH VISUAL C/C++ FOR 32-BIT APPLICATIONS A major difference exists between l6-bit and 32-bit applications. The 32-bit applications are written using Microsoft Visual C/C++ Express for Windows and the l6-bit applications are written using Microsoft C++ for DOS. The main difference is that Visual C/C++ Express for Windows is more common today, […]
Continue reading…
USING ASSEMBLY LANGUAGE WITH C/C++:USING ASSEMBLY LANGUAGE WITH C++ FOR 16-BIT DOS APPLICATIONS.
USING ASSEMBLY LANGUAGE WITH C/C++ INTRODUCTION Today, it is rare to develop a complete system using only assembly language. We often use C/C++ with some assembly language to develop a system. The assembly language portion usually solves tasks (difficult or inefficient to accomplish in C/C++) that often include control soft- ware for peripheral interfaces and […]
Continue reading…
SUMMARY OF PROGRAM CONTROL INSTRUCTIONS.
SUMMARY 1. There are three types of unconditional jump instructions: short, near, and far. The short jump allows a branch to within +127 and -128 bytes. The near jump (using a displacement of ±32K) allows a jump to any location in the current code segment (intrasegment). The far jump allows a jump to any location […]
Continue reading…
PROGRAM CONTROL INSTRUCTIONS:MACHINE CONTROL AND MISCELLANEOUS INSTRUCTIONS.
MACHINE CONTROL AND MISCELLANEOUS INSTRUCTIONS The last category of real mode instructions found in the microprocessor is the machine control and miscellaneous group. These instructions provide control of the carry bit, sample the BUSY/TEST pin, and perform various other functions. Because many of these instructions are used in hardware control, they need only be explained […]
Continue reading…
PROGRAM CONTROL INSTRUCTIONS:INTRODUCTION TO INTERRUPTS.
INTRODUCTION TO INTERRUPTS An interrupt is either a hardware-generated CALL (externally derived from a hardware signal) or a software-generated CALL (internally derived from the execution of an instruction or by some other internal event). At times, an internal interrupt is called an exception. Either type interrupts the program by calling an interrupt service procedure (ISP) […]
Continue reading…
PROGRAM CONTROL INSTRUCTIONS:PROCEDURES.
PROCEDURES The procedure (subroutine, method, or function) is an important part of any computer system’s architecture. A procedure is a group of instructions that usually performs one task. A procedure is a reusable section of the software that is stored in memory once, but used as often as necessary. This saves memory space and makes […]
Continue reading…
PROGRAM CONTROL INSTRUCTIONS:CONTROLLING THE FLOW OF THE PROGRAM.
CONTROLLING THE FLOW OF THE PROGRAM It is much easier to use the assembly language statements .IF, .ELSE, .ELSEIF, and .ENDIF to control the flow of the program than it is to use the correct conditional jump statement. These statements always indicate a special assembly language command to MASM. Note that the control flow assembly […]
Continue reading…