home *** CD-ROM | disk | FTP | other *** search
- ██ █ █ ████ ████ ██ ████ ████
- █ █ ██ █ █ █ █ █ █ █ █ █ █ █
- █ █ █ █ █ █ █ █ █ █ █
- █ █ █ █ █ ████ ██ █ █ ████ █
- ██████ █ ██ █ █ ██████ █ █
- █ █ █ █ █ █ █ █ █ █ █ █ █
- █ █ █ █ ████ ██████ █ █ ████ ████
-
- Version 1.0
-
- This version is Public Domain Software,
- but remember it is
- an Alfα Softwαre Production!
- December 1991.
-
- ╓──────────────────────────────────────────────────────────────────╖
- ║ An program to convert ANSI-screens into ASCII-screens. ║
- ╙──────────────────────────────────────────────────────────────────╜
- ╓──────────────────────────────────────────────────────────────────╖
- ║ A little history. ║
- ╙──────────────────────────────────────────────────────────────────╜
-
- Sysops of a BBS will reconize the next problem. They have designed a
- lot of ANSI-screens, with beautiful colors and cursor-movements and
- then they discover they had to make ASCII-screens to. Mostly they
- design their ANSI-screens with a special ANSI-paint-utility (for
- example ANSI-PAINT of TheDraw), which have the abillity to save the
- screens in both ANSI and ASCII formats. BUT, saving is a lot of
- work, the full-filename must be entered, just as a lot of parameters
- (like: clear the screen first, animation-speed).
-
- Well, as I installed a BBS for my own (Remote Acces, V1.10) (just
- for practise and for answering my phone when I'm from home) and I
- came to this problem. I like to design ANSI-screens, but dislike to
- enter all the parameters, just for getting ASCII-screens to. So, as
- programmer, I thought: "There must be an easier way to convert ANSI
- to ASCII."
-
- Well, I looked into my documentation for the ANSI-codes, I draw my
- Turbo-Pascal (V5.5) and my pascal-utillities (just for private
- usage, sorry guys) from my diskette-box and began to design the idea
- for ANS2ASC.
-
- I can tell, I managed in it and here is the result.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- an Alfα Softwαre Production! Page 1/5 December 1991
-
- ╓──────────────────────────────────────────────────────────────────╖
- ║ How it works. ║
- ╙──────────────────────────────────────────────────────────────────╜
-
- Well, I can short about it, it works excelent (little joke :-) ).
-
- Take an ANSI-screen. You will recornize them at the extension *.ANS.
- Then type at your prompt:
-
- ___> ANS2ASC <Enter>
- you will be asked to enter the filename, for example:
-
- Enter filename (Wildcards are OK) : [name].ANS
-
-
- ___> ANS2ASC [name].ANS <Enter>
-
- After returning to the prompt, you can give DIR and you see the
- extra file [name].ASC.
-
- While converting ANS2ASC use an array, which is supposed to be the
- screen (80 columns width, 60 lines high). ANS2ASC will first read
- the whole ANSI-file and will place all the characters in this array.
- ANS2ASC will convert cursor-movements into the right way, so at the
- end of the reading the array contains the whole ANSI-screen. The
- last thing ANS2ASC must do is writing the whole array into the
- ASCII-file. While writing ANS2ASC will NOT write the spaces at the
- end of the lines and ANS2ASC will NOT save the empty lines at the
- end of the array (at the end of the screen). So a screen of 10 lines
- ANSI is 10 lines in ASCII.
-
- As soon as the ANSI-file will clear the screen, the ASCII-file will
- begin with a formfeed (the ASCII-value is 12d, you know the female
- symbol).
-
- Al the other characters will be converted one at one into the
- ASCII-array.
-
- As (maybe) known, will ANSI-codes begin with an <Esc> (ASCII-value
- is 27d). As soon as ANS2ASC reads an <Esc>, it will think "Aha, this
- is an ANSI-code." They are explained later in this DOC-file.
-
- ╓──────────────────────────────────────────────────────────────────╖
- ║ What will ANS2ASC show on the screen. ║
- ╙──────────────────────────────────────────────────────────────────╜
-
- While ANS2ASC is converting, it will generate some messages on the
- screen:
-
-
- => Enter filename (Wildcards are OK) :
- You are prompted to enter the filenames. As you can see, you
- may enter wildcards. ANS2ASC will take the files, which fit
- with these wildcards (just like *.* or *.ANS).
-
-
-
-
- an Alfα Softwαre Production! Page 2/5 December 1991
-
- => Files to convert [filenames].[extensions]
- ANS2ASC prompted the filename again, which it will convert
- (here too, you can see wildcard if you entered them).
-
- => Extens. Error!> ANS2ASC.DOC
- ANS2ASC attends you, that he can only convert ANSI-files,
- which have an extension of ".ANS".
-
- => Directory not found!
- The given filename could not be found. You entered NO
- filename, or just the drive specification (C: with nothing
- more).
-
- => ..Converting > HDDD.ANS
- ANS2ASC have found an ANSI-file and is converting it.
-
- => O Converted > HDDD.ANS
- ANS2ASC have converted the ANSI-file into an ASCII-file.
-
- => Reading Error!> HDDD.ANS
- ANS2ASC could not read the ANSI-file.
-
- => Writing Error!> HDDD.ANS
- ANS2ASC could not write the ASCII-file.
-
- ╓──────────────────────────────────────────────────────────────────╖
- ║ Which ANSI-codes will be converted. ║
- ╙──────────────────────────────────────────────────────────────────╜
-
- ANS2ASC will convert the next ANSI-codes, more didnot tell my
- documentation.
-
- Cursor position movements, like
-
- <Esc> [ nn A Cursor up (if no nn is given, cursor
- goes one line up).
-
- <Esc> [ nn B Cursor down (if no nn is given, cursor
- goes one line down).
-
- <Esc> [ nn C Cursor forward (if no nn is given, cursor
- goes one column forward).
-
- <Esc> [ nn D Cursor backward (if no nn is given, cursor
- goes one column backward).
-
- <Esc> [ yy ; xx F same as the next one!!!!
- <Esc> [ yy ; xx H Cursor position, the cursor goes to line yy
- and column xx (if no xx and
- yy are given, cursor goes
- to the home position (the
- left-upper corner of the
- screen)).
-
-
-
-
-
- an Alfα Softwαre Production! Page 3/5 December 1991
-
- <Esc> [ 2 J Erase the screen. As soon as this ANSI-code
- is present in the ANSI-file, the
- ASCII-file will begin with an
- formfeed-symbol (ASCII(12)).
-
- <Esc> [ K Erase the line, from cursor position till
- the end. This sequence isnot
- built in yet. This code will be
- ignored (it will not be present
- in the ASCII-file).
-
- <Esc> [ at ; .. ; at m Set graphic Attributes. This code will just
- be ignored, as ASCII cann't
- use colors and screen
- attrbutes. Mostly this will be
- the codes you will remove form
- ANSI-files, for getting
- ASCII-files.
-
- <Esc> = ???? h Set mode. This function isnot clear at me,
- I could not understand it from my
- documentation. This code will
- simply be ignored (it will not be
- present in the ASCII-file).
-
- <Esc> = ???? l Reset mode. This function isnot clear at
- me too, I could not understand it
- from my documentation. This code
- will simply be ignored (it will
- not be present in the
- ASCII-file).
-
- <Esc> [ s Save cursor position.
-
- <Esc> [ u Restore cursor position, which have been
- saved with "<Esc> [ s". The default
- position is the left-upper corner
- of the screen.
-
- ╓──────────────────────────────────────────────────────────────────╖
- ║ Results. ║
- ╙──────────────────────────────────────────────────────────────────╜
-
- I have converted all my BBS-ANSI-screens with ANS2ASC, none of them
- contains errors, or did ANS2ASC do strange things.
-
-
-
-
-
-
-
-
-
-
-
-
-
- an Alfα Softwαre Production! Page 4/5 December 1991
-
- ╓──────────────────────────────────────────────────────────────────╖
- ║ Reclaimes and donations. ║
- ╙──────────────────────────────────────────────────────────────────╜
-
- This program is Public Domain. Althought I paid a very lot of
- attentions at doing strange things, you can never complain when your
- harddisk seems to be empty (if you use ANS2ASC, or if even you
- don't).
-
- But if you think: "Hey, nice program", then you can donate some mony
- at one of my accounts:
-
- account Bank Country Name
- 16.18.31.893 Rabobank Holland J.C.A. Niewenhuis
- 84.55.01.208 Verenigde spaarbank Holland J.C.A. Niewenhuis
-
- Please donate as many as you can miss, as I am still trying to get a
- job, I have to live with to few money. So extra money will be
- very welcome.
-
- ╓──────────────────────────────────────────────────────────────────╖
- ║ Last words from the writer. ║
- ╙──────────────────────────────────────────────────────────────────╜
-
- Sorry, when I have used strange english, sorry for writing-errors. I
- wasnot a good studuent in my English-lessons. But if the meaning are
- understood, I know: "What a nice piece of documentation did I
- write."
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- an Alfα Softwαre Production! Page 5/5 December 1991
-