من الملاحظ وجود كتب آسمبلي على لينكس، و المفروض حسب علمي أن الفرق بين أسمبلي و آخر على مستوى المعالج و ليس نظام التشغيل.
أليس كذلك؟
من الملاحظ وجود كتب آسمبلي على لينكس، و المفروض حسب علمي أن الفرق بين أسمبلي و آخر على مستوى المعالج و ليس نظام التشغيل.
أليس كذلك؟
ليس مطلقاً كما تظن !
نظام التشغيل له نصيب الأسد أيضاً ... كمثال بسيط فقط عملية الـIDT Redirection .
mov eax, dword ptr ds:[0xffdf0308]
jmp dword ptr [eax+0xfc]
اقتباسIs it the Same On Windows/DOS/Linux
The answers to this question are yes and no. The basic x86 machine code is dependent only on the processor. The x86 versions of Windows and Linux are obviously built on the x86 machine code. There are a few differences between Linux and Windows programming in x86 Assembly:
On a Linux computer, the most popular assembler is the GAS assembler, which uses the AT&T syntax for writing code, or Netwide Assembler which is also known as NASM which uses a syntax similar to MASM.
On a Windows computer, the most popular assembler is MASM, which uses the Intel syntax.
The list of available software interrupts, and their functions, is different on Windows and Linux.
The list of available code libraries is different on Windows and Linux.
Using the same assembler, the basic assembly code written on each Operating System is basically the same, except you interact with Windows differently than you interact with Linux, etc.
تم تعديل هذه المشاركة بواسطة allko في 27 سبتمبر 2008 في 07:36
شكرا لكما على ما تفضلتما به.
أعتقد أنني حصلت على الجواب لسؤالي.
السلام عليكم
كلامك صحيح الاسمبلى على مستوى المعالج بس فى حاجة زى ال Realmode مثلا لو عايز تطبع حرف ممكن تكتب فى (VGA text mode Memory) مقيش مشاكل
بس ال Linux و Windows المعالج بيشتغل فى ال Protected mode يعنى علشان تقدر تعمل آى حاجة لازم تستآذن من ال Kernel الاول علشان انت مش فى نفس Level بتاعها
وال Linux kernel ليها APIs والكتب دى بتشرحلك ازاى ممكن تستخدم ال APIs دى وحاجات تانى كتير من ال OS resources.
المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية
جارٍ التحقق من المتواجدين…