Sorry, a minor correction on results.

> On Mar 22, 2016, at 7:37 PM, Jerome E. Shidel Jr. <jer...@shidel.net> wrote:
> 
> Hello Eric (and anyone else who is interested),
> 
> Here is a little proof-of-concept demonstration of the issue regarding I/O 
> redirection.
> 
> ; begin example code
> 
> ; NASM 2.11.08 for DOS
> ; Jerome Shidel, Public Domain.
> 
> use16
> 
> cpu 8086
> 
> org 0x100
> 
> StdPassThru:
>     mov     ah, 0x0b    ; DOS Check Standard Input Status
>     int     0x21
>     cmp     al, 0x00    ; 0x00 = no character available, 0xff = present.
>     je      NoInput
>     mov     ah, 0x08    ; DOS Get character from STDIN, no echo. AL = 
> Character
>     int     0x21
>     mov     ah, 0x02    ; DOS Write DL character to STDOUT.
>     mov     dl, al
>     int     0x21
>     jmp     StdPassThru
> 
> NoInput:
>     mov     ax, 0x4c00  ; DOS Terminate, no error code
>     int     0x21
> 
> ; end example code
> 
> Compile with nasm PASSTHRU.ASM -fbin -o PASSTHRU.COM <http://passthru.com/>
> 
> Run in default DOSBox:
> 
>       type passthru.asm | passthru.com <http://passthru.com/>
>       Result garbage line of text.


Text goes immediately to STDOUT and does not go through PASSTHRU.COM 
<http://passthru.com/>.
(I was running type passthru.com | passthru.com)

> 
> Run under FreeCOM shell inside DOSBox
> 
>       C:\FDOS\BIN\command.com <http://command.com/>
>       type passthru.asm | passthru.com <http://passthru.com/>
>       
>       result: .Text scrolls by, then infinite number of blank characters and 
> occasional 
>       control characters.
> 
> Run on real (or virtual machine of) FreeDOS, MS-DOS, PC-DOS….
> 
>       text of PASSTHRU.ASM is output and program terminates.

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to