Download Latest Version PERIX1KC.ZIP (2.6 MB)
Email in envelope

Get an email when there's a new version of Perix Operating System - 16/32/64 Bit

Home / perix / kernel / bin / tpascal / diskimages / USBPendrive
Name Modified Size InfoDownloads / Week
Parent folder
kingstonmbrbootkernel01.zip 2016-02-01 2.1 MB
README.TXT 2016-01-29 5.8 kB
Totals: 2 Items   2.1 MB 0
USB pendrive install - Perix v0.01H - Turbo Pascal version
---------------------------------------------------------

You need a USB penddrive with 2gb or greater
Download IMAGEUSB by PassMark software - tested under windows 7
It don't have a windows installer, just click and execute
       
Step 1: Select your destination drive - mark the box in front of the drive
Step 2: Select Write image to USB drive
Step 3: Select de image file .bin you have downloaded from sourceforge
Step 4: Click the Write button to begin installation

Close all programs, and terminate windows


Attention         
--------         

All data in your pendrive will be destroyed, backup your files and
create an image .BIN file from your pendrive before make changes.
I am not responsible for loss of data or incorrect setup in your bios.
Be sure you are familiar with low level system programming and you know
what you are doing. Use at your own risk. 


BIOS Setup
----------

Reboot your system, when BIOS appears, type F2 or F12 key,
depending on your BIOS setup, im my notebook the key is F2.
 
In BIOS, change your first device to boot from your pendrive
Save and exit BIOS changes and re-init the system again.

When perix boots, various messages (i am debugging) appears,
just type enter key (slowly) until multitasking is displayed on the screen

Know bugs
---------

PS/2 mouse is loosing data from pracket when i type various keys
on keyboard and move the mouse at the same time.
if the multitasking slowdown or craches is because the mouse.

File System
-----------

The file system is FAT32, you can copy or remove files in
windows explorer.

The KERNEL.SYS is a Turbo Pascal 7.0 KERNEL.EXE created from
KERNEL.PAS, just renamed to .SYS, the bootloader needs this
file extension.

MBR                
---

The pendrive image i have created is similar a Hard Disk,
yes it have a master boot record with active partition at begin of
your pendrive, but unlike hard disk, is not located
at offset 0 on the disk.
                   
Bootloader
----------
                   
The master boot record, 512 bytes in size, contains information
about the disk partitions and a bootstrap code that loads de bootloader
from sector 63 on the disk

The bootloader loads and execute normal .EXE and .COM files
renamed to .SYS, but it search only for KERNEL.SYS at root directory


Future releases
---------------

I need to work in several modifications and implementations in
the 32 bit kernel, perix is a project that uses various compilers
such asPerix as Turbo Pascal 7.0, Virtual Pascal, Pascal Pro, Delphi 7, etc.
and i know how to load create a 64bit kernel written by DELPHI XE2 64BIT
but i need much time to do the work, 64 bit needs paging implementation,
the multitasking in 64bit is not similar as in 32bit witch is executed by the
processor level with TSS structures.


How to create your own operating system
---------------------------------------

If you want to create your own first minimal kernel in real mode, its
very simple.

Create a file called KERNEL.TXT in notepad, or if you
are in windows DOS prompt, type edit KERNEL.TXT

make this:

Program KERNEL;

Uses Crt;

Begin
  DirectVideo:=True; { This is very, very important            }
                     { Remember that this program will be booted}
                     { from the bootloader and you cant call DOS}
                     { functions. This instruction, i dont remember}
                     { write the strings direct on the screen or call }
                     { BIOS functions. It updates the cursor position   }
                     { calling crt hardware ports or bios function too }
                     { without this, write and writeln procedures call }
                     { MS-DOS functions and crashes. Then int 21H vector }
                     { points to the address 0000H:0000H and do nothing }

  Writeln("MY FIRST KERNEL IS WORKING");

  { ---- wait for a keypress ----- }

  ASM
		XOR 	AX,AX
                INT 	16H      { call bios function }

@@Here:         JMP     @@Here   { stay in the loop, the program dont terminate }
  END; { ASM }

End. {Program}



Save the file. In DOS prompt type -->  TPC /B KERNEL.TXT 
or rename KERNEL.TXT to KERNEL.PAS --> TPC /B KERNEL.PAS

Then rename KERNEL.EXE to KERNEL.SYS --> REN KERNEL.EXE KERNEL.SYS

Suppose that your pendrive you have mounted with instructions above is
in drive E:

make this--->  COPY KERNEL.EXE E:KERNEL.SYS

it's all, just reboot your machine

Remember that turbo pascal 6 and 7 has a bug in CRT unit, it causes
error 200 on fast machines, you need to patch the CRT unit, search
for a CRT unit replacement on the net, create new one, or write
to screen using BIOS functions or direct writing using ports.

I think that turbo pascal 5.5 works fine and it's free, you can
get it at borland museum. The problem it's TP 5.5 you cant write
assembler instructions direct in the pascal code, you need to
write external .ASM files compile with tasm, link with tlink to
create an .OBJ and link with your KERNEL.PAS program

Remember, there are no DOS when your kernel starts, because of this, you cant
use getmem and freemem procedures because Turbo Pascal needs information from
the PSP, Prefix Segment Program, you need to modify the heap pointers, the other
perix project for real mode you can see how change these pointers.
The procedures GetIntVec and SetIntVec cant be used too, you need to write your
own procedures to make changes in the vector table.

Here at Perix 32bit project, i use a new memory management that breaks the
65520 bytes barrier, i can allocate megas or gigabytes of memory.


 
Thanks

Fernando Perez

Source: README.TXT, updated 2016-01-29