Xref: utzoo comp.os.msdos.programmer:747 comp.sys.ibm.pc.misc:1374 Path: utzoo!attcan!uunet!unisoft!bdt!doug From: doug@bdt.UUCP (Doug Asherman) Newsgroups: comp.os.msdos.programmer,comp.sys.ibm.pc.misc Subject: TASM bug? Message-ID: <4691@bdt.UUCP> Date: 3 Sep 90 03:02:16 GMT Distribution: na Organization: Beckemeyer Development Tools Lines: 34 I've run into something in TASM that may be a bug, but I'm not sure. The code in question looks somewhat like this (compressed for brevity's sake): cseg segment assume etc. etc. ; data __key__ db ? ; other data ; code ; get the time from dos ; move the seconds into key mov __key__,dl ; dl contains the seconds ;....stuff deleted ; ....then later on mov ax,word ptr __key__ ....I took this through the debugger a few times and ax always ended up as some weird number like 7f1b, or something equally strange. I was able to get around this by doing the following: mov al,__key__ cbw ; sign-extend __key__ Though I'm hardly an assembly language guru, it's always been my understanding that casting a byte variable to a word will sign- extend it automatically. I haven't had a chance to see if MASM behaves the same, so I can't say if MASM does the same thing. If this is a bug, though, Borland should probably know about it. -- .signature: permission denied