Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!harpo!seismo!hao!hplabs!sri-unix!GILLMANN@USC-ISIB From: GILLMANN%USC-ISIB@sri-unix.UUCP Newsgroups: net.micro.pc Subject: Re: Position Sensitive Code Message-ID: <15034@sri-arpa.UUCP> Date: Mon, 2-Jan-84 19:46:00 EST Article-I.D.: sri-arpa.15034 Posted: Mon Jan 2 19:46:00 1984 Date-Received: Thu, 5-Jan-84 00:59:14 EST Lines: 44 From: Dick Gillmann Here's a concrete example of how FORMAT is position dependent: (1) Assemble, link and exe2bin the following programm which I call SPACE.ASM. The program when exeuted simply installs itself and takes up 39K bytes of memory, thereby changing the load point for programs. CSEG SEGMENT ASSUME CS:CSEG ORG 100H START PROC FAR JMP INIT START ENDP K EQU 1024 WASTE DB 39*K DUP(0) INIT PROC NEAR MOV DX,OFFSET INIT INT 27H ; EXIT BUT STAY RESIDENT INIT ENDP CSEG ENDS END START (2) Change your AUTOEXEC.BAT and CONFIG.SYS files to remove any installed device drivers or installations of programs which stay resident (examples: ANSI.SYS or PROKEY). (3) Boot DOS 2.0. This should give you a pure copy of DOS. (4) Run SPACE.COM, thereby changing the program load point. (5) Now put a diskette in drive A: and give the command FORMAT A:. You will get a "Track 0 bad - disk unusable" error, no matter which diskette you use. I ran this test on an XT, but it should work on a PC as well. Using a different version of DOS would change it. Try varying the amount of space wasted; FORMAT does all kinds of things. I understand that this problem also affects DISKCOPY. Dick Gillmann -------