CS401 Midterm Short Notes
- Type
- Midterm past paper
- Course
- CS401 Computer Architecture and Assembly Language Programming
- Size
- PDF 887 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 22. Download the file for all 22 pages.
Important Note
You should never copy paste the same answer which we are providing. Please do make some changes in the solution file. If you appreciate our work, please share our website with your friends.
آپ کو کبھی بھی وہی جواب کاپی پیسٹ نہیں کرنا چاہیے جو ہم فراہم کر رہے ہیں۔ براہ کرم حل فائل میں کچھ تبدیلیاں کریں۔ اگر آپ ہمارے کام کی تعریف کرتے ہیں تو براہ کرم ہماری ویب ک و اپنے دوستوں کے
ساتھ شیئر کریں
Lecher 1 Introduction to Assembly Language
Address Bus Data Bus Data Bus In computer architecture, the data bus is a wired connection dedicated for the transmitting the data between the CPU, peripheral devices and other hardware components. The data bus is a part of the system bus in addition to address bus and the control bus. REGISTERS A register is a piece of high-speed memory located directly on the processor. It is used to store data while the processor manipulates it. On the iAPX8088, there are 14 registers. INSTRUCTION A command that tells the processor to do something, like add two numbers or get some data from the memory. Some manufacturers name the mnemonics for data movement instructions as “move,” some call it “load” and “store” and still other names are present. INTEL IAPX88 ARCHITECTURE Technically iAPX88 stands for “Intel Advanced Processor Extensions 88.” It was a very successful processor also called 8088 and was used in the very first IBM PC machines. Our discussion will revolve around 8088 in the first half of the course while in the second half we will use iAPX386 which is very advanced and powerful processor. 8088 is a 16bit processor with its accumulator and all registers of 16 bits. 386 on the other hand, is a 32bit processor.
Lax 2 Addressing Modes
DATA DECLARATION
A data definition statement sets aside storage in memory for a variable, with an optional name. Data definition statements create variables based on intrinsic data types such as BYTE, WORD, DWORD SBYTE, SWORD etc. In Assembly language, there are no distinct data types like char,string,int,float,double,etc Instead there are very basic data types according to their sizes. They are: byte – 8 bits. word – 16 bits.
DIRECT ADDRESSING
In direct addressing mode, the offset value is specified directly as part of the instruction, usually indicated by the variable name. The assembler calculates the offset value and maintains a symbol table, which stores the offset values of all the variables used in the program. Our numerical machine can only work with numbers. We used symbols for our ease to label or tag certain positions in our program. The assembler converts these symbols into the appropriate numbers automatically.
Size Mismatch Errors
In general assembly language gives a lot of power to the programmer but power comes with responsibility. Assembly language programming is not a difficult task but a responsible one. To keep the declarations and their access synchronized is the responsibility of the programmer and not the assembler. The assembler allows the programmer to do everything he wants to do, and that can possibly run on the processor. The assembler only keeps us from writing illegal instructions which the processor cannot execute. This is the difference between a syntax error and a logic error. So the assembler and debugger have both done what we asked them to do but the programmer asked them to do the wrong chore. The programmer is responsible for accessing the data as word if it was declared as a word and accessing it as a byte if it was declared as a byte.
REGISTER INDIRECT ADDRESSING
Register-Indirect addressing is perhaps the simplest of ARM's addressing modes. To load a value from memory into a register using register-indirect addressing, we use a second register, known as the base register. This base register holds the actual memory address that the program is interested in.
There are four registers in iAPX88 architecture that can hold address of data and they are BX, BP, SI, and DI.
REGISTER + OFFSET ADDRESSING
Direct addressing and indirect addressing using a single register are two basic forms of memory access. Another possibility is to use different combinations of direct and indirect references. In the above example we used BX to access different array elements which were placed consecutively in memory like an array.
SEGMENT ASSOCIATION
Related CS401 files
All CS401 files →- CS401 Midterm Topics by Ray Afzal Midterm PDF 500 KB
- CS401 Midterm Subjective Set 2 by Waqar Siddhu Midterm PDF 1.9 MB
- CS401 Midterm MCQs by Talha Sajid Midterm PDF 1 MB
- CS401 Midterm Notes by Sonu Ilyas Midterm PDF 5.4 MB
- CS401 Highlighted Handouts by VU Topper RM Highlighted PDF 7.2 MB
- CS401 MCQs Collection by Sonu Ilyas MCQs PDF 2.5 MB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.