[comp.os.msdos.programmer] Why doesn't this work?

resmgt04@spacm1.uucp (10/03/90)

Why doesn't this work?

I'm just trying to use DEBUG as an assembler, and I can type out my
"source" in a file and then direct it to DEBUG like

c:\ DEBUG<SOURCE.DBG

What I'd like is a listing file, which I thought I could get by

c:\ DEBUG<SOURCE.DBG>SOURCE.LST

but DOS tells me "File not found" (creating the file ahead of time
doesn't work either) and if I explicitly stick in the path of the
files DOS sez "Path not found".

I should probably try to find an assembler to download (not up to 
paying for MASM), but I'd still like to know what's wrong.

psfales@cbnewsc.att.com (Peter Fales) (10/04/90)

In article <1939.2709b45f@spacm1.uucp>, resmgt04@spacm1.uucp writes:
> Why doesn't this work?
> 
> I'm just trying to use DEBUG as an assembler, and I can type out my
> "source" in a file and then direct it to DEBUG like

Hey!  Neat idea!

> c:\ DEBUG<SOURCE.DBG
> 
> What I'd like is a listing file, which I thought I could get by
> 
> c:\ DEBUG<SOURCE.DBG>SOURCE.LST

Try a space before the ">" - works great!

-- 
Peter Fales			AT&T, Room 5B-420
N9IYJ            		2000 N. Naperville Rd.
UUCP:	...att!ihlpb!psfales	Naperville, IL 60566
Domain: psfales@ihlpb.att.com	work:	(708) 979-8031

otto@tukki.jyu.fi (Otto J. Makela) (10/04/90)

[why doesn't this work ?]
   >> DEBUG<SOURCE.DBG>SOURCE.LST
[reply: use spaces: DEBUG <SOURCE.DBG >SOURCE.LST]

There is also the possibility that a keyboard driver messes up redirections
(what seems to happen is that for some reason the CR/LF pairs get both pushed
into DEBUG, and DEBUG doesn't recognize them as commands -- and the MS-DOS
stdin read routines are so stupid that they just sit there, in spite of stdin
running out).
I know that DOSEDIT, CED and UNCLE do this.  I'm not sure about ANARKEY.
--
   /* * * Otto J. Makela <otto@jyu.fi> * * * * * * * * * * * * * * * * * * */
  /* Phone: +358 41 613 847, BBS: +358 41 211 562 (CCITT, Bell 24/12/300) */
 /* Mail: Kauppakatu 1 B 18, SF-40100 Jyvaskyla, Finland, EUROPE         */
/* * * Computers Rule 01001111 01001011 * * * * * * * * * * * * * * * * */

2113av@gmuvax2.gmu.edu (John Porter) (10/05/90)

In article <OTTO.90Oct4103609@tukki.jyu.fi> otto@tukki.jyu.fi (Otto J. Makela) writes:
>I know that DOSEDIT, CED and UNCLE do this.  I'm not sure about ANARKEY.

Interesting.  I have never had this problem under Anarkey, and, if memory
serves, under Ced either.  DOS difference, maybe? 

-- john.porter

rcollins@altos86.Altos.COM (Robert Collins) (10/05/90)

>[why doesn't this work ?]
>   >> DEBUG<SOURCE.DBG>SOURCE.LST

I've been trying to let this one just go by my screen.  But when I kept
seeing suggestion after suggestion that didn't start with the obvious
question (regarding what was in SOURCE.DBG) I couldn't help but let my
fingers do the typing.

Does the file SOURCE.DBG look like this:
a  	; for ASSEMBLE
SOURCE CODE
<ENTER> ; to exit ASSEMBLE MODE
RCX     ; file size
RBX     ; File size
W	; Write file
Q	; QUIT (this is as important as "A" for assemble)

I do this: DEBUG<SOURCE.DBC>SOURCE.LST all the time.  I just did it
the other day.  There is nothing broken about DOS STDIN or STDOUT,
but did the originator try these obvious things?  Did all you who
responded think of them 
-- 
"Worship the Lord your God, and serve him only."  Mat. 4:10
Robert Collins                 UUCP:  ...!sun!altos86!rcollins
HOME:  (408) 225-8002
WORK:  (408) 432-6200 x4356

cage@fmeed1.UUCP (Russ Cage) (10/07/90)

In article <4153@altos86.Altos.COM> rcollins@altos86.UUCP (Robert Collins) writes:
>>[why doesn't this work ?]
>>   >> DEBUG<SOURCE.DBG>SOURCE.LST

>Does the file SOURCE.DBG look like this:
>a  	; for ASSEMBLE
>SOURCE CODE
><ENTER> ; to exit ASSEMBLE MODE
>RCX     ; file size
>RBX     ; File size
>W	; Write file
>Q	; QUIT (this is as important as "A" for assemble)

WHATEVER you do, do NOT forget the "Q"uit command to DEBUG.

I have done procedures such as the above hundreds of times (literally).
If you forget the "Q" command, DEBUG does not recognize the EOF condition
on stdin as it should, and it infinite loops, locking up the machine.
The only way to exit then is to reboot.

If you construct your SOURCE.DBG file correctly, your script will
work.  If not, you will chase the bug for a long time, especially if
you are re-directing the output to a file which is lost when you
reboot.
-- 
Russ Cage	Ford Powertrain Engineering Development Department
Work:  itivax.iti.org!cfctech!fmeed1!cage   (Business only, NO CHATTY MAIL PLS)
Home:  russ@m-net.ann-arbor.mi.us  (Everything else)
I speak for the companies I own, not for the ones I don't.