Real Microkernel Need C coders

A

Adam

I am coding a microkernel based off of Tanebaum's theroy. For Isis to
be extensible, fast, and secure, it has been decided it will be a
microkernel. Not in the old Mach sense of the word, but in the size of
the entire project. It is a microkernel, that will limit interprocess
communication.
But as Tanenbaum says, you learn nothing by reading theroy alone. The
code should be self-explaintory. Another reason I choose the
microkernel method was to make customizable, and easily added on to.
For example my science fair project(which is also on the main site
site) proved that distributed-microkernels will be the wave of the
future. Mach is brain damaged, and Minix is an educational tool(which
is fine, that's what it's purpose was), it is time for a real
Microkernel. And that is what I'm providing.

The main site can be found here:
http://isisos.worldbreak.com/index.html

The source can be downloaded here:
http://www.free-ftp.org/isisos/IsisOS0.01.zip

And our SF page is here: http://sourceforge.net/projects/isisos/

I am actively seeking developers C and assembly programmers.
Thankyou for reading
 
J

jacob navia

Adam said:
I am coding a microkernel based off of Tanebaum's theroy. For Isis to
be extensible, fast, and secure, it has been decided it will be a
microkernel. Not in the old Mach sense of the word, but in the size of
the entire project. It is a microkernel, that will limit interprocess
communication.
But as Tanenbaum says, you learn nothing by reading theroy alone. The
code should be self-explaintory. Another reason I choose the
microkernel method was to make customizable, and easily added on to.
For example my science fair project(which is also on the main site
site) proved that distributed-microkernels will be the wave of the
future. Mach is brain damaged, and Minix is an educational tool(which
is fine, that's what it's purpose was), it is time for a real
Microkernel. And that is what I'm providing.

The main site can be found here:
http://isisos.worldbreak.com/index.html

The source can be downloaded here:
http://www.free-ftp.org/isisos/IsisOS0.01.zip

And our SF page is here: http://sourceforge.net/projects/isisos/

I am actively seeking developers C and assembly programmers.
Thankyou for reading

There is no way to know why you want a new microkernel when in fact
there are so many of them:

The GNU Hurd project
The MKLinux project
and many others.

None of them has gained widespread usage, maybe because they have your
philosophy:
> as I've said if you place too much effort on the GUI and the user,
> than you'll get a brain-damaged OS like Windows,

It is the user that will in end effect *use* this system isn't it?

You throw words like
"Mach is brain damaged"
"Windows is brain damaged"

but nowhere is a serious criticism of those operating systems to be
seen.

Since there is absolutely no documentation or explanatory pages
as to why should we invest time and effort in this project this
looks doomed from the start.

Before asking for other's help however, you could write yourself
something. The zip file with the "source code" is just 13K, and most of
it not even remotely functional. The OS can't even read from disk,
and there isn't even a VGA driver to print something in the screen.

For instance the whole "File system" module is just this:
<quote>
/*Adam Alonzi FS */

struct file
{
char f_flag;
char f_count;
int f_inode;
char *f_offset[2];

} file(AFILE);

/* Defines I/O of the FS, aren't computer acronyms great? */

#define FREAD 01
#define FWRITE 02
#define FPIPE
< end quote>


Imagine for a moment I want to help, as you propose... What should I do
out of this mess?

Why is FPIPE defined as nothing?

Have you ever heared of the need of *COMMENTING THE USAGE OF STRUCTURES* ???

What is that "count" field? count of WHAT??? Beans? Galaxies? sectors
in the floppy? bytes in the file? WHAT?

And how should I understand
struct file { ... } file(AFILE);

This doesn't even compile!

Anyway, since there isn't even a makefile, it is not so important :)

There is a basic misconception in your proposal:

You assume people are stupid, and that you are very clever.

jacob
 
A

Adam

The FS needs a lot of work. I haven't actually read up.

Yes I realize by critiscims need a base. But as a C coder, you should
agree with me on my windows statement.

OH shit! I'm sorry, I forgot to include the VGA driver.

I am so sorry. The FS compiled for me. But maybe it's just my compiler.
I will re-write that!

I apperciate your critique. All I meant by the GUI, is that many OS's
don't invest enough time in the kernel.
 
A

Adam

By the way, instead of critiscizing the lack of a VGA driver(which is
not required to print characters) show me the code. This is %100 done
by me within one month.
I am going to code a VGA driver, out of spite. And a new FS(which I've
done) out of spite. Isn't it wonderful what spite can do?
 
A

Adam

/* Go to hell Jacob whatever the hell your name is*/
/*Yeah some asshole on the net made me code this*/

#ifndef VGA_H
#define VGA_H

#include <CPU.h>
#include <Time.h>

#ifdef __cplusplus
extern "C"
{
#endif

#ifdef ISIS_OS
#define caddr_t char *
#endif

#define TEXT 0 /* Compatible with VGAlib v1.2 */
#define G320x200x16 1
#define G640x200x16 2
#define G640x350x16 3
#define G640x480x16 4
#define G320x200x256 5
#define G320x240x256 6
#define G320x400x256 7
#define G360x480x256 8
#define G640x480x2 9

#define G640x480x256 10
#define G800x600x256 11
#define G1024x768x256 12

#define G1280x1024x256 13 /* Additional modes. */

#define G320x200x32K 14
#define G320x200x64K 15
#define G320x200x16M 16
#define G640x480x32K 17
#define G640x480x64K 18
#define G640x480x16M 19
#define G800x600x32K 20
#define G800x600x64K 21
#define G800x600x16M 22
#define G1024x768x32K 23
#define G1024x768x64K 24
#define G1024x768x16M 25
#define G1280x1024x32K 26
#define G1280x1024x64K 27
#define G1280x1024x16M 28

#define G800x600x16 29
#define G1024x768x16 30
#define G1280x1024x16 31

#define G720x348x2 32 /* Hercules emulation mode */

#define G320x200x16M32 33 /* 32-bit per pixel modes. */
#define G640x480x16M32 34
#define G800x600x16M32 35
#define G1024x768x16M32 36
#define G1280x1024x16M32 37

/* additional resolutions */
#define G1152x864x16 38
#define G1152x864x256 39
#define G1152x864x32K 40
#define G1152x864x64K 41
#define G1152x864x16M 42
#define G1152x864x16M32 43

#define G1600x1200x16 44
#define G1600x1200x256 45
#define G1600x1200x32K 46
#define G1600x1200x64K 47
#define G1600x1200x16M 48
#define G1600x1200x16M32 49

#define __GLASTMODE G1600x1200x16M32
#define GLASTMODE vga_lastmodenumber()

extern int vga_setmode(int mode);
extern int vga_hasmode(int mode);
extern int vga_setflipchar(int c);

extern int vga_clear(void);
extern int vga_flip(void);

extern int vga_getxdim(void);
extern int vga_getydim(void);
extern int vga_getcolors(void);

extern int vga_setpalette(int index, int red, int green, int blue);
extern int vga_getpalette(int index, int *red, int *green, int
*blue);
extern int vga_setpalvec(int start, int num, int *pal);
extern int vga_getpalvec(int start, int num, int *pal);

extern int vga_screenoff(void);
extern int vga_screenon(void);

extern int vga_setcolor(int color);
extern int vga_drawpixel(int x, int y);
extern int vga_drawline(int x1, int y1, int x2, int y2);
extern int vga_drawscanline(int line, unsigned char *colors);
extern int vga_drawscansegment(unsigned char *colors, int x, int y,
int length);
extern int vga_getpixel(int x, int y); /* Added. */
extern int vga_getscansegment(unsigned char *colors, int x, int y,
int length);

extern int vga_getch(void);

extern int vga_dumpregs(void);


/* Extensions to VGAlib v1.2: */

/* blit flags */
#define HAVE_BITBLIT 1
#define HAVE_FILLBLIT 2
#define HAVE_IMAGEBLIT 4
#define HAVE_HLINELISTBLIT 8
#define HAVE_BLITWAIT 16

/* other flags */
#define HAVE_RWPAGE 1 /* vga_setreadpage() / vga_setwritepage()
available */
#define IS_INTERLACED 2 /* mode is interlaced */
#define IS_MODEX 4 /* ModeX style 256 colors */
#define IS_DYNAMICMODE 8 /* Dynamic defined mode */
#define CAPABLE_LINEAR 16 /* Can go to linear addressing mode. */
#define IS_LINEAR 32 /* Linear addressing enabled. */
#define EXT_INFO_AVAILABLE 64 /* Returned modeinfo contains valid
extended fields */
#define RGB_MISORDERED 128 /* Mach32 32bpp uses 0BGR instead of BGR0.
*/
/* As of this version 1.25 also used to signal if real RGB
(red first in memory) is used instead of BGR (Mach32 DAC 4) */
#define HAVE_EXT_SET 256 /* vga_ext_set() available */

typedef struct {
int width;
int height;
int bytesperpixel;
int colors;
int linewidth; /* scanline width in bytes */
int maxlogicalwidth; /* maximum logical scanline width */
int startaddressrange; /* changeable bits set */
int maxpixels; /* video memory / bytesperpixel */
int haveblit; /* mask of blit functions available */
int flags; /* other flags */

/* Extended fields: */

int chiptype; /* Chiptype detected */
int memory; /* videomemory in KB */
int linewidth_unit; /* Use only a multiple of this as parameter for
set_logicalwidth and
set_displaystart */
char *linear_aperture; /* points to mmap secondary mem aperture of
card (NULL if unavailable) */
int aperture_size; /* size of aperture in KB if size>=videomemory. 0
if unavail */
void (*set_aperture_page) (int page);
/* if aperture_size<videomemory select a memory page */
void *extensions; /* points to copy of eeprom for mach32 */
/* depends from actual driver/chiptype.. etc. */
} vga_modeinfo;

extern vga_modeinfo *vga_getmodeinfo(int mode);
extern int vga_getdefaultmode(void);
extern int vga_getcurrentmode(void);
extern int vga_getcurrentchipset(void);
extern char *vga_getmodename(int mode);
extern int vga_getmodenumber(char *name);
extern int vga_lastmodenumber(void);

extern unsigned char *graph_mem;
extern unsigned char *vga_getgraphmem(void);

extern void vga_setpage(int p);
extern void vga_setreadpage(int p);
extern void vga_setwritepage(int p);
extern void vga_setlogicalwidth(int w);
extern void vga_setdisplaystart(int a);
extern void vga_waitretrace(void);
extern int vga_claimvideomemory(int n);
extern void vga_disabledriverreport(void);
extern int vga_setmodeX(void);
extern int vga_init(void); /* Used to return void in svgalib <=
1.12. */
extern int vga_getmousetype(void);
extern int vga_getmonitortype(void);
extern void vga_setmousesupport(int s);
extern void vga_lockvc(void);
extern void vga_unlockvc(void);
extern int vga_getkey(void);
extern int vga_oktowrite(void);
extern void vga_copytoplanar256(unsigned char *virtualp, int pitch,
int voffset, int vpitch, int w, int h);
extern void vga_copytoplanar16(unsigned char *virtualp, int pitch,
int voffset, int vpitch, int w, int h);
extern void vga_copytoplane(unsigned char *virtualp, int pitch,
int voffset, int vpitch, int w, int h, int plane);
extern int vga_setlinearaddressing(void);
extern void vga_safety_fork(void (*shutdown_routine) (void));


#ifdef EGA /* Kernel headers may define this. */
#undef EGA
#endif

#define UNDEFINED 0
#define VGA 1
#define ET4000 2
#define CIRRUS 3
#define TVGA8900 4
#define OAK 5
#define EGA 6
#define S3 7
#define ET3000 8
#define MACH32 9
#define GVGA6400 10
#define ARK 11
#define ATI 12
#define ALI 13
#define MACH64 14
#define CHIPS 15
#define APM 16
#define NV3 17

/* Hor. sync: */
#define MON640_60 0 /* 31.5 KHz (standard VGA) */
#define MON800_56 1 /* 35.1 KHz (old SVGA) */
#define MON1024_43I 2 /* 35.5 KHz (low-end SVGA, 8514) */
#define MON800_60 3 /* 37.9 KHz (SVGA) */
#define MON1024_60 4 /* 48.3 KHz (SVGA non-interlaced) */
#define MON1024_70 5 /* 56.0 KHz (SVGA high frequency) */
#define MON1024_72 6

extern void vga_setchipset(int c);
extern void vga_setchipsetandfeatures(int c, int par1, int par2);
extern void vga_gettextfont(void *font);
extern void vga_puttextfont(void *font);
extern void vga_settextmoderegs(void *regs);
extern void vga_gettextmoderegs(void *regs);

extern int vga_white(void);
extern int vga_setegacolor(int c);
extern int vga_setrgbcolor(int r, int g, int b);

extern void vga_bitblt(int srcaddr, int destaddr, int w, int h, int
pitch);
extern void vga_imageblt(void *srcaddr, int destaddr, int w, int h,
int pitch);
extern void vga_fillblt(int destaddr, int w, int h, int pitch, int
c);
extern void vga_hlinelistblt(int ymin, int n, int *xmin, int *xmax,
int pitch, int c);
extern void vga_blitwait(void);
extern int vga_ext_set(unsigned what,...);
extern int vga_accel(unsigned operation,...);

/* Valid values for what in vga_ext_set: */
#define VGA_EXT_AVAILABLE 0 /* supported flags */
#define VGA_EXT_SET 1 /* set flag(s) */
#define VGA_EXT_CLEAR 2 /* clear flag(s) */
#define VGA_EXT_RESET 3 /* set/clear flag(s) */
#define VGA_EXT_PAGE_OFFSET 4 /* set an offset for all subsequent
vga_set*page() calls */
/* Like: vga_ext_set(VGA_EXT_PAGE_OFFSET, 42); */
/* returns the previous offset value. */
#define VGA_EXT_FONT_SIZE 5 /* the (maximal) size of the font buffer */

/* Valid params for VGA_EXT_AVAILABLE: */
#define VGA_AVAIL_SET 0 /* vga_ext_set sub funcs */
#define VGA_AVAIL_ACCEL 1 /* vga_accel sub funcs */
#define VGA_AVAIL_FLAGS 2 /* known flags for VGA_EXT_SET */
#define VGA_AVAIL_ROP 3 /* vga_accel ROP sub funcs */
#define VGA_AVAIL_TRANSPARENCY 4 /* vga_accel TRANSPARENCY sub funcs */
#define VGA_AVAIL_ROPMODES 5 /* vga_accel ROP modes supported funcs */
#define VGA_AVAIL_TRANSMODES 6 /* vga_accel TRANSPARENCY modes
supported */

/* Known flags to vga_ext_set() */
#define VGA_CLUT8 1 /* 8 bit DAC entries */

/* Acceleration interface. */

/* Accel operations. */
#define ACCEL_FILLBOX 1 /* Simple solid fill. */
#define ACCEL_SCREENCOPY 2 /* Simple screen-to-screen BLT. */
#define ACCEL_PUTIMAGE 3 /* Straight image transfer. */
#define ACCEL_DRAWLINE 4 /* General line draw. */
#define ACCEL_SETFGCOLOR 5 /* Set foreground color. */
#define ACCEL_SETBGCOLOR 6 /* Set background color. */
#define ACCEL_SETTRANSPARENCY 7 /* Set transparency mode. */
#define ACCEL_SETRASTEROP 8 /* Set raster-operation. */
#define ACCEL_PUTBITMAP 9 /* Color-expand bitmap. */
#define ACCEL_SCREENCOPYBITMAP 10 /* Color-expand from screen. */
#define ACCEL_DRAWHLINELIST 11 /* Draw horizontal spans. */
#define ACCEL_SETMODE 12 /* Set blit strategy. */
#define ACCEL_SYNC 13 /* Wait for blits to finish. */
#define ACCEL_SETOFFSET 14 /* Set screen offset */
#define ACCEL_SCREENCOPYMONO 15 /* Monochrome screen-to-screen BLT. */
#define ACCEL_POLYLINE 16 /* Draw multiple lines. */
#define ACCEL_POLYHLINE 17 /* Draw multiple horizontal spans. */
#define ACCEL_POLYFILLMODE 18 /* Set polygon mode. */

/* Corresponding bitmask. */
#define ACCELFLAG_FILLBOX 0x1 /* Simple solid fill. */
#define ACCELFLAG_SCREENCOPY 0x2 /* Simple screen-to-screen BLT. */
#define ACCELFLAG_PUTIMAGE 0x4 /* Straight image transfer. */
#define ACCELFLAG_DRAWLINE 0x8 /* General line draw. */
#define ACCELFLAG_SETFGCOLOR 0x10 /* Set foreground color. */
#define ACCELFLAG_SETBGCOLOR 0x20 /* Set background color. */
#define ACCELFLAG_SETTRANSPARENCY 0x40 /* Set transparency mode. */
#define ACCELFLAG_SETRASTEROP 0x80 /* Set raster-operation. */
#define ACCELFLAG_PUTBITMAP 0x100 /* Color-expand bitmap. */
#define ACCELFLAG_SCREENCOPYBITMAP 0x200 /* Color-exand from screen. */
#define ACCELFLAG_DRAWHLINELIST 0x400 /* Draw horizontal spans. */
#define ACCELFLAG_SETMODE 0x800 /* Set blit strategy. */
#define ACCELFLAG_SYNC 0x1000 /* Wait for blits to finish. */
#define ACCELFLAG_SETOFFSET 0x2000 /* Set screen offset */
#define ACCELFLAG_SCREENCOPYMONO 0x4000 /* Monochrome screen-to-screen
BLT. */
#define ACCELFLAG_POLYLINE 0x8000 /* Draw multiple lines. */
#define ACCELFLAG_POLYHLINE 0x10000 /* Draw multiple horizontal spans.
*/
#define ACCELFLAG_POLYFILLMODE 0x20000 /* Set polygon mode. */

/* Mode for SetTransparency. */
#define DISABLE_TRANSPARENCY_COLOR 0
#define ENABLE_TRANSPARENCY_COLOR 1
#define DISABLE_BITMAP_TRANSPARENCY 2
#define ENABLE_BITMAP_TRANSPARENCY 3

/* Flags for SetMode (accelerator interface). */
#define BLITS_SYNC 0
#define BLITS_IN_BACKGROUND 0x1

/* Raster ops. */
#define ROP_COPY 0 /* Straight copy. */
#define ROP_OR 1 /* Source OR destination. */
#define ROP_AND 2 /* Source AND destination. */
#define ROP_XOR 3 /* Source XOR destination. */
#define ROP_INVERT 4 /* Invert destination. */

/* For the poly funcs */
#define ACCEL_START 1
#define ACCEL_END 2

/*
* wait for keypress, mousemove, I/O, timeout. cf. select (3) for
details on
* all parameters execept which.
* NULL is a valid argument for any of the ptrs.
*/

extern int vga_waitevent(int which, fd_set * in, fd_set * out,
fd_set * except,
struct timeval *timeout);

/*
* valid values for what ( | is valid to combine them )
*/
#define VGA_MOUSEEVENT 1
#define VGA_KEYEVENT 2

/*
* return value >= has bits set for mouse/keyboard events detected.
* mouse and raw keyboard events are already handled and their bits
removed
* from *in when vga_waitevent returns.
* VGA_KEYEVENT relates to vga_getch NOT vga_getkey.
* return values < 0 signal errors. In this case check errno.
*/

/* Background running */
extern void vga_runinbackground(int stat, ...);
#define VGA_GOTOBACK -1
#define VGA_COMEFROMBACK -2
extern int vga_runinbackground_version(void);
#ifdef __cplusplus
}

#endif
#endif /* VGA_H */
 
A

Adam

/* Go to hell Jacob whatever the hell your name is*/
/*Yeah some asshole on the net made me code this*/

#ifndef VGA_H
#define VGA_H

#include <CPU.h>
#include <Time.h>

#ifdef __cplusplus
extern "C"
{
#endif

#ifdef ISIS_OS
#define caddr_t char *
#endif

#define TEXT 0 /* Compatible with VGAlib v1.2 */
#define G320x200x16 1
#define G640x200x16 2
#define G640x350x16 3
#define G640x480x16 4
#define G320x200x256 5
#define G320x240x256 6
#define G320x400x256 7
#define G360x480x256 8
#define G640x480x2 9

#define G640x480x256 10
#define G800x600x256 11
#define G1024x768x256 12

#define G1280x1024x256 13 /* Additional modes. */

#define G320x200x32K 14
#define G320x200x64K 15
#define G320x200x16M 16
#define G640x480x32K 17
#define G640x480x64K 18
#define G640x480x16M 19
#define G800x600x32K 20
#define G800x600x64K 21
#define G800x600x16M 22
#define G1024x768x32K 23
#define G1024x768x64K 24
#define G1024x768x16M 25
#define G1280x1024x32K 26
#define G1280x1024x64K 27
#define G1280x1024x16M 28

#define G800x600x16 29
#define G1024x768x16 30
#define G1280x1024x16 31

#define G720x348x2 32 /* Hercules emulation mode */

#define G320x200x16M32 33 /* 32-bit per pixel modes. */
#define G640x480x16M32 34
#define G800x600x16M32 35
#define G1024x768x16M32 36
#define G1280x1024x16M32 37

/* additional resolutions */
#define G1152x864x16 38
#define G1152x864x256 39
#define G1152x864x32K 40
#define G1152x864x64K 41
#define G1152x864x16M 42
#define G1152x864x16M32 43

#define G1600x1200x16 44
#define G1600x1200x256 45
#define G1600x1200x32K 46
#define G1600x1200x64K 47
#define G1600x1200x16M 48
#define G1600x1200x16M32 49

#define __GLASTMODE G1600x1200x16M32
#define GLASTMODE vga_lastmodenumber()

extern int vga_setmode(int mode);
extern int vga_hasmode(int mode);
extern int vga_setflipchar(int c);

extern int vga_clear(void);
extern int vga_flip(void);

extern int vga_getxdim(void);
extern int vga_getydim(void);
extern int vga_getcolors(void);

extern int vga_setpalette(int index, int red, int green, int blue);
extern int vga_getpalette(int index, int *red, int *green, int
*blue);
extern int vga_setpalvec(int start, int num, int *pal);
extern int vga_getpalvec(int start, int num, int *pal);

extern int vga_screenoff(void);
extern int vga_screenon(void);

extern int vga_setcolor(int color);
extern int vga_drawpixel(int x, int y);
extern int vga_drawline(int x1, int y1, int x2, int y2);
extern int vga_drawscanline(int line, unsigned char *colors);
extern int vga_drawscansegment(unsigned char *colors, int x, int y,
int length);
extern int vga_getpixel(int x, int y); /* Added. */
extern int vga_getscansegment(unsigned char *colors, int x, int y,
int length);

extern int vga_getch(void);

extern int vga_dumpregs(void);


/* Extensions to VGAlib v1.2: */

/* blit flags */
#define HAVE_BITBLIT 1
#define HAVE_FILLBLIT 2
#define HAVE_IMAGEBLIT 4
#define HAVE_HLINELISTBLIT 8
#define HAVE_BLITWAIT 16

/* other flags */
#define HAVE_RWPAGE 1 /* vga_setreadpage() / vga_setwritepage()
available */
#define IS_INTERLACED 2 /* mode is interlaced */
#define IS_MODEX 4 /* ModeX style 256 colors */
#define IS_DYNAMICMODE 8 /* Dynamic defined mode */
#define CAPABLE_LINEAR 16 /* Can go to linear addressing mode. */
#define IS_LINEAR 32 /* Linear addressing enabled. */
#define EXT_INFO_AVAILABLE 64 /* Returned modeinfo contains valid
extended fields */
#define RGB_MISORDERED 128 /* Mach32 32bpp uses 0BGR instead of BGR0.
*/
/* As of this version 1.25 also used to signal if real RGB
(red first in memory) is used instead of BGR (Mach32 DAC 4) */
#define HAVE_EXT_SET 256 /* vga_ext_set() available */

typedef struct {
int width;
int height;
int bytesperpixel;
int colors;
int linewidth; /* scanline width in bytes */
int maxlogicalwidth; /* maximum logical scanline width */
int startaddressrange; /* changeable bits set */
int maxpixels; /* video memory / bytesperpixel */
int haveblit; /* mask of blit functions available */
int flags; /* other flags */

/* Extended fields: */

int chiptype; /* Chiptype detected */
int memory; /* videomemory in KB */
int linewidth_unit; /* Use only a multiple of this as parameter for
set_logicalwidth and
set_displaystart */
char *linear_aperture; /* points to mmap secondary mem aperture of
card (NULL if unavailable) */
int aperture_size; /* size of aperture in KB if size>=videomemory. 0
if unavail */
void (*set_aperture_page) (int page);
/* if aperture_size<videomemory select a memory page */
void *extensions; /* points to copy of eeprom for mach32 */
/* depends from actual driver/chiptype.. etc. */
} vga_modeinfo;

extern vga_modeinfo *vga_getmodeinfo(int mode);
extern int vga_getdefaultmode(void);
extern int vga_getcurrentmode(void);
extern int vga_getcurrentchipset(void);
extern char *vga_getmodename(int mode);
extern int vga_getmodenumber(char *name);
extern int vga_lastmodenumber(void);

extern unsigned char *graph_mem;
extern unsigned char *vga_getgraphmem(void);

extern void vga_setpage(int p);
extern void vga_setreadpage(int p);
extern void vga_setwritepage(int p);
extern void vga_setlogicalwidth(int w);
extern void vga_setdisplaystart(int a);
extern void vga_waitretrace(void);
extern int vga_claimvideomemory(int n);
extern void vga_disabledriverreport(void);
extern int vga_setmodeX(void);
extern int vga_init(void); /* Used to return void in svgalib <=
1.12. */
extern int vga_getmousetype(void);
extern int vga_getmonitortype(void);
extern void vga_setmousesupport(int s);
extern void vga_lockvc(void);
extern void vga_unlockvc(void);
extern int vga_getkey(void);
extern int vga_oktowrite(void);
extern void vga_copytoplanar256(unsigned char *virtualp, int pitch,
int voffset, int vpitch, int w, int h);
extern void vga_copytoplanar16(unsigned char *virtualp, int pitch,
int voffset, int vpitch, int w, int h);
extern void vga_copytoplane(unsigned char *virtualp, int pitch,
int voffset, int vpitch, int w, int h, int plane);
extern int vga_setlinearaddressing(void);
extern void vga_safety_fork(void (*shutdown_routine) (void));


#ifdef EGA /* Kernel headers may define this. */
#undef EGA
#endif

#define UNDEFINED 0
#define VGA 1
#define ET4000 2
#define CIRRUS 3
#define TVGA8900 4
#define OAK 5
#define EGA 6
#define S3 7
#define ET3000 8
#define MACH32 9
#define GVGA6400 10
#define ARK 11
#define ATI 12
#define ALI 13
#define MACH64 14
#define CHIPS 15
#define APM 16
#define NV3 17

/* Hor. sync: */
#define MON640_60 0 /* 31.5 KHz (standard VGA) */
#define MON800_56 1 /* 35.1 KHz (old SVGA) */
#define MON1024_43I 2 /* 35.5 KHz (low-end SVGA, 8514) */
#define MON800_60 3 /* 37.9 KHz (SVGA) */
#define MON1024_60 4 /* 48.3 KHz (SVGA non-interlaced) */
#define MON1024_70 5 /* 56.0 KHz (SVGA high frequency) */
#define MON1024_72 6

extern void vga_setchipset(int c);
extern void vga_setchipsetandfeatures(int c, int par1, int par2);
extern void vga_gettextfont(void *font);
extern void vga_puttextfont(void *font);
extern void vga_settextmoderegs(void *regs);
extern void vga_gettextmoderegs(void *regs);

extern int vga_white(void);
extern int vga_setegacolor(int c);
extern int vga_setrgbcolor(int r, int g, int b);

extern void vga_bitblt(int srcaddr, int destaddr, int w, int h, int
pitch);
extern void vga_imageblt(void *srcaddr, int destaddr, int w, int h,
int pitch);
extern void vga_fillblt(int destaddr, int w, int h, int pitch, int
c);
extern void vga_hlinelistblt(int ymin, int n, int *xmin, int *xmax,
int pitch, int c);
extern void vga_blitwait(void);
extern int vga_ext_set(unsigned what,...);
extern int vga_accel(unsigned operation,...);

/* Valid values for what in vga_ext_set: */
#define VGA_EXT_AVAILABLE 0 /* supported flags */
#define VGA_EXT_SET 1 /* set flag(s) */
#define VGA_EXT_CLEAR 2 /* clear flag(s) */
#define VGA_EXT_RESET 3 /* set/clear flag(s) */
#define VGA_EXT_PAGE_OFFSET 4 /* set an offset for all subsequent
vga_set*page() calls */
/* Like: vga_ext_set(VGA_EXT_PAGE_OFFSET, 42); */
/* returns the previous offset value. */
#define VGA_EXT_FONT_SIZE 5 /* the (maximal) size of the font buffer */

/* Valid params for VGA_EXT_AVAILABLE: */
#define VGA_AVAIL_SET 0 /* vga_ext_set sub funcs */
#define VGA_AVAIL_ACCEL 1 /* vga_accel sub funcs */
#define VGA_AVAIL_FLAGS 2 /* known flags for VGA_EXT_SET */
#define VGA_AVAIL_ROP 3 /* vga_accel ROP sub funcs */
#define VGA_AVAIL_TRANSPARENCY 4 /* vga_accel TRANSPARENCY sub funcs */
#define VGA_AVAIL_ROPMODES 5 /* vga_accel ROP modes supported funcs */
#define VGA_AVAIL_TRANSMODES 6 /* vga_accel TRANSPARENCY modes
supported */

/* Known flags to vga_ext_set() */
#define VGA_CLUT8 1 /* 8 bit DAC entries */

/* Acceleration interface. */

/* Accel operations. */
#define ACCEL_FILLBOX 1 /* Simple solid fill. */
#define ACCEL_SCREENCOPY 2 /* Simple screen-to-screen BLT. */
#define ACCEL_PUTIMAGE 3 /* Straight image transfer. */
#define ACCEL_DRAWLINE 4 /* General line draw. */
#define ACCEL_SETFGCOLOR 5 /* Set foreground color. */
#define ACCEL_SETBGCOLOR 6 /* Set background color. */
#define ACCEL_SETTRANSPARENCY 7 /* Set transparency mode. */
#define ACCEL_SETRASTEROP 8 /* Set raster-operation. */
#define ACCEL_PUTBITMAP 9 /* Color-expand bitmap. */
#define ACCEL_SCREENCOPYBITMAP 10 /* Color-expand from screen. */
#define ACCEL_DRAWHLINELIST 11 /* Draw horizontal spans. */
#define ACCEL_SETMODE 12 /* Set blit strategy. */
#define ACCEL_SYNC 13 /* Wait for blits to finish. */
#define ACCEL_SETOFFSET 14 /* Set screen offset */
#define ACCEL_SCREENCOPYMONO 15 /* Monochrome screen-to-screen BLT. */
#define ACCEL_POLYLINE 16 /* Draw multiple lines. */
#define ACCEL_POLYHLINE 17 /* Draw multiple horizontal spans. */
#define ACCEL_POLYFILLMODE 18 /* Set polygon mode. */

/* Corresponding bitmask. */
#define ACCELFLAG_FILLBOX 0x1 /* Simple solid fill. */
#define ACCELFLAG_SCREENCOPY 0x2 /* Simple screen-to-screen BLT. */
#define ACCELFLAG_PUTIMAGE 0x4 /* Straight image transfer. */
#define ACCELFLAG_DRAWLINE 0x8 /* General line draw. */
#define ACCELFLAG_SETFGCOLOR 0x10 /* Set foreground color. */
#define ACCELFLAG_SETBGCOLOR 0x20 /* Set background color. */
#define ACCELFLAG_SETTRANSPARENCY 0x40 /* Set transparency mode. */
#define ACCELFLAG_SETRASTEROP 0x80 /* Set raster-operation. */
#define ACCELFLAG_PUTBITMAP 0x100 /* Color-expand bitmap. */
#define ACCELFLAG_SCREENCOPYBITMAP 0x200 /* Color-exand from screen. */
#define ACCELFLAG_DRAWHLINELIST 0x400 /* Draw horizontal spans. */
#define ACCELFLAG_SETMODE 0x800 /* Set blit strategy. */
#define ACCELFLAG_SYNC 0x1000 /* Wait for blits to finish. */
#define ACCELFLAG_SETOFFSET 0x2000 /* Set screen offset */
#define ACCELFLAG_SCREENCOPYMONO 0x4000 /* Monochrome screen-to-screen
BLT. */
#define ACCELFLAG_POLYLINE 0x8000 /* Draw multiple lines. */
#define ACCELFLAG_POLYHLINE 0x10000 /* Draw multiple horizontal spans.
*/
#define ACCELFLAG_POLYFILLMODE 0x20000 /* Set polygon mode. */

/* Mode for SetTransparency. */
#define DISABLE_TRANSPARENCY_COLOR 0
#define ENABLE_TRANSPARENCY_COLOR 1
#define DISABLE_BITMAP_TRANSPARENCY 2
#define ENABLE_BITMAP_TRANSPARENCY 3

/* Flags for SetMode (accelerator interface). */
#define BLITS_SYNC 0
#define BLITS_IN_BACKGROUND 0x1

/* Raster ops. */
#define ROP_COPY 0 /* Straight copy. */
#define ROP_OR 1 /* Source OR destination. */
#define ROP_AND 2 /* Source AND destination. */
#define ROP_XOR 3 /* Source XOR destination. */
#define ROP_INVERT 4 /* Invert destination. */

/* For the poly funcs */
#define ACCEL_START 1
#define ACCEL_END 2

/*
* wait for keypress, mousemove, I/O, timeout. cf. select (3) for
details on
* all parameters execept which.
* NULL is a valid argument for any of the ptrs.
*/

extern int vga_waitevent(int which, fd_set * in, fd_set * out,
fd_set * except,
struct timeval *timeout);

/*
* valid values for what ( | is valid to combine them )
*/
#define VGA_MOUSEEVENT 1
#define VGA_KEYEVENT 2

/*
* return value >= has bits set for mouse/keyboard events detected.
* mouse and raw keyboard events are already handled and their bits
removed
* from *in when vga_waitevent returns.
* VGA_KEYEVENT relates to vga_getch NOT vga_getkey.
* return values < 0 signal errors. In this case check errno.
*/

/* Background running */
extern void vga_runinbackground(int stat, ...);
#define VGA_GOTOBACK -1
#define VGA_COMEFROMBACK -2
extern int vga_runinbackground_version(void);
#ifdef __cplusplus
}

#endif
#endif /* VGA_H */
 
A

Adam

/* Go to hell Jacob whatever the hell your name is*/
/*Yeah some asshole on the net made me code this*/

#ifndef VGA_H
#define VGA_H

#include <CPU.h>
#include <Time.h>

#ifdef __cplusplus
extern "C"
{
#endif

#ifdef ISIS_OS
#define caddr_t char *
#endif

#define TEXT 0 /* Compatible with VGAlib v1.2 */
#define G320x200x16 1
#define G640x200x16 2
#define G640x350x16 3
#define G640x480x16 4
#define G320x200x256 5
#define G320x240x256 6
#define G320x400x256 7
#define G360x480x256 8
#define G640x480x2 9

#define G640x480x256 10
#define G800x600x256 11
#define G1024x768x256 12

#define G1280x1024x256 13 /* Additional modes. */

#define G320x200x32K 14
#define G320x200x64K 15
#define G320x200x16M 16
#define G640x480x32K 17
#define G640x480x64K 18
#define G640x480x16M 19
#define G800x600x32K 20
#define G800x600x64K 21
#define G800x600x16M 22
#define G1024x768x32K 23
#define G1024x768x64K 24
#define G1024x768x16M 25
#define G1280x1024x32K 26
#define G1280x1024x64K 27
#define G1280x1024x16M 28

#define G800x600x16 29
#define G1024x768x16 30
#define G1280x1024x16 31

#define G720x348x2 32 /* Hercules emulation mode */

#define G320x200x16M32 33 /* 32-bit per pixel modes. */
#define G640x480x16M32 34
#define G800x600x16M32 35
#define G1024x768x16M32 36
#define G1280x1024x16M32 37

/* additional resolutions */
#define G1152x864x16 38
#define G1152x864x256 39
#define G1152x864x32K 40
#define G1152x864x64K 41
#define G1152x864x16M 42
#define G1152x864x16M32 43

#define G1600x1200x16 44
#define G1600x1200x256 45
#define G1600x1200x32K 46
#define G1600x1200x64K 47
#define G1600x1200x16M 48
#define G1600x1200x16M32 49

#define __GLASTMODE G1600x1200x16M32
#define GLASTMODE vga_lastmodenumber()

extern int vga_setmode(int mode);
extern int vga_hasmode(int mode);
extern int vga_setflipchar(int c);

extern int vga_clear(void);
extern int vga_flip(void);

extern int vga_getxdim(void);
extern int vga_getydim(void);
extern int vga_getcolors(void);

extern int vga_setpalette(int index, int red, int green, int blue);
extern int vga_getpalette(int index, int *red, int *green, int
*blue);
extern int vga_setpalvec(int start, int num, int *pal);
extern int vga_getpalvec(int start, int num, int *pal);

extern int vga_screenoff(void);
extern int vga_screenon(void);

extern int vga_setcolor(int color);
extern int vga_drawpixel(int x, int y);
extern int vga_drawline(int x1, int y1, int x2, int y2);
extern int vga_drawscanline(int line, unsigned char *colors);
extern int vga_drawscansegment(unsigned char *colors, int x, int y,
int length);
extern int vga_getpixel(int x, int y); /* Added. */
extern int vga_getscansegment(unsigned char *colors, int x, int y,
int length);

extern int vga_getch(void);

extern int vga_dumpregs(void);


/* Extensions to VGAlib v1.2: */

/* blit flags */
#define HAVE_BITBLIT 1
#define HAVE_FILLBLIT 2
#define HAVE_IMAGEBLIT 4
#define HAVE_HLINELISTBLIT 8
#define HAVE_BLITWAIT 16

/* other flags */
#define HAVE_RWPAGE 1 /* vga_setreadpage() / vga_setwritepage()
available */
#define IS_INTERLACED 2 /* mode is interlaced */
#define IS_MODEX 4 /* ModeX style 256 colors */
#define IS_DYNAMICMODE 8 /* Dynamic defined mode */
#define CAPABLE_LINEAR 16 /* Can go to linear addressing mode. */
#define IS_LINEAR 32 /* Linear addressing enabled. */
#define EXT_INFO_AVAILABLE 64 /* Returned modeinfo contains valid
extended fields */
#define RGB_MISORDERED 128 /* Mach32 32bpp uses 0BGR instead of BGR0.
*/
/* As of this version 1.25 also used to signal if real RGB
(red first in memory) is used instead of BGR (Mach32 DAC 4) */
#define HAVE_EXT_SET 256 /* vga_ext_set() available */

typedef struct {
int width;
int height;
int bytesperpixel;
int colors;
int linewidth; /* scanline width in bytes */
int maxlogicalwidth; /* maximum logical scanline width */
int startaddressrange; /* changeable bits set */
int maxpixels; /* video memory / bytesperpixel */
int haveblit; /* mask of blit functions available */
int flags; /* other flags */

/* Extended fields: */

int chiptype; /* Chiptype detected */
int memory; /* videomemory in KB */
int linewidth_unit; /* Use only a multiple of this as parameter for
set_logicalwidth and
set_displaystart */
char *linear_aperture; /* points to mmap secondary mem aperture of
card (NULL if unavailable) */
int aperture_size; /* size of aperture in KB if size>=videomemory. 0
if unavail */
void (*set_aperture_page) (int page);
/* if aperture_size<videomemory select a memory page */
void *extensions; /* points to copy of eeprom for mach32 */
/* depends from actual driver/chiptype.. etc. */
} vga_modeinfo;

extern vga_modeinfo *vga_getmodeinfo(int mode);
extern int vga_getdefaultmode(void);
extern int vga_getcurrentmode(void);
extern int vga_getcurrentchipset(void);
extern char *vga_getmodename(int mode);
extern int vga_getmodenumber(char *name);
extern int vga_lastmodenumber(void);

extern unsigned char *graph_mem;
extern unsigned char *vga_getgraphmem(void);

extern void vga_setpage(int p);
extern void vga_setreadpage(int p);
extern void vga_setwritepage(int p);
extern void vga_setlogicalwidth(int w);
extern void vga_setdisplaystart(int a);
extern void vga_waitretrace(void);
extern int vga_claimvideomemory(int n);
extern void vga_disabledriverreport(void);
extern int vga_setmodeX(void);
extern int vga_init(void); /* Used to return void in svgalib <=
1.12. */
extern int vga_getmousetype(void);
extern int vga_getmonitortype(void);
extern void vga_setmousesupport(int s);
extern void vga_lockvc(void);
extern void vga_unlockvc(void);
extern int vga_getkey(void);
extern int vga_oktowrite(void);
extern void vga_copytoplanar256(unsigned char *virtualp, int pitch,
int voffset, int vpitch, int w, int h);
extern void vga_copytoplanar16(unsigned char *virtualp, int pitch,
int voffset, int vpitch, int w, int h);
extern void vga_copytoplane(unsigned char *virtualp, int pitch,
int voffset, int vpitch, int w, int h, int plane);
extern int vga_setlinearaddressing(void);
extern void vga_safety_fork(void (*shutdown_routine) (void));


#ifdef EGA /* Kernel headers may define this. */
#undef EGA
#endif

#define UNDEFINED 0
#define VGA 1
#define ET4000 2
#define CIRRUS 3
#define TVGA8900 4
#define OAK 5
#define EGA 6
#define S3 7
#define ET3000 8
#define MACH32 9
#define GVGA6400 10
#define ARK 11
#define ATI 12
#define ALI 13
#define MACH64 14
#define CHIPS 15
#define APM 16
#define NV3 17

/* Hor. sync: */
#define MON640_60 0 /* 31.5 KHz (standard VGA) */
#define MON800_56 1 /* 35.1 KHz (old SVGA) */
#define MON1024_43I 2 /* 35.5 KHz (low-end SVGA, 8514) */
#define MON800_60 3 /* 37.9 KHz (SVGA) */
#define MON1024_60 4 /* 48.3 KHz (SVGA non-interlaced) */
#define MON1024_70 5 /* 56.0 KHz (SVGA high frequency) */
#define MON1024_72 6

extern void vga_setchipset(int c);
extern void vga_setchipsetandfeatures(int c, int par1, int par2);
extern void vga_gettextfont(void *font);
extern void vga_puttextfont(void *font);
extern void vga_settextmoderegs(void *regs);
extern void vga_gettextmoderegs(void *regs);

extern int vga_white(void);
extern int vga_setegacolor(int c);
extern int vga_setrgbcolor(int r, int g, int b);

extern void vga_bitblt(int srcaddr, int destaddr, int w, int h, int
pitch);
extern void vga_imageblt(void *srcaddr, int destaddr, int w, int h,
int pitch);
extern void vga_fillblt(int destaddr, int w, int h, int pitch, int
c);
extern void vga_hlinelistblt(int ymin, int n, int *xmin, int *xmax,
int pitch, int c);
extern void vga_blitwait(void);
extern int vga_ext_set(unsigned what,...);
extern int vga_accel(unsigned operation,...);

/* Valid values for what in vga_ext_set: */
#define VGA_EXT_AVAILABLE 0 /* supported flags */
#define VGA_EXT_SET 1 /* set flag(s) */
#define VGA_EXT_CLEAR 2 /* clear flag(s) */
#define VGA_EXT_RESET 3 /* set/clear flag(s) */
#define VGA_EXT_PAGE_OFFSET 4 /* set an offset for all subsequent
vga_set*page() calls */
/* Like: vga_ext_set(VGA_EXT_PAGE_OFFSET, 42); */
/* returns the previous offset value. */
#define VGA_EXT_FONT_SIZE 5 /* the (maximal) size of the font buffer */

/* Valid params for VGA_EXT_AVAILABLE: */
#define VGA_AVAIL_SET 0 /* vga_ext_set sub funcs */
#define VGA_AVAIL_ACCEL 1 /* vga_accel sub funcs */
#define VGA_AVAIL_FLAGS 2 /* known flags for VGA_EXT_SET */
#define VGA_AVAIL_ROP 3 /* vga_accel ROP sub funcs */
#define VGA_AVAIL_TRANSPARENCY 4 /* vga_accel TRANSPARENCY sub funcs */
#define VGA_AVAIL_ROPMODES 5 /* vga_accel ROP modes supported funcs */
#define VGA_AVAIL_TRANSMODES 6 /* vga_accel TRANSPARENCY modes
supported */

/* Known flags to vga_ext_set() */
#define VGA_CLUT8 1 /* 8 bit DAC entries */

/* Acceleration interface. */

/* Accel operations. */
#define ACCEL_FILLBOX 1 /* Simple solid fill. */
#define ACCEL_SCREENCOPY 2 /* Simple screen-to-screen BLT. */
#define ACCEL_PUTIMAGE 3 /* Straight image transfer. */
#define ACCEL_DRAWLINE 4 /* General line draw. */
#define ACCEL_SETFGCOLOR 5 /* Set foreground color. */
#define ACCEL_SETBGCOLOR 6 /* Set background color. */
#define ACCEL_SETTRANSPARENCY 7 /* Set transparency mode. */
#define ACCEL_SETRASTEROP 8 /* Set raster-operation. */
#define ACCEL_PUTBITMAP 9 /* Color-expand bitmap. */
#define ACCEL_SCREENCOPYBITMAP 10 /* Color-expand from screen. */
#define ACCEL_DRAWHLINELIST 11 /* Draw horizontal spans. */
#define ACCEL_SETMODE 12 /* Set blit strategy. */
#define ACCEL_SYNC 13 /* Wait for blits to finish. */
#define ACCEL_SETOFFSET 14 /* Set screen offset */
#define ACCEL_SCREENCOPYMONO 15 /* Monochrome screen-to-screen BLT. */
#define ACCEL_POLYLINE 16 /* Draw multiple lines. */
#define ACCEL_POLYHLINE 17 /* Draw multiple horizontal spans. */
#define ACCEL_POLYFILLMODE 18 /* Set polygon mode. */

/* Corresponding bitmask. */
#define ACCELFLAG_FILLBOX 0x1 /* Simple solid fill. */
#define ACCELFLAG_SCREENCOPY 0x2 /* Simple screen-to-screen BLT. */
#define ACCELFLAG_PUTIMAGE 0x4 /* Straight image transfer. */
#define ACCELFLAG_DRAWLINE 0x8 /* General line draw. */
#define ACCELFLAG_SETFGCOLOR 0x10 /* Set foreground color. */
#define ACCELFLAG_SETBGCOLOR 0x20 /* Set background color. */
#define ACCELFLAG_SETTRANSPARENCY 0x40 /* Set transparency mode. */
#define ACCELFLAG_SETRASTEROP 0x80 /* Set raster-operation. */
#define ACCELFLAG_PUTBITMAP 0x100 /* Color-expand bitmap. */
#define ACCELFLAG_SCREENCOPYBITMAP 0x200 /* Color-exand from screen. */
#define ACCELFLAG_DRAWHLINELIST 0x400 /* Draw horizontal spans. */
#define ACCELFLAG_SETMODE 0x800 /* Set blit strategy. */
#define ACCELFLAG_SYNC 0x1000 /* Wait for blits to finish. */
#define ACCELFLAG_SETOFFSET 0x2000 /* Set screen offset */
#define ACCELFLAG_SCREENCOPYMONO 0x4000 /* Monochrome screen-to-screen
BLT. */
#define ACCELFLAG_POLYLINE 0x8000 /* Draw multiple lines. */
#define ACCELFLAG_POLYHLINE 0x10000 /* Draw multiple horizontal spans.
*/
#define ACCELFLAG_POLYFILLMODE 0x20000 /* Set polygon mode. */

/* Mode for SetTransparency. */
#define DISABLE_TRANSPARENCY_COLOR 0
#define ENABLE_TRANSPARENCY_COLOR 1
#define DISABLE_BITMAP_TRANSPARENCY 2
#define ENABLE_BITMAP_TRANSPARENCY 3

/* Flags for SetMode (accelerator interface). */
#define BLITS_SYNC 0
#define BLITS_IN_BACKGROUND 0x1

/* Raster ops. */
#define ROP_COPY 0 /* Straight copy. */
#define ROP_OR 1 /* Source OR destination. */
#define ROP_AND 2 /* Source AND destination. */
#define ROP_XOR 3 /* Source XOR destination. */
#define ROP_INVERT 4 /* Invert destination. */

/* For the poly funcs */
#define ACCEL_START 1
#define ACCEL_END 2

/*
* wait for keypress, mousemove, I/O, timeout. cf. select (3) for
details on
* all parameters execept which.
* NULL is a valid argument for any of the ptrs.
*/

extern int vga_waitevent(int which, fd_set * in, fd_set * out,
fd_set * except,
struct timeval *timeout);

/*
* valid values for what ( | is valid to combine them )
*/
#define VGA_MOUSEEVENT 1
#define VGA_KEYEVENT 2

/*
* return value >= has bits set for mouse/keyboard events detected.
* mouse and raw keyboard events are already handled and their bits
removed
* from *in when vga_waitevent returns.
* VGA_KEYEVENT relates to vga_getch NOT vga_getkey.
* return values < 0 signal errors. In this case check errno.
*/

/* Background running */
extern void vga_runinbackground(int stat, ...);
#define VGA_GOTOBACK -1
#define VGA_COMEFROMBACK -2
extern int vga_runinbackground_version(void);
#ifdef __cplusplus
}

#endif
#endif /* VGA_H */
 
B

Ben Pfaff

Adam said:
[...nothing of relevance...]

Do you have a question about the standard C programming language?

Your article is outside the domain of comp.lang.c, which discusses
only the standard C programming language, including the standard C
library. This is a remarkably narrow topic compared to what many
people expect.

For your convenience, the list below contains topics that are not
on-topic for comp.lang.c, and suggests newsgroups for you to explore
if you have questions about these topics. Please do observe proper
netiquette before posting to any of these newsgroups. In particular,
you should read the group's charter and FAQ, if any (FAQs are
available from www.faqs.org and other sources). If those fail to
answer your question then you should browse through at least two weeks
of recent articles to make sure that your question has not already
been answered.

* OS-specific questions, such as how to clear the screen,
access the network, list the files in a directory, or read
"piped" output from a subprocess. These questions should be
directed to OS-specific newsgroups, such as
comp.os.ms-windows.programmer.misc, comp.unix.programmer, or
comp.os.linux.development.apps.

* Compiler-specific questions, such as installation issues and
locations of header files. Ask about these in
compiler-specific newsgroups, such as gnu.gcc.help or
comp.os.ms-windows.programmer.misc. Questions about writing
compilers are appropriate in comp.compilers.

* Processor-specific questions, such as questions about
assembly and machine code. x86 questions are appropriate in
comp.lang.asm.x86, embedded system processor questions may
be appropriate in comp.arch.embedded.

* ABI-specific questions, such as how to interface assembly
code to C. These questions are both processor- and
OS-specific and should typically be asked in OS-specific
newsgroups.

* Algorithms, except questions about C implementations of
algorithms. "How do I implement algorithm X in C?" is not a
question about a C implementation of an algorithm, it is a
request for source code. Newsgroups comp.programming and
comp.theory may be appropriate.

* Making C interoperate with other languages. C has no
facilities for such interoperation. These questions should
be directed to system- or compiler-specific newsgroups. C++
has features for interoperating with C, so consider
comp.lang.c++ for such questions.

* The C standard, as opposed to standard C. Questions about
the C standard are best asked in comp.std.c.

* C++. Please do not post or cross-post questions about C++
to comp.lang.c. Ask C++ questions in C++ newsgroups, such
as comp.lang.c++ or comp.lang.c++.moderated.

* Test posts. Please test in a newsgroup meant for testing,
such as alt.test.

news.groups.questions is a good place to ask about the appropriate
newsgroup for a given topic.
 
J

Jack Klein

There is no way to know why you want a new microkernel when in fact
there are so many of them:

The GNU Hurd project
The MKLinux project
and many others.

Jacob, as much as I enjoy using lcc-win32, what would you think if I
turned your words around a little?

There is no way to know what you want to write a new C compiler when
in fact there are so many of them around?

And indeed, many of them freely usable.

But don't think I don't appreciate your efforts.
 
J

jacob navia

The lcc compiler exists since approx 1990. I did *not* start
a *new* project but joined the project of Fraser and Hanson,
the "little C compiler". Many other peopla have contributed
to the code of lcc, besides Fraser and Hanson, for instance
Dennis Ritchie, that wrote the pre-processor that is still
used in lcc. (1)

This project differs from the other compilers around in
its compactness: the code of lcc is approx 5% of the
source code of gcc.

I contributed to that project many things, but tried to
keep the essential: the simplicity of the compiler as
I found it.

I have never said however, that "gcc is brain damaged"
or anything against the other free compilers. Yes, I
think that their code is bloated and their objectives
wrong (C++ instead of improving C) but never something
like "brain damaged".

Of course it is possible (and maybe necessary) to say
that something is "brain damaged", specially when it
really is, :)-) but it should be justified by facts
and arguments.

jacob

(1) Note: The fact that I name the people that contributed
to lcc doesn't of course mean that they all agree with
my views!
 
D

dandelion

Adam said:
/* Go to hell Jacob whatever the hell your name is*/
/*Yeah some asshole on the net made me code this*/

Letting ones behavior be determined by others is not a sign of a string
mind.

char *linear_aperture; /* points to mmap secondary mem aperture of card
(NULL if unavailable)*/

extern int vga_init(void); /* Used to return void in svgalib <= 1.12. */

<snip>

I very much suspect you ripped the code from the linux vga-driver.
 
J

Johan Rydberg

dandelion said:
I very much suspect you ripped the code from the linux vga-driver.

I guess that's not a problem, as long as the correct copyright is in
place and they share the same license.

~j
 
D

dandelion

Johan Rydberg said:
I guess that's not a problem, as long as the correct copyright is in
place and they share the same license.

It's open-source, so the *copying* is not a problem (if proper copyrights
and attributions are included, which are lacking). Passing it off as ones
*own* code, however, is not something i like in a fellow human being.

<quote>
/*Yeah some asshole on the net made me code this*/
</quote>
 
R

Randy Howard

I have never said however, that "gcc is brain damaged"
or anything against the other free compilers. Yes, I
think that their code is bloated and their objectives
wrong (C++ instead of improving C) but never something
like "brain damaged".

Why does C need improving? It's been doing quite a fine
job for a *very* long time relative to the computer "age",
and arguably was doing so long before 1989, and definitely
very much so before 1999.

If anything needs improving, it's instructors and
programming students, if reading the hundreds of

"please help me, my grades are on fire and I have only 3
minutes to complete my assignment, but I don't know
anything about C, pointers, library functions, comments,
logic, parsing, or where I left my last pair of clean
underwear"

comments are to be considered typical.
 
B

Ben Pfaff

Randy Howard said:
If anything needs improving, it's instructors and
programming students, if reading the hundreds of

"please help me, my grades are on fire and I have only 3
minutes to complete my assignment, but I don't know
anything about C, pointers, library functions, comments,
logic, parsing, or where I left my last pair of clean
underwear"

I've been a TA for Stanford's basic operating systems course for
a couple of quarters. The biggest deficiency in the students
taking the course is underestimating the time it will take to
complete an assignment. The biggest deficiency in the
instructors and TAs is underspecifying the desired final product,
or failing to provide enough information and good enough tools
for the students to accomplish it.
 
A

Adam

Ok, you caught me.

Nope, the driver was not stolen from Linux. However, driver was not
written by me. It was written by one of my developers, James.
 
A

Adam

... nor that of a string character


Yes, but I belive I have proven my "character" as a programmer, and a
human being by licensing my kernel under the GNU.
 
A

Adam

... nor that of a string character


Yes, but I belive I have proven my "character" as a programmer, and a
human being by licensing my kernel under the GNU.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top