Thread View: cn.bbs.comp.program
2 messages
2 total messages
Started by Mr.J
Thu, 26 Mar 1998 00:00
��ô��Delphi��д�˿ڣ�Ҳ����Pascal�����⣩��Empty
Author: Mr.J
Date: Thu, 26 Mar 1998 00:00
Date: Thu, 26 Mar 1998 00:00
5 lines
551 bytes
551 bytes
as title -- [m[1;32m�� ��Դ:���������� BBS bbs.nease.net��[FROM: ab-2-221.bta.ne][m
Re: ��ô��Delphi��д�˿ڣ�Ҳ����Pascal�����⣩��Empty
Author: James
Date: Fri, 27 Mar 1998 00:00
Date: Fri, 27 Mar 1998 00:00
42 lines
1451 bytes
1451 bytes
Hi,
in delphi1 u can use port[] or portw[] to access them, but it is not
supported by d2 and d3, u need to write asm to do that as bellow
procedure OutPort( PortNo : Word ; Value : Byte );
begin
asm
mov dx , PortNo
mov al , Value
out dx , al
end;
end;
procedure OutPortW( PortNo : Word ; Value : Word )
begin
asm
mov dx , PortNo
mov ax , Value
out dx , ax
end;
end;
function ReadPort( PortNo : Word ) : Byte ;
var
RetByte : Byte ;
begin
asm
mov dx , PortNo
in al , dx
mov RetByte , al
end;
ReadPort := RetByte ;
end;
I used these in my own program, wish it will be helpful.
Mr.J wrote:
> as title
>
> --
> [m[1;32m�� ��Դ:���������� BBS bbs.nease.net��[FROM: ab-2-221.bta.ne][m
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads