Re: Not possible to send two disk drive commands after each other

From: Greg King (gngking_at_erols.com)
Date: 2004-02-14 10:29:35

From: Christian Johansson; on Date: Saturday, February 07, 2004, 05:33 PM

> I just noticed that if I, in assembly, first send one disk drive command
> to the disk drive, e.g. "U1 3 0 1 0", and I then, immediately after the
> carriage return, send another disk drive command, such as "B-P 3 0",
> both commands fail.  The drive light starts to flash, and if I read out
> the error channel, it says "30 SYNTAX ERROR".  If I just send one of the
> disk drive commands, it works well.  Why is this?  Must there be a pause
> between the commands, for it to work, or do I perhaps have to call UNLSN
> followed by LISTN between the commands, or do something else to get it
> to work?  (For my application, I found that the B-P command was
> superfluous; so, I could just leave it out.  But, I would still like to
> know how to do it.)

Yes, it is UNLSN that actually executes a DOS command.  In fact, the DOS
ignores a carriage-return that is at the end of the command; you do not
need to send that character.

Position-commands are an exception:  the record-number might contain
chr$(13); so, you do need to add a carriage-return to the end of those
commands.  Then, DOS will ignore the carriage-return, and keep the
chr$(13).


       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.