�$-READ ME l«GRDEMO COM¯Ê÷GRDEMO Z80È‘ð–NEWTCAP Z80Y64#WYSE Z3T�|ôZL ZEX� ‚Ðÿ 23 January 1986 DEMONSTRATION of Z-SYSTEM GRAPHICS, WINDOWS, and PULL-DOWN MENUS Graphicó  anä  Windowó  arå  useä  bù  utilitù  anä   applicatioî � programmeró  tï  "dress-up¢  theiò screeî  displays¬  tï  producå � efficienô anä pleasinç useò interfaces. Demï  prograí (GRDEMO.COM© musô bå installeä witè Z3INÓ  anä � youò  SYS.ENÖ filå (Z3.ENÖ oò ZC.ENV¬  iæ auto-instalì  version)® � Alsï  thå Z3TCAÐ filå (WYSE.Z3Ô ió foò WYSÅ 5° anä 50« terminals© � musô  suiô  youò terminal»  modifù NEWTCAP.Z8° tï  youò  terminaì � sequencå  codes®  Assemble¬  loaä  tï á COÍ filå anä renamå  to¬ � e.g.¬  YOURTERM.Z3T®  Theî loaä aó systeí segmenô usinç LDR.COM® � (Yoõ  maù  wisè tï puô terminaì descriptioî iî youò SYS.ENÖ  filå � usinç Z3BASE.LI anä originaì SYSENV.LI anä SYSENV.ASÍ files¬ oò � overlaù SYS.ENÖ witè COÍ createä abovå usinç ZDÍ anä iNEWTCAP.COÍ � anä r8° aó debuggeò commands.) Afteò loadinç youò ne÷ terminaì capabilitù descriptoò anä � installinç GRDEMO.COM¬ typå GRDEMO‚ tï ruî thå demo® Terminaì � speedó  aó  lo÷  aó  9,60° bauä arå  acceptablå  foò  thå  windo÷ � routines»  aô 38,40° baud¬ graphics¬ windows¬ anä pull-dowî menuó � arå trulù impressive® Demï giveó aî ideá oæ somå thingó thaô caî � bå donå witè moderî terminaló anä Z-System. Neweò  terminaló  (posô  '82© thaô  returî  characteò  undeò � cursor¬  iî  additioî tï requireä cursoò addressing¬  arå memory-� efficienô usinç windows® Oldeò terminaló arå noô recommendeä foò � window-use¬ unlesó yoõ arå prepareä tï uså lotó oæ TPÁ (Transienô � Prograí Area)¬  writå youò owî routinå tï storå screens¬  anä uså � alternatå characteò seô insteaä oæ built-iî graphiã characters. GRXLIB¬  GRWLIB¬ anä PDWLI librarieó joiî SYSLIB¬ Z3LI anä � VLI tï aiä assemblù languagå programminç undeò Z-Systeí environ� ment®  Graphicó  anä Windo÷ librarieó iî  Microsofô  relocatiblå � REL-filå  form¬  witè  how-to-uså  documenation¬  ió  offereä  aô � $49.00¬  pluó $4.0° shippinç anä handlinç withiî continentaì USA® � Pleaså statå acceptablå disë formats» adä 7.0¥ taø iæ California® � Ordeò from: Echelon¬ Inc. 885 N. San Antonio Road Los Altos, CA 94022 USA Telephone: 415/948-3820 P.S®  Iæ  yoõ  loaî uó youò terminaì manual¬  wå wilì  creatå  aî � extendeä  Z3Ô filå foò youò terminaì anä releaså filå tï yoõ  anä � thå public® Oî thå otheò hand¬ iæ yoõ creatå á Z3Ô filå foò youò � terminal¬  pleaså senä iô tï uó oò uploaä iô tï ouò remotå accesó � systeí (RAS)¬ Z-Nodå Central¬ aô 415/489-9005® Thanë you. à Z3ENVþ* ÍO .Í@W *** Extended Z3TCAP not available *** ÉÍþTͨ=(>ÿ2´%!9"&=!¨=ùÍYT:´%·ÊØÍ;IGRAPHICSGRAPHIC PRIMATIVESGraphic CharactersLINE AND BAR DRAWINGVertical RoutinesHorizontal RoutinesADVANCED GRAPHICSBox RoutineGraph DemoÍ;IWINDOWSWINDOW HANDLINGIntroductionWindow DemoÍ;IPULL-DOWN-MENUSPULL DOWN MENU ROUTINESSETPDM RoutineSELPDM RoutineCLRPDM RoutineÍ;IDUMMY MENU 1SUBHEADER 1ITEM 1ITEM 2ITEM 3SUBHEADER 2ITEM 4ITEM 5Í%T GRXLIB, GRWLIB AND PDMLIB DEMO PROGRAM This program demonstrates the use of Graphic, Windowing and Pull Down Menu routines in the GRXLIB.REL, GRWLIB.REL and PDMLIB libraries. GRXLIB, GRWLIB and PDMLIB use the new Z-System extended Z3TCAP information to make them terminal independent. :´%·Â†Í%TSorry your Terminal does not support Windows or Pull Down MenusÃÍ2T Since your terminal has the needed capabilities for Pull Down Menus you will be able to select the demonstrations you want to see by using the pull down selections you see on the top line. If you look at the top line of your screen you will see a line of Pull Down Menu selections the left most selection is printed in hi-intensity. To move to the other selections use your left and right cursor keys or Control-S (move left), Control-D (move right). Once you reach the desired selection press Return and a Pull Down Menu will appear. You can escape from this menu by pressing the escape key or you can move to a desired menu selection with the up and down cursor keys or Control-R (move up), Control-C (move down). Press Return when at desired selection. ÃI Íâ$Í«%Í%T  PLEASE SELECT ONE OF THE FOLLOWING OPTIONS 1. Graphic Characters 2. Vertical Routines 3. Horizontal Routines 4. Box Routine 5. Graph Demo 6. Exit Demo Program̓$2µ%þ1Ê{þ2Êäþ3Êwþ4Ê¿þ5Êþ6Ê4$Ú:´%·Êͦ$Í>Ê4$|þÊl þÊ„ þÊ� ÃI }þÊ{þÊäþÊwþÊ¿Ã}þÊtã}þÊÊ þʪ Í«%Í%T  PDMLIB routine SELPDM is used to enter Pull Down Menu Mode. The first Pull Down Selection on the menu line at the top of the screen is printed in hi-intensity and user input to select a menu or move to another selection is awaited. The following code will now be used to enter Pull Down Menu Mode. The return from SELPDM either contains Zero Status, in which case user exited Pull Down Mode without making a selection or Non-Zero Status in which case the register pair (HL) contain the Menu number (H) and the Item number (L) selected. CALL SELPDM ; Enter Pull Down Menu Mode ... < Code to interrogate the return status and user selection >ÃI Í«%Í%T  PDMLIB routine CLRPDM is used to clear a Pull Down Menu. The following code will now be used to clear DUMMY MENU 1. LD A,4 ; Menu number in register (A) CALL CLRPDM ; Clear the menu Íâ$>ÍáHÃI Í«%Í%T  PDMLIB routine SETPDM is used to setup a Pull Down Menu. Up to 10 Pull Down Menus can be present at one time as long as the top of screen headers can all fit on the screen. The following code will now be used to setup a new menu. CALL SETPDM ; Setup the following menu DB 5,'DUMMY MENU 2',1 ; Menu Number, Header String DB 'SUBHEADER',2 ; Subheader String (optional) DB 'ITEM 1',3 ; Item String DB 'ITEM 2',3 ; " " DB 0 ; End of menu Íâ$Í;IDUMMY MENU 2SUBHEADERITEM 1ITEM 2ÃI Í«%Í%T  The following is a demonstration of GRXLIB graphics routines. The following routine will draw a horizontal line starting at row 17, column 10 The line will be 60 columns long and will be drawn from left to right. CALL DRHORZ DB 17,10,60,0 ; row,col,length,directionÍâ$Í«%Í%THorizontal line created by GRXLIB routine DRHORZͪR <Íâ$Í«%Í%T  Horizontal bars can also be created using the GRXLIB routine DRHBAR. The following are examples of the GRXLIB horizontal bar routine: CALL DRHBAR DB 1,16,10,60,0 ; type, row,col,length,left to right CALL DRHBAR DB 2,18,69,60,1 ; type, row,col,length,right to leftÍâ$Í«%Í%T Horizontal bars created by GRXLIB routine DRHBARÍ%TType 1Í‚R <Í%TType 2Í‚RE<ÃI Í«%Í%T  The following routine will draw a vertical line starting at row 16, column 38 The line will be 5 rows long and will be drawn from top to bottom. CALL DRVERT DB 16,38,5,0 ; row,col,length,directionÍâ$Í«%Í%T Vertical line created by GRXLIB routine DRVERTÍãQ&Íâ$Í«%Í%T  Vertical bars can also be created using the GRXLIB routine DRVBAR as follows: CALL DRVBAR DB 1,16,25,5,0 ; type,row,col,height,direction CALL DRVBAR DB 2,16,35,5,0 ; type,row,col,height,direction CALL DRVBAR DB 3,16,45,5,0 ; type,row,col,height,direction CALL DRVBAR DB 4,16,55,5,0 ; type,row,col,height,directionÍâ$Í«%Í%T Vertical bars created by GRXLIB routine DRVBARÍ%TType 1Í%T Type 2Í%T*Type 3Í%T4Type 4Í·QÍ·Q#Í·Q-Í·Q7ÃI Í«%Í%T  GRXLIB contains routines to draw individual graphics characters. The routines LTISEC (draw left intersect), RTISEC (draw right intersect), UISEC (draw upper intersect), LISEC (draw lower intersect), ISEC (draw intersection), DRFULL (draw full block), DRHASH (draw hashed block), and ULEFT, URIGHT, LRIGHT, LLEFT (corner drawing routines) are demonstrated.Íâ$Í«%Í%T Individual graphics characters supported by GRXLIBÍTÍ¥SÍT&ÍäSÍT:Í®SÍTÍÉSÍT&ÍíSÍT:ÍÒSÍTÍÀSÍT&ÍÛSÍT:Í·SÍTÍÿSÍT0ÍöSÃI Í«%Í%T  The following is an example of the GRXLIB DRBOX routine. this example will draw a box starting at row 16, column 10 The box will be 5 rows high and 20 columns wide. CALL DRBOX DB 16,10,5,20 ; row,col,height,widthÍâ$Í«%Í%T Box drawn with GRXLIB routine DRBOXÍ‚P ÃI Í«%Í%T  The next demonstration will show how by combining the GRXLIB routines DRBOX, and DRVBAR a bar graph chart can be created.Íâ$Í«%Í‚P <Í%T 100% - Í%T50% - Í%T0% _ Í%T1976Í%T1977Í%T"1978Í%T*1979Í%T21980Í%T:1981Í·QÍ·QÍ·QÍ·QÍ·Q"Í·Q$Í·Q*Í·Q,Í·Q2Í·Q4 Í·Q:Í·Q< ÃI Í«%Í%T  INTRODUCTION TO GRWLIB WINDOW ROUTINES GRWLIB contains routines to create and maintain up to 16 separate on screen windows. GRWLIB supports two types of windows, framed windows (those which are surrounded by a bold boarder) and standard windows (those which are surrounded by a thin line). Routines are provided to create (OPENW, OPENFW), clear (CLEARW), position cursor and print in (ATW, WXYMSG), interrogate (GETCUR, GETLEV), and close (CLOSEW), windows.ÃI Í«%Í%T  The following demonstrations will demonstrate the use of some of the routines in the GRWLIB window library. GRWLIB contains routines to create and maintain up to 16 separate windows the following routine will open window number 1 starting at row 2, column 33 The window will be framed 15 rows high and 42 columns wide. LD DE,SAVBUF ; Address of buffer to save current screen CALL OPENFW ; Open a framed window DB 1,2,33,15,42 ; window number,row,col,height,widthÍâ$¶%͸J!*>Í8LÍNTHIS IS A GRWLIB FRAMED WINDOWÍNData was printed in this window usingÍNcalls to GRWLIB routines CLEARW andÍNWXYMSG as follows:ÍNLD A,WINDOW ; Window # in (A)ÍN CALL CLEARW ; Clear the windowÍN CALL WXYMSG ; Send the messageÍN DB WINDOW,ROW,COLÍN DB 'MESSAGE',0Íâ$†-ͱJ  $>Í8LÍNTHIS IS A GRWLIB STANDARD WINDOWÍNThis window was created with theÍNGRWLIB routine OPENW.ÍNAs can be seen windows can beÍNoverlayed.Íâ$V5͸J 8>Í8LÍNTo insure that the original screen is properlyÍNrestored, windows should be closed in the reverseÍNorder from which they were opened. The GRXLIBÍNroutine CLOSEW is used as follows:ÍN LD A,WINDOW NUMBERÍN CALL CLOSEWÍ %>ÍÒKÍ>%>ÍÒKÍo%>ÍÒKÃI Í«%¯ÍáHÍ%T This concludes the GRXLIB/GRWLIB/PDMLIB demonstration. ÍT*&=ùÉÍ%T Enter your choice: Ã�%Í%T Select Pull Down Menu or Press to quit: ÉÍ%T Press any key to continue: Ã�%Í%T Press any key to close window 3: Ã�%Í%T Press any key to close window 2: Ã�%Í%T Press any key to close window 1: ÍìWõ> ÍýWÍ}TñÉÍT Í>SÉÍhJÉåÕ_*öO~»(.>»()*øO~»(&>»(!*úO~»(>»(*üO~»(>»(¯{Ãó=> >>>·ÑáÉÕ_:>»{ÑÉ2>ÉåÕÅÍ™S:>O¯2 A! J~þÿÊÂ>· ôå#~2;>2Ø>^#VáÕåÍTþ(ÍýWõÍìW¹(lþ Ê¥>ͬ=(ðþ(%þ(æá"A~þÿ(· ò*AåÎÑÍÔ>Ã$>áå J¯íR}· ¼ áå~·(ÌÃG>á¯íR~·(ÞÔáÑÕÍë>ÑÊ´>ÍÔ>ÕåÃG>áÑÍÔ>¯2 AÍŸSÁÑá: A·È* A>ÿ·ÉÍTÍ¥Tþ(ÍýWõÍÐTÉÅåÝåÕÝ!ã@#~25?2´@<2¼@##~27?Ö2½@#~26?:5?O:7?�þP8:7?O>O‘25?2´@<2¼@AͱJ>Í8LÍ™SÑÕþ úÕ!Î@¯w#íS A·(4þ(þ(ñy·(>w# >w#>w# Öw: AÝwÝ#:AÝwÝ## Áѯw!Î@#~þ Í¥TÍÐTy2—@Í“@·ÊÌ?þ( þ(ÍýWí # #~þ̤@Í!Î@#Ý!ã@~þ(#÷ÍÐTÝ^Ý#ÝVÝ+x2—@Í“@ÕÍš@ÑÍìWþ ÑÕ2Ay2 A>ÿ·Ãƒ@Åõ:>Oñ¹Á õ¯2 Añ^ͬ=(ÐþÊ\@þ(Å#~þ(þ õÍ¥TÍ“@Íš@Ý#Ý# Ãá?+~þÊú?ÃQ@+~þ(þ õÍ¥TÍ“@Íš@Ý+Ý+ Ãá?#~þÊú?Ãx@õ>ÍÒKÍ™SñÑÝááÁÉÍ NÉþÈÍýWöy<<2»@2³@ÍÐTÍTÍÉSͪRÍÒS #ÉRow TableåÕÅO! J~·( þÿ( ¹(y·( îy·(#¯*åůw#~2I#O~‘GÍT> ÍýWùÁáy·(Öy· 2gJ>ÿ·ÁÑáÉÍTÍ>SÉãÅÕDMÅå~õ! JO~¹(þÿ ÷! J~· ñw>%~þÿ(·(õñÁá#~· ûà Jñ" Awå+ý~áÆ2©I#wëáåOÅ#~þ( ÷yÁáþPÚ¥IÃJÍTÍ¥T#~þ(ÍýW íIÍÐTë#qëÕ#~þ( þ( ·( ð>ÿ2Jy¸8Aß:J·(¯2J{ÆOxÆÑë#w#qÁ#q#pë>ÿ2gJ·#ÑÁãÉ#~· ûÁí[ A¯íÿÍO·Èå*&P~· #~·(>ÿ2þM*$P~·(>ÿ2ÿM *(P~·(>ÿ2N*Õ"ãM"ëM"õMÑáÉã¯2ÏKã>ÿ2ÏKÅÕ~#þ0å2ËKÍKK~·ëíSÐK·á(#ý¯ÃGK:ÌK<2ÌK~#úÁÅåy2ÍKx2ÎK9K*ÐKåÅí°ÁáKí°>ÿ2üMÍžL¯2üMÍ™S!‚P:ÏK·(!RP"7KÍÍ™S:ËK>ÿ·áÑÁãÉÕ![K=(= üÑÉÅÕåþ8¯XoÍŠN(R}ÍKK~·(Jå#~2 L#~2 L#~2L#~2L#~2ÍK#~2ÎKÍžLáåN:ÌK=2ÌK¹8![K~¹8=w÷á¯w>ÿ·áÑÁÉõ>ÿ2ýMñÕå·(9þ8¯2oÍŠN(,}ÍKK~·($#~<2vL#~<2wL#~==2xL#~==2yLÍžL>ÿ·õ¯2ýM2üMñáÑÉíSÍKõ>ÿ2üMñÃ?LíSÍKÃ?LãÕÅ~2ÚL2MG#~2ÛL2MO#~W:M‚=2M#~_:Mƒ=2M#å:üM·ÄƒSÍ™Si`KÍTÕåí[ÍK:üM·(T:þM·(ÕÅ*Må*&P^#Vëí[ÍKéÁÑ7:ÿM· (ÍT*(PÍÐMÿÿÍàM x· ö± óáÑÜMÍèMä*$PÍÐMÍèM:ýM·(> ÍïMA:N·(3**P~õ#~gño:gJ·( ÍT½ ûÍT¼( ½(Í«MóáÑÜMÍ«MíSÍKáÑÂÜLY(x2ÚLÃ×L:üM·Ä‰SÍŸSáÁÑãÉå* P~õ*"P~gñoõ¥ ÍmSñ´ÍïMÍxSáÉñáÍïMÉ~·Èþ\ #~ÍïM#ñÉÕÅÍ·ÕÅÍ ÕÅåõOÍñáÁÑÉã>ÿ2NãÕ~·(]þÒlN_ÍŠNÊlN{#^#V#åÍKK~·ÊpN#~ƒ_#~‚WíS9NÍTá:N· >ÿ·"~·(þõÌ¥TñõþÌÐTñÍïM#è>ÿ·#õ¯2NñÑãÉ###åá:N·(ò~·(ç#ÃwN:ÌK·É:ËK·ÉåÕÅÍKKN:ÌK¹(Uõ#~G#~O#~Wx‚W#~_yƒ_![K>2ÐKñ2ÑKåáÕÅ:ÑKOÍóNÁÑÊìNå#~ºÒ·NÕW#~»ÒéN_#~‚¸ÒéN#~ƒ¹ÒéNÑá¯ÑË>ÿ·ÁÑáÉ~¹(Ð:ÐK=2ÐK ñÉåÕÅÍéVÍW"öO#"øO#"üO#"úO####ÍëOÍëOÍëOÍëOÍëOÍëOÍëO"þO#"P#"PÍëO"PÍëO"PÍëO"PÍëO" PÍëO" PÍëO"PÍëO"PÍëO"PÍëO"PÍëO"PÍëO"PÍëO"PÍëO"PÍëO"PÍëO" P#""P#"$PÍëO"&P##"(PÍëO"*P#",P#".P#"0PÍëO"2PÍëO"4PÍëO"6PÍëO"8P*P~·(>ÿ·ÁÑáÉ~#·Èþ\ ø#õãõ>ÿ2…Pñ6ãåÅÕõ!P:P í°*P"P" P"P" P"P"P>ÿ2QPñÑÁáãõ~2µP#~2¶P#~2PP#~#åÕÅ==_2©Q:PP==W2³Q:µPg:¶PoÍT:…P·(> ÍýW>ÿ2¢QÍmSå*PÍ]Sá|2§Q}<2¨Q¯2ªQÍ£Q:…P·(> ÍýWå*PÍ]Sá|<2±Q}<ƒ2²Q¯2´QÍ­Q|<‚2Q}<ƒ2QÍT:…P·(> ÍýWå* PÍ]Sá|<‚2§Q}<2¨QÍ£Q|<‚2LQ}2MQÍT:…P·(> ÍýWå* PÍ]Sá|‚2±Q}2²Q>2´QÍ­Q:…P·(¯2…PÍxS:QP·(!:PP í°¯2QPÁÑá¯2¢QñãÉåͪRáÉåÍãQáÉãõ~2=S#å*P":Pþ0*P"P*P"Pá ã>þ2…Pãõ~2!R#~2"R#~2âQ#~#åÕ_:âQW:!Rg:"Ro:…P· :¢Q· ÍmS{õ|2!R}2"RÍTå:…P·(> ÍýW:=S·( =(==(>ÿõ*PÍ]Sñ<(õáñ· $% ¾:=S·( *:P"P¯2=S:…P·(<( ¯2…P:¢Q· ÍxSÑáñãÉãõ~2=S#å*P":P*Pþ *P"Pá ãõ>þ2…Pãõ~2èR#~2éR#~2©R#~#åÕ_:©RW:èRg:éRo:…P· :¢Q· ÍmS{õ|2èR}2éRÍTõå:…P·(> ÍýW*PÍ]Sáñ· ,- Î Ú:=S·( *:P"P¯2=S:…P·(<( ¯2…P:¢Q· ÍxSÑáñãÉåÅ*.PF*0P~·(Í]Sx·(ÍüVû>ÿ·ÁáÉ~·Èþ\ #~ÍýW#ñÉåÅ*þOF*PÏåÅ*PF*PÄå*2På*4P~·(Í]S>ÿ·áÉå*6Pîå*8PèÍmSå*PXÍmSå*POÍmSå* PFÍmSå* P=ÍmSå*P4ÍmSå*P+ÍmSå*P"ÍmSå*PÍmSå*PÍmSå*PÍmSå*P~·(Í]S>ÿ·õÍxSñáÉãÕV#^#ëÍ+UëÑãÉãÕV#^#ëÍ+UëÑããõ~#·ÊVTþÊJTþÊPTÍýWÃ4TÍ¥TÃ4TÍÐTÃ4TñãÉåÕ*úV~þ!ÚyTV###~·ÊyTÍŽVÑá¯=ÉÑá¯ÉåÕ*úV~þ!Ú¡TV#ÍÜVÍÜV~·Ê¡TÍŽVÑá¯=ÉÑá¯ÉåÕ*úV~þ!ÚÌTÍÜVÍÜVÍÜV~·ÊÌTÍŽVÑá¯=ÉÑá¯ÉåÕ*úV~þ!ÚúTÍÜVÍÜVÍÜVÍÜV~·ÊúTÍŽVÑá¯=ÉÑá¯ÉåÕõ*úV~þ!Ú'UÍÜVÍÜVÍÜVÍÜVÍÜV~·Ê'UÍŽVñÑáÉÅÕå*úV~þ!Ú[U~2�V##ÍÜV~·Ê[UëáåÍ`U:�VÍ¥VáÑÁ¯=ÉáÑÁ¯É%-¯2‹V2ŒV·Èþ%Ê…Uþ\Ê}UÍýWÃiUÍýWÃiUþdÊ$VþDÊ$Vþ2ÊVþ3ÊVþ.ÊüUþ+ÊçUþ>ÊÔUþrÊÌUþRÊÌUþiÊÄUþIÊÄUÍýWÃiU>2ŒVÃiU>2‹VÃiUÍ5VO¹ÒãU�ÍSVÃiUGÍ5V€ÍýW:‹Vö€2‹VÃiUÍ5VÍýWÃñUÍ5VdÍlV ÍlVÆ0ÍýWÃñUÍ5VÃVÍ5VdÍlV ÃV:‹V·úKVæÊFV:ŒV…É:ŒV„ÉæÊAVÃFVO:‹V·údVæÊbViÉaÉæÊ`VÃbVÕ0�ÚwVÃoV€õzþ0„Vy·ÊˆVzÍýWñÑÉ~·Ê¡V#þ\›V~#ÍýWÃŽVzÃ¥VõÅÕåO·ÊÆV*>W+~·Â¼V>GÅÍËVÁ ½VáÑÁñÉÍÓVÂËVÉãã ÂÕVÉ~#·Èþ\ÂÜV#ÃÜVå">W€"úVáÉ"úVÉõÕÅÍ,WÂW>Gãã WÂWÁÑñÉÕ*>W€Ñ~þ!Ú*W¯=ɯÉåÕ*>W+~Ñá·É">WÉãÍFWãÉÕÅõ~#·ÊšWþ Ê„W Í«Wþ ÊqWþ ÊvWþÊvWþÊzWÃKWÃKW ÃKWy·ÊKW ÃKWyæG>�G�O> ÍýWÂ�WÃKWñÁÑÉõ> ÍýW> ÍýWñÉþ ÒýWþÊýWþÊýWþÊýWþ ÊýWþ ÊýWõõ>^ÍýWñÆ@ÍýWñÉÅÕå*.åWÕé/æáÑÁÉÅÕå*. ùWÕéáÑÁÉõÅÕåO*.  XÕéáÑÁñÉ*­€?€¬ªšw³o°1‡CÀ ‡€ÄlÚ4áà`8*¢à,Ú~[²¨x6ûŸÀ–UyÙUä#aÖPmaРÊÝ•B€¶è‡`ÀÀÑØ#TdnÄ©À;program grdemo ;version 1.0 ;author dennis l. wright ;echelon, inc. ;date 1-23-86 ; ;assembly and link with ei zas and zlink using ; syslib, z3lib, vlib, grxlib, grwlib, and pdmlib rel libraries ; z3env equ 0fe00h ; CR EQU 0DH LF EQU 0AH DIM EQU 1 BRT EQU 2 ; ; ; external routines used by demo program ; EXT TINIT,GXYMSG,CLS,EREOL,CRLF,CIN,COUT,AT,VPRINT,PRINT EXT DRBOX,ATW,WXYMSG,DRHBAR,DRVBAR EXT DRVERT,DRHORZ,GRXINIT,OPENW,CLOSEW,CLREOS EXT LTISEC,RTISEC,UISEC,LISEC,ISEC,DRFULL,DRHASH EXT ULEFT,URIGHT,LRIGHT,LLEFT,CLEARW,OPENFW EXT PDMINIT,SETPDM,SELPDM,CLRPDM ; ; program to test graphics and window lib functions ; JP START DB 'Z3ENV' DB 1 Z3EADR: DW Z3ENV ; START: LD HL,(Z3EADR) CALL GRXINIT ; Initialize the graphic and Z3 environment JR NZ,START1 CALL PRINT DB CR,LF,'*** Extended Z3TCAP not available ***',CR,LF,0 RET START1: CALL TINIT ; Initialize users terminal CALL PDMINIT JR Z,START2 LD A,-1 ; Pull Down Menus and Windows are supported LD (PDMFLG),A ; Set Pull Down Menu Window flag START2: LD HL,0 ADD HL,SP LD (OLDSTK),HL LD HL,STACK LD SP,HL CALL CLS LD A,(PDMFLG) OR A ; Pull Down Menus supported? JP Z,LOGON CALL SETPDM ; Yes setup GRXLIB pull down menu DB 1,'GRAPHICS',1 DB 'GRAPHIC PRIMATIVES',2 DB 'Graphic Characters',3 DB 'LINE AND BAR DRAWING',2 DB 'Vertical Routines',3 DB 'Horizontal Routines',3 DB 'ADVANCED GRAPHICS',2 DB 'Box Routine',3 DB 'Graph Demo',3 DB 0 CALL SETPDM ; Setup GRWLIB pull down menu DB 2,'WINDOWS',1 DB 'WINDOW HANDLING',2 DB 'Introduction',3 DB 'Window Demo',3 DB 0 CALL SETPDM ; Setup PDMLIB pull down menu DB 3,'PULL-DOWN-MENUS',1 DB 'PULL DOWN MENU ROUTINES',2 DB 'SETPDM Routine',3 DB 'SELPDM Routine',3 DB 'CLRPDM Routine',3 DB 0 CALL SETPDM ; Setup a dummy pull down menu DB 4,'DUMMY MENU 1',1 DB 'SUBHEADER 1',2 DB 'ITEM 1',3 DB 'ITEM 2',3 DB 'ITEM 3',3 DB 'SUBHEADER 2',2 DB 'ITEM 4',3 DB 'ITEM 5',3 DB 0 LOGON: CALL GXYMSG DB 3,1 DB ' GRXLIB, GRWLIB AND PDMLIB DEMO' DB ' PROGRAM',CR,LF DB CR,LF DB ' This program demonstrates the use of Graphic,' DB ' Windowing and Pull ',CR,LF DB ' Down Menu routines in the GRXLIB.REL,' DB ' GRWLIB.REL and PDMLIB ',CR,LF DB ' libraries. GRXLIB, GRWLIB and PDMLIB use' DB ' the new Z-System extended ',CR,LF DB ' Z3TCAP information to make them terminal' DB ' independent. ',CR,LF,LF,0 LD A,(PDMFLG) OR A JP NZ,PDMOK CALL GXYMSG DB 17,7 DB 'Sorry your Terminal does not support Windows' DB ' or Pull Down Menus',0 JP MENU ; Can't use pull down menus ; PDMOK: CALL VPRINT DB ' Since your terminal has the needed' DB ' capabilities for Pull Down ',CR,LF DB ' Menus you will be able to select the demonstrations' DB ' you want to ',CR,LF DB ' see by using the pull down selections you' DB ' see on the top line.',CR,LF DB CR,LF DB ' If you look at the top line of your' DB ' screen you will see a ',CR,LF DB ' line of Pull Down Menu selections the' DB ' left most selection is ',CR,LF DB ' printed in hi-intensity. To move to the' DB ' other selections use your ',CR,LF DB ' left and right cursor keys or Control-S' DB ' (move left), Control-D ',CR,LF DB ' (move right). Once you reach the desired' DB ' selection press Return ',CR,LF DB ' and a Pull Down Menu will appear. You can' DB ' escape from this menu by ',CR,LF DB ' pressing the escape key or you can move' DB ' to a desired menu ',CR,LF DB ' selection with the up and down cursor keys' DB ' or Control-R (move up), ',CR,LF DB ' Control-C (move down). Press Return when' DB ' at desired selection. ',0 JP PDMENU ; MENU: CALL WAIT CALL CLR9 CALL GXYMSG ; Display a conventional menu DB 12,1 DB ' PLEASE SELECT ONE OF THE FOLLOWING' DB ' OPTIONS',CR,LF DB CR,LF DB ' 1. Graphic Characters',CR,LF DB ' 2. Vertical Routines',CR,LF DB ' 3. Horizontal Routines',CR,LF DB ' 4. Box Routine',CR,LF DB ' 5. Graph Demo',CR,LF DB ' 6. Exit Demo Program',0 MENU1: CALL CHOICE MENU2: LD (OPT),A CP '1' JP Z,GCHAR CP '2' JP Z,DRV CP '3' JP Z,GRAPHIC CP '4' JP Z,DRBX CP '5' JP Z,GRAF CP '6' JP Z,DONE JR MENU1 ; PDMENU: LD A,(PDMFLG) OR A ; Pull down menus available? JP Z,MENU CALL PDMC CALL SELPDM ; Enter Pull down Menu mode JP Z,DONE ; Done if no selection made LD A,H ; Else get menu number from (H) reg CP 1 ; Menu 1? JP Z,DEMO2 CP 2 ; Menu 2? JP Z,DEMO3 CP 3 ; Menu 3? JP Z,DEMO4 JP PDMENU ; DEMO2: LD A,L CP 1 ; Menu item 1? JP Z,GCHAR CP 2 JP Z,DRV CP 3 JP Z,GRAPHIC CP 4 JP Z,DRBX JP GRAF ; DEMO3 LD A,L CP 1 JP Z,WINDOW1 JP WINDOW2 ; DEMO4: LD A,L CP 1 JP Z,SETDMO CP 3 JP Z,CLRDMO CALL CLR9 CALL GXYMSG DB 10,1 DB ' PDMLIB routine SELPDM is used to enter Pull' DB ' Down Menu Mode. The ',CR,LF DB ' first Pull Down Selection on the menu' DB ' line at the top of the ',CR,LF DB ' screen is printed in hi-intensity and user' DB ' input to select a menu ',CR,LF DB ' or move to another selection is awaited.' DB ' The following code will ',CR,LF DB ' now be used to enter Pull Down Menu Mode.' DB ' The return from SELPDM ',CR,LF DB ' either contains Zero Status, in which case' DB ' user exited Pull Down ',CR,LF DB ' Mode without making a selection or Non-Zero' DB ' Status in which case ',CR,LF DB ' the register pair (HL) contain the Menu' DB ' number (H) and the Item ',CR,LF DB ' number (L) selected.',CR,LF DB CR,LF DB ' CALL SELPDM ; Enter' DB ' Pull Down Menu Mode',CR,LF DB ' ...',CR,LF DB ' < Code to interrogate the return status' DB ' and user selection >',0 JP PDMENU ; CLRDMO: CALL CLR9 CALL GXYMSG DB 12,1 DB ' PDMLIB routine CLRPDM is used to clear' DB ' a Pull Down Menu. The ',CR,LF DB ' following code will now be used to clear' DB ' DUMMY MENU 1.',CR,LF DB CR,LF DB CR,LF DB ' LD A,4 ; Menu' DB ' number in register (A)',CR,LF DB ' CALL CLRPDM ; Clear' DB ' the menu',CR,LF DB 0 CALL WAIT LD A,4 CALL CLRPDM JP PDMENU ; SETDMO: CALL CLR9 CALL GXYMSG DB 10,1 DB ' PDMLIB routine SETPDM is used to setup a' DB ' Pull Down Menu. Up to 10 ',CR,LF DB ' Pull Down Menus can be present at one time' DB ' as long as the top of ',CR,LF DB ' screen headers can all fit on the screen.' DB ' The following code will ',CR,LF DB ' now be used to setup a new menu.',CR,LF DB CR,LF DB ' CALL SETPDM ; Setup the' DB ' following menu',CR,LF DB ' DB 5,''DUMMY MENU 2'',1 ' DB '; Menu Number, Header String',cr,lf DB ' DB ''SUBHEADER'',2 ' DB '; Subheader String (optional)',cr,lf DB ' DB ''ITEM 1'',3 ; Item String',cr,lf DB ' DB ''ITEM 2'',3 ; " "',cr,lf DB ' DB 0 ; End of menu',cr,lf DB 0 CALL WAIT CALL SETPDM DB 5,'DUMMY MENU 2',1 DB 'SUBHEADER',2 DB 'ITEM 1',3 DB 'ITEM 2',3 DB 0 JP PDMENU ; GRAPHIC:CALL CLR9 CALL GXYMSG DB 12,1 DB ' The following is a demonstration of GRXLIB' DB ' graphics routines. The ',CR,LF DB ' following routine will draw a horizontal' DB ' line starting at row 17, ',CR,LF DB ' column 10 The line will be 60 columns long' DB ' and will be drawn from ',CR,LF DB ' left to right. ',CR,LF DB CR,LF DB ' CALL DRHORZ',CR,LF DB ' DB 17,10,60,0 ; row,col,length,direction',0 CALL WAIT CALL CLR9 CALL GXYMSG DB 14,16 DB 'Horizontal line created by GRXLIB routine DRHORZ',0 CALL DRHORZ DB 17,10,60,0 ; Row 22, Col 10, 60 columns long, rt to lt CALL WAIT DRHB: CALL CLR9 CALL GXYMSG DB 12,1 DB ' Horizontal bars can also be created using' DB ' the GRXLIB routine ',CR,LF DB ' DRHBAR. The following are examples of' DB ' the GRXLIB horizontal bar ',CR,LF DB ' routine:',CR,LF,LF DB ' CALL DRHBAR',CR,LF DB ' DB 1,16,10,60,0 ' DB '; type, row,col,length,left to right',cr,lf DB ' CALL DRHBAR',CR,LF DB ' DB 2,18,69,60,1 ' DB '; type, row,col,length,right to left',0 CALL WAIT CALL CLR9 CALL GXYMSG DB 13,16 DB 'Horizontal bars created by GRXLIB routine DRHBAR',0 CALL GXYMSG DB 16,2 DB 'Type 1',0 CALL DRHBAR ; Draw dark horizontal bar DB 1,16,10,60,0 ; Row 16, Col 10, 60 columns long, lt to rt CALL GXYMSG DB 18,2 DB 'Type 2',0 CALL DRHBAR ; Draw light horizontal bar DB 2,18,69,60,1 ; Row 18, Col 69, 60 columns long, rt to lt JP PDMENU ; DRV: CALL CLR9 CALL GXYMSG DB 12,1 DB ' The following routine will draw a vertical' DB ' line starting at row ',CR,LF DB ' 16, column 38 The line will be 5 rows long' DB ' and will be drawn from ',CR,LF DB ' top to bottom.',CR,LF DB CR,LF DB ' CALL DRVERT',CR,LF DB ' DB 16,38,5,0 ; row,col,length,direction',0 CALL WAIT CALL CLR9 CALL GXYMSG DB 13,17 DB 'Vertical line created by GRXLIB routine DRVERT',0 CALL DRVERT ; Draw vertical line DB 16,38,5,0 ; Row 16, Col 40, 5 rows deep, Top down CALL WAIT DRVB: CALL CLR9 CALL GXYMSG DB 12,1 DB ' Vertical bars can also be created using' DB ' the GRXLIB routine ',CR,LF DB ' DRVBAR as follows:',CR,LF,LF DB ' CALL DRVBAR',CR,LF DB ' DB 1,16,25,5,0' DB ' ; type,row,col,height,direction',cr,lf DB ' CALL DRVBAR',CR,LF DB ' DB 2,16,35,5,0' DB ' ; type,row,col,height,direction',cr,lf DB ' CALL DRVBAR',CR,LF DB ' DB 3,16,45,5,0' DB ' ; type,row,col,height,direction',cr,lf DB ' CALL DRVBAR',CR,LF DB ' DB 4,16,55,5,0' DB ' ; type,row,col,height,direction',0 CALL WAIT CALL CLR9 CALL GXYMSG DB 12,17 DB 'Vertical bars created by GRXLIB routine DRVBAR',0 CALL GXYMSG DB 14,22 DB 'Type 1',0 CALL GXYMSG DB 14,32 DB 'Type 2',0 CALL GXYMSG DB 14,42 DB 'Type 3',0 CALL GXYMSG DB 14,52 DB 'Type 4',0 CALL DRVBAR DB 1,16,25,5,0 CALL DRVBAR DB 2,16,35,5,0 CALL DRVBAR DB 3,16,45,5,0 CALL DRVBAR DB 4,16,55,5,0 JP PDMENU ; GCHAR: CALL CLR9 CALL GXYMSG DB 12,1 DB ' GRXLIB contains routines to draw individual' DB ' graphics characters. ',CR,LF DB ' The routines LTISEC (draw left intersect),' DB ' RTISEC (draw right ',CR,LF DB ' intersect), UISEC (draw upper intersect),' DB ' LISEC (draw lower ',CR,LF DB ' intersect), ISEC (draw intersection), DRFULL' DB ' (draw full block), ',CR,LF DB ' DRHASH (draw hashed block), and ULEFT,' DB ' URIGHT, LRIGHT, LLEFT ',CR,LF DB ' (corner drawing routines) are demonstrated.',0 CALL WAIT CALL CLR9 CALL GXYMSG DB 13,13 DB 'Individual graphics characters supported by GRXLIB',0 CALL AT DB 16,18 CALL ULEFT ; Draw upper left corner CALL AT DB 16,38 CALL UISEC ; Draw upper intersect CALL AT DB 16,58 CALL URIGHT ; Draw upper right corner CALL AT DB 18,18 CALL LTISEC ; Draw left intersect CALL AT DB 18,38 CALL ISEC ; Draw intersection CALL AT DB 18,58 CALL RTISEC ; Draw right intersect CALL AT DB 20,18 CALL LLEFT ; Draw lower left corner CALL AT DB 20,38 CALL LISEC ; Draw lower intersect CALL AT DB 20,58 CALL LRIGHT ; Draw lower right corner CALL AT DB 18,28 CALL DRFULL ; Draw full block CALL AT DB 18,48 CALL DRHASH ; Draw hashed block JP PDMENU ; DRBX: CALL CLR9 CALL GXYMSG DB 12,1 DB ' The following is an example of the GRXLIB' DB ' DRBOX routine. this ',CR,LF DB ' example will draw a box starting at row' DB ' 16, column 10 The box ',CR,LF DB ' will be 5 rows high and 20 columns wide.',CR,LF DB CR,LF DB ' CALL DRBOX',CR,LF DB ' DB 16,10,5,20 ; row,col,height,width',0 CALL WAIT CALL CLR9 CALL GXYMSG DB 13,3 DB 'Box drawn with GRXLIB routine DRBOX',0 CALL DRBOX ; Draw a box DB 16,10,5,20 ; Row 16, col 10, 5 X 20 JP PDMENU ; GRAF: CALL CLR9 CALL GXYMSG DB 12,1 DB ' The next demonstration will show how by' DB ' combining the GRXLIB ',CR,LF DB ' routines DRBOX, and DRVBAR a bar graph' DB ' chart can be created.',0 CALL WAIT CALL CLR9 CALL DRBOX ; Draw a box DB 11,10,11,60 ; Row 12, col 10, 11 X 60 CALL GXYMSG DB 12,3 ; Vertical descriptors DB '100% - ',0 CALL GXYMSG DB 16,4 DB '50% - ',0 CALL GXYMSG DB 20,5 DB '0% _ ',0 CALL GXYMSG DB 22,18 ; Horizontal descriptors DB '1976',0 CALL GXYMSG DB 22,26 DB '1977',0 CALL GXYMSG DB 22,34 DB '1978',0 CALL GXYMSG DB 22,42 DB '1979',0 CALL GXYMSG DB 22,50 DB '1980',0 CALL GXYMSG DB 22,58 DB '1981',0 CALL DRVBAR ; Draw dark vertical bar DB 2,20,18,5,1 ; Row 19, col 18, 5 rows deep, bottom up CALL DRVBAR ; Draw light vertical bar DB 4,20,20,3,1 ; Row 19, col 20, 3 rows deep, bottom up CALL DRVBAR ; Draw dark vertical bar DB 2,20,26,6,1 ; Row 19, col 26, 6 rows deep, bottom up CALL DRVBAR ; Draw light vertical bar DB 4,20,28,4,1 ; Row 19, col 28, 4 rows deep, bottom up CALL DRVBAR DB 2,20,34,7,1 CALL DRVBAR DB 4,20,36,6,1 CALL DRVBAR DB 2,20,42,8,1 CALL DRVBAR DB 4,20,44,8,1 CALL DRVBAR DB 2,20,50,8,1 CALL DRVBAR DB 4,20,52,9,1 CALL DRVBAR DB 2,20,58,7,1 CALL DRVBAR DB 4,20,60,9,1 JP PDMENU ; WINDOW1:CALL CLR9 CALL GXYMSG DB 12,1 DB ' INTRODUCTION TO GRWLIB WINDOW' DB ' ROUTINES',CR,LF DB CR,LF DB ' GRWLIB contains routines to create and maintain' DB ' up to 16 separate ',CR,LF DB ' on screen windows. GRWLIB supports two types' DB ' of windows, framed ',CR,LF DB ' windows (those which are surrounded by' DB ' a bold boarder) and ',CR,LF DB ' standard windows (those which are surrounded' DB ' by a thin line). ',CR,LF DB ' Routines are provided to create (OPENW, ' DB ' OPENFW), clear (CLEARW), ',CR,LF DB ' position cursor and print in (ATW, WXYMSG),' DB ' interrogate (GETCUR, ',CR,LF DB ' GETLEV), and close (CLOSEW), windows.',0 JP PDMENU ; WINDOW2:CALL CLR9 CALL GXYMSG DB 12,1 DB ' The following demonstrations will demonstrate' DB ' the use of some of ',CR,LF DB ' the routines in the GRWLIB window library.' DB ' GRWLIB contains ',CR,LF DB ' routines to create and maintain up to 16' DB ' separate windows the ',CR,LF DB ' following routine will open window number' DB ' 1 starting at row 2, ',CR,LF DB ' column 33 The window will be framed 15' DB ' rows high and 42 columns ',CR,LF DB ' wide.',CR,LF DB CR,LF DB ' LD DE,SAVBUF ; Address of buffer' DB ' to save current screen',CR,LF DB ' CALL OPENFW ; Open a framed window',cr,lf DB ' DB 1,2,33,15,42 ' DB '; window number,row,col,height,width',0 CALL WAIT LD DE,SBUFF1 CALL OPENFW DB 1,2,33,15,42 LD A,1 CALL CLEARW CALL WXYMSG DB 1,2,5 DB 'THIS IS A GRWLIB FRAMED WINDOW',0 CALL WXYMSG DB 1,4,2 DB 'Data was printed in this window using',0 CALL WXYMSG DB 1,5,2 DB 'calls to GRWLIB routines CLEARW and',0 CALL WXYMSG DB 1,6,2 DB 'WXYMSG as follows:',0 CALL WXYMSG DB 1,8,4 DB 'LD A,WINDOW ; Window # in (A)',0 CALL WXYMSG DB 1,9,4 DB 'CALL CLEARW ; Clear the window',0 CALL WXYMSG DB 1,10,4 DB 'CALL WXYMSG ; Send the message',0 CALL WXYMSG DB 1,11,4 DB 'DB WINDOW,ROW,COL',0 CALL WXYMSG DB 1,12,4 DB 'DB ''MESSAGE'',0',0 CALL WAIT LD DE,SBUFF2 CALL OPENW DB 2,9,14,10,36 LD A,2 CALL CLEARW CALL WXYMSG DB 2,2,2 DB 'THIS IS A GRWLIB STANDARD WINDOW',0 CALL WXYMSG DB 2,4,2 DB 'This window was created with the',0 CALL WXYMSG DB 2,5,2 DB 'GRWLIB routine OPENW.',0 CALL WXYMSG DB 2,7,2 DB 'As can be seen windows can be',0 CALL WXYMSG DB 2,8,2 DB 'overlayed.',0 CALL WAIT LD DE,SBUFF3 CALL OPENFW DB 3,4,3,11,56 LD A,3 CALL CLEARW CALL WXYMSG DB 3,2,4 DB DIM,'To insure that the ',BRT,'original screen',DIM DB ' is properly',0 CALL WXYMSG DB 3,3,4 DB 'restored, windows should be closed in the reverse',0 CALL WXYMSG DB 3,4,4 DB 'order from which they were opened. The GRXLIB',0 CALL WXYMSG DB 3,5,4 DB 'routine ',BRT,'CLOSEW',DIM,' is used as follows:',BRT,0 CALL WXYMSG DB 3,7,4 DB ' LD A,WINDOW NUMBER',0 CALL WXYMSG DB 3,8,4 DB ' CALL CLOSEW',0 CALL WAIT1 LD A,3 CALL CLOSEW CALL WAIT2 LD A,2 CALL CLOSEW CALL WAIT3 LD A,1 CALL CLOSEW JP PDMENU ; DONE: CALL CLR9 XOR A ; Clear all pull down menus CALL CLRPDM CALL GXYMSG DB 17,12 DB ' This concludes the GRXLIB/GRWLIB/PDMLIB demonstration. ',0 CALL AT DB 23,1 LD HL,(OLDSTK) LD SP,HL RET ; CHOICE: CALL GXYMSG DB 24,1 DB DIM,' Enter your choice: ',BRT,0 JP WCIN ; PDMC: CALL GXYMSG DB 24,1 DB DIM,' Select Pull Down Menu or Press ' DB 'to quit: ',BRT,0 RET ; WAIT: CALL GXYMSG DB 24,1 DB DIM,' Press any key to continue: ',BRT,0 JP WCIN ; WAIT1: CALL GXYMSG DB 24,1 DB DIM,' Press any key to close window 3: ',BRT,0 JP WCIN ; WAIT2: CALL GXYMSG DB 24,1 DB DIM,' Press any key to close window 2: ',BRT,0 JP WCIN ; WAIT3: CALL GXYMSG DB 24,1 DB DIM,' Press any key to close window 1: ',BRT,0 ; WCIN: CALL CIN PUSH AF LD A,CR CALL COUT CALL EREOL POP AF RET ; CLR9: CALL AT DB 9,1 CALL CLREOS RET ; PDMFLG: DB 0 OPT: DB 0 SBUFF1: DS 2000 SBUFF2: DS 2000 SBUFF3: DS 2000 OLDSTK: DW 0 DS 128 STACK EQU $ ; ; end test program ; ; ; **** DRAFT--Not Final **** ; ZCPR 3.3 System TCAP ; Copyright 1985, 1986 by Richard Conn, Dennis Wright, and Echelon, Inc. ; All Rights Reserved ; ; Note on Padding: ; All entries which have an asterisk (like, *) following ; their one-line explanation have delays which may be ; variable. ; Note on Definition: ; If a function is not available for a particular terminal, ; its string should be 0 and its delay should be 0 (if it has ; a delay). ; ; ; Section 1: Basic Terminal Characteristics ; ; YU Single Character Generated by Uparrow Key on Keyboard ; YD Single Character Generated by Downarrow Key on Keyboard ; YL Single Character Generated by Leftarrow Key on Keyboard ; YR Single Character Generated by Rightarrow Key on Keyboard ; Note: If no arrow keys or arrow keys generate more than ; one character (like VT100), then use WordStar convention ; for these codes: YU=^E, YD=^X, YL=^S, YR=^D ; ; CL Clear Screen String (has a delay which may be variable); ; cursor is placed in home position (upper left corner) when ; this sequence is complete ; ; CM Cursor Motion String (see explanation of codes in the Manual) ; ; CE Clear to End of Line String; cursor is left at original ; position when this sequence is complete ; ; SO Begin Highlighting (Reverse Video or Dim); no character ; positions on the screen are used by this sequence (ie, cursor ; does not move after this sequence is complete) ; SE End Highlighting (return to Normal display intensity); no ; character positions on the screen are used by this sequence ; ; TI Initialize Terminal String; it is preferred that nothing be ; output to the screen by this sequence, but no output is not ; required ; TE Deinitialize Terminal String; it is preferred that nothing ; be output to the screen by this sequence ; envorg2: db 'WYSE 50 ' ; Name of Terminal (16 chars) db 'K'-'@' ; YU (YU = Cursor UP) db 'J'-'@' ; YD (YD = Cursor DOWN) db 'L'-'@' ; YL (YL = Cursor LEFT) db 'H'-'@' ; YR (YR = Cursor RIGHT) db 0 ; CL Delay (CL = Clear Screen)* db 0 ; CM Delay (CM = Cursor Motion) db 0 ; CE Delay (CE = Clear to EOL) db 1bh,'+',0 ; CL String db 1bh,'%ia%dR%dC',0 ; CM String db 1bh,'T',0 ; CE String db 1bh,')',0 ; SO String (SO = Stand Out Mode) db 1bh,'(',0 ; SE String (SE = End Stand Out Mode) db 0 ; TI String (TI = Terminal Init) db 0 ; TE String (TE = Terminal Deinit) ; ; Section 2: Business Graphics ; ; The following strings are used to create graphics symbols. ; If your terminal does not support business graphics, make (GO) and (GE) ; a non-zero non-printable character that has no effect on your ; terminal and use ASCII characters like '*' to replace the graphics ; characters. Recommended character values are indicated in [], like [*]. ; An alternate recommendation using '.' and ':' will be made with release ; of ZCPRB3. ; db 0 ; GO Delay (GO = Graphics On) db 0 ; GE Delay (GE = Graphics End) db 27,'H',2,0 ; GO - Graphics on string db 27,'H',3,0 ; GE - Graphics end string db '2',0 ; GULC - Upper left corner [*] db '3',0 ; GURC - Upper right corner [*] db '1',0 ; GLLC - Lower left corner [*] db '5',0 ; GLRC - Lower right corner [*] db ':',0 ; GHL - Horizontal line [-] db '6',0 ; GVL - Vertical line [|] db '7',0 ; GFB - Full block [*] db '?',0 ; GHB - Hashed block [#] ; db ';',0 ; GHB - Use this if RSP is used ; on WYSE 50 because the ; ? (01fh) will be confused ; with the ELM end line mark db '0',0 ; GUI - Upper intersect [+] db '=',0 ; GLI - Lower intersect [+] db '8',0 ; GIS - Intersection [+] db '9',0 ; GRTI - Right intersect [+] db '4',0 ; GLTI - Left intersect [+] ; ; Section 3: Windowing ; ; The following environmental data must be present if window ; routines are to be used. GCM (Graphic Character Mask) contains ; any bits that are not used by on screen graphics characters. ; GCD (Graphics Chararacter Difference) are the bits that are ; stripped (by the terminal) from a sent graphics character to ; form the on screen graphics character. ; db 0e0h ; GCM - Graphic character mask byte db 20h ; GCD - Graphic char difference bit(s) ; ; The next string can be either a terminal control code or an ; address of a user supplied subroutine. If a user supplied routine ; is to be used set the U1 address accordingly. Remember if an ; address is placed here and both bytes of the address are 00h, ; then the RAT string will be used. If the RAT string is null the RSP ; string will be used. At least one of these two functions must be ; available for window routines, RAT is prefered. ; ; If a RAT user supplied routine is to be used it must return the ; characters as follows: ; ; RAT - Read character at cursor position must return the character ; at the current cursor position in the (A) register. ; ; db 1bh,'M',0 ; RAT - Read char at current cursor ; position ; db 0 ; Zero if using RSP ; ; Set the following address non-zero if user supplied RAT subroutine ; is to be used. ; dw 0 ; U1 - Use user supplied RAT routine ; db 1bh,'7',0 ; RSP - Read screen page ; ; If RSP is to be used the following two bytes must be defined; if not, ; make them zero. ; db 1fh ; ELM - End of line mark db 0dh ; EPM - End of screen mark ; ; These bytes are the screen codes sent by the terminal at the end of ; each line (ELM) and end of page (EPM). Some terminals like the WYSE 50 ; may have graphics character codes that are the same as the ELM or EPM ; codes. In this case an alternative graphic character must be used. ; ; Section 4: Extended Terminal Characteristics ; (More to be added in banked ZCPRB3 256-byte version) ; ; CD Clear to End of Display; the cursor is not moved by this ; action ; KL Keyboard Lock; the keys on the keyboard are made inoperative ; KU Keyboard Unlock; the keys on the keyboard are made operative ; ; CDO Cursor Display Off; Cursor is no longer displayed, no ; character positions on the screen are used by this sequence ; CDE Cursor Display Enable; Cursor is displayed, no character ; positions on the screen are used by this sequence ; db 0 ; CD Delay (CD = Clear to End Display)* db 1bh,'Y',0 ; CD String db 1bh,'#',0 ; KL String (KL = Keyboard Lock) db 1bh,'"',0 ; KU String (KU = Keyboard Unlock) db 1bh,'`','0',0 ; CDO String (Cursor Display Off) db 1bh,'`','1',0 ; CDE String (Cursor Display Enable) ; ds 80H-[$-envorg2] ; Make exactly 80H bytes long ; ; End of ZCPR 3.3 TCAP ; WYSE 50 +%ia%dR%dCT)(HH2315:67?0=894à M7 Y#"`0`1^. ^# ^<^| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;^| ; ;^| ; ZASLINK.ZEX -- Z-System ZAS Macro Assembler and ZLINK Linker ;^| ; with ZAS error checking. ;^| ; ;^| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;^| ^> ^& if ~exist $1.Z80 ;note if file does not exist^| ECHO ^G *** $1.Z80 NOT FOUND ***^| else^| ZAS $1^| if ~er ;note if no assembly errors^| ERA $1.COM^| ZLINK $1,A:PDMLIB/,A:GRWLIB/,A:GRXLIB/,A:VLIB/,A:Z3LIB/,A:SYSLIB/ $$C100^| ERA $1.REL^| ERA $1.BAK^| Z3INS A15:SYS $1.COM^| ECHO -- ZASLINK COMPLETE^| else^| ECHO ^G *** FATAL ERROR IN ASSEMBLY, ZASLINK ABORTED ***^| fi ;note if ~er^| fi ;note if ~exist^| ^#