Pascal Lesson 2 Contents

 
Updated 1st July 2000

 

It seems that we go on through the hardship from lesson one. Now, let me present you the second lesson of Pascal. Now I'm not going to convert all of this stuff into text files, but I'll let all of them in HTML format instead. You could download the second lesson in all as well, click here.

They are all fifteen lessons. Lessons one through five, about pointers, are mainly studied in computer science. I think they are very important to programming life. So, I am going to explain what is necessary. Well, since some of the visitors are from academic life, I would like to write the academic point of view as well. I'm not going to explain pointers in depth in this part, but I'd rather to move them into the third lessons. These include AVL tree, heap, B-tree, graph and digraph. May be I'd like to include the AVL tree here but it seems that it has no practical use, just talking about balancing tree. You can skip chapter 4 and 5 if you want to.

Lessons six and the rest are very practical. The BGI graphics, ah yes! I would split them into two chapters.Quite a thorough journey to graphics, but not quite good for high speed games. Then printer unit and overlay are discussed in a simple and neat chapter each. Registers and interrupts discussion and – may be I/O port and combining Pascal with assembly language – are directed especially to practical programmers. Perhaps electronic engineering students will find it useful as well.

After taking the second lesson, you should be able to:

  1. Program in Pascal more advancedly.
  2. Use nearly all programming-aspects that Borland Pascal 7.0 offers in real mode.
  3. Program some low-level codes.
  4. Use pointers in intermediary level.
  5. Use graphics for all of your applications.

The contents are:


Chapter 1 – Pointer Basics

Explains the understanding about pointers and how to declare them, including typed and untyped ones. All basic understandings are here. If you are new to pointers, you should learn this very well before you stepped on to the next lessons.

Chapter 2 – Single Linked List

It's all about the single linked list; either queues (FIFO) or stack (LIFO). I'll tell you all the basic operations like add, delete, insert, uproot (delete all), initiate, and so on. Queue and stack are similar, so I think you could go further than this information could give.

Chapter 3 – Double Linked List

It's about the same as if the queue and stack are combined together. But I'm going to explain something that lurks inside, which make programmers fall in a single trap. This includes the common mistakes that people often do.

Chapter 4 – Tree and Binary Tree

Its understanding is developed from basic linked list. This structure is often used as pull-down menu and directory display in File Manager or Explorer (they are Microsoft's programs in Windows). The tree is enhanced into binary tree, which is often used in compression or searching methods. A very useful structure!

Chapter 5 – Multidimensional Linked List

It's actually the basic of graph and digraph, but I have no courage in explaining them. I'll explain you the basics only. The lesson may be brief, but the understanding is very deep. Graph and digraph are often used in artificial intelligence (AI) stuff like map searching programs. Also, the Decision Support System (DSS) stuff, an AI tools for managers, to maximize profits.

Chapter 6 – BGI Graphics part 1

An interesting part! I explain the basic commands to draw in graphic screens, such as line, rectangle, and so on. I also tell you about initializing and destroying, and so on. From now on, you could bring your "Pacman" game into life if you did the challenge in the first lesson.

Chapter 7 – BGI Graphics part 2

This part explains graphics further. Linking the graphics files into one is the main subject. I also introduce saving and loading sprites, transparent background sprites, patterns, and the basic of 3-D stuff.

Chapter 8 – Overlaying programs

Well, it's not really an important lesson. I'll just explain how the overlay works in Pascal. That's all.

Chapter 9 – Printer

A necessary lesson! Although the lesson may be brief, it IS very useful. You can get your database programs to print results.

Chapter 10 – Low Level Language Basics

Explaining memory contents, register, and interrupts is quite a trivial task. I've never found a very suitable book for this. Then, I arrange this chapter to suit your need.

Chapter 11 – I/O Ports

Going further, I'll teach you the I/O ports. Every hardware has ports, but each port needs special treatment. So, be careful, this means you fiddle with your hardware. Any slight error may cause hardware failure. But, if you can program it properly, your program will blast like lightning!

Chapter 12 – The Ancient Ruins of DOS

The remaining commands in DOS unit are especially used for low-level calls. So, I'd like to teach it in the second lesson rather in the first one. This includes spawning child programs and so on.

Chapter 13 – Memory Accesses

I'm going to teach you to fiddle with memory locations. This is especially important for many aspects of low-level programming. Detecting BIOS, equipment, and so on. I also tell you the basic of 256-color mode 13h graphics. This mode is popular yet easy.

Chapter 14 – Combining Pascal with Assembly Language

At this point, you should learn assembly lesson before you could continue. Low level programming is done best by assembly, not Pascal. However, writing programs thoroughly in Assembly is a crazy idea, since it IS very difficult (Even I've done it in my chess program J). However, though Pascal is syntactically easy, he cannot do things as fast as assembly can. Combining the ease of Pascal and the speed of Assembly is the perfect idea.

Chapter 15 – Using Math Co-processor

I cancel my idea to give protected mode programming for this chapter. I give lessons about math co-processor instead.


Some lesson has a quiz so that you could evaluate yourself. If you don't know the answers, refer to the lesson or -- if you have questions related to it -- you may write me. Suggestions, critics, and corrections are welcome!

If you want to write me, go ahead and make sure you check the FAQ first.

I'm sorry but I HAVE to mention this:

DISCLAIMER

The tutorial is distributed "AS IS". The author is NOT liable for any damage caused by any parts of this tutorial. The entire risk is assumed to be user's. The damage is assumed to be user's fault and/or user's disability to use the tutorial. By entering any directory, user agrees to be bound in this agreement.

Sorry folks. But I am sure that this code works. I've tested it. Should any bug arise, write to me.


Now, where to go?

Download all 15 chapters of the second lesson
Back to main page
Back to lesson contents
To Lesson 3
My page of programming link

© 1997, 2000, Roby Joehanes