;**************************** AMUS Program Label ****************************** ;* Filename: ALMTIM.M68 Date: 4/18/90 ;* Category: UTIL Hash Code: 260-254-244-264 Version: 1.0(100) ;* Initials: GR/AM Name: James A. Jarboe IV ;* Company: Educational Video Network, Inc. Telephone #: 4092955767 ;* Related Files: MUST LNKLIT TO PRODUCE ALMTIM.LIT ;* Min. Op. Sys.: 1.3 Expertise Level: BEG ;* Special: 2.x assembly is 260-254-244-264, 1.x assembly is 164-214-630-117 ;* Description: Sets internal terminal clock on AM65 and Wyse60 terminals to ;* current system time. Different hash totals are due to differences in $ODTIM ;* call on 1.x and 2.x systems. ;****************************************************************************** ;*; Updated on 18-Apr-90 at 10:26 PM by James A. Jarboe IV; edit time: 0:17:04 ;**************************************************************************** ;* * ;* ALMTIM.M68 * ;* * ;* Written By: James A. Jarboe IV * ;* 1401 19th Street * ;* Huntsville, TX 77340 * ;* 409-295-5767 * ;* * ;* 18-Apr-90 * ;* GR/AM * ;**************************************************************************** ;* Copyright (c) 1990 - James A. Jarboe IV * ;* Free to AMUS Users - Not for Sale. * ;*************************************************************************** ; ; Description: Sets the internal terminal clock on an AM65, or WYSE60 ; to current system time. ; ; Sets WYSEWORKS clock for WYSE terminals ; Sets AM65 clock for Calculator-Calendar-Clock toolkit. ; (Press FancyFunct key and CapsLock for Toolkit.) ; ; Note: If terminal is turned off, ALMTIM must be run again when terminal ; is turned back on to reset terminal time to current system time. ; ; Edit History: ; ;[100] 18-Apr-90 Written by James A. Jarboe IV. ; ASMMSG " " ASMMSG "( By )" ASMMSG "( James A. Jarboe IV )" ASMMSG "( )" ASMMSG "( LNKLIT ALMTIM after assembly to )" ASMMSG "( create ALMTIM.LIT. )" ASMMSG "( )" ASMMSG "( Type ALMTIM/? for Help )" ASMMSG " " PAGE ;*************************************************************************** ; * ; S Y M B O L I C S * ; * ;*************************************************************************** ; SEARCH SYS ; Amos Standard symbolic. SEARCH SYSSYM ; Amos Standard symbolic. EXTERN $ODTIM ; Define external. PAGE ;*************************************************************************** ; * ; C U R R E N T V E R S I O N * ; * ;*************************************************************************** ; VMAJOR = 1. ; Written by James A. Jarboe IV VMINOR = 0 ; VEDIT = 100. ; Current release. /JAJ VWHO = 0 ; PAGE ;*************************************************************************** ; * ; P R O G R A M M A C R O S * ; * ;*************************************************************************** ; ;************* ; PRTTAB * ;************* ; ; Similar to Basic PRINT TAB directive. ; ; Where: ; ROW = Decimal Row number to set or beginning of TCRT call. ; COL = Decimal Column number to set or end of TCRT call. ; ; Example: ; PRTTAB 3, 15. ; Will place cursor at row 3, column 15. ; PRTTAB -1, 0. ; Will Clear screen. ; ; D1 will be destroyed. ; DEFINE PRTTAB ROW, COL MOVW #, D1 ; Set up D1. TCRT ; Do TCRT call. ENDM ;************* ; HTYPE * ;************* ; ; Description: ; Output to terminal, the defined text in a ; highlighted fashion. Text will always start out in ; low intensity {? TAB(-1,11)} until an "_" character ; is found then text will be output in normal intensity ; {? TAB(-1,12)} until another "_" is found. ; Where: ; TEXT = A line of text. ; A $CR will output a $CR $LF pair. ; ; HLT = Value of highlight character. ; If HLT is not defined then defaults to "_". ; Example: ; HTYPE <_This is bright._ This is dim.> ; {continuation of code} ; EXIT ; DEFINE HTYPE TEXT1, HLT ; Highlight type text. ; If HLT is blank then default to "_" else set to HLT value ; Must MOVB to maintain even assembly. ; IF B, HLT, MOV #$UL, D6 ; Use _. IF NB, HLT, MOV #HLT, D6 ; Use defined character. LEA A6, 10$$ ; Index Text. CALL $HTYP. ; Do highlight type. BR 20$$ ; Bypass text. 10$$: ASCII `TEXT1` ; Text. BYTE 0 ; End of text. EVEN ; Even up assembly. 20$$: ; Next line of code. ENDM ;************* ; HTYPSP * ;************* ; ; Description: ; Output to terminal, the defined text and a space in a ; highlighted fashion. Text will always start out in ; low intensity {? TAB(-1,11)} until an "_" character ; is found then text will be output in normal intensity ; {? TAB(-1,12)} until another "_" is found. ; Where: ; TEXT = A line of text. ; An additional space will be output after text. ; ; HLT = Value of highlight character. ; If HLT is not defined then defaults to "_". ; ; Example: ; HTYPSP <_This is bright._ This is dim.> ; {continuation of code} ; EXIT ; DEFINE HTYPSP TEXT1, HLT ; If HLT is blank then default to "_" else set to HLT value ; Must MOVB to maintain even assembly. ; IF B, HLT, MOVB #$UL, D6 ; Use "_". IF NB, HLT, MOVB #HLT, D6 ; Use defined character. LEA A6, 10$$ ; Index text to type out. CALL $HTYP. ; Call Highlight TYPe. BR 20$$ ; Branch over text. 10$$: ASCII `TEXT1` ; Defined text. BYTE 32.,0 ; Add a space. EVEN ; Even assembly. 20$$: ENDM ;************* ; HTYPCR * ;************* ; ; Description: ; Output to terminal, the defined text and CRLF pair in a ; highlighted fashion. Text will always start out in ; low intensity {? TAB(-1,11)} until an "_" character ; is found then text will be output in normal intensity ; {? TAB(-1,12)} until another "_" is found. ; Where: ; TEXT = A line of text. ; A $CR will output a $CR $LF pair. ; ; HLT = Value of highlight character. ; If HLT is not defined then defaults to "_". ; ; Example: ; HTYPCR <_This is bright._ This is dim.>, $UL ; {continuation of code} ; EXIT ; DEFINE HTYPCR TEXT1, HLT ; If HLT is blank then default to "_" else set to HLT value ; Must MOVB to maintain even assembly. ; IF B, HLT, MOV #$UL, D6 ; Use _. IF NB, HLT, MOV #HLT, D6 ; Use defined character. LEA A6,10$$ ; Index text. CALL $HTYP. ; Use Highlight TYPe. BR 20$$ ; Branch over text. 10$$: ASCII `TEXT1` ; The text. BYTE 13.,0 ; Add a CR. $HTYP. does LF. EVEN ; Even assembly. 20$$: ENDM PAGE ;*************************************************************************** ; * ; B U F F E R S I Z E S A N D E Q U A T E S * ; * ;*************************************************************************** ; IF NDF, $LF, $LF = 10. ; A linefeed character. IF NDF, $CR, $CR = 13. ; A Carriage return. IF NDF, $ESC, $ESC = 27. ; The "escape" character. IF NDF, $QUOTE, $QUOTE = 34.; The " character. IF NDF, $UL, $UL = 95. ; The "_" character. PAGE ;*************************************************************************** ; * ; S T A R T O F P R O G R A M C O D E * ; * ;*************************************************************************** ; ;+************************+ ; ALMTIM * ;+************************+ ; ; Sets a terminal's internal clock. ; ; Description: ; ; Will set the internal clock on an AM65 or Wyse60 terminal to the ; current system time. ; ; Arguments: ; ; None ; ; Returned: ; ; Terminal's internal clock will be set to current system time. ; ; Dependancies: Must have a terminal with internal clock and ; must respond to ESC c 8 hh mm code. ; ; Program header. ; SETALM: PHDR -1, 0, PH$REU!PH$REE ; Reusable, Reentrant. ; Allocate our local impure area. ; BYP ; Bypass white space. LIN ; User requested something? BNE HELPEM ; Yes..show them help. ; Output code sequence to set internal terminal clock. ; TTYI CODSEQ ; Output following code sequence. BYTE $ESC, 'c, '8, 0 ; Escape c 8 SUB A2, A2 ; Output to terminal. CLR D3 ; Set no Date. MOV #^B001010000000001, D5 ; Set Time, 24hr, no colon. CALL $ODTIM ; Set current time to terminal. EXIT HELPEM: CRLF ; Bump one line. HTYPCR <%Usage: _ALMTIM_ (cr)> CRLF ; Display different usages of HTYP?? macro that uses $HTYP. call. ; HTYPSP < Sets the internal terminal clock for _AM65_, _Wyse60_> HTYPCR HTYPSP < system time. If terminal is turned _off_, internal> HTYPCR