$-READ ME lGRDEMO COMGRDEMO Z80NEWTCAP 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 Menus2T 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{23w4ʿ564$:%ͦ$>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 $>HI ͫ%%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 2I ͫ%%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 DRVERTQ&$ͫ%%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-ͷQ7I ͫ%%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 GRXLIBTͥST&ST:ͮSTST&ST:STST&ST:ͷSTST0SI ͫ%%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!*>8LNTHIS IS A GRWLIB FRAMED WINDOWNData was printed in this window usingNcalls to GRWLIB routines CLEARW andNWXYMSG as follows:NLD A,WINDOW ; Window # in (A)N CALL CLEARW ; Clear the windowN CALL WXYMSG ; Send the messageN DB WINDOW,ROW,COLN DB 'MESSAGE',0$-ͱJ  $>8LNTHIS IS A GRWLIB STANDARD WINDOWNThis window was created with theNGRWLIB routine OPENW.NAs can be seen windows can beNoverlayed.$V5͸J 8>8LNTo insure that the original screen is properlyNrestored, windows should be closed in the reverseNorder from which they were opened. The GRXLIBNroutine CLOSEW is used as follows:N LD A,WINDOW NUMBERN CALL CLOSEW %>K>%>Ko%>KI ͫ%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}TT >ShJ_*O~(.>()*O~(&>(!*O~(>(*O~(>({=> >>>_:>{2>͙S:>O2 A! J~> #~2;>2>^#VT(WW(l ʥ>ͬ=((%("A~( *A>$> JR} ~(G>R~(>ʴ>>G>>2 A͟S: A* A>TͥT(WT!@#~25?2@<2@##~27?2@#~26?:5?O:7?P8:7?O>O25?2@<2@AͱJ>8L͙S !@w#S A(4((y(>w# >w#>w# w: Aw#:Aw## ѯw!@#~ ͥTTy2@͓@?( (W # #~̤@!@#!@~(#T^#V+x2@͓@͚@W 2Ay2 A>Ã@:>O 2 A^ͬ=(\@(#~( ͥT͓@͚@## ?+~?Q@+~( ͥT͓@͚@++ ?#~?x@>K͙S NWy<<2@2@TTSͪRS #Row TableO! J~( ( (y( y(#*ůw#~2I#O~GT> Wy(y 2gJ>T>SDM~! JO~( ! J~ w>%~((#~ J" Aw+~2I#wO#~( yPڥIJTͥT#~(W íIT#q#~( ( ( >2Jy8A:J(2J{Ox#w#q#q#p>2gJ##~ [ AO*&P~ #~(>2M*$P~(>2M *(P~(>2N*"M"M"M2K>2K~#02KKK~SK(#GK:K<2K~#y2Kx2K9K*KK>2M͞L2M͙S!P:K(!RP"7K͙S:K>![K=(= 8Xo͊N(R}KK~(J#~2 L#~2 L#~2L#~2L#~2K#~2K͞LN:K=2K8![K~8=ww>>2M(982o͊N(,}KK~($#~<2vL#~<2wL#~==2xL#~==2yL͞L>2M2MSK>2M?LSK?L~2L2MG#~2L2MO#~W:M=2M#~_:M=2M#:MăS͙Si`KT[K:M(T:M(*M*&P^#V[K7:M (T*(PMM x ÜMM*$PMM:M(> MA:N(3**P~#~go:gJ( T T( (ͫMÜMͫMSKLY(x2LL:MĉS͟S* P~*"P~go mSMxSM~\ #~M# O>2N~(]lN_͊NlN{#^#V#KK~pN#~_#~WS9NT:N >"~(̥TTM#>#2N###:N(~(#wN:K:KKKN:K(U#~G#~O#~WxW#~_y_![K>2K2K:KONN#~ҷNW#~N_#~N#~N>~(:K=2K VW"O#"O#"O#"O####OOOOOOO"O#"P#"PO"PO"PO"PO" PO" PO"PO"PO"PO"PO"PO"PO"PO"PO"PO" P#""P#"$PO"&P##"(PO"*P#",P#".P#"0PO"2PO"4PO"6PO"8P*P~(>~#\ #>2P6!P:P *P"P" P"P" P"P"P>2QP~2P#~2P#~2PP#~#==_2Q:PP==W2Q:Pg:PoT:P(> W>2QmS*P]S|2Q}<2Q2QͣQ:P(> W*P]S|<2Q}<2Q2QͭQ|<2Q}<2QT:P(> W* P]S|<2Q}<2QͣQ|<2LQ}2MQT:P(> W* P]S|2Q}2Q>2QͭQ:P(2PxS:QP(!:PP 2QP2QͪRQ~2=S#*P":P0*P"P*P"P >2P~2!R#~2"R#~2Q#~#_:QW:!Rg:"Ro:P :Q mS{|2!R}2"RT:P(> W:=S( =(==(>*P]S<( $% :=S( *:P"P2=S:P(<( 2P:Q xS~2=S#*P":P*P *P"P >2P~2R#~2R#~2R#~#_:RW:Rg:Ro:P :Q mS{|2R}2RT:P(> W*P]S ,-  :=S( *:P"P2=S:P(<( 2P:Q xS*.PF*0P~(]Sx(V>~\ #~W#*OF*P*PF*P*2P*4P~(]S>*6P*8PmS*PXmS*POmS* PFmS* P=mS*P4mS*P+mS*P"mS*PmS*PmS*PmS*P~(]S>xSV#^#+UV#^#+U~#VTJTPTW4TͥT4TT4T*V~!yTV###~yT͎V=*V~!ڡTV#VV~ʡT͎V=*V~!TVVV~T͎V=*V~!TVVVV~T͎V=*V~!'UVVVVV~'U͎V*V~![U~2V##V~[U`U:VͥV=%-2V2V%ʅU\}UWiUWiUd$VD$V2V3V.U+U>UrURUiUIUWiU>2ViU>2ViU5VOUSViUG5VW:V2ViU5VWU5VdlV lV0WU5VV5VdlV V:VKVFV:V:VAVFVO:VdVbVia`VbV0wVoVz0„VyʈVzW~ʡV#\›V~#WÎVzåVOV*>W+~¼V>GV ½VVV V~#\V#V">W"V"V,WW>G WW*>W~!*W=ɯ*>W+~">WFW~#ʚW ʄW ͫW qW vWvWzWKWKW KWyKW KWyG>GO> WWKW> W> W WWWW W W>^W@W*.W/*. WO*.  X*?wo1Cl4á`8*,~[x6UyU#aPmaРݕ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^| ^#