crt.pp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1993-98 by the Free Pascal development team.
  5. Borland Pascal 7 Compatible CRT Unit for Go32V2
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. unit crt;
  13. interface
  14. const
  15. { CRT modes }
  16. BW40 = 0; { 40x25 B/W on Color Adapter }
  17. CO40 = 1; { 40x25 Color on Color Adapter }
  18. BW80 = 2; { 80x25 B/W on Color Adapter }
  19. CO80 = 3; { 80x25 Color on Color Adapter }
  20. Mono = 7; { 80x25 on Monochrome Adapter }
  21. Font8x8 = 256; { Add-in for ROM font }
  22. { Mode constants for 3.0 compatibility }
  23. C40 = CO40;
  24. C80 = CO80;
  25. { Foreground and background color constants }
  26. Black = 0;
  27. Blue = 1;
  28. Green = 2;
  29. Cyan = 3;
  30. Red = 4;
  31. Magenta = 5;
  32. Brown = 6;
  33. LightGray = 7;
  34. { Foreground color constants }
  35. DarkGray = 8;
  36. LightBlue = 9;
  37. LightGreen = 10;
  38. LightCyan = 11;
  39. LightRed = 12;
  40. LightMagenta = 13;
  41. Yellow = 14;
  42. White = 15;
  43. { Add-in for blinking }
  44. Blink = 128;
  45. var
  46. { Interface variables }
  47. CheckBreak: Boolean; { Enable Ctrl-Break }
  48. CheckEOF: Boolean; { Enable Ctrl-Z }
  49. DirectVideo: Boolean; { Enable direct video addressing }
  50. CheckSnow: Boolean; { Enable snow filtering }
  51. LastMode: Word; { Current text mode }
  52. TextAttr: Byte; { Current text attribute }
  53. WindMin: Word; { Window upper left coordinates }
  54. WindMax: Word; { Window lower right coordinates }
  55. { Interface procedures }
  56. procedure AssignCrt(var F: Text);
  57. function KeyPressed: Boolean;
  58. function ReadKey: Char;
  59. procedure TextMode(Mode: Integer);
  60. procedure Window(X1,Y1,X2,Y2: Byte);
  61. procedure GotoXY(X,Y: Byte);
  62. function WhereX: Byte;
  63. function WhereY: Byte;
  64. procedure ClrScr;
  65. procedure ClrEol;
  66. procedure InsLine;
  67. procedure DelLine;
  68. procedure TextColor(Color: Byte);
  69. procedure TextBackground(Color: Byte);
  70. procedure LowVideo;
  71. procedure HighVideo;
  72. procedure NormVideo;
  73. procedure Delay(MS: Word);
  74. procedure Sound(Hz: Word);
  75. procedure NoSound;
  76. {Extra Functions}
  77. procedure cursoron;
  78. procedure cursoroff;
  79. procedure cursorbig;
  80. implementation
  81. uses
  82. go32;
  83. {$ASMMODE ATT}
  84. var
  85. DelayCnt,
  86. ScreenWidth,
  87. ScreenHeight : longint;
  88. VidSeg : Word;
  89. {
  90. definition of textrec is in textrec.inc
  91. }
  92. {$i textrec.inc}
  93. {****************************************************************************
  94. Low level Routines
  95. ****************************************************************************}
  96. procedure setscreenmode(mode : byte);
  97. var
  98. regs : trealregs;
  99. begin
  100. regs.realeax:=mode;
  101. realintr($10,regs);
  102. end;
  103. function GetScreenHeight : longint;
  104. begin
  105. getscreenheight:=mem[$40:$84]+1;
  106. If mem[$40:$84]=0 then
  107. getscreenheight := 25;
  108. end;
  109. function GetScreenWidth : longint;
  110. begin
  111. getscreenwidth:=mem[$40:$4a];
  112. end;
  113. procedure SetScreenCursor(x,y : longint);
  114. var
  115. regs : trealregs;
  116. begin
  117. regs.realeax:=$0200;
  118. regs.realebx:=0;
  119. regs.realedx:=(y-1) shl 8+(x-1);
  120. realintr($10,regs);
  121. end;
  122. procedure GetScreenCursor(var x,y : longint);
  123. begin
  124. x:=mem[$40:$50]+1;
  125. y:=mem[$40:$51]+1;
  126. end;
  127. {****************************************************************************
  128. Helper Routines
  129. ****************************************************************************}
  130. Function WinMinX: Byte;
  131. {
  132. Current Minimum X coordinate
  133. }
  134. Begin
  135. WinMinX:=(WindMin and $ff)+1;
  136. End;
  137. Function WinMinY: Byte;
  138. {
  139. Current Minimum Y Coordinate
  140. }
  141. Begin
  142. WinMinY:=(WindMin shr 8)+1;
  143. End;
  144. Function WinMaxX: Byte;
  145. {
  146. Current Maximum X coordinate
  147. }
  148. Begin
  149. WinMaxX:=(WindMax and $ff)+1;
  150. End;
  151. Function WinMaxY: Byte;
  152. {
  153. Current Maximum Y coordinate;
  154. }
  155. Begin
  156. WinMaxY:=(WindMax shr 8) + 1;
  157. End;
  158. Function FullWin:boolean;
  159. {
  160. Full Screen 80x25? Window(1,1,80,25) is used, allows faster routines
  161. }
  162. begin
  163. FullWin:=(WindMax-WindMin=$184f);
  164. end;
  165. {****************************************************************************
  166. Public Crt Functions
  167. ****************************************************************************}
  168. procedure textmode(mode : integer);
  169. var
  170. regs : trealregs;
  171. begin
  172. lastmode:=mode;
  173. mode:=mode and $ff;
  174. setscreenmode(mode);
  175. { set 8x8 font }
  176. if (lastmode and $100)<>0 then
  177. begin
  178. regs.realeax:=$1112;
  179. regs.realebx:=$0;
  180. realintr($10,regs);
  181. end;
  182. screenwidth:=getscreenwidth;
  183. screenheight:=getscreenheight;
  184. windmin:=0;
  185. windmax:=(screenwidth-1) or ((screenheight-1) shl 8);
  186. end;
  187. Procedure TextColor(Color: Byte);
  188. {
  189. Switch foregroundcolor
  190. }
  191. Begin
  192. TextAttr:=(Color and $8f) or (TextAttr and $70);
  193. End;
  194. Procedure TextBackground(Color: Byte);
  195. {
  196. Switch backgroundcolor
  197. }
  198. Begin
  199. TextAttr:=(Color shl 4) or (TextAttr and $0f);
  200. End;
  201. Procedure HighVideo;
  202. {
  203. Set highlighted output.
  204. }
  205. Begin
  206. TextColor(TextAttr Or $08);
  207. End;
  208. Procedure LowVideo;
  209. {
  210. Set normal output
  211. }
  212. Begin
  213. TextColor(TextAttr And $77);
  214. End;
  215. Procedure NormVideo;
  216. {
  217. Set normal back and foregroundcolors.
  218. }
  219. Begin
  220. TextColor(7);
  221. TextBackGround(0);
  222. End;
  223. Procedure GotoXy(X: Byte; Y: Byte);
  224. {
  225. Go to coordinates X,Y in the current window.
  226. }
  227. Begin
  228. If (X>0) and (X<=WinMaxX- WinMinX+1) and
  229. (Y>0) and (Y<=WinMaxY-WinMinY+1) Then
  230. Begin
  231. Inc(X,WinMinX-1);
  232. Inc(Y,WinMinY-1);
  233. SetScreenCursor(x,y);
  234. End;
  235. End;
  236. Procedure Window(X1, Y1, X2, Y2: Byte);
  237. {
  238. Set screen window to the specified coordinates.
  239. }
  240. Begin
  241. if (X1>X2) or (X2>ScreenWidth) or
  242. (Y1>Y2) or (Y2>ScreenHeight) then
  243. exit;
  244. WindMin:=((Y1-1) Shl 8)+(X1-1);
  245. WindMax:=((Y2-1) Shl 8)+(X2-1);
  246. GoToXY(1,1);
  247. End;
  248. Procedure ClrScr;
  249. {
  250. Clear the current window, and set the cursor on 1,1
  251. }
  252. var
  253. fil : word;
  254. y : longint;
  255. begin
  256. fil:=32 or (textattr shl 8);
  257. if FullWin then
  258. DosmemFillWord(VidSeg,0,ScreenHeight*ScreenWidth,fil)
  259. else
  260. begin
  261. for y:=WinMinY to WinMaxY do
  262. DosmemFillWord(VidSeg,((y-1)*ScreenWidth+(WinMinX-1))*2,WinMaxX-WinMinX+1,fil);
  263. end;
  264. Gotoxy(1,1);
  265. end;
  266. Procedure ClrEol;
  267. {
  268. Clear from current position to end of line.
  269. }
  270. var
  271. x,y : longint;
  272. fil : word;
  273. Begin
  274. GetScreenCursor(x,y);
  275. fil:=32 or (textattr shl 8);
  276. if x<WinMaxX then
  277. DosmemFillword(VidSeg,((y-1)*ScreenWidth+(x-1))*2,WinMaxX-x+1,fil);
  278. End;
  279. Function WhereX: Byte;
  280. {
  281. Return current X-position of cursor.
  282. }
  283. var
  284. x,y : longint;
  285. Begin
  286. GetScreenCursor(x,y);
  287. WhereX:=x-WinMinX+1;
  288. End;
  289. Function WhereY: Byte;
  290. {
  291. Return current Y-position of cursor.
  292. }
  293. var
  294. x,y : longint;
  295. Begin
  296. GetScreenCursor(x,y);
  297. WhereY:=y-WinMinY+1;
  298. End;
  299. {*************************************************************************
  300. KeyBoard
  301. *************************************************************************}
  302. var
  303. is_last : boolean;
  304. last : char;
  305. function readkey : char;
  306. var
  307. char2 : char;
  308. char1 : char;
  309. regs : trealregs;
  310. begin
  311. if is_last then
  312. begin
  313. is_last:=false;
  314. readkey:=last;
  315. end
  316. else
  317. begin
  318. regs.realeax:=$0000;
  319. realintr($16,regs);
  320. char1:=chr(regs.realeax and $ff);
  321. char2:=chr((regs.realeax and $ff00) shr 8);
  322. if char1=#0 then
  323. begin
  324. is_last:=true;
  325. last:=char2;
  326. end;
  327. readkey:=char1;
  328. end;
  329. end;
  330. function keypressed : boolean;
  331. var
  332. regs : trealregs;
  333. begin
  334. if is_last then
  335. begin
  336. keypressed:=true;
  337. exit;
  338. end
  339. else
  340. begin
  341. regs.realeax:=$0100;
  342. realintr($16,regs);
  343. keypressed:=((regs.realflags and zeroflag) = 0);
  344. end;
  345. end;
  346. {*************************************************************************
  347. Delay
  348. *************************************************************************}
  349. procedure Delayloop;assembler;
  350. asm
  351. .LDelayLoop1:
  352. subl $1,%eax
  353. jc .LDelayLoop2
  354. cmpl %fs:(%edi),%ebx
  355. je .LDelayLoop1
  356. .LDelayLoop2:
  357. end;
  358. procedure initdelay;assembler;
  359. asm
  360. movl $0x46c,%edi
  361. movl $-28,%edx
  362. movl %fs:(%edi),%ebx
  363. .LInitDel1:
  364. cmpl %fs:(%edi),%ebx
  365. je .LInitDel1
  366. movl %fs:(%edi),%ebx
  367. movl %edx,%eax
  368. call DelayLoop
  369. notl %eax
  370. xorl %edx,%edx
  371. movl $55,%ecx
  372. divl %ecx
  373. movl %eax,DelayCnt
  374. end;
  375. procedure Delay(MS: Word);assembler;
  376. asm
  377. movzwl MS,%ecx
  378. jecxz .LDelay2
  379. movl $0x400,%edi
  380. movl DelayCnt,%edx
  381. movl %fs:(%edi),%ebx
  382. .LDelay1:
  383. movl %edx,%eax
  384. call DelayLoop
  385. loop .LDelay1
  386. .LDelay2:
  387. end;
  388. procedure sound(hz : word);
  389. begin
  390. if hz=0 then
  391. begin
  392. nosound;
  393. exit;
  394. end;
  395. asm
  396. movzwl hz,%ecx
  397. movl $1193046,%eax
  398. cltd
  399. divl %ecx
  400. movl %eax,%ecx
  401. movb $0xb6,%al
  402. outb %al,$0x43
  403. movb %cl,%al
  404. outb %al,$0x42
  405. movb %ch,%al
  406. outb %al,$0x42
  407. inb $0x61,%al
  408. orb $0x3,%al
  409. outb %al,$0x61
  410. end ['EAX','ECX','EDX'];
  411. end;
  412. procedure nosound;
  413. begin
  414. asm
  415. inb $0x61,%al
  416. andb $0xfc,%al
  417. outb %al,$0x61
  418. end ['EAX'];
  419. end;
  420. {****************************************************************************
  421. HighLevel Crt Functions
  422. ****************************************************************************}
  423. procedure removeline(y : longint);
  424. var
  425. fil : word;
  426. begin
  427. fil:=32 or (textattr shl 8);
  428. y:=WinMinY+y-1;
  429. While (y<WinMaxY) do
  430. begin
  431. dosmemmove(VidSeg,(y*ScreenWidth+(WinMinX-1))*2,
  432. VidSeg,((y-1)*ScreenWidth+(WinMinX-1))*2,(WinMaxX-WinMinX+1)*2);
  433. inc(y);
  434. end;
  435. dosmemfillword(VidSeg,((WinMaxY-1)*ScreenWidth+(WinMinX-1))*2,(WinMaxX-WinMinX+1),fil);
  436. end;
  437. procedure delline;
  438. begin
  439. removeline(wherey);
  440. end;
  441. procedure insline;
  442. var
  443. my,y : longint;
  444. fil : word;
  445. begin
  446. fil:=32 or (textattr shl 8);
  447. y:=WhereY;
  448. my:=WinMaxY-WinMinY;
  449. while (my>=y) do
  450. begin
  451. dosmemmove(VidSeg,(((WinMinY+my-1)-1)*ScreenWidth+(WinMinX-1))*2,
  452. VidSeg,(((WinMinY+my)-1)*ScreenWidth+(WinMinX-1))*2,(WinMaxX-WinMinX+1)*2);
  453. dec(my);
  454. end;
  455. dosmemfillword(VidSeg,(((WinMinY+y-1)-1)*ScreenWidth+(WinMinX-1))*2,(WinMaxX-WinMinX+1),fil);
  456. end;
  457. {****************************************************************************
  458. Extra Crt Functions
  459. ****************************************************************************}
  460. procedure cursoron;
  461. var
  462. regs : trealregs;
  463. begin
  464. regs.realeax:=$0100;
  465. regs.realecx:=$90A;
  466. If VidSeg=$b800 then
  467. regs.realecx:=$90A
  468. else
  469. regs.realecx:=$b0d;
  470. realintr($10,regs);
  471. end;
  472. procedure cursoroff;
  473. var
  474. regs : trealregs;
  475. begin
  476. regs.realeax:=$0100;
  477. regs.realecx:=$ffff;
  478. realintr($10,regs);
  479. end;
  480. procedure cursorbig;
  481. var
  482. regs : trealregs;
  483. begin
  484. regs.realeax:=$0100;
  485. regs.realecx:=$10A;
  486. realintr($10,regs);
  487. end;
  488. {*****************************************************************************
  489. Read and Write routines
  490. *****************************************************************************}
  491. var
  492. CurrX,CurrY : longint;
  493. Procedure WriteChar(c:char);
  494. var
  495. regs : trealregs;
  496. begin
  497. case c of
  498. #10 : inc(CurrY);
  499. #13 : CurrX:=WinMinX;
  500. #8 : begin
  501. if CurrX>WinMinX then
  502. dec(CurrX);
  503. end;
  504. #7 : begin { beep }
  505. regs.dl:=7;
  506. regs.ah:=2;
  507. realintr($21,regs);
  508. end;
  509. else
  510. begin
  511. memw[VidSeg:((CurrY-1)*ScreenWidth+(CurrX-1))*2]:=(textattr shl 8) or byte(c);
  512. inc(CurrX);
  513. end;
  514. end;
  515. if CurrX>WinMaxX then
  516. begin
  517. CurrX:=WinMinX;
  518. inc(CurrY);
  519. end;
  520. while CurrY>WinMaxY do
  521. begin
  522. removeline(1);
  523. dec(CurrY);
  524. end;
  525. end;
  526. Function CrtWrite(var f : textrec):integer;
  527. var
  528. i : longint;
  529. begin
  530. GetScreenCursor(CurrX,CurrY);
  531. for i:=0 to f.bufpos-1 do
  532. WriteChar(f.buffer[i]);
  533. SetScreenCursor(CurrX,CurrY);
  534. f.bufpos:=0;
  535. CrtWrite:=0;
  536. end;
  537. Function CrtRead(Var F: TextRec): Integer;
  538. procedure BackSpace;
  539. begin
  540. if (f.bufpos>0) and (f.bufpos=f.bufend) then
  541. begin
  542. WriteChar(#8);
  543. WriteChar(' ');
  544. WriteChar(#8);
  545. dec(f.bufpos);
  546. dec(f.bufend);
  547. end;
  548. end;
  549. var
  550. ch : Char;
  551. Begin
  552. GetScreenCursor(CurrX,CurrY);
  553. f.bufpos:=0;
  554. f.bufend:=0;
  555. repeat
  556. if f.bufpos>f.bufend then
  557. f.bufend:=f.bufpos;
  558. SetScreenCursor(CurrX,CurrY);
  559. ch:=readkey;
  560. case ch of
  561. #0 : case readkey of
  562. #71 : while f.bufpos>0 do
  563. begin
  564. dec(f.bufpos);
  565. WriteChar(#8);
  566. end;
  567. #75 : if f.bufpos>0 then
  568. begin
  569. dec(f.bufpos);
  570. WriteChar(#8);
  571. end;
  572. #77 : if f.bufpos<f.bufend then
  573. begin
  574. WriteChar(f.bufptr^[f.bufpos]);
  575. inc(f.bufpos);
  576. end;
  577. #79 : while f.bufpos<f.bufend do
  578. begin
  579. WriteChar(f.bufptr^[f.bufpos]);
  580. inc(f.bufpos);
  581. end;
  582. end;
  583. ^S,
  584. #8 : BackSpace;
  585. ^Y,
  586. #27 : begin
  587. f.bufpos:=f.bufend;
  588. while f.bufend>0 do
  589. BackSpace;
  590. end;
  591. #13 : begin
  592. WriteChar(#13);
  593. WriteChar(#10);
  594. f.bufptr^[f.bufend]:=#13;
  595. f.bufptr^[f.bufend+1]:=#10;
  596. inc(f.bufend,2);
  597. break;
  598. end;
  599. #26 : if CheckEOF then
  600. begin
  601. f.bufptr^[f.bufend]:=#26;
  602. inc(f.bufend);
  603. break;
  604. end;
  605. else
  606. begin
  607. if f.bufpos<f.bufsize-2 then
  608. begin
  609. f.buffer[f.bufpos]:=ch;
  610. inc(f.bufpos);
  611. WriteChar(ch);
  612. end;
  613. end;
  614. end;
  615. until false;
  616. f.bufpos:=0;
  617. SetScreenCursor(CurrX,CurrY);
  618. CrtRead:=0;
  619. End;
  620. Function CrtReturn:Integer;
  621. Begin
  622. CrtReturn:=0;
  623. end;
  624. Function CrtClose(Var F: TextRec): Integer;
  625. Begin
  626. F.Mode:=fmClosed;
  627. CrtClose:=0;
  628. End;
  629. Function CrtOpen(Var F: TextRec): Integer;
  630. Begin
  631. If F.Mode=fmOutput Then
  632. begin
  633. TextRec(F).InOutFunc:=@CrtWrite;
  634. TextRec(F).FlushFunc:=@CrtWrite;
  635. end
  636. Else
  637. begin
  638. F.Mode:=fmInput;
  639. TextRec(F).InOutFunc:=@CrtRead;
  640. TextRec(F).FlushFunc:=@CrtReturn;
  641. end;
  642. TextRec(F).CloseFunc:=@CrtClose;
  643. CrtOpen:=0;
  644. End;
  645. procedure AssignCrt(var F: Text);
  646. begin
  647. Assign(F,'');
  648. TextRec(F).OpenFunc:=@CrtOpen;
  649. end;
  650. var
  651. x,y : longint;
  652. begin
  653. { Load startup values }
  654. ScreenWidth:=GetScreenWidth;
  655. ScreenHeight:=GetScreenHeight;
  656. WindMax:=(ScreenWidth-1) or ((ScreenHeight-1) shl 8);
  657. { Load TextAttr }
  658. GetScreenCursor(x,y);
  659. lastmode := mem[$40:$49];
  660. if screenheight>25 then
  661. lastmode:=lastmode or $100;
  662. If not(lastmode=Mono) then
  663. VidSeg := $b800
  664. else
  665. VidSeg := $b000;
  666. TextAttr:=mem[VidSeg:((y-1)*ScreenWidth+(x-1))*2+1];
  667. { Redirect the standard output }
  668. assigncrt(Output);
  669. Rewrite(Output);
  670. TextRec(Output).Handle:=StdOutputHandle;
  671. assigncrt(Input);
  672. Reset(Input);
  673. TextRec(Input).Handle:=StdInputHandle;
  674. { Calculates delay calibration }
  675. initdelay;
  676. end.
  677. {
  678. $Log$
  679. Revision 1.4 1999-03-26 00:00:17 peter
  680. * fixed lastmode at startup for > 25 lines
  681. Revision 1.3 1999/02/03 09:56:17 florian
  682. + added simple support for monochrome video cards (not cursors yet),
  683. thanks to Jeff Patterson
  684. Revision 1.2 1999/01/22 11:12:09 florian
  685. + support of font8x8 added
  686. Revision 1.1 1998/12/21 13:07:02 peter
  687. * use -FE
  688. Revision 1.17 1998/12/15 22:42:49 peter
  689. * removed temp symbols
  690. Revision 1.16 1998/12/09 23:04:36 jonas
  691. * fixed bug in InsLine (changed "my" from "WinMaxY -1" to "WinMaxY - WinMinY")
  692. Revision 1.15 1998/11/28 14:09:48 peter
  693. * NOATTCDQ define
  694. Revision 1.14 1998/11/26 23:14:52 jonas
  695. * changed cdq to cltd in AT&T assembler block
  696. Revision 1.13 1998/08/26 10:01:54 peter
  697. * fixed readln cursor position
  698. Revision 1.12 1998/08/19 17:57:55 peter
  699. * fixed crtread with wrong cursor position
  700. Revision 1.11 1998/08/19 14:55:44 peter
  701. * fixed removeline which scrolled too much lines
  702. Revision 1.10 1998/08/18 13:32:46 carl
  703. * bugfix to make it work with FPC 0.99.5 (Delayloop is not correctly
  704. converted by ATT parser)
  705. Revision 1.9 1998/08/15 17:00:10 peter
  706. * moved delaycnt from interface to implementation
  707. Revision 1.8 1998/08/08 21:56:45 peter
  708. * updated crt with new delay, almost like bp7 routine
  709. Revision 1.5 1998/05/31 14:18:12 peter
  710. * force att or direct assembling
  711. * cleanup of some files
  712. Revision 1.4 1998/05/28 10:21:38 pierre
  713. * Handles of input and output restored
  714. Revision 1.3 1998/05/27 00:19:16 peter
  715. * fixed crt input
  716. Revision 1.2 1998/05/21 19:30:46 peter
  717. * objects compiles for linux
  718. + assign(pchar), assign(char), rename(pchar), rename(char)
  719. * fixed read_text_as_array
  720. + read_text_as_pchar which was not yet in the rtl
  721. }