| www.delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
| Date: | Tue, 01 Nov 2005 23:35:11 +0100 |
| From: | Pafo007 <"Pafo007 at wanadoo dot fr"@unknown.addr> |
| User-Agent: | Mozilla Thunderbird 1.0 (Windows/20041206) |
| X-Accept-Language: | fr, en |
| MIME-Version: | 1.0 |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Why the call instruction points 2 bytes before to the real start |
| sub-routine ? | |
| References: | <003501c5df1c$b3f4a440$2432a8c0 AT dcueva> |
| In-Reply-To: | <003501c5df1c$b3f4a440$2432a8c0@dcueva> |
| Lines: | 36 |
| Message-ID: | <4367ee3f$0$1729$8fcfb975@news.wanadoo.fr> |
| Organization: | les newsgroups par Wanadoo |
| NNTP-Posting-Date: | 01 Nov 2005 23:37:52 CET |
| NNTP-Posting-Host: | 82.124.255.112 |
| X-Trace: | 1130884672 news.wanadoo.fr 1729 82.124.255.112:2975 |
| X-Complaints-To: | abuse AT wanadoo DOT fr |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Ouch! Going to 32bits mode isn't a easy thing: you have to build a GDT, to load GDTR with LGDT intruction, to set bit0 of CR0 register and to jump to your code in a 32bits segment... That's a hard way if you haven't read anything about it! Perhaps should you try this: http://www.osdever.net/tutorials/pmodetuts/all_pm_tuts.zip?the_id=36 That's a 17 chapter book about protected mode... Diego Cueva a écrit : > Thanks for your response. > > Now I am using a 32 bit disassembler: > > 00000000 90 nop > 00000001 E80B000000 call 0x11 > 00000006 66BE5C01 mov si,0x15c > 0000000A E834000000 call 0x43 > 0000000F CD20 int 0x20 > 00000011 6650 push ax > 00000013 6653 push bx > 00000015 6651 push cx > 00000017 6652 push dx > 00000019 B406 mov ah,0x6 > 0000001B B000 mov al,0x0 > 0000001D B500 mov ch,0x0 > > This dis-assembled code is correct, but when I run the program does not > work fine. > > The program act as a 16 bit code, this mean that the 1st CALL > instruction, jump to 010F. In other words, this compiled program only > execute: > 100. - NOP > 101. - CALL 010F (jump really to 10F not to 0x11) > 10F. - INT 0x20 :( That's all.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |