Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!sol.ctr.columbia.edu!samsung!usc!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!mmshah From: mmshah@athena.mit.edu (Milan M Shah) Newsgroups: comp.os.msdos.programmer Subject: TASM can't subtract ... Message-ID: <1991Mar1.014835.7651@athena.mit.edu> Date: 1 Mar 91 01:48:35 GMT Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 42 Hi! I am trying to assemble Fontedit.asm, a program published in PC-Magazine vol 7 no. 15 using Turbo Assembler 1.0 (Yup, its 1.0 alright). In the program, there's a couple of lines that go: LOADER LABEL BYTE LOADER_OFFSET EQU 100H - LOADER Simple enough, but TASM complains. It says 'Can't add relative addresses.' First off, 100H is a constant, and not a relative address. Second, I think its pretty ridiculous for TASM to give an error and die. Maybe a warning, but to refuse to assemble? Sheesh, here's a number, here's another, and I want TASM to subtract one from the other, and TASM can't do that? That's ridiculous, I sez. So I try: LOADER_OFFSET EQU 100H - $ LOADER_OFFSET EQU 100H - OFFSET LOADER LOADER_OFFSET = 100H - [each of three options above] In all cases, TASM complains. It does so even in QUIRKS and MASM mode. So, I gave a call to Borland on my dime. The semi moron at the other end wanted an explanation as to why I wanted to do the above. He kept stumbling on (you know, the answer will probably be negative (Wow! brilliant)), and I kept asking "So?". I finally had to hang up after ~25 minutes when I realized that for the price of the call, I could probably pick up a copy of Microsoft's assembler off the net!! In any case, since I have already spent the money on the product and more on entertaining a clown, can anyone suggest a way out? The only solution I know of (and it semi-works) is that everywhere I want to use LOADER_OFFSET, I have to first subtract off OFFSET LOADER and then add in 100H. I have no objection to doing this, save for the fact that LOADER_OFFSET is used in other Equates. It bugs me no end that TASM can't subtract two numbers which are completely and unambiguously defined, and I paid a cool $259 (for the professional C) package for this. :-( Thanks for any help! Milan .