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

سؤال عن كود في الاسمبلي وعن الدالة 4ah

بدأه ayash في 30 يونيو 2010 · 3 رد · 614 مشاهدة · في أرشيف قسم الـــ Assembly
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

بسم الله الرحمن الرحيم

السلام عليكم

هل ممكن شرح هذا الكود

 

mov ah,4AH ;modify allocated memory

mov bx,2000H ;we want 2*64K

int 21H ;set c if not enough memory

pushf

mov ah,4AH ;re-allocate all available mem

mov bx,0FFFFH

int 21H

mov ah,4AH ;bx now has actual amt avail

int 21H

popf

ret

ما الفائدة من ال 4ah

ومتى تستعمل

وكيف تستعمل

وبارك الله فيكم

291964_260506123967115_206850989332629_1001538_45132_n.jpg

اللهم إني أعوذ بك من علم لا ينفع ، ومن قلب لا يخشع ، ومن نفس لا تشبع ، ومن دعوة لا يستجاب لها

#2

;This routine checks memory to see if there is enough room for Justin to

;execute properly. If not, it returns with carry set.

جزء من سورس كود فايروس

http://vx.netlux.org/lib/files/vml01/justin.asm

A man who wants to lead the orchestra must turn his back on the crowd

#3

شكرا اخي على المرور

هل ممكن شرج الكود

ما الفائدة من ال 4ah

ومتى تستعمل

وكيف تستعمل

291964_260506123967115_206850989332629_1001538_45132_n.jpg

اللهم إني أعوذ بك من علم لا ينفع ، ومن قلب لا يخشع ، ومن نفس لا تشبع ، ومن دعوة لا يستجاب لها

#4

إعذرني يا اخي ما بعرف أشرح.

إنما الـah تستخدم في الإحتفاظ بجزء من الذاكرة للبرنامج لكي نستخدمه.

Function (ah):  48h
Entry parameters:       bx- Requested block size (in paragraphs)
Exit parameters:        If no error (carry clear): 
                                ax:0 points at allocated memory block 

                        If an error (carry set):
                                bx- maximum possible allocation size
                                ax- error code (7 or 8)
This call is used to allocate a block of memory. On entry into DOS, bx contains the size of the requested block in paragraphs (groups of 16 bytes). On exit, assuming no error, the ax register contains the segment address of the start of the allocated block. If an error occurs, the block is not allocated and the ax register is returned containing the error code. If the allocation request failed due to insufficient memory, the bx register is returned containing the maximum number of paragraphs actually available.

A man who wants to lead the orchestra must turn his back on the crowd

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

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…