Esempio n. 1
0
int get_block(u16 blk, char *buf)
{
	u16 c = blk / 18;
	u16 h = ((2*blk)%36)/18;
	u16 s = ((2*blk)%36)%18;

  diskr(c, h, s, buf);    // call int13-43 in assembly
}
Esempio n. 2
0
CTEST(test, ohne_roots){

	const float a = 1;
	const float b = 0;
	const float c = 1;

	const struct skr roots = diskr(a, b, c);

	const struct skr ohne_roots = {END};

	ASSERT_DBL_NEAR(ohne_roots.end, roots.end);
}
Esempio n. 3
0
CTEST(test, dos_roots) {

	const float a = 1;
	const float b = 5;
	const float c = 6;

	const struct skr roots = diskr(a, b, c);

	const struct skr dos_roots = {-2, -3};

	ASSERT_DBL_NEAR(dos_roots.x1, roots.x1);
	ASSERT_DBL_NEAR(dos_roots.x2, roots.x2);
}
Esempio n. 4
0
CTEST(test, uno_roots) {

        const float a = 1;
        const float b = 2;
        const float c = 1;

        const struct skr roots = diskr(a, b, c);

        const struct skr uno_roots = {-1};

        ASSERT_DBL_NEAR(uno_roots.x1, roots.x1);
        ASSERT_DBL_NEAR(uno_roots.x2, roots.x2);
}
Esempio n. 5
0
int getSector(u32 sector, char *addr)
{
  dp->addr    = addr;
  dp->s1      = (u32)sector;
  diskr();    // call int13-43 in assembly
}