Subversion Repositories SvarDOS

Rev

Rev 1873 | Rev 1875 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1873 Rev 1874
Line 479... Line 479...
479
 
479
 
480
; set DS to the original PSP
480
; set DS to the original PSP
481
mov ds, bx
481
mov ds, bx
482
 
482
 
483
; load the pointer to the JFT, save it on stack, and set DS to the JFT seg
483
; load the pointer to the JFT, save it on stack, and set DS to the JFT seg
484
mov bx, [0x34] ; offset
484
lds bx, [0x34]  ; loads offset at [0x34] into BX and segment at [0x36] into DS
485
mov ds, [0x36] ; seg
485
                ; same as "mov bx, [0x34]" + "mov ds, [0x36]", but smaller
486
push ds
486
push ds
487
push bx
487
push bx
488
 
488
 
489
; save the original process stdin and stdout on stack
489
; save the original process stdin and stdout (at [BX]) on stack
490
mov dx, [bx]   ; original stdin and stdout (from the JFT)
490
push word [bx]  ; original stdin and stdout (from the JFT)
491
push dx
-
 
492
 
491
 
493
; overwrite the original process stdin and stdout with stderr, in case stdout
492
; overwrite the original process stdin and stdout with stderr, in case stdout
494
; or stdin was redirected.
493
; or stdin was redirected.
495
mov dl, [bx+2]   ; the process stderr (3rd entry of the JFT in original PSP)
494
mov dl, [bx+2]   ; the process stderr (3rd entry of the JFT in original PSP)
496
mov dh, dl       ; dup DL so I can overwrite stdin and stdout with one write
495
mov dh, dl       ; dup DL so I can overwrite stdin and stdout with one write