TESTEMM.PAS 530 B

12345678910111213141516171819202122232425
  1. uses my_mem;
  2. var
  3. LittleMem:EMMRec;
  4. MyStr : ^string;
  5. begin
  6. if not InitEMM then
  7. begin
  8. WriteLn('Suxx');
  9. Halt(255);
  10. end;
  11. WriteLn(MaxEMM);
  12. if TestAlloc(640 shl 10) then
  13. if AllocEMM(1024 shl 10,LittleMem) then
  14. begin
  15. if MapEMMMemory(LittleMem,0,LittleMem.PageCount mod 4+1) then
  16. begin
  17. MyStr := AbsEMM;
  18. MyStr^ := 'Hack the planet';
  19. WriteLn(MyStr^);
  20. end
  21. else WriteLn('Fuck 2');
  22. FreeEMM(LittleMem);
  23. end
  24. else WriteLn('Fuck');
  25. end.