Archived from groups: microsoft.public.windowsxp.newusers (
More info?)
Ah yes, of course; I should have been able to visualize that but didn't. It
means I have a little more empirical work to do; and you've likely saved me
from some frustration down the road. Best laid plans and all that stuff.
Thanks for your time and patience,
Pop
--
Let someone else do it
I'm retired!
"Rick "Nutcase" Rogers" <rick@mvps.org> wrote in message
news:%231tLwXnQFHA.3120@TK2MSFTNGP10.phx.gbl...
> Hi Pop,
>
> To put it simply as I can, some program code, depending on the language
> and how it is assembled, will load the address of the intended port and
> attempt to write directly to it. In WinXP this is not allowed in the
> normal runtime environment, though you could do this through the
> underlying 16-bit subsystem in Win9x systems. In XP, only the drivers can
> address the hardware, so you must go through them when writing program
> code. In the case of the lpt1 port (378h), you can run the command
> emulator as it translates the output to go through the driver. In the case
> of Qbasic, if the code is written to load the address of the port and
> directly output data to it, it won't work.
>
> --
> Best of Luck,
>
> Rick Rogers, aka "Nutcase" - Microsoft MVP
> http://mvp.support.microsoft.com/
> Associate Expert - WindowsXP Expert Zone
> www.microsoft.com/windowsxp/expertzone
> Windows help - www.rickrogers.org
>
> "Pop" <nobody@devnull.spamcop.net> wrote in message
> news:OXQlZqiQFHA.3704@TK2MSFTNGP12.phx.gbl...
>>I agree, and I understand your points. But, if my batch files work OK,
>>why wouldn't QBasic or whatever he said he was using? I think I mis-named
>>it in my previous post, BTW.
>>
>> As I said it seems to work fine in the tests I'm doing here; what is it
>> that would be giving QBasic problems? I know Basic fairly well though I
>> don't have a version installed here and using the LPT shouldn't be much
>> of a problem? Or am I using my blind eye again?
>>
>> I'm not debating or intimating that you are wrong: I just want to know
>> what's up.
>>
>> I looked briefly without success: Do you think there is a better group
>> to ask this question in ? I'd like to do some followup for my own
>> benefit.
>>
>> Regrads,
>> Pop
>> --
>> Let someone else do it
>> I'm retired!
>>
>> "Rick "Nutcase" Rogers" <rick@mvps.org> wrote in message
>> news:ujf$CIiQFHA.2788@TK2MSFTNGP09.phx.gbl...
>>> Hi,
>>>
>>> The command prompt within Windows uses the device drivers to execute the
>>> commands - keep in mind that this is not DOS even though it looks like
>>> it, it's just an emulator. A program written to directly address the
>>> hardware via the program code without going through this layer won't
>>> work in protected mode.
>>>
>>> --
>>> Best of Luck,
>>>
>>> Rick Rogers, aka "Nutcase" - Microsoft MVP
>>> http://mvp.support.microsoft.com/
>>> Associate Expert - WindowsXP Expert Zone
>>> www.microsoft.com/windowsxp/expertzone
>>> Windows help - www.rickrogers.org
>>>
>>> "Pop" <nobody@devnull.spamcop.net> wrote in message
>>> news:%23IzMaleQFHA.3544@TK2MSFTNGP12.phx.gbl...
>>>> Rick, really?
>>>> I suspect I'm either not understanding the question or the answer,
>>>> not sure which. Nor do I know if it's "direct access" for sure, but I
>>>> thought it was:
>>>>
>>>> The following commands both worked just now, from a Command Prompt
>>>> within windows; I didn't try from a booted command prompt:
>>>> copy fname lpt1:
>>>> copy fname lpt2:
>>>> Then I slapped both into a batch file and ran it, and got the same
>>>> results except the batch file I could add the command to FF the paper &
>>>> so I didn't have to manually press the FF button on the printer.
>>>>
>>>> Oh, XP Pro SP2/updates, one Serial connected, one USB connected.
>>>> printer.
>>>>
>>>> Wouldn't QDOS do the same thing? It seems not, from your response.
>>>>
>>>> Why do I care?
>>>> Because I'm in the process of writing some similar basic routines and
>>>> plan to print to a printer at completion. They're batch files with
>>>> calls to .exe's to do the "real" work.
>>>>
>>>> Guess I'd better go test it; but even if it works it'll leave me with
>>>> the curiousity; what am I missing?. Comments please?
>>>>
>>>> TIA,
>>>>
>>>> Pop
>>>>
>>>> "Rick "Nutcase" Rogers" <rick@mvps.org> wrote in message
>>>> news:u3odo8UQFHA.1096@tk2msftngp13.phx.gbl...
>>>>> Hi,
>>>>>
>>>>> If you are trying to talk directly to the serial port, it won't work.
>>>>> WinXP doesn't allow direct hardware addressing by a program.
>>>>>
>>>>> --
>>>>> Best of Luck,
>>>>>
>>>>> Rick Rogers, aka "Nutcase" - Microsoft MVP
>>>>> http://mvp.support.microsoft.com/
>>>>> Associate Expert - WindowsXP Expert Zone
>>>>> www.microsoft.com/windowsxp/expertzone
>>>>> Windows help - www.rickrogers.org
>>>>>
>>>>> "hans.vdpl" <hans.vdpl@discussions.microsoft.com> wrote in message
>>>>> news:14DA8AAD-E3CD-437C-B9F0-9EFF76DF8387@microsoft.com...
>>>>>>I would like to send esc chr sequences and content to a serial printer
>>>>>>via
>>>>>> the rs232 com1 port on my XP Pro pc . This goes without any problems
>>>>>> on a
>>>>>> windows 98 SE pc , but on my XP pc I get a device timeout . The
>>>>>> program is a
>>>>>> dos QBasic code .Appreciating any help .
>>>>>>
>>>>>> Hans
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>