Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.development    |    Operating system development chatter    |    4,255 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,081 of 4,255    |
|    wolfgang kern to James Harris    |
|    Re: The EA jump immediately after enabli    |
|    16 Feb 22 03:07:08    |
      From: nowhere@nevernet.at              On 14/02/2022 16:55, James Harris wrote:              >> [about stack...]              > I have previously only ever had to think about Real Mode (which is       > always 16-bit) or the form of Protected Mode which is entirely 32-bit,       > i.e. where all segments are 32-bit. The idea of having PMode where some       > segments are 16-bit and others are 32-bit is entirely new to me but I       > think it is yielding insights into how the processor works.              I played a lot around with these options and finally decided for a mix.              [the Big bit...]>> you mean implicit stack references (all push pop call       return)?       > Yes.              > When working with a mix of 16-bit and 32-bit segments it seems there are       > at least THREE sizes we need to be aware of.       ...       > So where are such sizes defined?       ...       I knew all that :) just didn't remember because there were no problems.              >> BUT how about       >> PM32:       >> 8B 44 24 fc mov eax.[esp-04] ;SP or ESP depending on seg-size ?       >> RM:       >> 67 8B 44 24 fc mov ax,[esp-04] ;could have an UnReal flat big stack              > How do you interpret those?              my disassembler do this for me.       >       > BTW, what happens when referring to BP or EBP as in       >       > mov eax, [ebp + 4]       > sub ebp, 8       >       > Does such code use the SS descriptor's B bit?              Yes, at least on CPUs which still support the B bit.       >> and I'm not sure yet if my mixed code CALL/RET work on SP only due to       >> my 16 bit stack. OK I use 66 c3 and 66 E8xxxxxxxx here and there and       >> my esp is always in 16 bit range (initially decided to fit BIOS calls).       >> So I never noticed it's using only SP.              > Does the above help?              :) thanks it helped to remember.       __       wolfgang              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca