Dec 082017
 
The PingAnsi unit provides partial Ansi emulation for Turbo Pascal versions 5.x and higher.
File ANSI_133.ZIP from The Programmer’s Corner in
Category Pascal Source Code
The PingAnsi unit provides partial Ansi emulation for Turbo Pascal versions 5.x and higher.
File Name File Size Zip Size Zip Type
ANSIFUNC.TXT 3709 1383 deflated
DEMO.PAS 1957 851 deflated
MUSICA.PAS 14008 3673 deflated
PINGANSI.DOC 7371 3127 deflated
PINGANSI.HST 1722 849 deflated
PINGANSI.PAS 17426 4047 deflated
POORMAN.PAS 2761 1059 deflated
SHUTTLE2.ANS 14424 3272 deflated

Download File ANSI_133.ZIP Here

Contents of the ANSIFUNC.TXT file


Control Sequences
The following table lists the sequences understood by the
PingAnsi unit. Differences between PingAnsi and the standard
ansi.sys are marked with a vertical bar (|). Functions not yet
implemented are marked with *.

Cursor Positioning
Short Long name Format Notes
CUP cursor position ESC[y;xH Sets cursor position.
HVP cursor position ESC[y;xf Same as CUP; not recommended.
CUU cursor up ESC[nA n = # of lines to move
CUD cursor down ESC[nB
CUF cursor forward ESC[nC n = # of columns to move
CUB cursor backward ESC[nD
DSR Device Status, Report! ESC[6n Find out cursor position.
(also interfaced via hook)
CPR Cursor Position report ESC[y;xR Response to DSR, as if typed.
Sets ReportedX, ReportedY.
SCP Save Cursor Position ESC[s Not nestable. Saves in SaveX,
SaveY.
RCP Restore Cursor Position ESC[uGotoXY(SavedX, SavedY);

Editing
ED | Erase in Display ESC[0J or ESC[J Clear to end of screen
| ESC[1J Clear to start of screen
ESC[2J Clears screen.
EL Erase in Line ESC[K Clears to end of line.
IL | Insert Lines ESC[nL Inserts n blank lines at cursor line.
DL | Delete Lines ESC[nM Deletes n lines including cursor line.
ICH | Insert Characters *ESC[n@ Inserts n blank chars at cursor.
DCH | Delete Characters *ESC[nP Deletes n chars including cursor char.


Mode-Setting
SGR Set Graphics Rendition ESC[n;n;...nm See character attribute table.
SM Set Mode ESC[=nh See screen mode table.
RM Reset Mode ESC[=nl See screen mode table.
IBMKKR| Keyboard Key Reass. (*)ESC[#;"string"p
This function is not supported, but is interfaced via the
UserHook KeyAssign(St : String);

Character Attributes
The Set Graphics Rendition command is used to select foreground
and background colors or attributes.
When you use multiple parameters, they are executed in sequence, and
the effects are cumulative.
Attrib code Value
0 All attributes off (normal white on black)
1 Bold
|2Dim (not Bold)
4 Underline (blue foreground)
5 Blink
7 Reverse Video
8 Invisible (but why?)
|22Cancel Bold
|24Cancel Underline (white foreground)
|25Cancel Blink
|27Normal, un-reversed video
30-37 foregnd blk/red/grn/yel/blu/magenta/cyan/white
40-47 background

Screen Modes
The IBM BIOS supports several video modes; the codes given in the
BIOS documentation are used as parameters to the Set Mode command.
Mode Code Value
0 text 40x25 Black & White
1 text 40x25 Color
2 text 80x25 Black & White
3 text 80x25 Color
4 *bitmap 320x200 4 bits/pixel
5 *bitmap 320x200 1 bit/pixel
6 *bitmap 640x200 1 bit/pixel
7 (cursor wrap kludge)

'Ansi' music
Basic like musicEsc[M{string}^C
read the documentation for Basic Play.


 December 8, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)