| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | IO problems |
Hi Colin,
In your message of 05 Jan (11:29 hrs) to All, you wrote:
CU> I am having trouble with my com routine..
CU> I am using a PCCOM 4-port serial card and this unit works with a
CU> small test
CU> program but when I use it in a larger program (executable approx
CU> 48k) I only
CU> get some of the characters from the port.
When you say "I only get some characters" do you mean that 1) you
get ALL the characters up to a point in time then NO characters from then
on, or 2) you get the characters intermittently (eg 1234567890 is sent in
the com port but the software sees 135679) ?
CU> The serial card is 16450 based with int vector at $02BF..
CU> I have done very little interrupt programming so I don't know if
CU> that is the
CU> problem.
It has been a few years (1991) since I've played with this multiport board.
I had a quick look through your code but didn't notice anything glaringly
obvious. I did notice a couple of weird things though.
In the InitInter routine you appear to enable the interrupts (Port[$02Bf]
:= $FF) on the multiport board prior to setting the interrupt vector. This
could cause you a problem - in my code I have the enable interrupt after
the setting of the PIC, also I do "Port[$02BF] := $80" to enable
the interrupts (I have no idea what the other 7 bits do).
CU> procedure InitInter;
CU> begin
CU> InitPort (0);
CU> InitPort (1);
CU> InitPort (2);
CU> InitPort (3);
CU> Port[$02BF]:=$ff;
CU> GetIntVec(COM_IRQ_vector, OldInt0Dh);
CU> SetIntVec(COM_IRQ_vector, {at}Async_ISR);
CU> COM_mask := (1 shl (COM_IRQ_number)) xor $00FF;
CU> OldPic:=Port[$21];
CU> Port[$21] := OldPIC and COM_mask;
CU> end;
What are the "COM_tt := Port[BaseAddr[Serial_IOPort]+n]" lines in
the InitPort and TerminateInter routines for? Are they necessary???
CU> procedure TerminateInter;
CU> var Serial_IOPort,com_tt:byte;
CU> begin
CU> { COM_mask := 1 shl (COM_IRQ_number);}
CU> SetIntVec(COM_IRQ_vector, OldInt0Dh);
CU> for Serial_IOPort := 0 to 3 do begin
CU> { set Interrupt enable off }
CU> COM_tt:=Port[BaseAddr[Serial_IOPort]];
CU> COM_tt:=Port[BaseAddr[Serial_IOPort]+1];
CU> COM_tt:=Port[BaseAddr[Serial_IOPort]+2];
CU> COM_tt:=Port[BaseAddr[Serial_IOPort]+3];
CU> COM_tt:=Port[BaseAddr[Serial_IOPort]+4];
CU> COM_tt:=Port[BaseAddr[Serial_IOPort]+5];
CU> COM_tt:=Port[BaseAddr[Serial_IOPort]+6];
CU> Port[BaseAddr[Serial_IOPort]]:=0;
CU> Port[BaseAddr[Serial_IOPort]+$01]:= $00;
CU> Port[$21] := Port[$21] and OldPIC;
CU> end;
CU> END;
Michael
--- GEcho 1.12/beta+
* Origin: PC Users Group (ACT), Point Vortex! (3:620/243.70)SEEN-BY: 633/267 270 @PATH: 620/243 711/808 50/99 635/503 633/371 374 267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.