This project is read-only.

Reading and writing to ports in Milestone 5

Jan 30, 2011 at 4:14 AM

How to read and write to a port in milestone 5?

Jan 30, 2011 at 9:07 AM
what port?

On Sun, Jan 30, 2011 at 5:14 AM, forest201 <notifications@codeplex.com> wrote:

From: forest201

How to read and write to a port in milestone 5?

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jan 30, 2011 at 3:49 PM

Any port. Like 0x3F6. Or the keyboard port 0x64.

Jan 30, 2011 at 4:07 PM
that's done using the IOPort classes


On Sun, Jan 30, 2011 at 4:49 PM, forest201 <notifications@codeplex.com> wrote:

From: forest201

Any port. Like 0x3F6. Or the keyboard port 0x64.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jan 30, 2011 at 5:43 PM

Could you please give me an example of how you go about reading port 0x64.

Jan 30, 2011 at 8:10 PM
Edited Jan 30, 2011 at 8:11 PM

I have tried it using the code below but when i compile it  i get this error ->" The type 'Cosmos.Core.IOPortBase' has no constructors defined"

 

 using Cosmos.Core;

namespace CosmosKernel1
{
    public class Test:IOPortBase
    {
        private static ushort Total;
        private static uint High, low;

        public static ushort GetAmountOfRam()
        {
             IOPortRead.Write8(0x70, 0x30);
             low = IOPortRead.Read8(0x71);
             IOPortWrite.Write8(0x70, 0x31);
             High = IOPortRead.Read8(0x71);
             Total = (ushort)(low | High << 8);
            return Total;
        }
    }

}

Jan 31, 2011 at 7:05 AM
creating io ports is only allowed from inside the Cosmos.Core assembly...

On Sun, Jan 30, 2011 at 9:10 PM, forest201 <notifications@codeplex.com> wrote:

From: forest201

I have tried it using the code below but when i compile it i get this error ->" The type 'Cosmos.Core.IOPort' has no constructors defined"

using Cosmos.Core;

namespace CosmosKernel1
{
public class Test:IOPortBase
{
private static ushort Total;
private static uint High, low;

public static ushort GetAmountOfRam()
{
IOPortRead.Write8(0x70, 0x30);
low = IOPortRead.Read8(0x71);
IOPortWrite.Write8(0x70, 0x31);
High = IOPortRead.Read8(0x71);
Total = (ushort)(low | High << 8);
return Total;
}
}

}

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com