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.
|
|
|
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). |
|
|
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
|
|
|
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 ? |
|
|
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.
|
|
|
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
|
|
|
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.
|
|
|
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.
|
|
|
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. ]
|
|
|
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.
|
|
|
Post a Comment