Powered by Invision Power Board


  Reply to this topicStart new topicStart Poll

> BOOTCODE.INC question, Why the repetition?
Luc
Posted: October 19, 2009 10:58 am
Quote Post


Newbie
*

Group: Members
Posts: 1
Member No.: 2081
Joined: October 19, 2009



Hi,

I am new to ASM so please bare with me if the answer is obvious. I am studying the code of MenuetOS 32, and in the file BOOTCODE.INC there are the following lines:
CODE

  ; Draw welcome screen

        call setbase1000


Looking at setbase1000, what it does is:
CODE

   push  ax
   mov   ax,0x1000
   mov   es,ax
   mov   ds,ax
   pop   ax

   ret


So 0x1000 is loaded into ES and DS. My question is why, knowing that this was done previously in:
CODE

  ; Reset 16 bit selectors, registers and stack

    mov  ax,0x1000
    mov  es,ax
    mov  ds,ax


Am I missing something?
Thanks.
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll