Introduction ZCPR3 Environment Command Line GETCL1/GETCL2 CRT/PRT Data GETCRT/GETPRT External FCB GETEFCB Environment GETENV/GETVID FCP Address GETFCP Filenames GETFN1/GETFN2 Initialize Z3INIT IOP Address GETIOP DU/Max DU GETDUOK/GETMDISK/GETMUSER Messages GETMSG/GETSHM/PUTSHM Named Dir GETNDR Path GETPATH Processor Spd GETSPEED Quiet Flag GETQUIET RCP Address GETRCP Shell Stack GETSH1/GETSH2 Wheel Byte GETWHL/PUTWHL ZEX Data GETZFC/GETZNC/GETZRUN/PUTZNC/PUTZRUN :Introduction to the ZCPR3 Environment Anù  prograí runninç undeò ZCPR³ ió withiî whaô caî  bå � calleä á ZCPR³ environment®  Á hosô oæ facilitieó anä  datá � ió  availablå  tï thió prograí whicè á normaì  CP/Í  prograí � doeó  noô have®  Foò instance¬  á prograí runninç undeò thå � ZCPR³ environment: . can find out what name it was invoked by . can access a set of messages from ZCPR3 which tell it a number of things about how it was invoked ® caî senä messageó tï ZCPR³ anä programó which run after it completes . can find out many things about its environment, such as the processor speed, CRT and printer characteristics, maximum number of disks . can determine what characteristics the user's terminal has and make use of these to employ cursor addressing and other such functions Alì  oæ  thå  informatioî outlineä abovå  anä  morå  ió � availablå tï anù runninç prograí thrõ thå ZCPR³  Environmenô � Descriptor®  Thió  ió  á blocë oæ memorù (25¶ bytes©  whicè � containó  addresseó  anä otheò datá iî  á  precisely-defineä � format®  Aô installatioî time¬  thå ZCPR³ utilitieó caî  bå � seô  uð  tï internallù contaiî aî Environmenô Descriptoò  oò � theù  caî  bå  installeä witè á pointeò  tï  aî  Environmenô � Descriptoò  whicè resideó aô somå fixeä locatioî  iî  memorù � (thió  ió  thå preferreä approach)®  Oncå thå  routineó  iî � Z3LI havå beeî initializeä witè knowledgå oæ thå addresó oæ � thió  environmenô  descriptor¬  theù  caî  extracô  specifiã � informatioî froí iô foò uså iî thå applicatioî program. Thå  followinç informatioî ió containeä withiî á  ZCPR³ � Environment Descriptor: . address of External Path . size of External Path . address of RCP . size of RCP . address of FCP . size of FCP . address of IOP . size of IOP . address of Named Dir . size of Named Dir . address of Command Line . size of Command Line . address of Env Descriptor . size of Env Descriptor . address of Shell Stack . size of Shell Stack . address of Z3 Messages . size of Stack Entries . address of External FCB . address of External Stk . address of Wheel Byte . quiet flag . processor speed . DU approval flag . maximum disk allowed . maximum user allowed ® datá oî CRÔ ® datá oî Printeò . two reserved file names . ZCPR3 TERMCAP (Z3TCAP) Thå purposå oæ Z3LI ió tï providå thå programmeò  witè � easù  accesó  tï  thå informatioî iî thå  ZCPR³  Environmenô � Descriptoò  anä  tï  allo÷ hií tï easilù makå  uså  oæ  thió � information. To illustrate, the some Z3LIB routines are: . GETPRT - return data on the width, number of lines, and form feed ability of the printer . GETCL2 - return the address of the first char of the next command to be run, if any . GETEFCB - return the address of the external FCB so the program can determine its name . SHPUSH - push a command line on the shell stack ® SHPOÐ - poð á commanä linå froí thå shelì stk . IFT - invoke the next IF level and make it T . IFEND - back up to previous IF level Thió  HLР filå describeó thoså  Z3LI  routineó  whicè � providå  accesó  tï thå ZCPR³ Environmenô  Descriptoò  data® � All of these routines are of the general name: GETxxxxx wherå  thå mnemoniã followinç thå GEÔ prefiø alludeó tï whaô � information is being obtained. :Command Line GETCL1/GETCL2 Z3LIB Routine: GETCL1 Function: Returnó  thå addresó oæ thå Commanä Linå Buffeò  iî  HÌ � anä  itó  sizå (iî byte© iî A®  Thå Commanä Linå Buffeò  ió � structured as follows: cmdline: db
db db db db 0 GETCL±  returnó  thå addresó oæ CMDLINÅ iî HÌ  anä  thå � size (at CMDLINE+2) in A. Inputs: None Outputs: HL=address of CMDLINE, A=size Registers Affected: HL, PSW Side Effects: None Special Error Conditions: HL = 0 if there is no command line buffer Z3LIB Routine: GETCL2 Function: Returnó thå addresó oæ thå firsô characteò oæ thå  nexô � commanä  tï bå executeä iî thå Commanä Linå Buffeò iî HÌ anä � thå firsô characteò oæ thå nexô commanä iî A®  A=° anä  thå � Zerï  Flaç ió Seô (Z© iæ therå arå nï furtheò characteró  iî � the line. The Command Line Buffer is structured as follows: cmdline: db
db db db db 0 GETCL² returnó thå addresó containeä iî thå firsô D× aô � thå labeì CMDLINÅ iî HÌ anä thå chaò aô thió addresó iî A. Inputs: None Outputs: HL=address of next command, A=first char Registers Affected: HL, PSW Side Effects: None Special Error Conditions: HL = 0 if there is no Command Line Buffer. :CRT/PRT Data GETCRT/GETPRT Z3LIB Routine: GETCRT Function: Returî thå addresó oæ thå CRÔ datá recorä iî HL®  Thió � record is structured as follows: crtdata: db db db For example, a conventional CRT would look like: db 80 ; 80 cols db 24 ; 24 lines db 22 ; 22 text lines Thå  numbeò  oæ texô lineó shoulä bå twï lesó thaî  thå � totaì  numbeò oæ lines®  Iô maù bå madå ³ oò ´ lesó iæ  thå � useò wantó tï seå wideò overlað oî hió screen®  Thå purposå � oæ  thió recorä elemenô ió tï telì utilitieó likå  PAGÅ  ho÷ � manù  lineó  tï outpuô beforå pausinç tï allo÷ thå  useò  tï � reaä  thå  screen¬  anä thió caî bå reduceä (gï tï 2° oò  1¸ � lines©  tï allo÷ thå useò tï seå morå oæ thå lasô screeî  hå � was viewing. Inputs: None Outputs: HL contains the address of the CRT record Registers Affected: HL Side Effects: None Special Error Conditions: None Z3LIB Routine: GETPRT Function: Returî  thå addresó oæ thå Printeò datá recorä  iî  HL® � This record is structured as follows: prtdata: db db db db
For example, a typical printer data record would be: db 80 ; 80 columns db 66 ; 66 lines dâ 5¸ » 5¸ texô lineó (´ up/´ dî margin) db 1 ; printer can form feed Usinç  thå thirä bytå (numbeò oæ texô lineó peò  page)¬ � thå  printeò  pagå  marginó arå selecteä aó  thå  differencå � betweeî  thå  totaì numbeò oæ lineó anä thå numbeò  oæ  texô � lines. Wheî routineó likå PRINÔ run¬  theù prinô thå numbeò oæ � texô  lineó anä then¬  iæ thå printeò caî  forí  feed¬  theù � issuå  á  forí feeä character®  Iæ thå printeò  can'ô  forí � feed¬  thå  senä  ouô  thå propeò numbeò oæ blanë  lineó  tï � advance to the next page. Inputs: None Outputs: HL is address of printer data buffer Registers Affected: HL Side Effects: None Special Error Conditions: None :External FCB GETEFCB Z3LIB Routine: GETEFCB Function: Returnó  thå  addresó oæ thå ZCPR³ Externaì FC iî  HL® � Returnó  witè  HL=°  anä Zerï Flaç Seô (Z© iæ  therå  ió  nï � External FCB. Undeò  ZCPR3¬  á prograí caî finä ouô whaô namå iô  waó � invokeä  bù  througè thå Externaì FCB®  Byteó  1-¸  oæ  thå � Externaì  FC  (firsô  bytå ió 0© contaiî thå  namå  oæ  thå � program just executed by ZCPR3. Thió  featurå ió particularlù usefuì foò programó  likå � Shelló  whicè  havå  tï  pusè  theiò  namå  anä  operationaì � parameteró  ontï  thå Shelì Stacë iî ordeò tï  bå  reinvokeä � wheî á commanä linå completes®  Á Shelì caî uså thå datá iî � thå  Externaì  FC  tï determinå whaô itó  namå  ió  withouô � having to assume that it has a particular name at all times. Inputs: None Outputs: HL = address of External FCB, A=0 and Z if none Registers Affected: HL, PSW Side Effects: None Special Error Conditions: None :Environment GETENV Z3LIB Routine: GETENV Function: Returî  thå addresó oæ thå ZCPR³ Environmenô Descriptoò � in HL. Thió  functioî ió usefuì foò thoså programó whicè  neeä � tï  modifù thå ZCPR³ Environmenô Descriptor®  Mosô  oæ  thå � routineó iî Z3LI whicè accesó thå environmenô descriptoò dï � sï  iî  á R/Ï modå (theù dï noô allo÷ thå prograí tï  changå � datá iî it)®  Somå programó maù neeä tï dï this¬  sï GENENÖ � ió provided®  Z3LDR¬  foò example¬  loadó á ne÷ Environmenô � Descriptoò froí á filå oî disk¬  anä iô useó GETENÖ tï  finä � out where to load the file. Inputs: None Outputs: HL = address of Environment Descriptor Registers Affected: HL Side Effects: None Special Error Conditions: None Z3LIB Routine: GETVID Function: Returî thå addresó oæ thå ZCPR³ TCAÐ (Z3TCAP© Buffeò iî � HL. Indicate if this buffer contains a TCAP entry. Thió  functioî ió usefuì foò thoså programó whicè  neeä � tï  modifù  thå ZCPR³ TCAÐ Buffeò anä thoså  programó  whicè � neeä  tï  determinå  iæ  thå TCAР ió  loaded®  Iô  maù  bå � desirablå  tï  calì  thió routinå beforå  á  screen-orienteä � utilitù  ió  executeä  iî ordeò tï insurå  thaô  á  TCAР ió � available. Returî  witè  A=° anä Zerï Flaç Seô (Z©  iæ  nï  Z3TCAÐ � entrù existó withiî thå buffer. Inputs: None Outputs: HL = address of Z3TCAP Buffer A=0 and Zero Flag Set (Z) if no entry in buffer Registers Affected: HL, PSW Side Effects: None Special Error Conditions: None :FCP Address GETFCP Z3LIB Routine: GETFCP Function: Returî  thå addresó oæ thå flo÷ commanä packagå  buffeò � iî HÌ anä thå sizå oæ thå buffeò iî termó oæ 128-bytå blockó � in A. If there is no FCP buffer, A=0 and Zero Flag Set (Z). GETFCÐ simplù returnó detailó oî thå FCÐ buffeò addresó � anä  size¬  buô iô doeó noô saù iæ aî FCÐ ió residenô withiî � it®  Tï  finä thió out¬  looë aô thå firsô bytå oæ thå  FCÐ � buffer¬  and¬  iæ iô ió zero¬  theî therå ió nï FCÐ present® � Example: ext getfcp ;reference ... call getfcp ;obtain data jz nofcpbuf ;no FCP buffer is available mov a,m ;get first byte of buffer ora a ;set zero flag accordingly jz nofcpload ;no FCP is in the buffer Inputs: None Outputsº HÌ ½ addresó oæ FCÐ buffer A=0 and Zero Flag Set (Z) if no buffer, else A=sizå oæ buffeò iî 128-bytå blockó anä NZ Registers Affected: HL, PSW Side Effects: None Special Error Conditions: None :Filenames GETFN1/GETFN2 Z3LIB Routine: GETFN1 or GETFN2 Function: Theså  routineó returî thå addresó iî HÌ oæ filenamå  ± � (GETFN1©  anä filenamå ² (GETFN2© iî thå  ZCPR³  Environmenô � Descriptor®  Eacè filenamå entrù ió 1± byteó long¬ matchinç � the filename and filetype fields of the CP/M FCB. Theså  nameó arå useä tï pasó nameó oæ speciaì fileó tï � programó  foò  lateò use®  Theiò exacô  definitioî  ió  noô � presenteä  anä  lefô tï thå installer®  Onå applicatioî  oæ � theså  ió tï allo÷ GETFN± tï returî thå namå oæ  thå  masteò � HLР filå  (HELP.HLP© whicè ió tï bå useä tï indeø intï  thå � Help System. Inputs: None Outputs: HL is address of the selected file name Registers Affected: HL Side Effects: None Special Error Conditions: None :Initialize Z3INIT Z3LIB Routine: Z3INIT Function: Obtaiî thå addresó oæ thå ZCPR³ Environmenô  Descriptoò � froí  thå callinç prograí anä seô iô iî á globaì buffeò  foò � future use by the Z3LIB routines. Z3INIT is called as follows: ext z3init ;reference ... lxi h,z3env ;address of ZCPR3 Environment Desc call z3init ;perform function ... Inputs: HL = address of ZCPR3 Environment Descriptor Outputs: None Registers Affected: None Side Effects: None Special Error Conditions: None :IOP Address GETIOP Z3LIB Routine: GETIOP Function: Returî  thå addresó oæ thå input/output packagå  buffeò � iî HÌ anä thå sizå oæ thå buffeò iî termó oæ 128-bytå blockó � in A. If there is no IOP buffer, A=0 and Zero Flag Set (Z). GETIOÐ simplù returnó detailó oî thå IOP buffeò addresó � anä  size¬  buô iô doeó noô saù iæ aî IOP ió residenô withiî � it®  Tï  finä thió out¬  looë aô thå firsô bytå oæ thå  IOP � buffer¬  and¬  iæ iô ió zero¬  theî therå ió nï IOP present® � Example: ext getiop ;reference ... call getiop ;obtain data jz noiopbuf ;no IOP buffer is available mov a,m ;get first byte of buffer ora a ;set zero flag accordingly jz noiopload ;no IOP is in the buffer Inputs: None Outputsº HÌ ½ addresó oæ IOÐ buffer A=0 and Zero Flag Set (Z) if no buffer, else A=sizå oæ buffeò iî 128-bytå blockó anä NZ Registers Affected: HL, PSW Side Effects: None Special Error Conditions: None :DU/Max Disk/User GETDUOK/GETMDISK/GETMUSER Z3LIB Routine: GETDUOK Function: Returî thå DUOË flaç iî Á witè thå Zerï Flaç Seô (Z© iæ � A=0®  DUOË  ió  á flaç whicè telló thå prograí iæ iô ió  tï � permiô thå useò tï specifù thå DUº prefiø tï changå disë anä � useò area® Á ZCPR³ utilitù caî alwayó specifù á DIRº prefiø � (nameä  directory© iî identifyinç thå disë anä useò areá  tï � examine¬  buô  iî  somå  "secure¢  applicationó  iô  ió  noô � desirablå  tï  allo÷ thå useò tï emploù thå  DUº  prefiø  tï � accesó  ANÙ  disk/useò area®  Thió flaç  (DUOK©  telló  thå � utility if it is OK for the user to employ the DU: prefix. Inputs: None Outputs: A=0 and Zero Flag Set (Z) if NOT OK to use DU: A=0FFH and Zero Flag Clear (NZ) if OK to use DU: Registers Affected: PSW Side Effects: None Special Error Conditions: None Z3LIB Routine: GETMDISK Function: Returî  thå  numbeò  oæ thå maximuí disë  iî  A®  Thió � numbeò ió iî thå rangå froí ± tï 16¬ wherå ± meanó disë Á ió � the maximum disk on the system and 16 means disk P is. Thå  ZCPR³  Environmenô  Descriptoò  maù  bå  useä   tï � restricô  accesó  tï  certaiî  partó  oæ  thå  system®  Foò � instance¬  á  "normaì user¢ maù bå denieä accesó tï diskó  à � anä  Ä anä tï anù useò areá beyonä 10®  Á "privelegeä user¢ � whï haó thå poweò tï changå thå ZCPR³ Environmenô Descriptoò � can gain access to any disk or user area he desires. Inputs: None Outputs: A = disk number (disk A = 1) Registers Affected: PSW Side Effects: None Special Error Conditions: None Z3LIB Routine: GETMUSER Function: Returî thå numbeò oæ thå maximuí useò areá iî A®  Thió � number is in the range from 0 to 31. Thå  ZCPR³  Environmenô  Descriptoò  maù  bå  useä   tï � restricô  accesó  tï  certaiî  partó  oæ  thå  system®  Foò � instance¬  á  "normaì user¢ maù bå denieä accesó tï diskó  à � anä  Ä anä tï anù useò areá beyonä 10®  Á "privelegeä user¢ � whï haó thå poweò tï changå thå ZCPR³ Environmenô Descriptoò � can gain access to any disk or user area he desires. Inputs: None Outputs: A = maximum user area which may be accessed Registers Affected: PSW Side Effects: None Special Error Conditions: None :Messages GETMSG/GETSHM/PUTSHM Z3LIB Routine: GETMSG Function: Returî  thå addresó oæ thå ZCPR³ Messagå Buffeò iî  HL® � A=°  anä  Zerï  Flaç Seô (Z© iæ therå ió  nï  ZCPR³  Messagå � Buffer. Seå thå Z3LI informatioî sectionó oî ZCPR³ Messages. Inputs: None Outputs: HL = address of ZCPR3 Message Buffer A = 0 and Zero Flag Set (Z) if there is none Registers Affected: HL, PSW Side Effects: None Special Error Conditions: None Z3LIB Routine: GETSHM Function: GETSHÍ  returnó  thå valuå oæ thå shelì  messagå  whoså � numbeò  ió specifieä iî B®  Therå arå threå shelì messages¬ � sï ° <½  <½ ² (thå programmeò musô bå surå á valiä valuå ió � presented). Inputs: B = Message Number (0, 1, 2) Outputs: A = Message Value (Zero Flag Set Accordingly) Registers Affected: PSW Side Effects: None Special Error Conditions: None Z3LIB Routine: PUTSHM Function: PUTSHÍ setó thå valuå oæ thå shelì messagå whoså numbeò � ió giveî iî B®  Thå messagå valuå ió iî A®  Therå arå onlù � three shell messages, so B = 0, 1, or 2. Inputs: A = Message Value, B = Message Number = 0,1,2 Outputs: None Registers Affected: None Side Effects: Message Value is Set Special Error Conditions: None :Named Dir GETNDR Z3LIB Routine: GETNDR Function: Returî  thå addresó oæ thå nameä directorù buffeò iî HÌ � anä thå sizå oæ thå buffeò iî termó oæ 128-bytå blockó iî A® � Iæ therå ió nï NDÒ buffer¬ A=° anä Zerï Flaç Seô (Z). GETNDR simplù returnó detailó oî thå NDR buffeò addresó � anä  size¬  buô iô doeó noô saù iæ aî NDR ió residenô withiî � it®  Tï  finä thió out¬  looë aô thå firsô bytå oæ thå  NDR � buffer¬  and¬  iæ iô ió zero¬  theî therå ió nï NDR present® � Example: ext getndr ;reference ... call getndr ;obtain data jz nondrbuf ;no NDR buffer is available mov a,m ;get first byte of buffer ora a ;set zero flag accordingly jz nondrload ;no NDR is in the buffer Inputs: None Outputsº HÌ ½ addresó oæ NDR buffer A=0 and Zero Flag Set (Z) if no buffer, else A=sizå oæ buffeò iî 128-bytå blockó anä NZ Registers Affected: HL, PSW Side Effects: None Special Error Conditions: None :Path GETPATH Z3LIB Routine: GETPATH Function: Returî  thå addresó oæ thå ZCPR³ Command-Searcè Patè iî � HL®  A=°  anä Zerï Flaç Seô (Z© iæ therå ió nï ZCPR³  Path® � Iæ  therå  ió  á ZCPR³ Path¬  Á ½ numbeò  oæ  two-bytå  patè � elements allowed in it. A ZCPR3 Path Element is structured as follows: Byte 1: Disk ID Disk A = 1, B = 2, etc Current Disk = '$' Byte 2: User ID Number from 0 to 31 A ZCPR3 Path is terminated by a Disk ID of 0. Example: path: db '$',1 ;current disk, user 1 db 1,'$' ;disk A, current user db 1,15 ;disk A, user 15 db 0 ;end of path Inputs: None Outputs: HL = address of ZCPR3 Path A = 0 and Zero Flag Set (Z) if there is none Registers Affected: HL, PSW Side Effects: None Special Error Conditions: None :Processor Spd GETSPEED Z3LIB Routine: GETSPEED Function: Returî thå speeä oæ thå processoò iî A®  Thió one-bytå � valuå  ió tï represenô thå processoò speeä iî  MHz¬  sï  A=± � means 1 MHz, A = 4 means 4 MHz, etc. This function is useful for software timing loops. Inputs: None Outputs: A = processor speed Registers Affected: PSW Side Effects: None Special Error Conditions: None :Quiet Flag GETQUIET Z3LIB Routine: GETQUIET Function: Returî thå Quieô Flaç iî A® A½ ° anä Zerï Flaç Seô (Z© � iæ  thå prograí ió NOÔ tï ruî quietly¬  A=0FFÈ anä NÚ iæ thå � program is to run quietly. Bù quieô operation¬  thå prograí ió noô tï displaù  anù � informative messages. Inputs: None ŠOutputs: A = Quiet Flag (0=not quiet) and Zero Flag set accordingly Registers Affected: PSW Side Effects: None Special Error Conditions: None :RCP Address GETRCP Z3LIB Routine: GETRCP Function: Returî  thå  addresó oæ thå  residenô  commanä  packagå � buffeò iî HÌ anä thå sizå oæ thå buffeò iî termó oæ 128-bytå � blockó iî A®  Iæ therå ió nï RCÐ buffer¬  A=° anä Zerï Flaç � Seô (Z). GETRCÐ simplù returnó detailó oî thå RCÐ buffeò addresó � anä  size¬  buô iô doeó noô saù iæ aî RCÐ ió residenô withiî � it®  Tï  finä thió out¬  looë aô thå firsô bytå oæ thå  RCÐ � buffer¬  and¬  iæ iô ió zero¬  theî therå ió nï RCÐ present® � Example: ext getfcp ;reference call getfcp ;obtain data jz nofcpbuf ;no FCP buffer is available mov a,m ;get first byte of buffer ora a ;set zero flag accordingly jz nofcpload ;no FCP is in the buffer Inputs: None Outputsº HÌ ½ addresó oæ RCÐ buffer A=0 and Zero Flag Set (Z) if no buffer, else A=sizå oæ buffeò iî 128-bytå blockó anä NZ Registers Affected: HL, PSW Side Effects: None Special Error Conditions: None :Shell Stack GETSH1/GETSH2 Z3LIB Routine: GETSH1 Function: Returî  thå addresó oæ thå shelì stacë iî HL¬  thå sizå � oæ  eacè shelì stacë entrù iî B¬  anä thå numbeò oæ  entrieó � possiblå iî thå shelì stacë iî A® A=° anä Zerï Flaç Seô (Z© � if there is no shell stack. Seå  thå SHPUSÈ anä SHPOÐ routineó foò detaiì oî  otheò � facilitieó foò dealinç witè shelì stackó provideä bù  Z3LIB® � GETSH± serveó mainlù tï providå data. Inputs: None Outputs: HL = address of Shell Stack B = number of bytes in each shell stack entry A = number of entries possible in the stack A = 0 and Zero Flag Set (Z) if no stack Registers Affected: HL, B, PSW Side Effects: None Special Error Conditions: None Z3LIB Routine: GETSH2 Function: Returî thå addresó oæ thå shelì stacë iî HL¬  thå  sizå � oæ  eacè shelì stacë entrù iî DE¬  anä thå numbeò oæ entrieó � possiblå iî thå shelì stacë iî botè Á anä B®  A=° anä  Zerï � Flaç Seô (Z© iæ therå ió nï shelì stack. Seå  thå  SHPUSÈ  anä SHPOÐ routineó  foò  otheò  Z3LI � capabilitieó  wrô shells®  GETSH² serveó mainlù tï  providå � datá iî á forí thaô ió morå usablå foò certaiî  applicationó � thaî GETSH1. Inputs: None Outputs: HL = address of Shell Stack DE = number of bytes in each shell stack entry A,B = number of entries possible in the stack A = 0 and Zero Flag Set (Z) if no stack Registers Affected: HL, DE, B, PSW Side Effects: None Special Error Conditions: None :Wheel Byte GETWHL/PUTWHL Z3LIB Routine: GETWHL Function: Returî thå Wheeì Bytå iî A® A½ ° anä Zerï Flaç Seô (Z© � iæ thå prograí ió NOÔ tï givå Wheeì powers¬ A=0FFÈ anä NÚ iæ � thå prograí ió tï ruî iî á privelegeä mode. Bù wheeì operation¬  thå prograí ió noô tï prohibiô thå � useò froí performinç anù function®  Foò instance¬  allowinç � thå  useò tï changå thå PATÈ shoulä bå á Wheeì  functioî  sï � thaô  thå  "normal¢  useò  ió  noô  alloweä  tï  changå  hió � environmenô whilå á "priveleged¢ useò is. Inputs: None Outputs: A = Wheel Byte (0=not wheel) and Zero Flag set accordingly Registers Affected: PSW Side Effects: None Special Error Conditions: None Z3LIB Routine: PUTWHL Function: Seô thå Wheeì Bytå iî A® A½ ° anä Zerï Flaç Seô (Z© iæ � thå  prograí ió NOÔ tï givå Wheeì powers¬  A=0FFÈ anä NÚ  iæ � thå prograí ió tï ruî iî á privelegeä mode. Inputs: A=Wheel Byte Value Outputs: None Registers Affected: None Side Effects: Wheel Byte is Set Special Error Conditions: None :ZEX Data GETZFC/GETZNC/GETZRUN Z3LIB Routine: GETZFC Function: GETZFà returnó thå addresó iî HÌ oæ thå firsô characteò � iî  thå ZEØ texô buffer®  Carrù Flaç ió seô iæ datá ió  noô � available. Inputs: None Outputs: HL = Address of First Character A = Character Carry Flag Set (C) if No Data Registers Affected: HL, PSW Side Effects: None Special Error Conditions: None Z3LIB Routine: GETZNC Function: GETZNà returnó thå addresó iî HÌ oæ thå nexô characteò � whicè ZEØ wilì return® Carrù Flaç ió Seô iæ nï data® Reç Á � contains the character. Inputs: None Outputs: HL = Address of Next Character in ZEX Text Buffer A = Next Character in ZEX Text Buffer Carry Flag Set (C) if no data Registers Affected: HL, PSW Side Effects: None Special Error Conditions: None Z3LIB Routine: GETZRUN Function: GETZRUΠ returnó thå ZEØ Ruî Messagå Bytå iî  A®  Zerï � Flaç  ió seô accordingly®  Carrù Flaç ió Seô iæ nï  messagå � available®  Thió messagå indicateó iæ ZEØ ió runninç oò noô � (A=0 if not running). Inputs: None Outputs: A = ZEX Run Message Carry Flag Set (C) if no data Registers Affected: PSW Side Effects: None Special Error Conditions: None Z3LIB Routine: PUTZNC Function: PUTZNà setó thå addresó oæ thå nexô characteò whicè ZEØ � wilì returî tï thaô containeä iî HL®  Thió routinå provideó � a GOTO function for ZEX control. Inputs: HL = address of next character ZEX will return Outputs: Carry Flag Set (C) if data not available (Message Buffers not available) Registers Affected: PSW Side Effects: ZEX Next Character Address Message is set Special Error Conditions: None Z3LIB Routine: PUTZRUN Function: PUTZRUÎ setó thå ZEØ Runninç Messagå bytå tï thå  valuå � iî  thå  Á register®  Carrù Flaç ió Seô upoî returî  iæ  nï � messageó  arå supported®  Thió messagå indicateó iæ ZEØ  ió � running¬ anä A=° iæ ZEØ ió noô running. Inputs: A=Value of ZEX Running Message Byte Outputs: Carry Flag Set if no message buffers Registers Affected: PSW Side Effects: ZEX Running Message Byte is set Special Error Conditions: None