Advertisement

CS401 - Computer Architecture and Assembly Language Programming MDB Overview

[MC080406884]

Posted On:
October 18, 2009 08:48 PM

Replied On:
October 19, 2009 11:39 AM

Student's Message:Msg No. 402738
Subject: why AX is 0?
sir when we run program in bugger it shows ax or other register value 0, at that time, as you say that ax is only one register so sir other program which are using processor and registers same time are also using register so how can ax shows 0, hope you can understand what i m saying
Instructor's Reply:
It is due to multitasking in which we save the state of one program before executing the next task/program, the state includes registers, IP value etc. So, when the first program is given the chance to execute again, its state is restored.
That is why every task/program feels that there is no other program running.

You can read the details of multitasking from chapter_11 of the handouts.
[BC060200038]

Posted On:
October 18, 2009 06:07 PM

Replied On:
October 19, 2009 10:16 AM

Student's Message:Msg No. 402710
Subject: Afd

Dear Sir you said in the lecture if u dont understand anything about the debugger u can open the help file and can see things there. But i cant find the help file. would u plz guide me how to open a help file in the afd.

Thank you

Instructor's Reply:
Following AFD commands will be helpful for you.


CMD> M1 DS : 100

The above mentioned command will display the contents of memory location at offset address "0x0100" in memory window_1
Similarly to display data contents in memory window_2 use the following command:

CMD> M2 DS : 100


For help press F4 at CMD, the help window will be appeared at the bottom now either press PageUP/PageDown keys to move back and forth or type any command at command prompt, the command that you will type, its help will appear in the help window.


Use F2 to execute the program statement by statement. E.g. press F2 to execute first statement an then see the effect of this statement in registers, or memory window (by using command M1 or M2)


To navigate among different windows use F8 and F9 keys (you can write nop instruction once you are in the memory window).
[MC080408022]

Posted On:
October 18, 2009 04:49 PM

Replied On:
October 19, 2009 10:15 AM

Student's Message:Msg No. 402700
Subject: binary
respected sir , in the solution of Q2 of assignment I calculated the physical address in just hexadecimaland uploaded is it enough or i should also convert it to binary. I so plz tell me I will upload my updated solution
Instructor's Reply:
It is fine.

Kindly use these MDBs to post lecture-related questions, for other course related problems, send an e-mail at cs401@vu.edu.pk
[MC080200099]

Posted On:
October 18, 2009 09:59 AM

Replied On:
October 19, 2009 10:09 AM

Student's Message:Msg No. 402652
Subject: physical address calculation from origin 0x100

at origin we give address 0x100 that our program memory should start from this address

but when we write

mov ax,[num1]

num1 dw: 5

so we defined a word num1 , word is of 2bytes = 16bits ,

our origin is 0x100=16 in decimal

when we plus 16 with word 16+16=32

but you told that num1 offset start at 23, and num2 at 25, num3 at 27

how is this possible this should be 32,48,64 (multiples of 16)

please answer i am not understanding

Instructor's Reply:
First of all, 0x100 = 256

Now consider the following example:

[org 0x0100]

mov ax, [num1]

mov ax, 0x4c00
int 0x21

num1: dw 15

and it will be translated as:

A10801
B8004C
CD21
0F00


Now as we have mentioned, that first instruction must start from 0x0100 (256 in decimal),so
A1 will be loaded at 0100
08 will be loaded at 0101
01 will be loaded at 0102
That completes our first instruction (mov ax, [num1])

B8 will be loaded at 0103
00 will be loaded at 0104
4C will be loaded at 0105
That completes our second instruction (mov ax, 0x4c00)

CD will be loaded at 0106
21 will be loaded at 0107
That completes our third instruction (int 0x21)

0F will be loaded at 0108
00 will be loaded at 0109
That completes our fourth instruction (num1: dw 15)

So, 15 will be loaded at offset 0108 and 0109 (as it is of size word)

And this offset will be changed depending upon how many instruction are there in between.
Is there any confusion now ?
[MC090205765]

Posted On:
October 17, 2009 11:07 PM

Replied On:
October 19, 2009 09:41 AM

Student's Message:Msg No. 402616
Subject: Very Easy book

Respected sir,

Please recommended a very easy book for Assembly language programming,(cs401).

Instructor's Reply:
The list of recommended books is given in the Books section of this course on VU-LMS.
[MC090205511]

Posted On:
October 17, 2009 11:00 PM

Replied On:
October 19, 2009 09:38 AM

Student's Message:Msg No. 402611
Subject: Salam, is it fine that i solve

c. DAD1:2345

Effective Adrress = base + index + offset

0x0100 + 0xDAD1 + 0x2345

0xFF16

Physical Address = segment*0x10 + EA

0x0010 * 0x10 + 0xFF16

0xDAD1 + 0xFF16

0x1D9E7 (Memory Wrapped around )

Instructor's Reply:
Dear Student,
It is NOT allowed to discuss the assignment questions on MDB. However, if you have some confusion about the statement of the question, then you can send an e-mail at cs401@vu.edu.pk

[MC090205531]

Posted On:
October 17, 2009 10:47 PM

Replied On:
October 19, 2009 09:36 AM

Student's Message:Msg No. 402608
Subject: Help me
Dear sir, What does this error meaning? C:\AssmSoft>nasm ass.asm -o ass.com -l ass.asm:9: error: parser: expecting ] regards
Instructor's Reply:
Check the line_9 of your ass.asm file.
[BC070401293]

Posted On:
October 17, 2009 08:47 PM

Replied On:
October 19, 2009 09:34 AM

Student's Message:Msg No. 402579
Subject: what is label?

AOA

Sir i want to ask what is label? (discus about it in lec5)..

please explain it briefly.

thanx

Instructor's Reply:
A label is a sequence of characters that identifies a location within source code.
As we have labeled our data (5,10, 15 etc) with num1 so num1 is the data label.
Labels can be used on code as well. Just like data labels they remember the address at which they are used. The assembler does not differentiate between code labels and data labels. The programmer is responsible for using a data label as data and a code label as code.
[BC080200938]

Posted On:
October 17, 2009 08:25 PM

Replied On:
October 19, 2009 09:30 AM

Student's Message:Msg No. 402575
Subject: Salam

Sir when u teach in lectures I write the same program with you at the same time. But Some times IP values and M1, M2 etc vlues are different of mine if I match these from lecture window. Tell me does it really matter? or do I need to change them ?

Instructor's Reply:
If the program is same, then IP value must be same.

Kindly clearly mention, that in which program and at which instruction, you are getting different values of the same program.

[The segment register values can be changed which doesn't actually matters. ]
[MC080408436]

Posted On:
October 17, 2009 07:41 PM

Replied On:
October 19, 2009 09:22 AM

Student's Message:Msg No. 402566
Subject: salam

sir please explain the IRQ and EOI in easy wording?

Instructor's Reply:
An IRQ (Interrupt ReQuest) value is an assigned location where the computer can expect a particular device to interrupt it when the device sends the computer signals about its operation. The signal momentarily interrupts the computer so that it can decide what processing to do next. Since multiple signals to the computer on the same interrupt line might not be understood by the computer, a unique value must be specified for each device and its path to the computer.

EOI (End Of Interrupt) is a signal sent to a Programmable Interrupt Controller (PIC) to indicate the completion of interrupt processing for a given interrupt.

[MC090205531]

Posted On:
October 17, 2009 04:22 PM

Replied On:
October 19, 2009 09:15 AM

Student's Message:Msg No. 402513
Subject: need help
Sir in lectures the snapshot of the Dos it not clear can't see that what is inside it, so tell me that how i can be clear? i have not find these snap shots of dos or edit or debuger in the handouts so what i do? regards
Instructor's Reply:
The lecture videos are very much visible, however, if you are facing any difficulty in viewing anything, you can ask it here or through email.
[BC070401293]

Posted On:
October 17, 2009 02:42 PM

Replied On:
October 19, 2009 09:10 AM

Student's Message:Msg No. 402493
Subject: cs401

Asslam-O-Alikum

Sir i want to ask that we can access to 4 cells of memory by the

combination of two lines or two bits (00,01,11,10). similerly we can

access 8 cells of memory by the combination of 3 lines or three bits.

we can say that we can access to x memory cell by the combination of 2^y bits.

Now my question is that the combination of 16-bits can tackle the cell

of memory 65536 (2^16=65536) and the combination of 19 bits 524288

(2^19=524288bits=64kb). while in handouts tell us that we can access with 16

lines/bits to 64kb. there is confusion for me. i am too much confuse

or somewhere mistake to understanding, please guide me.

Instructor's Reply:
Wassalam,
There is a little mistake that you are making in calculation.

2^16 = 65536 bits
Now to represent it into Kb, we have to divide it with 1024 (as 1Kb = 1024bits)
So,
2^16 = 65536 bits = 65536/1024 = 64Kb

[BC080200915]

Posted On:
October 17, 2009 09:49 AM

Replied On:
October 17, 2009 11:01 AM

Student's Message:Msg No. 402413
Subject: cs401

Helo sir how r u please sir explian the calculating proceder

Instructor's Reply:
As already replied, it is your assignment question, so you have to solve it yourself. Kindly read the relevant topic from handouts, the procedure is straightforward.
Append zero at the end of segment address
Then add offset address into it.

It is hexadecimal addition, you can read about hexadecimal numbers from the following link:
http://vulms.vu.edu.pk/Courses/CS401/Downloads/Hexadecimal%20Numbers.pdf
[BC080200938]

Posted On:
October 16, 2009 11:14 PM

Replied On:
October 17, 2009 09:19 AM

Student's Message:Msg No. 402373
Subject: Salam

Sir in Lecture number 4 When U were teaching us Working in AFD Kindly Tell me from where u were writing nop instruction and change all that. Can we have any AFD helper?

Instructor's Reply:
Following AFD commands will be helpful for you.


CMD> M1 DS : 100

The above mentioned command will display the contents of memory location at offset address "0x0100" in memory window_1
Similarly to display data contents in memory window_2 use the following command:

CMD> M2 DS : 100


For help press F4 at CMD, the help window will be appeared at the bottom now either press PageUP/PageDown keys to move back and forth or type any command at command prompt, the command that you will type, its help will appear in the help window.


Use F2 to execute the program statement by statement. E.g. press F2 to execute first statement an then see the effect of this statement in registers, or memory window (by using command M1 or M2)


To navigate among different windows use F8 and F9 keys (you can write nop instruction once you are in the memory window).
[BC080200915]

Posted On:
October 16, 2009 07:37 PM

Replied On:
October 17, 2009 09:10 AM

Student's Message:Msg No. 402314
Subject: cs401

Helo sir how r u plz sir

  1. FFFF:5432

calculate the following address and explain its proceder

sory sir i cant understand the calculating preceder please sir

Instructor's Reply:
Dear Student,
It is your assignment question, you have to solve it yourself.

The method of calculating physical address is explained in chapter_1 of the handouts with the help of examples.

[BC070401789]

Posted On:
October 16, 2009 04:23 PM

Replied On:
October 17, 2009 09:06 AM

Student's Message:Msg No. 402248
Subject: debugger problem

A.A Sir

sir i have problem in debugger:

sir when i am writing the code in the notepad and save then

i opened the cmd and write the command:

nasm ex010.asm -o ex010.com -l ex010.lst

then sir the list is succesfully genrated but when i write the debugger command:

afd ex010.com

then the error is below as:

afd is not recognized as an internal or external command,operable program or batch file :

plz tell me the solution that error.thanks.

Instructor's Reply:
The error afd is not recognized as an internal or external command shows that:
either you are not in the assembly folder on command prompt, that is, command prompt is not displaying C:\assembly>
or the file afd.exe is not present in the assembly folder.
[MC090201578]

Posted On:
October 16, 2009 12:03 PM

Replied On:
October 16, 2009 01:32 PM

Student's Message:Msg No. 402168
Subject: CALCULATOR

AOA,

Sir, Can we use the scientific calculator to solve the assignment no. 1 or we have to do all the calculations manually.


Thanks,

Instructor's Reply:
It is better to solve it manually as in the exams, you will not be allowed to use calculators.

Kindly use the MBD for lecture related queries only, for other course-related issues send an email at cs401@vu.edu.pk
0 Responses