By J.Y Avenard
(c) May 1997
GHERKIN Productions
I- Description
STRING-WRITER is a fast, complete text editor written almost completely in SATURN assembly (5% in sys-RPL, 10% data (graphics, character tables, error messages, etc.), 85% machine language for a total of 24 Kbytes).
History : String Writer v4.31 doesn't add any functions to the 4.4 version. It use the 4.3 ML code (which is faster than 4.4) and the 4.4 SysRpl kernel.
Notice! This version is shareware, if yous use it please send 50FF (or 10$) to the author. (me)
To make comments, questions, or suggestions for new functions,
you may write to me at
3615-3614 STORM bal GHERKIN or:
Avenard Jean-Yves
16 rue de Savigny
91390 Morsang Sur ORGE
or email to : avenar_j@epita.fr
II- General Overview:
String-Writer is a library object. It will appear on the stack as: "Library 1303 : STR..."
1- Installation
To use it, you must store it in a port.
- Put the library in level 1 of the stack.
- Yype DUP then BYTES.
You must have on stack :
Level 2 : # 23A3h
Level 1 : 24385.5
Else, don't use this program.
- Type 0, 1, or 2 [..32], then STO according to whether you have
a plug-in card.
Then press [ON]-[C]. (Press and hold [ON], then press [C] and release them both). The calculator will perform a warm start. String Writer is now installed and ready for use.
2- Using it for the first time.
Go to the library menu. Press the white soft-key underneath the name STRW. If STRW does not appear in the menu, press [NXT] until it appears.
3- Different functions.
Once you're in the String Writer menu, you will see these names:
-EDIT
-VISIT
-Edit
-Visit
-NEW
-Info
-PUTFONT
-SWINIT
-XMIT2
-SRECV2
-CUT
Here is a description of each of these programs:
-EDIT : Edit the object in level 1 of the stack.
-VISIT : Take a 'GLOBAL NAME' and edit the contents of the
variable, or a real and edit the following object on the stack.
-Edit : Same as EDIT, only if the object is an algebraic
object, then the Equation Writer is used. If it's a matrix, then
the Matrix Writer is used. If it's a graphics object, then the
GRAPH menu is used. Strings are edited directly without adding
quotes "". I advise that you use Edit for strings,
because it uses much less RAM than EDIT.
-Visit : Like VISIT, only this works in the same fashion
as Edit.
-NEW : To create a new object. -Info : Give the version
number and information about the library.
-PUTFONT : Get the font used by STRING-WRITER and put it
on the stack.
-SWINIT : Activate USER mode, and assign the following
functions to keys:
HP48s(x):
LS +/- : EDIT
RS +/- : VISIT
DOWN : Edit
RS DOWN : Visit
DEL : NEW
CLVAR : Place the contents of the command line into STRING-WRITER
v4.31. If there is no command line, place the contents of LASTARG
into STRING-WRITER v4.31.
HP48g(x):
LS +/- : EDIT/VISIT
DOWN : Edit
LS DOWN : Visit
DEL : NEW
LASTARG : Place the contents of the command line into
STRING_WRITER v4.31.
XMIT2 : Equivalent to the command XMIT, but you can transfer at speeds as fast as 7500 baud for the IR port, and 15,000 baud for the wire serial port. (The average time is calculated compared to the time taken by the XMIT function). XMIT2 takes two arguments: in stack level 2 a string, and in level 1, a real number for the transfer speed. XMIT2 returns a 1 if the transfer was successful, or a 0 if it was interrupted.
0: 1200 baud
1: 1900 baud
2: 2400 baud
3: 3800 baud
4: 4800 baud
5: 7500 baud (maximum speed for the IR port)
6: 9600 baud
7: 15000 baud (maximum speed for the RS-232c port)
Here are a few example times for transferring a 5000 character text with the XMIT2 function.
Speed : time (in seconds).
0 : 46.73
1 : 29.34
2 : 23.50 (transfer speed for the IR using the function XMIT)
3 : 14.81
4 : 11.91
5 : 7.55
6 : 6.13 (maximum possible transfer speed with the XMIT function)
7 : 3.93 (maximum possible transfer speed with the XMIT2
function)
-SRECV2: This function is equivalent to SRECV, but also permits transfers at very high speeds. Also, it will receive texts with more than 256 bytes.
-CUT : Insert CR after 22 characters long.
III- Description of the STRING-WRITER commands.
In edit mode:
-Direction keys for moving around in the text
DEL :erase the character underneath the cursor
<= :erase the character to the left of the cursor
MTH :List all lines beginning with *. To see all the
labels, press MTH as many times as is necessary.
To go to a specific label, press the number key shown next to it.
PRG :Toggle insert/type-over mode. When in ALPHA type
mode, press RS ALPHA instead.
CST :Tab.
VAR :Toggle fast/slow mode. This influences movement keys
as well as deleting characters.
ENTER :Save the text, return to RPL.
ON :Exit STRING-WRITER v4.4 losing all changes made to
text.
NXT :Next menu page
LEFT SHIFT ( LS ) +:
MTH :Send the seletion out the Infra-red or wire serial
port.
PRG :Show End-Of-Line characters.
CST :Automatically give a carriage-return when the cursor
reaches the 22 column.
VAR :(followed by a digit 0-9) set a mark at this cursor
position. (See RS VAR for more info).
UP :PAGE-UP
DOWN :PAGE-DOWN
LEFT :PAGE-LEFT
RIGHT :PAGE-RIGHT
NXT :Next menu page.
+/- :Show the EDIT menu ( <-SKIP,SKIP->,etc.. )
1 :Type a ;
RIGHT SHIFT ( RS ) +:
MTH :Allow configuration of the serial port parameters.
The delay between each line during the transmission is in 1/16ths
of a second.
PRG :Toggle AUTO-INDENT mode.
CST :Change the TAB value
VAR :(followed by a digit 0-9) go to a previously set
mark. (see LS VAR for more info).
UP :MAX-UP
NXT :Toggle menu bar (visible/invisible)
DOWN :MAX-DOWN
LEFT :MAX-LEFT
RIGHT :MAX-RIGHT
DEL :
HP48G(X) : erase from cursor to end of line.
HP48S(X) : same as the DEL L function (see below).
<= :HP48G(X) : erase all characters from the start of the line
to the left of the cursor.
ON :Turn off the HP48.
MENU KEYS:
Each key is found underneath its function name (ex: ASCII) which allows you to execute one of the different STRING-WRITER 4.4 commands.
ASCII :Enter any ASCII number
(from 0 to 255) to get the corresponding character.
LS ASCII :A table of all the ASCII characters in
the font.
GOTO :GOTO a specific line in the text.
LS GOTO :GOTO a specific character number in the
text.
->BEG :Place the cursor at the beginning of the
selection.
->END :Place the cursor at the end of the
selection.
DEL L :Erase the current line if it contains
characters, otherwise erase the Carriage Return.
LS DEL L :Erase all the characters on the current
line to the left of the cursor.
RS DEL L :Erase all the characters from the cursor
to the end of the line.
INFOS :Display various information about the text
and the state of the memory. Hold the key down to see the
information.
BEGIN :mark
the beginning of the selection
END :mark the end of the selection Pressing SL
BEGIN, or SL END selects the word at the current cursor
position.
CUT :Cut the selection to the clipboard
COPY :Copy the selection to the clipboard
PASTE :Paste the clipboard to the current cursor
position.
DEL :erase the text selection
FIND :Prompt
for a string to be found. This string is limited to 21
characters.
LS FIND :Place the current selection into the FIND
prompt, then enter FIND.
REPL :Prompt for a search string, and a replace
string.
LS REPL :Same function as LS FIND only with REPL.
RS REPL :Place the selection into the 'Replace
with' prompt, then enter REPL.
NEXT :Search again for the pattern in FIND. If
found, the occurence becomes the current selection.
R :Replace the selection by the 'Replace with'
string in REPL
LS R :Same funtion, but use a special replace.
(See chapter on the use of Find/Replace)
R/N :Replace the selection, then search for the
next occurance. (Just like pressing R, then NEXT).
LS R/N :Same as LS R, then NEXT.
ALL :Replace all the occurances of the search
string in the text. Display each occurance as it goes.
Press [ON] to stop.
LS ALL :Replace all occurences without the
display. This is more rapid. It is impossible to
interrupt this operation.
RS ALL :Same as above, only turn off the display
first. This increases the speed by another 12%.
NOTES FOR WHEN THESE COMMANDS NEED ARGUMENTS:
When an argument is needed for the commands: ASCII,
GOTO, FIND, etc., pressing [ON] will do the following:
-If no character has yet been typed, then you are
returned to edit mode.
-If characters are present, these are erased from the
command line.
The functions PRG, CST, VAR, MAX-LEFT, MAX-RIGHT are
still actives. The others are not operational.
-In the FIND and REPLACE menus you can use the ASCII
command, as well as displaying the entire font.
<-SKIP :Place the
cursor at the first of the previous word.
LS <-SKIP:Execute <-SKIP, and select the
current word.
SKIP-> :Place the cursor at the beginning of
the next word.
LS SKIP->:Execute SKIP-> and select the
current word.
<-DEL :Erase all characters from the left of
the cursor to the beginning of the previous word.
RS <-DEL :Erase all characters from the left of
the cursor to the beginning of the current line.
DEL-> :Erase all characters from the cursor to
the beginning of the next word.
RS DEL-> :Erase from the cursor to the end of
the current line.
DEL L :Erase the current line if it contains
characters, otherwise remove the carriage return.
LS DEL L :Erase all the characters on the current
line to the left of the cursor.
RS DEL L :Erase all the characters from the cursor
to the end of the line.
INFOS :Display various information about the text
and the state of the memory. Hold the key down to see the
information.
IV- Manipulating the selection and moving blocks.
When a section of text is selected (with BEGIN and END), the text is displayed in inverse. BEGIN must be placed before END. You can now cut and paste like any other text editor.
V-Using the search and replace commands.
To search for a sequence of characters, go the the FIND menu, enter the search string, and press ENTER. Then, choose a search mode: case-sensitive, or non case-sensitive, then press ENTER.
Pressing ON will allow you to exit the FIND (or REPL) menu at any time.
If the search string is empty, you will see the error message: "Nonexistent Pattern". If no occurance of the string is found, you will see the message: "Can't Find Pattern" Otherwise, the first string it finds is selected.
If you press NEXT, STRING WRITER will search for the next occurance.
Note: The ASCII code 0 is a wild-card. It allows you to search for any character.
For example, searching for T*TO (where * is the ASCII code 0) allows you to find all words like TaTO, TATO, TZTO, etc.
After having entered all the necessary arguments in the REPL menu, the first search string found is selected.
- R replaces the selection with the 'Replace with' string. - R/N replaces the selection, then searches for the next string. - ALL replaces all occurances of the search string, starting with the current cursor position.
1-Replacing the selection.
It is possible to replace an entire segment of text with a string. To do this, select the text to be replaced. Go to the REPL menu and erase the search string (press [ON] if it isn't empty), then press ENTER.
Enter the replace string and press ENTER. The message "Nonexistent Pattern" appears.
Press R : The selection is replaced.
2-Using macros with REPLACE.
It is possible to mainipulate a string using the REPLACE command. For example, you can add a space every 5 characters, or search for any 5 characters and reverse them.
Examples.
a) How to add a space every five characters.
-Go to the REPL menu
-Place 5 ASCII code 0 characters as the search string
(all wild-cards).
-ENTER -Place 5 ASCII code 0 characters as the replace
string
-Add a SPACE (press SPC or ASCII code 32)
-ENTER The next 5 characters are selected.
-To replace only these 5 characters, press LS, then R.
-To replace these 5 characters and then search for the
next 5, press LS, then R/N
-To replace all characters : press ALL. The message
"Use Special Replace ?" will appear.
-Press Y : All the characters are replaced.
b) Search for 5 characters, then reverse them (ex: HELLO becomes OLLEH)
-Go to the REPL menu
-Place 5 ASCII code 0 characters in the search string.
-ENTER -Enter the ASCII code 15, then 14, then 13, 12,
11.
-ENTER -To replace only the next 5 characters, press LS,
then R.
-To replace the next 5 characters, then search for 5
more, press LS, then R/N.
-To replace all characters : Press ALL. The message
"Use Special Replace ?" will appear.
-Press Y : All the characters are replaced.
When REPLACE finds the ASCII code 15 in the replace string, it will replace it by the 5th character in the selection. For a more general application, to replace with the nth character of the selection, use the ASCII code (10+n). The ASCII code 0 character is used as a counter. The first ASCII code 0 character represents the 1st character of the selection; the second ASCII code 0 represents the second character of the selection, etc.
Example:
How to find 6 characters, then replace them with:
"The 1st is x1,6th is x6" , where x1 is the
first character and x6 is the sixth. Example :
"COUCOU" would be replaced with "The 1st
is C,6th is U"
-Type 6 characters of ASCII code 0 in the search
string.
-ENTER
-Type : "The 1st is" , type the ASCII code 11
or the ASCII code 0.
-Type : ",6th is " , type ASCII code 16 (for
the sixth char)
-ENTER
-To replace only the first 6 characters found, press LS,
then R.
-To replace these 6 characters, then search for the next
6, press LS, then R/N.
-To replace all characters : Press ALL. The message
"Use Special Replace ?" will appear.
-Press Y : All the characters are replaced.
VI-Notes when using the ASCII menu or displaying the entire font.
In the ASCII menu, after having entered the ASCII code to insert into the text, press ENTER without releasing it. The ASCII code will be entered into the text many times, until the ENTER key is released. The insertion speed depends on the FAST or SLOW mode.
VII- Changing the font.
In normal mode, STRING-WRITER edits text using the font found in the HP48 ROM, using a screen with 8 lines by 22 characters (without the menu). It is possible to change this font and have a screen with 10 lines by 22 characters.
a) Changing the font.
Store any font that you choose in the global name 'FONT'. STRING-WRITER will search for 'FONT' first in the current directory. then in port 0, 1, and 2 etc...
If 'FONT' is not found, then the font in ROM will be used.
'FONT' can also be used as a path in a list like { HOME FONT.DIR F7.0 } or { :0: { BACKUP FONT.DIR F6.1 } }
'FONT' can also be a program which make a font-object.
If font is an empty list then STRINGWRITER will edit text with ROM's font.
b) Increase the number of lines in edit mode.
A font can be represented as a 6 x 2048 GROB, a 7 x 2048 GROB,
or an 8 x 2048 GROB.
If 'FONT' contains :
-A GROB 6 x 2048, STRING-WRITER will edit text with bitmap
characters 6x6, which allows 10 lines on the screen.
-A GROB 7 x 2048, STRING-WRITER will edit text with bitmap
characters 6x7, which allows 9 lines on the screen.
-A GROB 8 x 2048, STRING-WRITER will edit the text with bitmap
characters 6x8, which allows 8 lines on the screen.
VIII- Configuring STRING-WRITER
Normally, STRING-WRITER edits text with the menu bar showing, in slow mode, and in insert mode.
Using the variable 'SWPAR' it is possible to change these settings.
'SWPAR' contains a binary integer (ex: # 5h ).
This binary integer must be from #0d to #15d (decimal) or from #0h and #Fh (hexadecimal). Check the following table for the function of SWPAR :
SWPAR | MENU | SPEED | INSERTION | ALPHA |
# 0h | yes | slow | yes | no |
# 1h | no | slow | yes | no |
# 2h | yes | fast | yes | no |
# 3h | no | fast | yes | no |
# 4h | yes | slow | no | no |
# 5h | no | slow | no | no |
# 6h | yes | fast | no | no |
# 7h | no | fast | no | no |
# 8h | yes | slow | yes | yes |
# 9h | no | slow | yes | yes |
# Ah | yes | fast | yes | yes |
# Bh | no | fast | yes | yes |
# Ch | yes | slow | no | yes |
# Dh | no | slow | no | yes |
# Eh | yes | fast | no | yes |
# Fh | no | fast | no | yes |
IX-To get further...
It is possible to use String-Writer as a sophisticated tool to
be included in various programs (Assemblers, DataBases, Kernel,
Utilities, etc...)
For example, it is possible to re-create the
Error-Message-Edition-Program in ASMFLASH : ER So, in error case
it would be possible to acces directly to the line to be
corrected in the source-code. To do this, we may use the XLIB
1303 12. This particular object is STRINGWRITER's main program.
It takes 3 arguments :
3: GROB 6*2048 ( A font )
2: "string"
1: #Binary Integer
Where "string" is the string to be edited. The
Binary integer is to be decomposed like # aaaaabbbbbccccc0h with
aaaaa : the selected zone's beginning position in hexadecimal
notation.
bbbbb : the selected zone's ending position.
ccccc : the cursor's position when starting editing the selected
zone.
Ex:
The binary integer looks like # 000020003F000010h
Then, we'll edit the text with selected zone from 2nd character
to 63rth character the cursor will be positionned at the 1st
character.
X-Thanks. Beta-testers :
Douglas R. Cannon, Christophe Nguyen, Francois-Xavier Leroy,
Stephane Doat, Christian Bourgeois, Mohamed Fatri,
Etienne de Foras, Cyrille de Brebisson, Gerald Squelart.
Special Thanks to :
- Christian Bourgeois for his involvement in STRING-WRITER 2.0
and without whom this editor would have never seen the light of
day.
- Douglas R. Cannon for the translation of this document.
- Christophe Nguyen for last traductions...
- Mohamed Fatri for his suggestions and the Sys-RPL environment.
- Detlef Mueller f Raymond Hellstern for RPL.LIB.
- Maubert Electronic for their help and support.
In case of any problems, contact them : 49 bvd St Germain 75005
Paris ( FRANCE )
X- Other products for the HP48 (in the public domain).
-Font-Writer : A font editor compatible with String-Writer
(all versions)
-HP ASM : A Saturn assembler.
-TERMHP : VT100 Emulator.
-LABY : Generate 3D mazes.
-ZAPPER : An IR control And many more...
Coming soon on your HP48GX :
META-KERNEL : A 128ko applications card with :
-A Kernel
-A symbolic Saturn Assembler
-An Equation Writer
-A graphic environment
-A file manager
-A text editor wich can use many fonts, and text attributs
(bold,underline,italic,inverse)
I- Presentation et Description.
STRING-WRITER est un editeur de texte complet et rapide realise presque exclusivement en assembleur SATURN (5% de SYS.RPL,10% de DATA (graphiques, table de caracteres,message d'erreur etc...,85% de langage machine pour un total de 24ko.).
Ce programme est un shareware, si vous l'utilisez vous etes
prie d'envoyer 50FF a l'auteur.
Ce principe de diffusion est base uniquement sur la confiance.
Vous n'etes tenus a aucune obligation. Cependant, la mise au
point et l'elaboration de ce logiciel ont necessite enormement de
temps et de patience.
Historique :
String Writer 4.31 n'ajoute aucune inovation par rapport a la
version 4.3, c'est juste le code assembleur de la version 4.3
beaucoup plus rapide, et le noyau external de la version 4.4
La copie et la diffusion de ce logiciel sont fortement conseillees.
Pour toutes remarques,demandes de nouvelles fonctions etc..
vous pouvez m'ecrire :
Avenard Jean-Yves
16 rue de Savigny
91390 Morsang Sur ORGE
Ou en EMAIL a : avenar_j@epita.fr
II-Presentation generale :
String-Writer est une librairie elle apparait dans la pile sous la forme : "Library 1303 : STR..."
1-Installation
Pour pouvoir l'utiliser il faut la stocker dans un port.
-Mettez la librairie au niveau 1 de la pile.
-Faites DUP puis BYTES. Il doit ce trouver alors sur la pile :
Au niveau 2: # 23A3h
Au niveau 1: 24385.5
-Si ces valeurs sont exactes alors procedez a l'etape suivante.
Sinon ce programme a surement subie un dommage ou une
modification. Toute utilisation est alors a vos seuls risques.
-Faites alors 0,1 ou 2 STO selon que vous ayez ou non une carte
d'extension.
Puis appuyez sur la touche ON et sans relacher appuyez sur la
touche C.
La calculatrice effectue un arret systeme.
String Writer est installe et pret a fonctionner.
2-Premiere utilisation.
Allez dans le menu librairie. Appuyez sur la touche blanche se situant sous le nom STRW s'il n'apparait pas dans le menu appuyez sur la touche NXT autant que necessaire.
3-Les differents programmes.
Une fois dans ce menu apparait dans la barre divers noms.
-EDIT
-VISIT
-Edit
-Visit
-NEW
-Info
-PUTFONT
-SWINIT
-XMIT2
-SRECV2
-CUT
Voici la description de chacun des programmes.
-EDIT : Edite l'objet au niveau 1 de la pile.
-VISIT : Prend un 'GLOBAL NAME' puis edite le contenu de
la variable, ou un reel et edite le niveau correspondant de la
pile.
-Edit : Meme fonction que EDIT mais si l'objet est un
algebrique on l'edite avec l'Equation Writer.Si c'est une matrice
on l'edite avec Matrix Writer.Si c'est un graphique on l'edite
avec le menu GRAPH. Les STRINGS (chaines de caracteres) sont
editees directement sans ajout de "" . Je conseille
d'ailleurs de toujours utiliser Edit pour les strings car il faut
beaucoup moins de memoire qu'avec EDIT
-Visit : Comme VISIT mais cette fois ci de la meme facon
qu'avec Edit.
-NEW : Pour creer un nouvel objet
-Info : Donne le numero de votre version et une info sur
la librairie.
-RCLFONT: Ressort la fonte utilisee par STRING-WRITER.
-SWINIT : Passe en mode USER et attribue aux touches les
fonctions :
LS +/- : EDIT/VISIT
DOWN : Edit
LS DOWN : Visit
DEL : NEW
LASTARG : Place le contenu de la ligne de commande dans
STRING-WRITER v4.31.
XMIT2 : Equivalent a la commande XMIT mais permet des transferts jusqu'a 7500 bauds via l'infra-rouge et 15000 bauds via la prise serie (temps moyens calcules par rapport au temps mis par la fonction XMIT).
Elle prend en arguments au niveau 2 une chaine de caracteres
et au niveau 1, un reel correspondant a la vitesse d'emission.
Elle renvoie 1 si le transfert a reussie ou 0 si elle a ete
interrompue.
0: 1200 bauds
1: 1900 bauds
2: 2400 bauds
3: 3800 bauds
4: 4800 bauds
5: 7500 bauds (vitesse maximum via l'IR)
6: 9600 bauds
7: 15000bauds (vitesse maximum via laRS-232)
Voici quelques temps mis pour transferer un texte de 5000 caracteres avec la fonction XMIT2.
Vitesse : temps (en secondes).)
0 : 46.73
1 : 29.34
2 : 23.50 (vitesse de transfert via l'IR en utilisant la fonction
XMIT)
3 : 14.81
4 : 11.91
5 : 7.55
6 : 6.13 (vitesse de transfert maximum avec la fonction XMIT)
7 : 3.93 (vitesse de transfert maximum avec la fonction XMIT2)
-SRECV2: Fonction equivalente a SRECV mais permet elle aussi des transfert a une vitesse tres elevee. De plus elle permet de recevoir des textes de plus de 256 octets. Elle prends en arguments au niveau 2 le nombre maximum de caracteres a recevoir et au niveau 1 un reel representant la vitesse de transferts.
Elle renvoie au niveau 2 la chaine recue et au niveau 1 : 1 si la reception a reussi ou 0 si la reception a ete interrompue ou si des erreurs se sont produites.
-CUT : Formatte un texte sur 22 caracteres de large.
III-Presentation succinte des differentes commandes de STRING-WRITER.
Voici un resume des fonctions de STRING-WRITER:
En mode edition:
-Touches de direction :se deplacer dans le texte
-DEL :efface le caractere a droite du curseur
-<= :efface le caractere a gauche du curseur
-MTH :Affiche la liste de toutes les lignes precedees par
*. Pour voir tous les labels re-appuyer sur MTH autant de fois
que necessaire.
Pour ce rendre a un label,appuyer sur la touche numerique
correspondant au numero.
-PRG :Mode insertion/recouvrement. Action en flip/flap.
Fonction accessible par ALPHA Right-Shift ALPHA.
-CST :Tabulation.
-VAR :Mode rapide/lent ,influence le deplacement ainsi que
l'effacement de caracteres. Action en flip/flap.
-ENTER :Sauvegarde le texte en cours puis retour au RPL
-ON :Quitter STRING-WRITER v4.3 avec l'ancien texte
-NXT :Menu suivant
LEFT SHIFT ( LS ) +:
-MTH :Envoi la selection vers le port Infra-rouge ou
Serie.
-PRG :Affiche les fins de lignes.
-CST :Passage en mode edition en continu avec retour a la
ligne tous les 22 caracteres.
-VAR :puis un chiffre compris entre 0 et 9 : Place dans la
memoire correspondante la position courante.
-UP :PAGE-UP
-DOWN :PAGE-DOWN
-LEFT :PAGE-LEFT
-RIGHT :PAGE-RIGHT
-NXT :Menu precedent
- +/- :Affiche le menu EDIT ( <-SKIP,SKIP->,etc.. )
- 1 :Saisie un ;
RIGHT SHIFT ( RS ) +:
-MTH :Permet de configurer le port serie et les parametres
d'emission. Le temps saisie pour la pause entre chaque ligne
durant l'emission est en 1/16s.
-PRG :Passage en mode AUTO-INDENTATION.
-CST :Permet de modifier la valeur de la tabulation.
-VAR :puis un chiffre compris entre 0 et 9 : Place le
curseur a la position sauvegardee dans la memoire correspondante.
-UP :MAX-UP
-NXT :Enleve/Remet la barre des menus.
-DOWN :MAX-DOWN
-LEFT :MAX-LEFT
-RIGHT :MAX-RIGHT
-DEL :HP48g(x) : Efface tous les caracteres de la ligne
courante situes apres le curseur. HP48s(x) : Equivalent a la
fonction DEL L (voir plus bas)
- <= :Sur HP48g(x) uniquement : Efface les caracteres
compris entre le debut de la ligne et le curseur.
-ON :eteint la HP48.
LES TOUCHES DE MENUS:
Chaque touche se trouvant sous un nom de fonction (ex:ASCII) permet d'executer une des differentes commandes de STRING-WRITER
ASCII :Permet de saisir le code
d'un caractere sous la norme ASCII.Elle prend en argument
un entier compris entre 0 et 255
LS ASCII :Table de tous les caracteres ASCII de la
fonte.
GOTO :Permet de se rendre directement a une ligne
du texte
LS GOTO :Permet de se rendre directement a un
caractere:ex le 485eme
->BEG :Place le curseur sur le debut de la
selection.
->END :Place le curseur sur la fin de la
selection.
DEL L :Efface la ligne si elle contient des
caracteres sinon enleve le retour chariot.
LS DEL L :Efface tous les caracteres de la ligne
courante situe avant le curseur.
RS DEL L :Efface les caracteres compris entre le
curseur et la fin de la ligne.
INFOS :Affiche diverses informations sur le texte
edite et l'etat de la memoire. Maintenir la touche
appuyee pour voir l'info.
BEGIN :positionne
le marqueur de debut de selection
END :positonne le marqueur de fin de selection.
L'appuie de SL puis de BEGIN ou END place
le mot ou se trouve le curseur dans la selection.
CUT :Copie la selection dans la memoire
(CLIPBOARD),puis efface la selection du texte
COPY :Place la selection dans le CLIPBOARD
PASTE :Recopie le texte enregistre dans le
clipboard a la position courante du curseur.
DEL :efface la selection du texte
FIND
:Affichage d'un ecran demandant la chaine a trouver
dans le texte. Cette chaine est limitee a 21 caracteres
LS FIND :Place la selection dans le motif de
recherche puis FIND
REPL :Permet la saisie de l'argument de
recherche,ainsi que de l'argument de remplacement.
LS REPL :Meme fonction que LS FIND mais lance le
REPL.
RS REPL :Place la selection dans le motif de
remplacement puis REPL
NEXT :Rechercher l'occurence suivante de la chaine
saisie dans FIND (PATTERN).En cas de reussite,l'occurence
est placee dans la selection.
R :Remplace la selection par la chaine de
remplacement saisie avec REPL
LS R :Meme fonction mais en utilisant le
remplacement special (Cf chapitre concernant
l'utilisation du Find/Replace)
R/N :Remplace la selection puis recherche
l'occurence suivante (i.e R puis NEXT)
LS R/N :Equivalent a LS R puis NEXT.
ALL :remplace toutes les occurences du texte en
affichant les differentes operations.Un appui sur la
touche ON permet d'arreter le remplacement.
LS ALL :remplace toutes les occurences du texte
sans affichage.D'ou un remplacement plus rapide.Il est
impossible de stopper cette operation.
RS ALL :idem a precedemment mais en eteignant
l'ecran d'ou une acceleration d'environ 12% par rapport a
ci-dessus
NOTE QUAND A L'UTILISATION DES COMMANDES DE SAISIE D'ARGUMENT:
Lors de la saisie d'argument pour les commandes ASCII,GOTO,FIND
etc... un appuie sur la touche ON permet:
-Si aucun caractere n'a ete saisi le retour a l'edition
du texte
-Si des caracteres ont ete saisis,l'effacement de la
ligne d'entree. Les fonctions PRG,CST,VAR,MAX-LEFT,MAX-RIGHT
sont toujours actives. Les autres sont inoperantes.
-Dans le menu FIND et le menu REPLACE il
est possible d'appeller la commande ASCII,et la
visualisation de toute la fonte.
<-SKIP :Place le
curseur au debut du mot precedent.
LS <-SKIP:Execute <-SKIP et place le mot
ainsi trouve dans la selection.
SKIP-> :Place le curseur au debut du mot
suivant.
LS SKIP->:Execute SKIP-> et place le mot
dans la selection.
<-DEL :Efface les caracteres compris entre la
position du curseur et le debut du mot precedent.
RS <-DEL :Efface les caracteres depuis le debut
de la ligne courante jusqu'a la position du curseur.
DEL-> :Efface les caracteres compris entre la
position du curseur et le debut du mot suivant.
RS DEL-> :Efface les caractes compris entre la
position du curseur et la fin de la ligne courante.
DEL L :Efface la ligne si elle contient des
caracteres sinon enleve le retour chariot.
LS DEL L :Efface tous les caracteres de la ligne
courante
RS DEL L :Efface les caracteres compris entre la
position du curseur et la fin de la ligne.
INFOS :Affiche diverses informations sur le texte
edite et l'etat de la memoire. Maintenir la touche
appuyee pour voir l'info.
IV- Manipulation de la selection et mouvements de blocs.
Lors de l'utilisation des commandes BEGIN et END,le texte place entre les deux marqueurs apparait alors en inversion video,representant la selection. Attention BEGIN doit etre superieur a END. Vous pouvez alors comme sur tout traitement de texte de Micro-ordinateur faire du copier/coller.
V-Utilisation des commandes de recherche et de remplacement.
Pour rechercher une sequence de caracteres, allez dans le menu FIND,saisir le motif de recherche puis ENTER. Puis choisir le mode de recherche : Differencier les majuscules des minuscules ou non. Puis ENTER.
Un appuie sur la touche ON permet a tout moment de sortir du menu FIND ( ou REPL).
Si le motif de recherche est vide apparait alors le message d'erreur : "Nonexistent Pattern". Si aucune occurence n'est trouvee le message : Can't Find Pattern apparait. Sinon la selection est placee sur l'occurence trouvee.
En appuyant sur la touche NEXT, STRING WRITER recherche la prochaine occurence.
Remarque : Le code ASCII 0 est un meta-caractere; Il permet la recherche de tous caracteres.
Exemple rechercher T*TO (* est le caractere de code ascii 0) permet de trouver des mots comme TaTO,TATO,TZTO etc...
Apres avoir saisis tous les arguments necessaires dans le menu REPL, la selection est placee sur la premiere occurence trouvee.
-R remplace alors la selection par la chaine saisie
dans REPL.
-R/N remplace la selection puis recherche l'occurence
suivante (Replace/Next).
-ALL effectue un remplacement de toutes les occurences a
partir de la position du curseur.
1-Remplacement de la selection.
Il est possible de remplacer tout un segment de texte par une chaine. Pour cela en utilisant les commandes BEGIN et END ,placer la selection sur le texte a remplacer. Allez dans le menu REPL. Effacer la ligne de recherche (appuyez sur ON si elle n'est pas vide) puis ENTER.
Saisir la chaine de remplacement puis ENTER. Le message "Nonexistent Pattern" apparait.
Appuyez alors sur la commande R : La selection est remplacee.
2-Utilisation des macros dans le REPLACE.
Il est possible de faire de la manipulation de chaine
grace a la commande REPLACE.
Par exemple ajouter un espace tous les 5 caracteres,
chercher 5 caracteres quels qu'ils soient puis effectuer
une inversion sur ces caracteres.
Exemples.
a) Comment ajouter un espace tous les cinq caracteres.
-Allez dans le menu REPL
-Mettre 5 caracteres de code ascii 0 dans la ligne de
recherche.
-ENTER -Mettre 5 caracteres de code ascii 0 dans la ligne
de remplacement
-AJouter un ESPACE (touche SPC ou code ascii 32)
-ENTER La selection est placee sur les 5 caracteres apres
la position du curseur precedent.
-Pour remplacer uniquement ces 5 caracteres appuyez sur
LEFT SHIFT puis R
-Pour remplacer ces 5 caracteres puis rechercher les 5
suivants appuyer sur LEFT SHIFT puis R/N
-Pour remplacer tous les caracteres : Appuyez sur ALL. Le
message "Use Special Replace ?" apparait.
-Appuyez sur la touche Y : Tous les caracteres sont
remplaces.
b) Rechercher 5 caracteres puis les inverser ( ex: SALUT deviendra TULAS )
-Allez dans le menu REPL
-Mettre 5 caracteres de code ascii 0 dans la ligne de
recherche.
-ENTER -Mettre le code ascii 15,puis le code ascii
14,puis le code ascii 13 etc.. jusqu'a 11.
-ENTER -Pour remplacer uniquement ces 5 caracteres
appuyez sur LEFT SHIFT puis R.
-Pour remplacer ces 5 caracteres puis rechercher les 5
suivants appuyer sur LEFT SHIFT puis R/N.
-Pour remplacer tous les caracteres : Appuyez sur ALL. Le
message "Use Special Replace ?" apparait.
-Appuyez sur la touche Y : Tous les caracteres sont
remplaces.
Lorsque le REPLACE trouve dans la sequence de remplacement le code ascii 15, il va le remplacer par le cinquieme caractere de la selection. D'une maniere generale,pour mettre le n ieme caractere de la selection, on utilise le code ascii (10+n) Le caractere de code ascii 0 est utilise comme compteur. C'est a dire que le premier code ascii 0 represente le 1er caractere de la selection,le deuxieme code ascii 0 represente le deuxieme caractere de la selection etc...
Exemple: Comment rechercher 6 caracteres puis les
remplacer par: "Le 1er est x1,6 est x6" , ou x1
est le premier caractere et x6 est le sixieme.
Exemple : "COUCOU" sera remplace par "Le
1er est C,6 est U"
-Mettre 6 caracteres de code ascii 0 dans la ligne de
recherche.
-ENTER -Mettre : "Le 1er est" ,mettre le code
ascii 11 ou le code ascii 0.
-Mettre : ",6 est " , mettre le code ascii 16 (
pour le sixieme)
-ENTER
-Pour remplacer uniquement ces 6 caracteres appuyez sur
LEFT SHIFT puis R.
-Pour remplacer ces 6 caracteres puis rechercher les 6
suivants appuyer sur LEFT SHIFT puis R/N.
-Pour remplacer tous les caracteres : Appuyez sur ALL. Le
message "Use Special Replace ?" apparait.
-Appuyez sur la touche Y. : Tous les caracteres sont
remplaces.
VI-Note quand a l'utilisation du menu ASCII ou de la visualisation de la fonte.
Dans le menu ascii, apres avoir saisi le code ascii a inserer
dans le texte, appuyez sur la touche ENTER sans la relacher. Le
code ascii sera insere dans le texte plusieurs fois tant que la
touche ENTER n'aura pas ete relachee.
La vitesse de la repetition est fonction du mode RAPIDE ou LENT.
VII-Changement de fonte.
En utilisation normale, STRING-WRITER edite le texte en
utilisant la fonte situee en ROM et avec un ecran contenant 8
lignes de 22 caracteres (sans menu).
Il est possible de changer cette fonte et d'avoir a l'ecran
jusqu'a 10 lignes de 22 caracteres.
a) Changer la fonte.
Stocker la fonte que vous desirez utiliser sous le nom global
: 'FONT'.
En sachant que STRING-WRITER cherche l'objet 'FONT' en premier
lieu dans le repertoire courant puis remonte jusque dans le HOME
puis dans les ports 0,1 et 2.
Si 'FONT' n'est pas trouve alors on edite avec la fonte de la
ROM.
'FONT' peut aussi contenir le chemin a utiliser, place dans une liste :
ex : { HOME FONTE.DIR F7.0 } ou encore : { :0: { BACKUP FONTES.DIR F6.1 } }
Si 'FONT' contient une liste vide, alors String-Writer editera le texte avec la fonte presente en ROM.
'FONT' peut aussi etre un programme generant une fonte. (Par exemple pour utiliser une fonte compressee)
b) Augmenter le nombre de ligne en edition.
Une fonte se presente sous la forme d'un graphique GROB 6 *
2048 ou GROB 7 * 2048 ou GROB 8 * 2048.
Si 'FONT' contient :
-Un GROB 6 * 2048, alors STRING-WRITER editera le texte avec des
caracteres de bitmap 6*6 , ce qui permet d'avoir 10 lignes a
l'ecran.
-Un GROB 7 * 2048, alors STRING-WRITER editera le texte avec des
caracteres de bitmap 6*7 , ce qui permet d'avoir 9 lignes a
l'ecran.
-Un GROB 8 * 2048, alors STRING-WRITER editera le texte avec des
caracteres de bitmap 6*8 , ce qui permet d'avoir 8 lignes a
l'ecran.
VIII- Configurer STRING-WRITER
En standard STRING-WRITER lors du lancement edite avec la barre de menu ,en vitesse lente, en mode insertion.
Grace a la variable 'SWPAR' il est possible de changer ces parametres.
'SWPAR' contient un entier systere ( BINARY INTEGER ex: # 5h ).
Cet entier doit etre compris entre #0d et #15d ( decimal ) ou entre #0 et #F ( hexadecimal ).
Correspondance de SWPAR :
SWPAR | MENU | VITESSE | INSERTION | ALPHA |
# 0h | oui | lente | oui | non |
# 1h | non | lente | oui | non |
# 2h | oui | rapide | oui | non |
# 3h | non | rapide | oui | non |
# 4h | oui | lente | non | non |
# 5h | non | lente | non | non |
# 6h | oui | rapide | non | non |
# 7h | non | rapide | non | non |
# 8h | oui | lente | oui | oui |
# 9h | non | lente | oui | oui |
# Ah | oui | rapide | oui | oui |
# Bh | non | rapide | oui | oui |
# Ch | oui | lente | non | oui |
# Dh | non | lente | non | oui |
# Eh | oui | rapide | non | oui |
# Fh | non | rapide | non | oui |
IX-Pour aller plus loin.
Il est possible d'utiliser String-Writer d'une facon plus poussee, afin de l'integrer dans divers programmes ( Assembleur, Base de Donnees , Noyau , Utilitaires etc...). Il est par exemple possible de recreer le programme d'edition d'erreur de l'ASMFLASH : ER Ainsi , en cas d'erreur on ira directement a la position de l'erreur pour modifier le source. Pour cela, on utilisera le XLIB 1303 12.
Cet objet est le programme principal de String-Writer.
Il prend en argument :
3: GROB 6*2048 ( Une fonte )
2: "string"
1: # binary integer
Ou "string" est la chaine a editer et le Binary Integer est decompose comme suit : # aaaaabbbbbccccc0h
Ou :
aaaaa : Position en hexadecimal sur 5 quartets du debut de la
selection.
bbbbb : Position en hexadecimal de la fin de la selection.
ccccc : Position ou sera place le curseur au debut de l'edition.
Ex :
Si le Binary Integer est : # 000020003F000010h
Alors on editera le texte avec la selection allant du 2eme au
63eme caracteres.
Le curseur etant place sur le 1er caractere.
X-Remerciements.
Beta-testeurs :
Douglas R. Cannon,Christophe Nguyen,Francois-Xavier Leroy,
Stephane Doat,Christian Bourgeois,Mohamed Fatri,
Etienne de Foras,Cyrille de Brebisson.
Gerald Squelart, Regis Duschene,Marc Vogel.
Remerciements particuliers a :
- Christian Bourgeois pour son association dans STRING-WRITER 2.0
et sans qui cet editeur n'aurai jamais vu le jour.
- Douglas R. Cannon pour la traduction de cette documentation.
- Mohamed Fatri pour ses suggestions et l'environement Sys-RPL
- Marc Vogel pour son programme RCLFONT
- Detlef Muller & Raimond Hellstern pour leur RPL.LIB.
- Maubert Electronic pour leur soutien et aide :
49 bvd St Germain 75005 Paris ( FRANCE )
XI- Autres produits pour HP48 en domaine public.
-Font-Writer : Un editeur de fonte compatible String-Writer
(toutes versions)
-HP ASM : Assembleur Saturn.
-TERMHP : Emulateur VT100.
-LABY : Createur et Generateur de Labyrinthe 3D.
-ZAPPER : Une telecommande universelle.
Et bien d'autres choses encore....
A venir :
META-KERNEL:
Une carte de developpement de 128ko contenant :
-Un assembleur symbolique
-Un equation writer
-Un environnement graphique
-Un gestionnaire de fichiers
-Un traitement de texte multi-fontes,multi-attributs (gras,
italique,souligne,inverse)