Path: utzoo!mnetor!tmsoft!masnet!rose!chris.chambers From: chris.chambers@rose.uucp (CHRIS CHAMBERS) Newsgroups: comp.lang.pascal Subject: sector RW with INT 25/ Message-ID: <20d360c9ae4628052f94@rose.uucp> Date: 12 Apr 91 01:55:00 GMT Organization: Rose Media, ON, CANADA Lines: 38 >>Hi, DOS Int. 25/26 (dec 37 and 38) do not clean up the stack. Instead >>they finish and return to the program with one word left on the stack. >>This is probably the cause for my following code hanging. I tried to >>follow intr() with and POP DX but this won't do it. Can anyone >>provide a solution (assembly, inline code, ...) to achieve what is >>intended here. I do want to use Int 25 instead of 13 hex. You should be able to adapt the following: { -------------------------------------------------------- } { readsector - absolute disk read for sectors } { -------------------------------------------------------- } Function ReadSector(Segment, Offset: word; drivecd: byte; Sector, Number: word): integer; begin Inline( $1E/ { push ds ;save TP's ds} $55/ { push bp ;save TP's bp} $8B/$46/$0000/ { mov bx,0 ;clear bx} $73/$02/ { jnc l1 ;test for error} $8A/$DC/ { mov bl,ah ;error code to bl} $59/ {l1: pop cx ;drop extra stack entry} $5D/ { pop bp ;restore TP's bp} $1F/ { pop ds ;restore TP's ds} $89/$5E/