; NBYEMDM.DOC -- Specifications for the NBYEMDM.INC file for NBYE.MAC ; ; Gary Case ; 585 Big Sky Court ; Colorado Springs, CO ; 80919 ; (303) 599-0744 ; ; ;****************************************************************************** ; ; NBYE.MAC requires that all modem interface code be located in a file ; named NBYEMDM.INC. The required routines in this module are documented ; below. The following conventions are used in this documentation: ; ; Inputs/Outputs: Any required input is shown as an input to the ; required register, with the expected register result ; shown exiting the register. For example, the modem ; output routine requires the character to send in Acc, ; and must not destroy the character. The routine ; documentation shows this as: ; ; Char to Send ==> Acc ==> Unchanged ; ; Status: Any required status flags will be explicitly listed ; after the register input/output conventions. The ; zero flag is represented by Z (set) or NZ (not set), ; and carry is represented by C (set) or NC (not set). ; ; Use of Registers: All Registers except the Acc must be preserved unless ; the register input/output section explicitly shows ; that a particular register is changed. If a routine ; may change a register, the exit condition is shown as ; three question marks. For example, if the character ; output routine was allowed to destroy the character, ; the documentation would show this as: ; ; Char to Send ==> Acc ==> ??? ; ; ; ; NOTE: To separate physical port I/O from the modem management ; code, a separate NBYEIO.INC file is included when assembling ; NBYE except in the S100 modem card cases. Any NBYEMDM.INC ; files you write should follow this convention. Please ; document the requirements for the associated NBYEIO.INC file ; at the top of your NBYEMDM.INC file, so someone with the same ; modem but a different I/O card (or computer) can easily adapt ; the insert for his system. ; ; ;****************************************************************************** ; ; MISTAT: ;Routine to return the current input status of the modem. ; ; ??? ==> Acc ==> 0 if no input ready ; 0FFH if a character is ready ; ;Exit Status: Z ==> No Input Ready ; NZ ==> An Input Character is Ready ; ; ; ; MOSTAT: ;Routine to return the current output status of the modem. ; ;Exit Status: Z ==> Modem is Not Ready for output ; NZ ==> Modem is Ready for the next output char ; ; ; ; MINP: ;Routine to input the next character from the modem. If no ;data is currently available, wait until the next character ;is received. If possible, check the USART status for framing, ;overrun, or parity errors, and if any are detected clear them ;and substitute a null for the errored character. ; ; ??? ==> Acc ==> The input character ; (Null if any errors were detected) ; ;Exit Status: None ; ; ; ; MOUT: ;Routine to send a character to the modem. Be sure the modem ;port is ready for the data before sending it. ; ; Character to Send ==> Acc ==> Unchanged ; ;Exit Status: None ; ; ; ; MINIT: ;Modem initialization routine. This routine must: ; ; 1) Ensure the modem is on hook. ; 2) Initialize the modem port baud rate as appropriate. ; 3) Set up the modem to desired default parameters. ; (See comments for MRING below) ; ;This is always the first routine NBYE calls in the ;NBYEMDM.INC insert. It is also called after each telephone ;call to hang up and reinitialize the modem. ; ;Exit Status: None ; ; ; ; MEXIT: ;Modem exit routine. This routine is called when the SYSOP ;has elected to exit NBYE. It should 'shut down' the modem, ;returning it to the desired default state. This is always ;the last routine called by NBYE in the NBYEMDM.INC insert. ; ;Exit Status: None ; ; ; ; MRING: ;Modem Ring Check routine. This routine returns the current ;ringing status of the telephone line. If your modem can't ;detect the ring status, then the initialization routine ;should set the auto-answer mode for the modem and, when the ;modem has answered the phone, MRING should return a Connect ;status. ; ;Exit Status: Z and NC ==> Telephone Not Ringing ; NZ and NC ==> Telephone Is Ringing ; C ==> Already Connected ; ; ; ; MANSWER: ;Modem Answer Routine. This routine must answer the telephone ;and wait for the carrier. The wait time can be whatever you ;want, but 30 seconds is suggested as reasonable. This routine ;is not called if MRING returns a connect status; however, it ;will be called if NBYE is invoked with a /A or /C option. ; ;Exit Status: Z ==> Didn't get a carrier ; NZ ==> Connected with a carrier ; ; ; ; MBAUD: ;Routine to return the connection baud rate. If the modem ;supports more than one baud rate, this routine should ;determine the current baud rate (by waiting for a carriage ;return, line feed, ctrl-c, etc.) and return the baud rate ;indicator as shown. If the modem always operates at the ;same baud rate, the routine can immediately return with the ;appropriate indicator. If an input is necessary to determine ;the baud rate, this routine should wait a limited time ;(suggested 5 seconds) and return undetermined status if ;no input is received. ; ; ??? ==> Acc ==> Baud Rate Indicator ; ; 0 ==> 110 ; 1 ==> 300 ; 2 ==> 450 ; 3 ==> 600 ; 4 ==> 710 ; 5 ==> 1200 ; 6 ==> 2400 ; 7 ==> 9600 ; 8 ==> 19200 ; ;Exit Status: C ==> Couldn't Determine the Baud Rate ; NC ==> Baud Rate Indicator is Set ; ; ; ; MCARRIER: ;Carrier Check Routine. Returns current carrier status. ; ;Exit Status: Z ==> No Carrier ; NZ ==> Carrier Active ; ; ; ; DELAY: ;Routine to delay 1/10 second. This routine is placed here ;because: ; 1) It may use some of the modem hardware (PMMI) ; ; 2) Some modems (e.g. Hayes Smartmodems) provide ; status information via response strings that ; might be missed if we didn't keep polling ; the modem port during delays. In these ; cases the delay routine can include a poll ; to the modem port and can factor in the poll ; time in the delay loop. ; ;Exit Status: None ; ; ; ; KDELAY: ;Routine to delay 1 millisecond. This routine is placed in ;this insert for the reasons stated at DELAY. ; ;Exit Status: None ; ; ; ; *** End of Required Modem Routines *** ; ;******************************************************************************