Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.asm.x86    |    Ahh, the lost art of x86 assembly    |    4,675 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,484 of 4,675    |
|    bilsch to R.Wieser    |
|    Re: a variable definition is causing an     |
|    21 Jul 18 01:08:53    |
      From: king621@nospicedham.comcast.net              On 07/18/2018 05:53 AM, R.Wieser wrote:       > Bill,       >       >> cmd_findfl db 'findfl',0       >>       >> is commented out the problem goes away.       >       > Have you already tried what happens when you just comment *that* line out       > (and leave the ones following it enabled) ? My guess is that the       > same/similar problem will occur              Yes, you are right. I tried that and the same problem occurs.              >       > js2nd dw 0x9e0 ;segment at end of jsec2       > ...       > mov word[si+6],js2nd ;segment - where to load sectors       >       > My assembler complains about that: you cannot do a direct memory-to-memory       > copy that way (needs to go thru a register). Your assembler might be using       > the address of js2nd (and not its contents), which would mean that you are       > loading a sector over all the variables that follow (including the drive       > letter).              In the actual (greater) program (not posted) it does work fine the first       time - the directory listing of the root directory is printed       successfully. If I then change the current drive and do it again it       prints the root directory of the previous drive. It all works fine       except the second time the int13/ah=42 fails. Since it works the first       time there must be some other problem.              >       > Did you maybe intended to use "equ" (or something like it) there (like       > "js2nd equ 0x9e0" or "js2nd = 0x9e0") ?       >       > Another possibility is that you are somehow trashing the stack.       > Could your stackpointer be pointing into the same area where you are loading       > your sector ?              In my 'boot sector' I have the following              mov ax, 0       mov ss, ax       mov sp, 0x600       mov ds, ax              mov si, 0 ;location of this info packet in data seg.       mov word[si],16 ;packet size       mov word[si+2],16 ;# of sectors to xfer       mov word[si+4],0x0000 ;offset where to load sectors       mov word[si+6],0x07e0 ;segment where to load sectors       mov word[si+8],546 ;starting absolute sector# in a quadword       mov word[si+10],0 ;       mov word[si+12],0       mov word[si+14],0       partition has 1(bs)+512(2FATs)+32(root dir.)+13(text)+3(data)       = 545 + 16              --- 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