Subject:  v07i013:  term2.bg - MLterminal Emulation v2.0, Part01/01
Date: Mon, 28 Sep 1992 21:32:08 GMT

Checksum: 3000427637 (verify with brik -cv)
Submitted-by: Bj\vrn Gahm <d89-bga@nada.kth.se>
Posting-number: Volume 7, Issue 13
Archive-name: term2.bg


BEGIN_DOC term2.doc
                      MLterminal emulation program
                               ver 2.0
                      (c) Bjorn Gahm, 1992-09-17

****************************************************************
Warning!!!! 
Even though this program works fine with my hp48-E I cannot be 
responsible for memory loss or even hadware damage on your HP48.
****************************************************************

New in this version is:
* It adjusts itself to the size of the PICTgrob. (You can now have a virtual
screen)
* The cursor is improved (it now inverts the char instead of overwrite it
and does not force a scroll when in the last position on screen).
* The cursor can be moved to any location on screen. (using 2 binaries)
* It is possible to write in reverse video.


The MLDISP uses the PICTgrob to write the text on.
It has a small font, you have 33x10 chars on the screen.
It uses XON/XOFF in order not to loose data, recieved at high speed.
I haven't got the XON/XOFF to work all the times (it seems to work sometimes but
sometimes not).
If anybody have a soloution to this problem please let me know.

To use just download the program in yous hp and go to the directory
and press CST and the NEW.
IF you want to use XON/XOFF then copy the IOPAR to the HOME dir.
(I think that is what you normaly want to do).

The program saves all its information on the PICT (the top 2 lines are used to
store data such as where on screen the next char will be written and which mode
(LF or LF/CR).
In this way you can quit the program and the go back to the program without 
loosing the text or settings.

In the CST menu have you following alternatives:

TERM  - starts the terminal
CLS   - clears the terminal window
NEW   - initiates a terminal window that is 10x33.
LF    - just recognize LF
LF/CR - recognize LF and CR

In the directory there are the following:

TERM   - main program
MLDISP - the ml display routine
FONT    - a grob that holds the font for MLDISP
NEWDISP - initiates a new display (needs two reals as input)
          2: real (# of columns, width)
          1: real (# of rows, height)
Pos     - Returns the position of the cursor
          2: binary x coordinate
          1: binary y coordinate
Cr      - set the mldisp to recognize CR as CR+LF
CRLF    - set the mldisp to recognize CR and LF separately (default)
Norm    - Text is written in normal video (default)
Inv     - Text is written in inverted video
CLS     - Clears the pict
CURON   - Turns on the cursor (default)
CUROFF  - Turns off the cursor
KEYMAP - for key definitions
IOPAR  - iopar to use XON/XOFF (copy it to the HOME dir)
CST    - the menu above

The ml routine (MLDISP) can be used to display other text.
It takes a string from the stack and displays it on the PICT,
or two binaries on level 1 & 2 to move the cursor to that position.

Eg.

1: "Hello"
MLDISP
Writes Hello to the PICTgrob (the PICTgrob must have been initiated
before you do this, 10 33 NEWDISP)

2: #8h         (x-coordinate)
1: #10h        (y-coordinate)
MLDISP
or in a program: \<< #8h #10h MLDISP \>>
moves the cursor to row 8 column 16.
Origo is upper left corner (#0h #0h).

If you use too large binaries then MLDISP will move the cursor to the last 
position on screen.

***********************
If you want to use MLDISP in other programs then put MLDISP and FONT in the HOME
directory.
***********************

If you type the string on the hp then switch the mldisp to recognize CR only.
Use Cr before you display the string.

It won't take other chars than is ascii 127, (it just displays other 
chars as a dot).

I have tried to make the key definitions as simple as possible.
If you look at your HP at the chars for left and right shift you'll
notice that the shifts correspond to the chars as much as possible.
So that you can use the prog a easy as possible.


The terminal uses the following keys:

a-z for a-z A-Z
toggle caps with left arrow
ctrl is the right arrow
control codes works for a-z
alpha is the ESC key

0-9 and / * - + are normal for small chars (not CAPS).

Otherwise they have the following definitions:
(a stands for the alpha key.)

   &       (   )
a  7   8   9   /

   $   %   [   ]
<- 4   5   6   *

   !   ?   <   >
-> 1   2   3   -

   =   ,   {   }   
ON 0   .  SPC  +

used with ctrl (right arrow):
a-z except for m generates the ctrl codes (m generates ' and 
enter always generates ^M (chr 13))

'
M

@               #
a   7   8   9   /

                _
<-  4   5   6   *

                "
->  1   2   3   -

        ;       :
ON  0   .  SPC  +


==============================================================
          Bj|rn Gahm        Email: d89-bga@nada.kth.se
                            Snail: Forskarbacken 10/315
                                   104 05 STOCKHOLM
==============================================================
END_DOC

BEGIN_ASC term2.asc
%%HP: T(1)A(R)F(.); @ tasc v2.52 file
"69A20FF70731000000303435453047A2084E2040455425D447A20C2A20B00003
4C435D9D20E1632C2A2070000C084E2060D4C44494350593632B2130B213047A
20C2A20B0000E45475D9D20E1632339201000000000000330339201000000000
00001084E2070E454754494350584E2040455425D493632B2130B213084E2020
342747A20C2A20F00003425F2C46484E20403425C464B2130B2130421005094F
40514255047A203392030000000000006904B2A29C2A29C2A23F2A23F2A2B213
06400060B45495D4140560C2A207420002020202020202020202162636465666
02020202768696A6B6C602020202D6E6F6071727020202023747576777870202
0202D097A702800202020202B1738393F2020202020202435363A20202020202
02132333D202020202020203E202B20202020202020202020214243444546402
020202748494A4B4C402020202D4E4F405152502020202354555657585020202
02A095A502F70202020202B162A282920202020202024252B5D5020202020202
12F3C3E3020202020202D3C2B7D7020202020202020202021020304050600202
0202708090A0B0C00202020272E0F00111210202020231415161718102020202
0291A10202020202020204E7E5C53202B302020202020202F5020202020202C7
020222020202020202B3B302A302020202C520070E454754494350570D9D20E1
632E4A20510006000000000000000EEDA1ED2A276BA1DBBF1E4A205100040000
00000000000EEDA1DBBF1614E1634E1DCC02C2A2070000C084E2060D4C444943
50593632B21306A00060345525F4646460D9D20E163247A20E4A205100030000
00000000000E4A20510000000000000000000B2130A13E14B2A266BC184E2060
D4C44494350593632B21304800050345525F4E450D9D20E163247A20E4A20510
003000000000000000E4A20510000000000000000000B2130443E14B2A266BC1
84E2060D4C44494350593632B2130280003034C43530D9D20E16323392010000
0000000021066BC184E2060D4C44494350593632B2130B40003094E66730D9D2
0E163247A20E4A20510004000000000000000E4A20510000000000000000000B
2130A13E193632B21301600040E4F627D640D9D20E163247A20E4A2051000400
0000000000000E4A20510000000000000000000B2130443E193632B213036000
403425C46440D9D20E163247A20E4A20510001000000000000000E4A20510000
000000000000000B2130443E193632B21303600020342720D9D20E163247A20E
4A20510001000000000000000E4A20510000000000000000000B2130A13E1936
32B2130F50003005F63730D9D20FEF30CC950FEF30CC950D8A81FDE8111920BB
000D9D20CCD20B40008FB97601B5650714213016916CAF014214713416914817
4147134169F4F41488D34150B2130B2130690004064F4E44540E1B20B8200A60
0081000000000222020550000272720262320542150227370440000422240122
2100525000272000002100070000000204421102555202322703421703424305
5744071343061757074211075757075743002020002021042124007070012421
0342020255160257550353530611160355530713170713110615560557550222
2204445205535501111705755503555507555703531107553703535506124307
2222055557055552055575055255055222074217062226011244032223025000
0000007420000006570117570007170447570007370627220007747117550202
2204044521153503222200077500035500075700075710075740071100062300
2726000557000552000577000525000574700326062326022222032623053000
0A5A5A5525750575570225750473170506570507570206570427370006600FFF
FFFC920060D4C44494350560D9D20D9D202BA812BF81D0040D9D2079E6084E20
4064F4E445B7970A2170D9D2079E60C2A20130004586560266F6E64702963702
E6F6470266F657E646E258B21B2130B2130D5040D9D20FDE8111920BB000D9D2
0B2130B2130B2130CCD204D7008FB976013313181AF027AD57D865A078076B30
75A595B9281AF19135818F2181AF0914FAE77360A5F95FBD73557900208D3415
081A3181F56507143818F09818F09131155717211BBB2BF614501D18B2B0EAE5
8BE9FDDDE0179A148381A51381A51C9D29181A514A5C81A50376137E7176C17F
227B7201762011381A51CAB28B25181A514A5C81A5037CD2013180967A07B626
0903190967A071326F7031B0967A079826E6031A096771776281A31080861606
E2031C0967A075636F3031D09670281A31080861607B22AE081A603681031E29
67E080822000630001808214A966A031066390808216B966A031166F70808215
A966A031266B60808214C966A031466750808216D966A031566340808215C966
A031666F20808219C966A031766B10808219A966A031366700318601AEB80821
029EA4002B6281A310808702180821F59EE60792F81AF1213196AD0175A6E96E
7F031B565071468082441000C2111D0810810A74C2113AF8114AB08B0E0114AF
8A5DA6DD0AE4C281A510BF4BF4BF4959C0A5DC295D8F136018082160AE8D0111
D081081015F015C0170136C2134A6D96D7E1108086441BF4BF4BF4E213474120
181A613B6481A60381A61C9E2F0AE081A60371300181A613A6C81A60381A61C9
E26E81A614A6C81A60373100181A513B5481A5030181A513A5C81A50381A51C9
E280AF0103011B56507142818F04130142818F8E119D2812812A76EA81A518BF
6BF6BF6EA3401000716CD81341F56507143818F09818F09119D2812812A76CA1
3181A518BF6BF6BF6CA1328A9D11567155717E17016E160CD8AD7E8A87115E01
5D0170160CC8ACDE81A510BF4BF4BF434010007BCBD8DAAF26B70D081AF031B5
6507142818F04130142818F8E119D2812812A76EA3401000718BD81341F56507
143818F09818F09119D2812812A76CA131132AF28A931155717E170CD8AD1F8A
80115D0170CC8AC4F018082160AE8D0111D081081015E0B8E15C0136C2134A6D
96D7E0181A31080873518085281A30071EC7CAF0181A31080862518084281A30
07FBC7A8F011B56507142130169AF0142818F813460000738ABF0BF0BF081A50
4164AF014234300000EF2819F0819F081A30496A40E48086040E4D681681681A
F19109BF0BF0BF0AD6A54A52A5681A508164152381A300162AF0142BF0BB4103
0113313113016414213014234C2A208A24002164AF2146818FA480824200008B
A606479819F2BF2BF2BF2AD716413281AF01133131130142818F09818F0981AF
020313313113014213014234E4A208A2400216914281A61C9E280ADEA5CD8133
13113016414213014234E4A208A24002169AF0142BF0BF0BF081A51C9D280ADE
A5CA60AF6AF7791EAFB81A60B81A50B74ED7A980385230B2130BA80040455425
D440D9D20E16325BE1247A20E4A20510000000000000000000E4A20510000000
000000000000B21300F2E14B2A23C032780228DBF159E128DBF184E2060D4C44
49435053CE22378A1AFE22D9D20D8732D9D2078BF13392010000000000001702
79E18A732D9D208DBF133920100000000000059090DA1F1AA1B21305DF2278BF
1339201000000000000180279E18A732D9D208DBF1339202000000000000910B
21305DF2292CF176BA184E2060B45495D41405DBBF178BF1C58C157E128DBF13
CE2278BF1339202000000000000910279E1AFE228DBF15DF22B21305DF22B213
05DF22DE0324B2A29B63293632B21308285"
@ BYTES: #5828h 2735.5
END_ASC

BYTES: #5828h 2735.5

BEGIN_UU term2.uue
begin 644 term2
M2%!(4#0X+466*O!_<!,````#0U-4`W0J@.0"!%1%4DUT*L"B`@L`,,0TU=D"
M'C;"H@('`,"`Y`(&34Q$25-0.3:R$@,K,4"G`BPJL```3D57G2W@82,S*1``
M```````S,),"`0````````%(+G#@5'1%E#0%A>0"!%1%4DTY-K(2`RLQ@.0"
M`D-R="K`H@(/`#`D]<)DA.0"!$-23$8K,;`2`R0!4)#T!!4D54"G`C,I,```
M`````)9`*RK)HI(L*O.B,B\J*S%@!``&2T5934%0!BPJ<"0`("`@("`@("`@
M(&%B8V1E9B`@("!G:&EJ:VP@("`@;6YO<'%R("`@('-T=79W>"`@("`->7H@
M""`@("`@&S<X.2\@("`@("`T-38J("`@("`@,3(S+2`@("`@(#`N("L@("`@
M("`@("`@04)#1$5&("`@($=(24I+3"`@("!-3D]045(@("`@4U155E=8("`@
M(`I96B!_("`@("`;)BHH*2`@("`@("0E6UT@("`@("`A/SP^("`@("`@/2Q[
M?2`@("`@("`@("`!`@,$!08@("`@!P@)"@L,("`@("<.#Q`1$B`@("`3%!46
M%Q@@("`@(!D:("`@("`@($!^7EPC(#L@("`@("`@7R`@("`@('P@("(@("`@
M("`[.R`Z("`@(%P"<.!4=$64-`5UT-D"'C;BI`(5`&``````````X-X:WJ)R
MMAJ]^^&D`A4`0`````````#@WAJ]^V%!'C;DT<P@+"IP```,2"Y@T,1$E#0%
ME6,C*S%@"@`&0U523T9&!ITMX&$C="K@I`(5`#``````````X*0"%0``````
M`````+`2`QKC02LJ9LN!Y`(&34Q$25-0.3:R$@.$`%`P5"7UY%30V0(>-D*G
M`DXJ4`$``P````````!.*E`!````````````*S%`-!ZTHF*V'$@N8-#$1)0T
M!95C(RLQ(`@``T-,4P.=+>!A(S,I$````````!)@MAQ(+F#0Q$24-`658R,K
M,;`$``-);G8#G2W@82-T*N"D`A4`0`````````#@I`(5````````````L!(#
M&N.18R,K,1`&``1.;W)M!)TMX&$C="K@I`(5`$``````````X*0"%0``````
M`````+`2`T3CD6,C*S$P!@`$0U),1@2=+>!A(W0JX*0"%0`0`````````."D
M`A4```````````"P$@-$XY%C(RLQ,`8``D-R`ITMX&$C="K@I`(5`!``````
M````X*0"%0```````````+`2`QKCD6,C*S'P!0`#4&]S`YTM\/X#S%GP_@/,
M6="H&-^.$9$"NP#0V0+,+;`$`/B;9Q!;5G!!$@-A&<;Z$"1!%T-A&81Q%'0Q
M%)9/3T&(/10%*S&P$@.6`$!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S%0_2*'^S&3`@$``````!`(<NF!>B.=+8"]'S,I
M(````````!FP$@/5+Y+"'V>K@>0"!DM%64U!4+W[<;@?7,A1YR'8^S'L(H?[
L,9,"`@``````D`%RZ:'O(MC[4?TB*S%0_2(K,5#](NTP0BLJN3:28R,K,0`K
`
end
sum -r/size 39704/3804 section (from "begin" to "end")
sum -r/size 13863/2744 entire input file
END_UU
-- 
          Bj|rn Gahm        Email: d89-bga@nada.kth.se
                            Snail: Forskarbacken 10/315
                                   104 05 STOCKHOLM

