Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <dos.h>
- #include <i86.h>
- #include <mem.h>
- #include <conio.h>
- #define INPUT_STATUS 0x03da
- #define VRETRACE 0x08
- typedef unsigned char byte;
- typedef unsigned short word;
- void wait_for_retrace(void);
- byte* VGA = (byte*)0xA0000000L;
- long vet[566] = {\
- 22528,22529,\
- 22850,22851,22852,22853,22854,22855,\
- 23168,23169,23170,23171,23172,23173,23174,23175,23176,23177,23178,23179,23180,23181,23182,23183,23184,23185,23186,23187,23188,23189,23190,23191,23192,\
- 23499,23500,23501,23513,23514,23515,23516,23517,23518,23519,23520,23521,23522,23523,23524,23525,23526,23527,23528,23529,23530,23531,23532,23533,23534,23535,23536,23537,23538,23539,\
- 23822,23823,23860,23861,\
- 24144,24145,24182,\
- 24466,24467,24503,24504,\
- 24788,24789,24825,\
- 25110,25111,25145,\
- 25432,25433,25465,\
- 25728,25729,25730,25731,25732,25733,25734,25735,25754,25785,\
- 26056,26057,26058,26059,26060,26075,26104,\
- 26381,26382,26383,26384,26396,26397,26424,\
- 26705,26706,26707,26718,26719,26743,\
- 27028,27040,27062,\
- 27342,27343,27344,27345,27346,27347,27348,27349,27350,27351,27352,27353,27354,27355,27356,27361,27381,\
- 27658,27659,27660,27661,27670,27677,27678,27682,27683,27701,\
- 27973,27974,27975,27976,27977,27991,27992,27999,28000,28004,28019,28020,\
- 28288,28289,28290,28291,28292,28313,28321,28325,28338,\
- 28634,28642,28643,28646,28657,\
- 28954,28964,28967,28976,\
- 29275,29285,29288,29294,29295,\
- 29596,29606,29609,29613,\
- 29888,29916,29927,29930,29931,29932,\
- 30209,30236,30248,30250,30251,\
- 30530,30557,30568,30569,30572,\
- 30851,30876,30886,30887,30889,30893,\
- 31172,31173,31196,31205,31210,31214,\
- 31494,31495,31516,31523,31524,31530,31535,\
- 31816,31836,31841,31842,31851,31856,\
- 32137,32155,32159,32160,32171,32177,\
- 32458,32459,32474,32477,32478,32491,32497,\
- 32779,32794,32796,32812,32818,\
- 33100,33113,33114,33115,33132,33138,\
- 33421,33431,33432,33433,33452,33459,\
- 33742,33749,33750,33751,33773,33780,\
- 34062,34067,34068,34069,34093,34100,\
- 34383,34386,34387,34388,34414,34421,\
- 34703,34704,34705,34706,34734,34739,34742,\
- 35023,35054,35059,35062,\
- 35343,35374,35378,35379,35380,35383,\
- 35663,35694,35698,35700,35703,\
- 35983,36015,36017,36020,36022,36023,36024,36025,36026,36027,36028,36029,36030,36031,\
- 36303,36328,36329,36330,36331,36332,36333,36334,36335,36336,36337,36338,36339,36340,36341,36343,\
- 36623,36637,36638,36639,36640,36641,36642,36643,36644,36645,36646,36647,36655,36656,36660,36663,\
- 36943,36944,36945,36946,36947,36948,36949,36950,36951,36952,36953,36954,36955,36956,36975,36980,36984,\
- 37252,37253,37254,37255,37256,37257,37258,37259,37260,37261,37262,37263,37294,37295,37301,37304,\
- 37568,37569,37570,37571,37583,37614,37615,37621,37624,\
- 37888,37890,37891,37903,37904,37933,37935,37941,37944,\
- 38208,38209,38212,38213,38222,38223,38224,38253,38256,38261,38264,\
- 38529,38530,38531,38534,38535,38542,38544,38545,38546,38572,38576,38581,38584,\
- 38852,38853,38854,38855,38856,38857,38858,38861,38862,38867,38868,38869,38870,38871,38872,38892,38896,38901,38904,\
- 39176,39177,39178,39179,39180,39181,39193,39194,39195,39196,39197,39198,39199,39200,39201,39211,39216,39221,39224,\
- 39498,39499,39500,39501,39522,39523,39524,39525,39526,39527,39528,39531,39536,39541,39544,\
- 39822,39823,39824,39825,39826,39827,39828,39829,39849,39850,39851,39852,39853,39854,39855,39856,39857,39858,39861,39863,\
- 40150,40151,40152,40153,40154,40155,40156,40170,40176,40179,40180,40181,40182,40183,40184,40185,40186,\
- 40477,40478,40479,40480,40481,40482,40483,40484,40485,40486,40489,40497,40502,40503,40507,40508,40509,40510,40511,\
- 40807,40808,40809,40810,40811,40812,40813,40814,40815,40816,40817,40818,40819,40820,40821,40822,40823,40824,40825,40826,\
- 41127,41137,41142,41147,41148,41149,41150,41151,\
- 41446,41457,41462,\
- 41766,41777,41781,41782,\
- 42085,42097,42101,42102,\
- 42404,42417,42420,42422};
- int main()
- {
- union REGS regs;
- long i;
- regs.h.ah = 0x00;
- regs.h.al = 0x13;
- int86(0x10, ®s, ®s);
- while(1)
- {
- for(i = 0; i < 64000; i++)
- VGA[i] = 14;
- for(i = 0; i < 566; i++)
- VGA[vet[i]] = 12;
- wait_for_retrace();
- for(i = 0; i < 64000; i++)
- VGA[i] = 0;
- for(i = 0; i < 566; i++)
- VGA[vet[i]] = 12;
- wait_for_retrace();
- }
- return 0;
- }
- void wait_for_retrace(void)
- {
- while ((inp(INPUT_STATUS) & VRETRACE));
- while (!(inp(INPUT_STATUS) & VRETRACE));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement