Anyway, try to run dosemu -D+iTcw -o log
look at the contents of log and see if anything suspect happens, ie. does dosemu open the ports in the first place, does it read the right config file and so on.
I've done that and I've tried two different methods with the COM port to try and find out exactly what's happening. Before I go any further, I should say that it's DOSEMU 1.1.99 running on a 2.4.22 kernel on an Athlon 1GHz. The PC has the standard two serial ports: COM1/ttyS0 at 0x3f8 and COM2/ttyS1 at 0x2f8. I've appended the fragment of my DOS prog (written in Power Basic) to the end of this message (after the log outputs) that you can see what I'm trying to do.
Here are the results:
First method - in this, I attempt to drive the COM port directly. This results in an error message which says that there's a conflict between COM1 and std port i/o.
The relevant lines from dosemu.conf are:
$_com1 = "/dev/ttyS0 irq 4" $_ports = " fast range 0x3f8,0x3ff"
What happens when I run my DOS prog is that the RTS signal appears to be perfectly timed to the data coming out of the TX pin on the serial port connector. Unfortunately (probably because of the port conflict?) I can't read any data coming back into the serial connector.
Here's a rough ASCII representation of what the oscilloscope (connected to the serial connector) displays:
RTS pin: _____| |______________________________
TX pin: -------XXXXXXXXXXXXXXXXX-------------------------------
I've copied the contents of the log file to the end of this message in the section headed "DOSEMU log - Method 1"
Second method - in this, I don't attempt to drive the COM port directly. Now there's no error message about conflicts, but the data doesn't come out of the TX pin of the serial port connector at the right time, which means that the RTS signal timing is all wrong with respect to the transmitted data stream. I also see that my prog never has to wait for the UART to send a character before loading the next one in. That seems very odd! This prog runs at 1200 baud, so you can see that it should take about 10ms for each character to shift out of the UART TX register. Running DOSEMU in this second method, it takes roughly 20 MICROSECONDS to send a character!! Is this because DOSEMU is emulating the hardware - is that the correct term for it?
Another rough ASCII wave chart:
RTS pin: _____| |____________________________________________________
TX pin: ------------XXXXXXXXXXXXXXXXX-------------------------------
(Note that the prog thinks that all the characters were sent while RTS was on, but the characters don't actually come out of the UART until much later - then it's too late!)
Here are the relevant lines in dosemu.conf for method 2:
$_com1 = "/dev/ttyS0 irq 4" $_ports = ""
I've copied the contents of that log file also to the end of this message in the section headed "DOSEMU log - Method 2"
So - to summarise my position at the moment: either (A) I get a conflict between COM1 and the existing port driver but I can get RTS and TX signals timed correctly at the connector; or (B) I can have no port conflict but there seems to be no correct relationship between driving the RTS signal and the TX data coming out of the connector.
The problem in (B) seems to be that all of my transmitted characters disappear into a sort of 'virtual' UART to be transmitted later, whilst the RTS signal seems to come out of the port in 'real' time.
And to summarise my questions: (A) how can I avoid a port conflict an dreceive data if I want to drive the port directly? (B) how can I make sure that the timing of RTS and the TX data is correct if I don't drive the port directly?
The 2 logs and the programme fragment are below. Sorry for the length of this message. I'd be very grateful for any help or clues that you can offer me.
Cheers,
Gerald.
============================================================================ DOSEMU log - Method 1: ============================================================================ CONF: config variable parser_version_3 set CONF: config variable c_system set CONF: Parsing built-in dosemu.conf file. CONF: config variable version_3_style_used set CONF: Parsing built-in global.conf file. CONF: config variable version_3_style_used unset CONF: config variable version_3_style_used set CONF: opened include file /etc/dosemu/dosemu.conf CONF: closed include file /etc/dosemu/dosemu.conf debug flags: -a+cw CONF: Enabling use of pentium timer CONF: dosbanner on CONF: timer freq=18, update=54925 CONF: CPU set to 586 CONF: 8192k bytes XMS memory CONF: 1024k bytes EMS memory CONF: EMS-frame = 0xe000 CONF: DPMI-Server on CONF: config.emusys = 'EMU' CONF: dosemu running on console SER: directory /var/lock namestub LCK.. binary No SER: /dev/ttyS0 port 0 int 4 MOUSE: /dev/mouse type 7 using internaldriver: yes, emulate3buttons: no baudrate: 0 CONF: Keyboard-layout keyb-user CONF: Keyboard-layout auto device: /dev/fd0 type 2 h: 0 s: 0 t: 0 floppy A: CONF: fastfloppy = 1 CONF: IPX support off CONF(LPT0) f: (null) c: lpr o: -POL610raw t: 5 port: 0 CONF: not allowing speaker port access CONF: Packet Driver disabled. CONF: range of I/O ports 0x03f8-0x03ff PORT: allow_io for port 0x03f8:8 perm=3 or=0 and=ff PORT: range 0x03f8-0x03ff already registered as serial(auto) PORT: Device /dev/null opened successfully = 4 PORT: registered "std port io" handle 0x01 [0x03f8-0x03ff] fd=138804216 PORT: giving fast access to ports [0x03f8-0x03ff] nPORT: set_ioperm [3f8:8:1] returns 0 device: /dev/hda1 type 3 partition# 1 h: -1 s: -1 t: -1 drive C: CONF: config variable c_system unset debug flags: +iTcw CONF: running exclusively as ROOT: uid=0 (cached 0) gid=0 (cached 0) DBG_FD already set DOSEMU-1.1.99.1 is coming up on Linux version 2.4.22-ATH040209e CONF: reserving 640Kb at 0x00000 for 'd' (Base DOS memory (first 640K)) CONF: reserving 64Kb at 0xF0000 for 'r' (Dosemu reserved area) major = 4 minor = 2 CONF: reserving 128Kb at 0xA0000 for 'v' (Video memory) PORT: registered "8254 Timer0" handle 0x06 [0x0040-0x0040] fd=-1 PORT: registered "8254 Timer1" handle 0x07 [0x0041-0x0041] fd=-1 PORT: registered "8254 Timer2" handle 0x08 [0x0042-0x0042] fd=-1 PORT: registered "8254 Ctrl02" handle 0x09 [0x0043-0x0043] fd=-1 PORT: registered "CMOS RAM" handle 0x0a [0x0070-0x0071] fd=-1 SERIAL $Header: /cvsroot/dosemu/dosemu/src/base/serial/ser_init.c,v 1.1.2.1 2003/09/17 14:40:54 bartoldeman Exp $ registering /dev/ttyS0 for serial ERROR: PORT: conflicting devices: COM1 & std port io registering /dev/mouse for internal_mouse PORT: registered "8259 PIC0" handle 0x0c [0x0020-0x0021] fd=-1 PORT: registered "8259 PIC1" handle 0x0d [0x00a0-0x00a1] fd=-1 PORT: registered "DMA - XT Controller" handle 0x0e [0x0000-0x000f] fd=-1 PORT: registered "DMA - XT Pages" handle 0x0f [0x0081-0x0087] fd=-1 PORT: registered "DMA - AT Controller" handle 0x10 [0x00c0-0x00de] fd=-1 PORT: registered "DMA - AT Pages" handle 0x11 [0x0089-0x008f] fd=-1 PORT: registered "SB Emulation" handle 0x12 [0x0220-0x0233] fd=-1 PORT: registered "Adlib (+ Advanced) Emulation" handle 0x13 [0x0388-0x038b] fd=-1 PORT: registered "Midi Emulation" handle 0x14 [0x0330-0x0331] fd=-1 PORT: registered "Joystick Port Emulation" handle 0x15 [0x0200-0x020f] fd=-1 PORT: registered "8042 Keyboard data" handle 0x16 [0x0060-0x0060] fd=-1 PORT: registered "8042 Keyboard command" handle 0x17 [0x0064-0x0064] fd=-1 PORT: registered "Speaker port" handle 0x18 [0x0061-0x0061] fd=-1 CONF: reserving 64Kb at 0xE0000 for 'E' (EMS page frame) TIME: using 9154 usec for updating ALRM timer 20 < 20 60 > 45 20 < 20 60 > c5 20 < 20 60 > c5 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 70 < 8a 71 < 26 70 < 8f 71 > 6 70 < 8b 71 > 2 70 < 8f 71 > 6 70 < 8b 71 < 2 70 < f 71 > 6 64 > 1c 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 2f2 < ff PORTb: 2f2 not available for write 2f3 < ff PORTb: 2f3 not available for write 2f4 < ff PORTb: 2f4 not available for write 2f5 < ff PORTb: 2f5 not available for write 2f6 < ff PORTb: 2f6 not available for write 2f7 < ff PORTb: 2f7 not available for write 6f2 < ff PORTb: 6f2 not available for write 6f3 < ff PORTb: 6f3 not available for write 6f4 < ff PORTb: 6f4 not available for write 6f6 < ff PORTb: 6f6 not available for write 6f7 < ff PORTb: 6f7 not available for write 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > 2e 20 < 20 20 < 20 20 < 20 60 > ae 20 < 20 20 < 20 20 < 20 20 < 20 60 > 18 20 < 20 20 < 20 60 > 32 20 < 20 20 < 20 60 > 98 20 < 20 20 < 20 60 > b2 20 < 20 20 < 20 20 < 20 60 > 32 20 < 20 20 < 20 20 < 20 60 > b2 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > 14 20 < 20 20 < 20 20 < 20 60 > 94 20 < 20 20 < 20 20 < 20 60 > 12 20 < 20 20 < 20 60 > 92 20 < 20 20 < 20 20 < 20 20 < 20 60 > 1f 20 < 20 20 < 20 20 < 20 60 > 9f 20 < 20 20 < 20 60 > 14 20 < 20 20 < 20 20 < 20 60 > 94 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > 1c 20 < 20 20 < 20 20 < 20 61 > 2c 61 < 2c SPEAKER: sound OFF! 43 < 36 40 < 0 40 < 0 21 > f8 21 < e8 60 > 9c 60 > 9c 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > 1 60 > 1 20 < 20 20 < 20 21 > e8 21 < f8 20 < 20 60 > 81 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > 1d 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > 1d 20 < 20 60 > e0 20 < 20 60 > 2a 20 < 20 60 > e0 20 < 20 60 > 51 20 < 20 20 < 20 20 < 20 60 > e0 20 < 20 60 > d1 20 < 20 60 > e0 20 < 20 60 > aa 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > 9d 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > 1d 20 < 20 20 < 20 60 > 38 20 < 20 20 < 20 20 < 20 20 < 20 leavedos(0|0x0) called - shutting down SPEAKER: sound OFF!
============================================================================ DOSEMU log - Method 2: ============================================================================ CONF: config variable parser_version_3 set CONF: config variable c_system set CONF: Parsing built-in dosemu.conf file. CONF: config variable version_3_style_used set CONF: Parsing built-in global.conf file. CONF: config variable version_3_style_used unset CONF: config variable version_3_style_used set CONF: opened include file /etc/dosemu/dosemu.conf CONF: closed include file /etc/dosemu/dosemu.conf debug flags: -a+cw CONF: Enabling use of pentium timer CONF: dosbanner on CONF: timer freq=18, update=54925 CONF: CPU set to 586 CONF: 8192k bytes XMS memory CONF: 1024k bytes EMS memory CONF: EMS-frame = 0xe000 CONF: DPMI-Server on CONF: config.emusys = 'EMU' CONF: dosemu running on console SER: directory /var/lock namestub LCK.. binary No SER: /dev/ttyS0 port 0 int 4 MOUSE: /dev/mouse type 7 using internaldriver: yes, emulate3buttons: no baudrate: 0 CONF: Keyboard-layout keyb-user CONF: Keyboard-layout auto device: /dev/fd0 type 2 h: 0 s: 0 t: 0 floppy A: CONF: fastfloppy = 1 CONF: IPX support off CONF(LPT0) f: (null) c: lpr o: -POL610raw t: 5 port: 0 CONF: not allowing speaker port access CONF: Packet Driver disabled. device: /dev/hda1 type 3 partition# 1 h: -1 s: -1 t: -1 drive C: CONF: config variable c_system unset debug flags: +iTcw CONF: running exclusively as ROOT: uid=0 (cached 0) gid=0 (cached 0) DBG_FD already set DOSEMU-1.1.99.1 is coming up on Linux version 2.4.22-ATH040209e CONF: reserving 640Kb at 0x00000 for 'd' (Base DOS memory (first 640K)) CONF: reserving 64Kb at 0xF0000 for 'r' (Dosemu reserved area) major = 4 minor = 2 CONF: reserving 128Kb at 0xA0000 for 'v' (Video memory) PORT: registered "8254 Timer0" handle 0x06 [0x0040-0x0040] fd=-1 PORT: registered "8254 Timer1" handle 0x07 [0x0041-0x0041] fd=-1 PORT: registered "8254 Timer2" handle 0x08 [0x0042-0x0042] fd=-1 PORT: registered "8254 Ctrl02" handle 0x09 [0x0043-0x0043] fd=-1 PORT: registered "CMOS RAM" handle 0x0a [0x0070-0x0071] fd=-1 SERIAL $Header: /cvsroot/dosemu/dosemu/src/base/serial/ser_init.c,v 1.1.2.1 2003/09/17 14:40:54 bartoldeman Exp $ registering /dev/ttyS0 for serial PORT: registered "COM1" handle 0x0b [0x03f8-0x03ff] fd=-1 registering /dev/mouse for internal_mouse PORT: registered "8259 PIC0" handle 0x0c [0x0020-0x0021] fd=-1 PORT: registered "8259 PIC1" handle 0x0d [0x00a0-0x00a1] fd=-1 PORT: registered "DMA - XT Controller" handle 0x0e [0x0000-0x000f] fd=-1 PORT: registered "DMA - XT Pages" handle 0x0f [0x0081-0x0087] fd=-1 PORT: registered "DMA - AT Controller" handle 0x10 [0x00c0-0x00de] fd=-1 PORT: registered "DMA - AT Pages" handle 0x11 [0x0089-0x008f] fd=-1 PORT: registered "SB Emulation" handle 0x12 [0x0220-0x0233] fd=-1 PORT: registered "Adlib (+ Advanced) Emulation" handle 0x13 [0x0388-0x038b] fd=-1 PORT: registered "Midi Emulation" handle 0x14 [0x0330-0x0331] fd=-1 PORT: registered "Joystick Port Emulation" handle 0x15 [0x0200-0x020f] fd=-1 PORT: registered "8042 Keyboard data" handle 0x16 [0x0060-0x0060] fd=-1 PORT: registered "8042 Keyboard command" handle 0x17 [0x0064-0x0064] fd=-1 PORT: registered "Speaker port" handle 0x18 [0x0061-0x0061] fd=-1 CONF: reserving 64Kb at 0xE0000 for 'E' (EMS page frame) TIME: using 9154 usec for updating ALRM timer 20 < 20 60 > 45 20 < 20 60 > c5 20 < 20 60 > c5 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 70 < 8a 71 < 26 70 < 8f 71 > 6 70 < 8b 71 > 2 70 < 8f 71 > 6 70 < 8b 71 < 2 70 < f 71 > 6 64 > 1c 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 2f2 < ff PORTb: 2f2 not available for write 2f3 < ff PORTb: 2f3 not available for write 2f4 < ff PORTb: 2f4 not available for write 2f5 < ff PORTb: 2f5 not available for write 2f6 < ff PORTb: 2f6 not available for write 2f7 < ff PORTb: 2f7 not available for write 6f2 < ff PORTb: 6f2 not available for write 6f3 < ff PORTb: 6f3 not available for write 6f4 < ff PORTb: 6f4 not available for write 6f6 < ff PORTb: 6f6 not available for write 6f7 < ff PORTb: 6f7 not available for write 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > 18 20 < 20 20 < 20 20 < 20 60 > 32 20 < 20 60 > 98 20 < 20 20 < 20 60 > b2 20 < 20 20 < 20 20 < 20 60 > 32 20 < 20 20 < 20 20 < 20 60 > b2 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > 14 20 < 20 20 < 20 20 < 20 60 > 94 20 < 20 20 < 20 60 > 12 20 < 20 20 < 20 60 > 92 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > 1f 20 < 20 20 < 20 60 > 9f 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > 14 20 < 20 20 < 20 60 > 94 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > e 20 < 20 20 < 20 20 < 20 60 > 8e 20 < 20 20 < 20 20 < 20 60 > e 20 < 20 20 < 20 20 < 20 60 > 8e 20 < 20 20 < 20 60 > e 20 < 20 20 < 20 20 < 20 60 > 8e 20 < 20 20 < 20 20 < 20 60 > e 20 < 20 20 < 20 60 > 8e 20 < 20 20 < 20 20 < 20 60 > e 20 < 20 20 < 20 60 > 8e 20 < 20 20 < 20 20 < 20 60 > e 20 < 20 20 < 20 20 < 20 60 > 8e 20 < 20 20 < 20 20 < 20 20 < 20 60 > e 20 < 20 20 < 20 60 > 8e 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > 2e 20 < 20 20 < 20 20 < 20 60 > ae 20 < 20 20 < 20 20 < 20 20 < 20 60 > 18 20 < 20 20 < 20 60 > 32 20 < 20 20 < 20 60 > 98 20 < 20 20 < 20 60 > b2 20 < 20 20 < 20 20 < 20 60 > 32 20 < 20 20 < 20 20 < 20 60 > b2 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > 14 20 < 20 20 < 20 60 > 94 20 < 20 20 < 20 60 > 12 20 < 20 20 < 20 20 < 20 60 > 92 20 < 20 20 < 20 20 < 20 60 > 1f 20 < 20 20 < 20 20 < 20 60 > 9f 20 < 20 20 < 20 20 < 20 60 > 14 20 < 20 20 < 20 20 < 20 60 > 94 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > 1c 20 < 20 20 < 20 20 < 20 60 > 9c 60 > 9c 20 < 20 61 > 3c 61 < 3c SPEAKER: sound OFF! 43 < 36 40 < 0 40 < 0 3f9 < 0 3fb < 87 3f8 < 60 3f9 < 0 3fb < 7 3fc < 9 3fb < 80 3f8 < 60 3f9 < 0 3fb < 3 3fc < b 3f9 < 1 3fc < b 3fe > 0 3fa < 4f 3f8 > 0 3f8 > 0 3fd > 60 21 > f8 21 < e8 3fc < b 3fd > 60 3f8 < 2 3fd > 20 3f8 < 30 3fd > 20 3f8 < 31 3fd > 20 3f8 < 30 3fd > 20 3f8 < 33 3fd > 20 3f8 < 3 3fd > 20 3f8 < 30 3fd > 20 3f8 < 31 3fd > 20 3f8 < d 3fd > 20 3fd > 60 3fc < 9 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 3fc < b 3fd > 60 3f8 < 2 3fd > 60 3f8 < 30 3fd > 20 3f8 < 31 3fd > 60 3f8 < 30 3fd > 20 3f8 < 33 3fd > 60 3f8 < 3 3fd > 20 3f8 < 30 3fd > 60 3f8 < 31 3fd > 20 3f8 < d 3fd > 60 3fd > 60 3fc < 9 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 3fc < b 3fd > 60 3f8 < 2 3fd > 60 3f8 < 30 3fd > 20 3f8 < 31 3fd > 60 3f8 < 30 3fd > 20 3f8 < 33 3fd > 60 3f8 < 3 3fd > 20 3f8 < 30 3fd > 60 3f8 < 31 3fd > 20 3f8 < d 3fd > 60 3fd > 60 3fc < 9 60 > 1 60 > 1 20 < 20 3fc < 0 21 > e8 21 < f8 20 < 20 20 < 20 60 > 81 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 20 < 20 60 > 1d 20 < 20 60 > 38 20 < 20 20 < 20 20 < 20 20 < 20 leavedos(0|0x0) called - shutting down SPEAKER: sound OFF!
============================================================================ Fragment of DOS RS485 programme run with DOSEMU: ============================================================================ ' TX2NETWORK turns on the TX driver, then waits for the TX holding ' register to empty before sending each character in TX$ to ' the UART. When the last character has gone into the UART, ' it again waits for the TX holding register to empty; ' then and ONLY then does it check for the TX shifter to empty ' before turning the TX driver off again. ' This last precaution is necessary on some UARTs to ensure that ' the TX shifter empty does not give a spurious clear signal ' before the last character has been completely sent. ' ' ' For the purposes of testing, TX$ has these ASCII characters: ' ' ASCII: STX 0 1 0 3 ETX 0 1 CR ' Hex: 03 30 31 30 33 03 30 31 0D ' ' An initialisation routine has already set the UART to 1200 baud. ' ' TX2NETWORK: ' ' Set RTS to turn TX driver on. Wait for TX driver to settle. ' out IUART+MCR%,TXEN% delay .1 ' ' Check that TX holding reg is empty first. ' Then send characters in TX$ one by one to UART to be shifted out. ' for i%=1 to len(TX$) while (inp(IUART+LSR%) and &B00100000)=0 : wend out IUART+THR%,asc(mid$(TX$,i%,1)) next i% ' ' Wait for last bit of last character to be shifted out, ' then reset RTS to turn TX driver off: ' while (inp(IUART+LSR%) and &B00100000)=0 : wend while (inp(IUART+LSR%) and &B01000000)=0 : wend out IUART+MCR%,TXDIS% return ' ============================================================================
- To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html