Guest User

Untitled

a guest
May 1st, 2013
5
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.39 KB | None | 0 0
  1. /**
  2.  *   MTGos - LowLevel OS
  3.  *   Copyright (C) 2013 Morten Delenk
  4.  *
  5.  *   This program is free software: you can redistribute it and/or modify
  6.  *   it under the terms of the GNU General Public License as published by
  7.  *   the Free Software Foundation, either version 3 of the License, or
  8.  *   (at your option) any later version.
  9.  *
  10.  *   This program is distributed in the hope that it will be useful,
  11.  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  *   GNU General Public License for more details.
  14.  *
  15.  *   You should have received a copy of the GNU General Public License
  16.  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
  17.  *   Please Read "LICENSE" for the Complete License
  18. **/
  19. #include "devDriver.hpp"
  20. unsigned char * driver[512];
  21. NullDrive devnull;
  22. NullDrive::NullDrive()
  23.   : Sectornum(0), Sectorlenth(512)
  24.   {
  25.     for(int i=0;i<512;i++)
  26.       driver[i]=0;
  27.   }
  28.   NullDrive::~NullDrive() {
  29.   }
  30.   void NullDrive::operator >> (Sector& val)
  31.   {
  32.     val.SektorLength=512;
  33.     val.sektor = &driver;
  34.     ++Sectornum;
  35.   }
  36.   NullDrive& NullDrive::operator << (Sector val)
  37.   {
  38.     //Muss nichts machen; ist ja nur ein NullDrive
  39.   }
  40.   Sector getCurrentSectorPos()
  41.   {
  42.     Sector sec;
  43.     sec.SektorLength=512;
  44.     sec.sektor = &driver;
  45.     sec.sektorNum = Sectornum;
  46.   }
Advertisement
Add Comment
Please, Sign In to add comment