Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!pitt!willett!ForthNet From: ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: Forth vs C Message-ID: <2046.UUL1.3#5129@willett.pgh.pa.us> Date: 4 Dec 90 03:37:18 GMT Organization: String, Scotch tape, and Paperclips. (in Pgh, PA) Lines: 20 Category 2, Topic 14 Message 5 Mon Dec 03, 1990 NMORGENSTERN at 19:43 EST The Forth word DriveError? in a previous upload is incorrect. DOS has some VERY STRANGE effects. I was unaware that Int 37, leaves the flags on the stack when it returns, and you have to remove them before you return! DriveError? will test for such problems as door open, etc. by calling INT 25H which is absolute disk read. It attempts to read 1 sector into PAD, and returns an error flag. Drive is 0 for A: 1 for B: etc., which is DOS standard. Return is 0 if ok. 2 is drive not ready. See DOS manual for other codes. code DriveError? ( drive -- f) pop ax xor ah, ah mov cx, # 1 xor dx, dx mov bx, # pad int 37 bx pop \ This line added to previous upload xor ah, ah 1push end-code. ----- This message came from GEnie via willett through a semi-automated process. Report problems to: dwp@willett.pgh.pa.us or uunet!willett!dwp Brought to you by Super Global Mega Corp .com