; ; COMOFF.A86 - Version 0.3 ; Take All UARTs Off The Interrupt Bus ; Freeware from Kirk Lawrence ; (Inspired by the DOS freeware source code RS232OFF.C by Jim Michener) ; ; cseg ;start of code segment org 100h ;leave room for base page jmp start ;get to the good stuff ; nbr dw 0 ;timer storage variable msg db 13,10,' COMOFF Version 0.3 - Take All UARTs Off The ' db 'Interrupt Bus' db 13,10,' Freeware from Kirk Lawrence',13,10 db 13,10,' Working$' done db 13,' All COM ports have been "put to sleep."',13,10,'$' ; timer: ;timer routine for delays xor ax,ax ;zero the AX register xor cx,cx ;zero the CX register xor dx,dx ;zero the DX register mov ah,00 ;function 0 - read system timer int 1Ah ;call BIOS timer services add dx,3 ;add our delay factor mov nbr,dx ;store the result in variable count: mov ah,00h ;function 0 - read system timer int 1Ah ;call BIOS timer services cmp dx,nbr ;has time period elapsed? jne count ;no, go count some more mov nbr,0 ;zero the storage variable xor ax,ax ;zero the AX register mov cl,2 ;function 2 - console out mov dl,'.' ;print 'period' character int 224 ;call BDOS ret ;return start: mov cl,9 ;function 9 - print string mov dx,offset msg ;point to header message int 224 ;call BDOS ;put COM1 to sleep mov al,0 mov dx,03F9h out dx,al call timer mov al,0 mov dx,03E9h out dx,al call timer ;put COM2 to sleep mov al,0 mov dx,02F9h out dx,al call timer mov al,0 mov dx,02E9h out dx,al call timer ;put COM3 to sleep mov al,0 mov dx,03FCh out dx,al call timer mov al,0 mov dx,03ECh out dx,al call timer ;put COM4 to sleep mov al,0 mov dx,02FCh out dx,al call timer mov al,0 mov dx,02ECh out dx,al call timer ; mov cl,9 ;function 9 - print string mov dx,offset done ;point to 'done' message int 224 ;call BDOS xor cx,cx ;function 0 - reset system int 224 ;call BDOS end