Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.msdos.programmer > #69

Re: Odd problem with int 0x21, ah = 0x4A

From Ross Ridge <rridge@csclub.uwaterloo.ca>
Newsgroups comp.os.msdos.programmer
Subject Re: Odd problem with int 0x21, ah = 0x4A
Date 2011-04-30 01:02 -0400
Organization University of Waterloo
Message-ID <ipg557$283$1@rumours.uwaterloo.ca> (permalink)
References <ci9o88-tf01.ln1@nntp.local.net> <4db9d42a$0$41117$e4fe514c@news.xs4all.nl>

Show all headers | View raw


R.Wieser <address@not.available> wrote:
>Shouldn't you round-up the "shr bx, 4" result (just add 0x000F before
>shifting) ?  Otherwise it might be 1 to 15 bytes too small ...
>
>Also, have you checked the value in BX just before the INT 0x21 call ?  Does
>it match your expectations ?
>
>My guess is that somehow your stack, and by it your program (and DS) gets
>trashed.

Yah, that looks like what's exactly happening here.  Because of the
rounding error you mentioned the program shrinks its memory so that end
of the stack is no longer in allocated memory.

					Ross Ridge

-- 
 l/  //	  Ross Ridge -- The Great HTMU
[oo][oo]  rridge@csclub.uwaterloo.ca
-()-/()/  http://www.csclub.uwaterloo.ca/~rridge/ 
 db  //	  

Back to comp.os.msdos.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Odd problem with int 0x21, ah = 0x4A Freedom on the Oceans <alex.buell@munted.org.uk> - 2011-04-28 15:18 +0100
  Re: Odd problem with int 0x21, ah = 0x4A Jim Leonard <mobygamer@gmail.com> - 2011-04-28 10:58 -0700
    Re: Odd problem with int 0x21, ah = 0x4A Freedom on the Oceans <alex.buell@munted.org.uk> - 2011-04-28 19:30 +0100
  Re: Odd problem with int 0x21, ah = 0x4A "R.Wieser" <address@not.available> - 2011-04-28 22:57 +0200
    Re: Odd problem with int 0x21, ah = 0x4A Ross Ridge <rridge@csclub.uwaterloo.ca> - 2011-04-30 01:02 -0400
      Re: Odd problem with int 0x21, ah = 0x4A Freedom on the Oceans <alex.buell@munted.org.uk> - 2011-05-01 08:48 +0100
        Re: Odd problem with int 0x21, ah = 0x4A "R.Wieser" <address@not.available> - 2011-05-01 13:43 +0200

csiph-web