الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

عندي كم من سؤال ماعرفت حلها

مغلق
بدأه coca cola في 18 نوفمبر 2004 · 1 رد · 559 مشاهدة · في لغة Assembly لأنظمة 16, 32, 64 بت
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

طبعا انا مبتدئة ومرة احتاج اجابات هالاسئلة اللي يعرف لايبخل علي هبا الله لايهينكم

السؤال الاول :

Identify the flags affected by each of the following actions:

A) an arithmetic sum is 0.

B) An arithmetic sum is negative.

C) String data is to move left to right.

السؤال التاني

A stack is defined as 64H bytes in size..

A) What is the initial value in the sP register ??

B) CX contains 25A4H. After PUSH CX, show the contents of the stack and SP ??

C) DX contains 3B2AH. After PUSH DX, show the contents of the stack and SP ??

D) Show the contents of SP after POP DX and POP CX ??

السؤال التالت

During execution of aprogram , CS contains 4AB6[0], SS contains 4A82[0], IP contains 36H, and SP contains 28H. (values are shown in normal, not reversed-byte, sequence) calculate the addresses of ..

A) the top (current location) of the stack and

B) the instruction to execute.

السؤال الرابع

The Video Display area for a color monitor in text mode is at address B800[0].

A) Use DEBUG D command to display this area. Note that each character in the video area is folowed by its attribute (07 if black and white). Use additional signale D commands to display further portions.

B)

C) Use the DEBUG F (Fill) commands to partially fill the screen with 50 astrerisks (2AH). As an example, the following command fills the entire vidio area with 4000 (FA0H) hearts (03) and attributes (where 16H is the attribute for brown character on blue background): F B800:0 LFA0 03 16.

السؤال الخامس

Assume that you have used DEBUG to enter the following E commands :

E CS:100 B8 05 1B 05 00 2C EB F8

A) What are the three symbolic instructions represented here??

B) On executing this program, you discover that the AX register ends up with 4705 instead of the expected 0547. what is the error , and how would you correct it??

D) Having corrected the instructions, you now want to reexecute the program from the first instruction. What DEBUG commands are required ??

السؤال السادس

Use DEBUG’s command enter the following instructions:

MOV DX,2E

ADD DX,1F

SHL DX,01

SUB DX,BA

JMP 100

Unassemble the instructions and trace their execution through to the JMP, and check the value in DX after each instruction.

انا عارفة اني مصختها لكن من جد والله مرة محتاجة الاجابات الله يجعلها في ميزان حسناتكم وانا انتظر الرد بفارغ الصبر

#2

السلام عليكم,

هو طبعا هناك أسئلة كثيرة هنا وأضن أن أحسن شيء هو أن نتعلم الأشياء أحسن من أن نجيب على كل سؤال على حدى ونحاول أن نكتشف الأشياء حتى نتعلم أكثر. وبما أنه عندنا البرنامج Debug فيمكن أن نستغله للإجابة على هذه الأسئلة فمثلا فيما يخص الأسئلة الأولى يمكن أن نكتب بضعة سطور يكون فيها ما نريد الوصول له ومن خلال Debug يمكن أن نرى ماذا سيتغير فيها فمثلا يمكن أن نكتب ما يلي :

mov ax,5
mov bx,5
هنا نلاحض NZ في مكان Flags يعني NonZero
sub bx,ax
هنا ستكون النتيجة 0 إذن سيغير علم الصفر وستتغير NZ إلى ZR


mov bx,8
هنا سيكون فلاغ PL يعني Plus
sub ax,bx
هنا ستكون النتيجة سلبية إذن سيغير علم الساني إلى NG يعني Negative

ويمكن أن نقوم بنفس الطريقة لمختلف الأسئلة ويكفي أن نتبعها ببرنامج Debug حتى نكتشف بأنفسنا كيف تسير الأشياء.

إلى اللقاء.

هذا الموضوع مغلق.

مواضيع مشابهة