Article View: alt.msdos.programmer
Article #844Re: This is strange, div doesn't work....
From: Steve Madsen
Date: Fri, 18 Dec 1992 14:48
Date: Fri, 18 Dec 1992 14:48
20 lines
1210 bytes
1210 bytes
Michael Duffy (mduffy@aludra.usc.edu) wrote: : The following code gives me a divide error: : : mov ax,0035h : mov dx,01h : div dx : I'm not a genius at assembler, but after looking in my TASM 3.2 quick-ref, this is about the only thing I could come up with: What it appears is that you are doing a simple 16-bit divide. As far as my manual is concerned, if you do a div instruction with a 16-bit operand (such as dx in your example), then it uses DX:AX as your dividend. This might be why you are having a problem, but it's only a guess. You could try changing DX to DL and see if that works. Since you are assigned DX to what looks like a byte value anyway, this might solve your problem.
Technical Details
Message-ID:
<1992Dec18.094825.14710@miavx1.acs.muohio.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!ohstpy!miavx1!apsvax.aps.muohio.edu!sjmadsenReferences:
<1gp6q9INNgdd@aludra.usc.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!ohstpy!miavx1!apsvax.aps.muohio.edu!sjmadsen Newsgroups: alt.msdos.programmer Subject: Re: This is strange, div doesn't work.... Message-ID: <1992Dec18.094825.14710@miavx1.acs.muohio.edu> From: sjmadsen@apsvax.aps.muohio.edu (Steve Madsen) Date: 18 Dec 92 09:48:24 -0500 References: <1gp6q9INNgdd@aludra.usc.edu> Nntp-Posting-Host: apsvax.aps.muohio.edu X-Newsreader: TIN [version 1.1 PL6] Lines: 20