Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

ctty/dup2 in DOS4 (Developers)

posted by kerravon E-mail, Ligao, Free World North, 26.12.2025, 20:08

In the DOS4 source code, I can see:

cmd\command\tcmd2b.asm

ICLLOOP:                                        ; Close basic handles
        MOV     AH,CLOSE
        INT     int_command
        INC     BX
        LOOP    ICLLOOP
        POP     BX                              ; Get handle
        MOV     AH,XDUP   
        INT     int_command                     ; Dup it to 0
        MOV     AH,XDUP   
        INT     int_command                     ; Dup to 1
        MOV     AH,XDUP
        INT     int_command                     ; Dup to 2
        MOV     AH,CLOSE                        ; Close initial handle
        INT     int_command


Now according to RBIL:

https://www.ctyme.com/intr/rb-2931.htm

BX should have the file handle. But I see 3 executions of Int int_command,
and I don't see BX changing from 0, to 1, to 2, between executions.

Any idea how this works?

Note - I'm trying to get "ctty com1:" to work on PDOS-generic, and I
don't really have the concept yet.

Thanks. Paul.

 

Complete thread:

Back to the forum
Board view  Mix view
23173 Postings in 2182 Threads, 404 registered users (2 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum