On Wed, 5 Jan 2005, John Foust wrote:
> And in your code, we'd need to know COMPORT, RDA, DATAPORT
> and theexactsizeofKERMIT. Not remembering enough low-level DOS
> myself, are the first three constants or something from a
> BIOS call?
theexactsizeofKERMIT is simply derived from the DIR command. The
only catch is if dir says kermit.com = 67000 bytes, and you send
only 66999, then the kludge will wait for 67000 bytes... for ever.
The solution is easy: copy/b some short crap file to the port.
IBM feces comm. port data is trivial RTFM. All from
http://wps.com/FidoNet/source/DOS-C-sources/Old%20DOS%20C%20library%20source/ibmasync.asm
DATAPORT= base + MDATA ; You're not paying me enough
STATPORT= base + MSTAT ; to do arithmetic.
and RDA is... RDA.
;
; 8250 hardware configuration
;
base dw 3f8h ; COM1 base port
intnum db 12 ; COM1 interrupt
intmsk db 11101111b ;
MDATA equ 0 ; modem data port
MLINE equ 3 ; line control
MLSTAT equ 5 ; line status
MCNTRL equ 4 ; modem control
MSTAT equ 6 ; modem status
MBAUDL equ 0 ; baud rate low
MBAUDH equ 1 ; baud rate high
INTENB equ 1 ; interrupt enable register
INTID equ 2 ; interrupt ID
FIFO equ 2 ; 16550 FIFO control
DLAB equ 80h ; baud reg. access bit
RDA equ 01h ; character avail
TBE equ 20h ; buffer empty
MODE equ 03h ; 8 bits, no parity
MMODE equ 00001000b ; enable interrupt
RTS equ 2 ; RTS bit
DTR equ 1 ; DTR bit,
CTS equ 10h ; CTS bit,
B300 equ 0180h ; 300 baud
B1200 equ 0060h ; 1200 baud
B9600 equ 000ch ; 9600 baud
>> I am surprised that no one pointed out that the input, store, incremnt
>> could more easily be done by:
>
> Who was the one talking about overkill and excessive optimization? :-)
Me? Never!
Received on Wed Jan 05 2005 - 14:18:32 GMT