tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Need help with hardware i/o


From: Detlef Riekenberg
Subject: Re: [Tinycc-devel] Need help with hardware i/o
Date: Sun, 23 Aug 2009 14:00:13 +0200

On Do, 2009-08-20 at 22:04 -0700, address@hidden wrote:

> I just discovered Tiny C

Welcome, person without a name.

> MS 'QuickC for DOS' had the inp()/outp() 
> functions defined in conio.h to do this.

There is no support for a 16Bit DOS target in tinycc.

> I can't figure out how to do this with TinyC. Since 
> TinyC runs on PC hardware (whether Linux or Windows),
> shouldn't it be able to do i/o commands?

You can access any pointer in memory, when you have the needed
permission,
but the OS is in charge to manage and access all resources.

> I also do direct access to video ram (xB8000000). Again, with QuickC I do
> this with:
> 
> char _huge *vaddr;
>       vaddr = (char *)0xB8000000;
>       *vaddr = 'a';
> 
> The _huge term makes QuickC use 32-bit pointers instead of 16-bits (to get
> to the video ram).

The video ram is managed by the OS (video driver) while the layout
and the location depend on the disply mode and resolution.

When you want to do use is 16-Bit DOS Text Mode related code.
That won't work on WIndows or Linux.

For 16-Bit DOS, you can use the compilers at http://www.openwatcom.org 
(Open Source) or http://www.digitalmars.com and even old Borland Compilers 
are free to use these days, but the old versions are no longer under
development: http://www.borland.com has a museum somewhere.

> Question: does TinyC use 32-bit pointers? Always?

32-Bit ans 64-Bit are possible with tinycc

> My program runs without a roblem when compiled with QuickC, 
> so I know what I'm doing can be done.

That can be done only with 16-Bit DOS. See the mentioned compiler above.

A 16-Bit DOS target might be a funny project, but not really useful
these days.

-- 
 
By by ... Detlef





reply via email to

[Prev in Thread] Current Thread [Next in Thread]