Evenbit 52 Junior Poster

Your test page must also have 'session_start()' at the top before any output. For compatibility with old versions of IE, you'll also want to add the P3P header.

index.php

<?php header('P3P CP="CAO PSA OUR"');
session_start();
$_SESSION['gallery'] = 42;
?>
<!DOCTYPE html>
<html>
<h1>Setting cookie!</h1>
<a href="/test.php">test</a><br>
<html>

test.php

<?php header('P3P CP="CAO PSA OUR"');
session_start();
$value = $_SESSION['gallery'];
?>
<!DOCTYPE html>
<html>
<h1>Getting cookie!</h1>
<? echo($value); ?>
<br>
<html>
Evenbit 52 Junior Poster

You will need to tweak 'termios' to get non-buffered input to work. Read this thread for code and discussion of the issue:

http://sourceforge.net/mailarchive/forum.php?thread_name=814462.63171.qm%40web65510.mail.ac4.yahoo.com&forum_name=hla-stdlib-talk

Nathan.

Evenbit 52 Junior Poster
Evenbit 52 Junior Poster

Here is some reading material:

http://del.icio.us/Evenbit/OS

Nathan.

Evenbit 52 Junior Poster

You have several "int 0x21" calls in your code. These are DOS calls:

http://www.ctyme.com/intr/int-21.htm

Since DOS is not loaded (indeed, you are writing your own OS), then you cannot use these functions. You must restrict yourself to just the BIOS calls.

Nathan.

Evenbit 52 Junior Poster

I believe that it really doesn't matter what language you learn because your skills are easily transferable. The major difference between languages is syntax, so once you understand the syntax of a new language, you can start programming in it with ease. After you have learned a few languages, they all begin to look the same. Same way with Operating Systems/Platforms -- your skills are easily transferrable from one to another so why worry about which one you start out on?

Evenbit 52 Junior Poster

Well, after the MAIN: label you can do something like...say, read a sector:

mov DH, 0 ; set the head
mov CH, 0 ; set the track
mov CL, 1 ; set the sector
lea BX, buffer ;must define 'buffer' first
call ReadSector

Then you will want to check the value in AH and handle any errors appropriately.

If no errors, then you might want to display the sector:

mov DH, 0 ; set the head
mov CH, 0 ; set the track
mov CL, 1 ; set the sector
lea BX, buffer
call DisplaySector

Of course, you will have to write the 'DisplaySector' code first. ;)

Hope this helps!