You know… I’ve seen more articles that I can count that get you this far with MASM or NASM or what have you, but none that take you further and get you set up with a basic keyboard driver and basic mouse driver and an IDT and GDT that actually do something.
There used to be an old Writing your own OS Howto/FAQ that I used when I was developing mine, it helped quite a bit, along with a protected mode howto I downloaded… all great resources.
Anyone here prefer gas to nasm? cause that’s what I used… I liked the syntax better.
Is it possible to write OS’ in languages other than C, C++ or Assembley? I’ve read about people trying to write a Perl OS, but never really seen any other attempts. I’m not asking is it too hard to, just if it’s possible.
I have been thinking about writing my own os (for fun) so i recently ordered Tanenbaum’s “Operating Systems: Design and Implementation” book from amazon.co.uk and yesterday i got this email from them (after a month of waiting):
Dear Customer,
We are sorry to report that we will not be able to obtain the following item
from your order:
Andrew S. Tanenbaum “Operating Systems: Design and
Implementation”
This unavailable item has been cancelled from your order.
I believe gas uses the AT&T style syntax… which to me seems to make logical sense.
For some reaosn it seems to make more sense…
if I remember correctly with Intel style syntax using mov the destination is on the left and the source is on the right… to me it makes more logical sense to have where it’s getting moved to on the right… I could be wrong about this, it’s been awhile since I worked with either… but yeah, that’s just annoying if I’m correct.
I have been thinking about writing my own os (for fun) so i recently ordered Tanenbaum’s “Operating Systems: Design and Implementation” book from amazon.co.uk and yesterday i got this email from them (after a month of waiting):
[/quote]
I ordered my copy from Holborn Books – they have copies in
The University of Calgary has taken a step in the right direction by offering an “Operating system class” centered on OpenBSD. This approach allows students to follow a work in progress with each new release. They also have the feeling that they’re doing something real, not some ethereal assignments based on Tanenbaum’s book (I know, I too had the displeasure of reading that one at school).
“if I remember correctly with Intel style syntax using mov the destination is on the left and the source is on the right… to me it makes more logical sense to have where it’s getting moved to on the right… I could be wrong about this,”
Arg ! I have to disagree with you (even if it’s, at the end, only a matter of preference).
With high-level languages, an assignement looks like :
Var = 1
So in assembly, I expect the exact same logic :
mov var,1 ; for instance
It look way better for me … And pretty much 95% of every API of libraries or interfaces I ever worked on always put the source after the target. For instance :
“Is it possible to write OS’ in languages other than C, C++ or Assembley?”
Technically yes, but definitelly not a good way. You can, for, exemple, create an OS based on Assembly and Pascal. But Pascal doesn’t handle as easily pointers maths than C, hence being not a good choice for programming an OS.
“I’ve read about people trying to write a Perl OS”
200% impossible. Perl is a script language, so we need a software to execute the scripts. And how can you do that if an OS is supposed to be the lowest level of software running on your machine?
And even so, the language syntax is just NOT adequate for OS programming at all (pointers math, interrupt handling, etc). It’s like trying to use a lawnmower to build a house. It’s just not the right tool.
“but never really seen any other attempts.”
That was probably just a joke in the first place. ๐
This is not a guide on how to write your own OS! This tells you how to write a GRUB clone. GRUB Is Not An OS. A piece of code which loads some sectors from a disk and switches to protected mode is not an OS.
One of these days someone should write a real “How To Write Your Own OS” tutorial. Til then, we’ve always got http://osdev.neopages.net/ and Andy Tanenbaum’s books (which should be all you need, but aren’t free).
Actually you could write OS in Perl, with support of other languages. (you can’t even write OS in C alone) E.g. you could create assembler object for writing data to GDT, then call it with Perl. In general: low-level bit flipping in assembly, but controled by Perl logic. The Perl part could be translated into machine language, without need for interpretation. Of course this is not the right way of writing OS but it is possible.
“Is it possible to write OS’ in languages other than C, C++ or Assembley?”
Yes it is. Generally you’ll have to use assembly for some things, but you can write most of the OS in any language with a real (not vm-based) compiler. As an example, I am writing an operating system in assembly and Forth (more Forth than assembly), and I’ve seen OSes written in Pascal, Oberon, and other languages.
“I’ve read about people trying to write a Perl OS”
> 200% impossible. Perl is a script language, so we need a
> software to execute the scripts. And how can you do that
> if an OS is supposed to be the lowest level of software
> running on your machine?
Not if they wrote a real compiler for Perl.
> And even so, the language syntax is just NOT adequate for
> OS programming at all (pointers math, interrupt handling,
> etc). It’s like trying to use a lawnmower to build a
> house. It’s just not the right tool.
You don’t need pointer math or interrupts! My OS is interrupt free. Pointers aren’t essential (though they can be useful). It may take a little more work, but it can be done.
Wow how can you do that ? You don’t need any interrupt timers ? Keyboard interrupts ? Hardware IRQ communications ?
I’m far from being an OS expert, I’m just curious to know how an OS can be interrupt free.
“Pointers aren’t essential”
How do you structure memory for multiple threads, lists, file system nodes, etc ? How can you not use function pointers for plug-ins and dynamic libraries supports (including drivers) ?
In my opinion, pointers ARE essential. But again I’m far from being an expert…
.. if you want to write an OS, being able to write the bootsector yourself is interesting, but pointless in the sense that it will give you zero help actually writing the kernel, and that it will give you a false sense of security (‘if i can get the bootsector done, the kernel should be easy!’). It’s important to understand how things work, but for production code, it’s easier and a lot nicer to the user to use something like GRUB, the fat bootsector loader for Linux (SYSLINUX), or something.
These are really good articles that OSNews published last year:
And it kinda make sense that the first chapter is to explain how to create a bootloader.
I don’t believe it does. I don’t believe that having your own boot loader is useful, let alone necessary. It’s time consuming and ultimately unrelated to the rest of the OS (unless you have a need for an intelligent loader such as NTLDR).
Most of the amateur OS projects I’ve seen have got bogged down at the boot loader stage. The authors have struggled with real mode assembly and the BIOS, and given up. If more people used GRUB or something similar, these OS projects might progress onto something useful.
This seems to be one of the big issues surrounding OS design…do you build your own bootloader or not? Personally I choose to build my own and I definetly regret it now.
It is time consuming (if you are doing this for the first time) and the rewards are very small. If I ever get the energy to carry on with my OS it will be using grub from the start.
> Wow how can you do that ? You don’t need any interrupt
> timers ? Keyboard interrupts ? Hardware IRQ
> communications ?
> I’m far from being an OS expert, I’m just curious to know
> how an OS can be interrupt free.
It’s not easy, but I’ve avoided them so far. My keyboard driver, ata driver, and so forth all use port I/O; the use of a single address space helps too. I’ll be adding multitasking later, but I think I can do that without interrupts as well.
“Pointers aren’t essential”
> How do you structure memory for multiple threads, lists,
> file system nodes, etc ? How can you not use function
> pointers for plug-ins and dynamic libraries supports
> (including drivers) ?
> In my opinion, pointers ARE essential. But again I’m far
> from being an expert…
It all depends on what you’re doing with your OS. It is possible to do an OS without pointers, but it’s even harder than doing one without interrupts. I actually meant that pointer math isn’t essential, though pointers are very useful (and save a lot of time) for other things. Once you get into having a decent driver system, libraries, and so on, it’s nearly impossible to avoid all pointer usage. I would recommend keeping the number of pointers to a minimum though. They are a common source of bugs, and unless you have a decent kernel-level debugger, it can be very difficult to find and fix them.
It’s not easy, but I’ve avoided them so far. My keyboard driver, ata driver, and so forth all use port I/O; the use of a single address space helps too.
You mean you do all I/O using polling? Do you ever intend to be able to do more than one thing at once? If so, you’re going to have a hell of a time polling two or more devices at the same time.
I’ll be adding multitasking later, but I think I can do that without interrupts as well.
You could do co-operative multitasking without interrupts; however, you can’t avoid interrupts if you want to do pre-emptive multitasking. Even simple round-robin scheduling needs a timer interrupt to keep the thing ticking along.
You will also need to use interrupts if you ever want to support more than one privilege level.
Interrupts were put into the CPU design for a good reason. My advice is to make use of them — they’ll make your life a lot easier (and make your OS much better in the long term).
It is possible to do an OS without pointers, but it’s even harder than doing one without interrupts.
Pointers are vital in any program unless you’re using, say, Java or Visual Basic. Even then you’re exposed to pointers indirectly. In general: it’s possible to write a program without pointers, but you’re severely restricting what you can do. No variable-sized arrays, no linked lists, no trees; in fact, no dynamically allocated memory.
> Won’t that make it hard to support USB keyboards? I
> thought the BIOS did some emulating to make them work
> with OS’ that don’t suppert USB
Some BIOSes do have options to support use of a USB keyboard with a “legacy” operating system, but Retro doesn’t need to support them as most use is on older systems. (386, 486, and early Pentiums)
RE: Charles Childers
> You mean you do all I/O using polling? Do you ever intend
> to be able to do more than one thing at once? If so,
> you’re going to have a hell of a time polling two or more
> devices at the same time.
Yes, I do all I/O using polling. Eventually I will be able to do more than one thing at once, but as a native Forth implementation, it’s not essential for Retro to do so.
> You could do co-operative multitasking without
> interrupts; however, you can’t avoid interrupts if you
> want to do pre-emptive multitasking. Even simple round-
> robin scheduling needs a timer interrupt to keep the
> thing ticking along.
The current kernel will only support cooperative multitasking for that reason. A future version of the kernel will have support for preemptive multitasking.
> You will also need to use interrupts if you ever want to
> support more than one privilege level.
I dislike multiple privilege levels. They aren’t needed for the purposes I want to use Retro for. Running in a single privilege level may not be “safe”, but it makes programming low-level stuff a lot easier.
> Interrupts were put into the CPU design for a good
> reason. My advice is to make use of them — they’ll make
> your life a lot easier (and make your OS much better in
> the long term).
We’ve been considering interrupts and their advantages and plan to use them in the next major version of the kernel. For now, the interrupt-free design suffices, but is limiting in many ways.
> Pointers are vital in any program unless you’re using,
> say, Java or Visual Basic. Even then you’re exposed to
> pointers indirectly. In general: it’s possible to write a
> program without pointers, but you’re severely restricting
> what you can do. No variable-sized arrays, no linked
> lists, no trees; in fact, no dynamically allocated
> memory.
Agreed. It is possible, but seldom practical. As I mentioned earlier, I do use pointers where convienent, I just try to keep them to a minimum.
interesting article… anyone have adive/tutorial for starting under GNU/Linux? (writing your own OS but with GRUB, GCC, BOCHs)?
ja
I browsed through the article and will read it in-depth later. My only complaint is the black text on a dark blue background ๐
Thank goodness for copy & paste ๐
You know… I’ve seen more articles that I can count that get you this far with MASM or NASM or what have you, but none that take you further and get you set up with a basic keyboard driver and basic mouse driver and an IDT and GDT that actually do something.
Anyone found anything like that?
Here’s better one: http://osdev.neopages.net It has a lot of more better resources, tutorials and etc.
People in there:
——————-
Joachim Nock
Tim Robinson
Chris Giese
Jordan C
Frank Millea
David D. Rude II aka “banned-it”
Mike Rieker
Akira
William Mccabe
xsism
——————-
Dude! There are lot of other computers on the world, not just PC with intel s…! Or do you mean no OS needed for them?
Droll hehehe the memories… Z80A
There used to be an old Writing your own OS Howto/FAQ that I used when I was developing mine, it helped quite a bit, along with a protected mode howto I downloaded… all great resources.
Anyone here prefer gas to nasm? cause that’s what I used… I liked the syntax better.
Is it possible to write OS’ in languages other than C, C++ or Assembley? I’ve read about people trying to write a Perl OS, but never really seen any other attempts. I’m not asking is it too hard to, just if it’s possible.
You actually LIKE gas syntax? Dear god! I cant stand it personally, i really like nasm, i find it to be the simplest.
I have been thinking about writing my own os (for fun) so i recently ordered Tanenbaum’s “Operating Systems: Design and Implementation” book from amazon.co.uk and yesterday i got this email from them (after a month of waiting):
Dear Customer,
We are sorry to report that we will not be able to obtain the following item
from your order:
Andrew S. Tanenbaum “Operating Systems: Design and
Implementation”
This unavailable item has been cancelled from your order.
(…)
Great!
I’ll try again, this time from amazon.com not amazon.co.uk (yes, using the osnews link http://www.amazon.com/exec/obidos/ASIN/0136386776/osnews-20/ ๐
From what i’ve read, this book is a must for anyone trying to write their own OS.
I believe gas uses the AT&T style syntax… which to me seems to make logical sense.
For some reaosn it seems to make more sense…
if I remember correctly with Intel style syntax using mov the destination is on the left and the source is on the right… to me it makes more logical sense to have where it’s getting moved to on the right… I could be wrong about this, it’s been awhile since I worked with either… but yeah, that’s just annoying if I’m correct.
[quote]
I have been thinking about writing my own os (for fun) so i recently ordered Tanenbaum’s “Operating Systems: Design and Implementation” book from amazon.co.uk and yesterday i got this email from them (after a month of waiting):
[/quote]
I ordered my copy from Holborn Books – they have copies in
stock and very speedy delivery.
http://www.holbornbooks.co.uk/details.aspx?sn=1242691
Nice article, well presented. Note — if you read it — that this was only part 1…!
news:alt.os.development ?
The ultimate OS dev resource…
The University of Calgary has taken a step in the right direction by offering an “Operating system class” centered on OpenBSD. This approach allows students to follow a work in progress with each new release. They also have the feeling that they’re doing something real, not some ethereal assignments based on Tanenbaum’s book (I know, I too had the displeasure of reading that one at school).
“Droll hehehe the memories… Z80A ”
Maybe for you … I programmed 8-bit Gameboy Color up to last year at my job. So that Z80A is still pretty fresh in my memory …
ld a,(hl)
Thanks god I moved on GBA projects recently. 32-bit RISC assembly !!! Plenty of registers ! Plenty !!!
“if I remember correctly with Intel style syntax using mov the destination is on the left and the source is on the right… to me it makes more logical sense to have where it’s getting moved to on the right… I could be wrong about this,”
Arg ! I have to disagree with you (even if it’s, at the end, only a matter of preference).
With high-level languages, an assignement looks like :
Var = 1
So in assembly, I expect the exact same logic :
mov var,1 ; for instance
It look way better for me … And pretty much 95% of every API of libraries or interfaces I ever worked on always put the source after the target. For instance :
memcpy( target, source );
“The tutorial continues in Operating System Basics part 2: The Kernel, coming soon! ”
Pretty much every tutorial on internet like this are never completed. Hopefully this one, very interesting, will not fall in that category.
“Is it possible to write OS’ in languages other than C, C++ or Assembley?”
Technically yes, but definitelly not a good way. You can, for, exemple, create an OS based on Assembly and Pascal. But Pascal doesn’t handle as easily pointers maths than C, hence being not a good choice for programming an OS.
“I’ve read about people trying to write a Perl OS”
200% impossible. Perl is a script language, so we need a software to execute the scripts. And how can you do that if an OS is supposed to be the lowest level of software running on your machine?
And even so, the language syntax is just NOT adequate for OS programming at all (pointers math, interrupt handling, etc). It’s like trying to use a lawnmower to build a house. It’s just not the right tool.
“but never really seen any other attempts.”
That was probably just a joke in the first place. ๐
This is not a guide on how to write your own OS! This tells you how to write a GRUB clone. GRUB Is Not An OS. A piece of code which loads some sectors from a disk and switches to protected mode is not an OS.
One of these days someone should write a real “How To Write Your Own OS” tutorial. Til then, we’ve always got http://osdev.neopages.net/ and Andy Tanenbaum’s books (which should be all you need, but aren’t free).
Actually you could write OS in Perl, with support of other languages. (you can’t even write OS in C alone) E.g. you could create assembler object for writing data to GDT, then call it with Perl. In general: low-level bit flipping in assembly, but controled by Perl logic. The Perl part could be translated into machine language, without need for interpretation. Of course this is not the right way of writing OS but it is possible.
I wonder which type of kernel he will demonstrate. I just wish that he chooses something other than the classic monolithic kernel…
Something like a micro-kernel (L4 and NOT Mach), or Exokernel would be good… Cache Kernel would be good as well…
“Is it possible to write OS’ in languages other than C, C++ or Assembley?”
Yes it is. Generally you’ll have to use assembly for some things, but you can write most of the OS in any language with a real (not vm-based) compiler. As an example, I am writing an operating system in assembly and Forth (more Forth than assembly), and I’ve seen OSes written in Pascal, Oberon, and other languages.
“I’ve read about people trying to write a Perl OS”
> 200% impossible. Perl is a script language, so we need a
> software to execute the scripts. And how can you do that
> if an OS is supposed to be the lowest level of software
> running on your machine?
Not if they wrote a real compiler for Perl.
> And even so, the language syntax is just NOT adequate for
> OS programming at all (pointers math, interrupt handling,
> etc). It’s like trying to use a lawnmower to build a
> house. It’s just not the right tool.
You don’t need pointer math or interrupts! My OS is interrupt free. Pointers aren’t essential (though they can be useful). It may take a little more work, but it can be done.
“but never really seen any other attempts.”
Here’s a few non-C/C++ OSes:
AnonymOS – Written in FreePascal
http://www.thegaineys.fsnet.co.uk/
An OS written in Scheme: http://bgb1.hypermart.net/
MaRTE – written in ADA – http://marte.unican.es/
I have a Forth OS at http://retro.tunes.org, and links to several others on the Wiki.
“This is not a guide on how to write your own OS! This tells you how to write a GRUB clone. GRUB Is Not An OS. ”
That’s only the first part of the tutorial. And it kinda make sense that the first chapter is to explain how to create a bootloader.
“My OS is interrupt free. ”
Wow how can you do that ? You don’t need any interrupt timers ? Keyboard interrupts ? Hardware IRQ communications ?
I’m far from being an OS expert, I’m just curious to know how an OS can be interrupt free.
“Pointers aren’t essential”
How do you structure memory for multiple threads, lists, file system nodes, etc ? How can you not use function pointers for plug-ins and dynamic libraries supports (including drivers) ?
In my opinion, pointers ARE essential. But again I’m far from being an expert…
For a naive like me, tutorials like these are of great help.
Awaiting for the next stuff to come…
why not a tutorial on how to make your own tires ?
how to refine your own gasoline ?
.. if you want to write an OS, being able to write the bootsector yourself is interesting, but pointless in the sense that it will give you zero help actually writing the kernel, and that it will give you a false sense of security (‘if i can get the bootsector done, the kernel should be easy!’). It’s important to understand how things work, but for production code, it’s easier and a lot nicer to the user to use something like GRUB, the fat bootsector loader for Linux (SYSLINUX), or something.
These are really good articles that OSNews published last year:
http://osnews.com/story.php?news_id=1482
http://osnews.com/story.php?news_id=1532
( and the guy actually completed a working OS )
Brian
And it kinda make sense that the first chapter is to explain how to create a bootloader.
I don’t believe it does. I don’t believe that having your own boot loader is useful, let alone necessary. It’s time consuming and ultimately unrelated to the rest of the OS (unless you have a need for an intelligent loader such as NTLDR).
Most of the amateur OS projects I’ve seen have got bogged down at the boot loader stage. The authors have struggled with real mode assembly and the BIOS, and given up. If more people used GRUB or something similar, these OS projects might progress onto something useful.
Well, maybe a tutorial about bootsector will help all those people for not being stuck at this stage of development ๐
oh geeze. another bootsector tutorial. let me add it to the pile of 10000 other boot sector tutorials.
Simple OS made using GNU tools that actualy does
something visible (look at upper left corner).
/var/tmp$ cat multiboot.S
.global start
.align 4
/* multiboot header */
.long 0x1badb002
.long 0
.long -0x1badb002
/* main body (runs in protected mode) */
start:
movb $0x0e, 0xb8000 + 1
0:
incb 0xb8000 + 0
jmp 0b
/var/tmp$ as -o multiboot.o multiboot.S
/var/tmp$ ld -e start -o image multiboot.o
.. and boot the file
(grub) root (hd0,5)
(grub) kernel /var/tmp/image
(grub) boot
I personaly recommend writing OS from scratch using GRUB
as a boot loader. More that a half of the tutorial above
was about FAT format, which I _realy_ don’t want to know.
BranoZ
This seems to be one of the big issues surrounding OS design…do you build your own bootloader or not? Personally I choose to build my own and I definetly regret it now.
It is time consuming (if you are doing this for the first time) and the rewards are very small. If I ever get the energy to carry on with my OS it will be using grub from the start.
Chris
“My OS is interrupt free. ”
> Wow how can you do that ? You don’t need any interrupt
> timers ? Keyboard interrupts ? Hardware IRQ
> communications ?
> I’m far from being an OS expert, I’m just curious to know
> how an OS can be interrupt free.
It’s not easy, but I’ve avoided them so far. My keyboard driver, ata driver, and so forth all use port I/O; the use of a single address space helps too. I’ll be adding multitasking later, but I think I can do that without interrupts as well.
“Pointers aren’t essential”
> How do you structure memory for multiple threads, lists,
> file system nodes, etc ? How can you not use function
> pointers for plug-ins and dynamic libraries supports
> (including drivers) ?
> In my opinion, pointers ARE essential. But again I’m far
> from being an expert…
It all depends on what you’re doing with your OS. It is possible to do an OS without pointers, but it’s even harder than doing one without interrupts. I actually meant that pointer math isn’t essential, though pointers are very useful (and save a lot of time) for other things. Once you get into having a decent driver system, libraries, and so on, it’s nearly impossible to avoid all pointer usage. I would recommend keeping the number of pointers to a minimum though. They are a common source of bugs, and unless you have a decent kernel-level debugger, it can be very difficult to find and fix them.
> My keyboard driver, ata driver, and so forth all use port I/O
Won’t that make it hard to support USB keyboards? I thought the BIOS did some emulating to make them work with OS’ that don’t suppert USB
It’s not easy, but I’ve avoided them so far. My keyboard driver, ata driver, and so forth all use port I/O; the use of a single address space helps too.
You mean you do all I/O using polling? Do you ever intend to be able to do more than one thing at once? If so, you’re going to have a hell of a time polling two or more devices at the same time.
I’ll be adding multitasking later, but I think I can do that without interrupts as well.
You could do co-operative multitasking without interrupts; however, you can’t avoid interrupts if you want to do pre-emptive multitasking. Even simple round-robin scheduling needs a timer interrupt to keep the thing ticking along.
You will also need to use interrupts if you ever want to support more than one privilege level.
Interrupts were put into the CPU design for a good reason. My advice is to make use of them — they’ll make your life a lot easier (and make your OS much better in the long term).
It is possible to do an OS without pointers, but it’s even harder than doing one without interrupts.
Pointers are vital in any program unless you’re using, say, Java or Visual Basic. Even then you’re exposed to pointers indirectly. In general: it’s possible to write a program without pointers, but you’re severely restricting what you can do. No variable-sized arrays, no linked lists, no trees; in fact, no dynamically allocated memory.
to me it makes more logical sense to have where it’s getting moved to on the right…
To me it doesn’t have any difference at all… having the destination operand at the left side mimics a simple high level assignment:
a = b –> mov […], bx
or
a += b –> add […], bx
RE: Questions to ‘Charles Childers’
> Won’t that make it hard to support USB keyboards? I
> thought the BIOS did some emulating to make them work
> with OS’ that don’t suppert USB
Some BIOSes do have options to support use of a USB keyboard with a “legacy” operating system, but Retro doesn’t need to support them as most use is on older systems. (386, 486, and early Pentiums)
RE: Charles Childers
> You mean you do all I/O using polling? Do you ever intend
> to be able to do more than one thing at once? If so,
> you’re going to have a hell of a time polling two or more
> devices at the same time.
Yes, I do all I/O using polling. Eventually I will be able to do more than one thing at once, but as a native Forth implementation, it’s not essential for Retro to do so.
> You could do co-operative multitasking without
> interrupts; however, you can’t avoid interrupts if you
> want to do pre-emptive multitasking. Even simple round-
> robin scheduling needs a timer interrupt to keep the
> thing ticking along.
The current kernel will only support cooperative multitasking for that reason. A future version of the kernel will have support for preemptive multitasking.
> You will also need to use interrupts if you ever want to
> support more than one privilege level.
I dislike multiple privilege levels. They aren’t needed for the purposes I want to use Retro for. Running in a single privilege level may not be “safe”, but it makes programming low-level stuff a lot easier.
> Interrupts were put into the CPU design for a good
> reason. My advice is to make use of them — they’ll make
> your life a lot easier (and make your OS much better in
> the long term).
We’ve been considering interrupts and their advantages and plan to use them in the next major version of the kernel. For now, the interrupt-free design suffices, but is limiting in many ways.
> Pointers are vital in any program unless you’re using,
> say, Java or Visual Basic. Even then you’re exposed to
> pointers indirectly. In general: it’s possible to write a
> program without pointers, but you’re severely restricting
> what you can do. No variable-sized arrays, no linked
> lists, no trees; in fact, no dynamically allocated
> memory.
Agreed. It is possible, but seldom practical. As I mentioned earlier, I do use pointers where convienent, I just try to keep them to a minimum.