diff --git a/cc.asm b/cc.asm index 3ddb0f8..89f3da5 100644 --- a/cc.asm +++ b/cc.asm @@ -187,6 +187,7 @@ TAB equ 9 TAB key code stz ~QuickExitList stz ~QuickExitList+2 case on + stz __useTimeTool do not use Time Tool jsl ~InitIO reset standard I/O case off @@ -363,6 +364,9 @@ start ds 2 start of the command line string stz ~ExitList+2 stz ~QuickExitList stz ~QuickExitList+2 + case on + stz __useTimeTool do not use Time Tool + case off lda #~RTL set up so exit(), etc. call ~RTL sta ~C_Quit+1 diff --git a/time.asm b/time.asm index a64b9ae..54dda5f 100644 --- a/time.asm +++ b/time.asm @@ -394,13 +394,11 @@ ad1 tay **************************************************************** * ~get_tz_offset private - pha make space for status return/TZ prefs + lda >__useTimeTool if not using time tool + beq no_tz assume we have no TZ offset + + pha make space for TZ prefs pha - _tiStatus check if time tool is active - bcs no_tz - lda 1,s - beq no_tz - pea 1 get one record element only (TZ offset) tsc get time zone preference @@ -409,9 +407,14 @@ ad1 tay pha _tiGetTimePrefs pla - bcs no_tz + bcc have_tz + pla + pla + lda #0 assume 0 offset if TZ info not available +no_tz tax + rts - pha determine if it's daylight savings +have_tz pha determine if it's daylight savings ph2 #$5E _ReadBParam pla @@ -430,12 +433,6 @@ ad1 tay ret pla return offset value plx rts - -no_tz pla - pla - lda #0 assume 0 offset if no TZ info available - tax - rts end **************************************************************** @@ -1318,14 +1315,11 @@ Y_skip inx ;%Z - time zone name or abbreviation, if available ;we print the numeric offset for both, or nothing if time zone is not available fmt_z anop -fmt_Z pha check if time tool is active - _tiStatus - pla - bcs z_ret - beq z_ret +fmt_Z lda >__useTimeTool if not using Time Tool + beq z_ret write nothing pea 0 push pointer to string buffer tdc -; clc + clc adc #numstr pha pha make space for TZ preferences record diff --git a/vars.asm b/vars.asm index 20be459..6332749 100644 --- a/vars.asm +++ b/vars.asm @@ -35,6 +35,8 @@ sys_nerr entry # of error messages _toolErr entry last error in a tool call (C) ~TOOLERROR entry last error in a tool call (Pascal) ds 2 +__useTimeTool entry use Time Tool in functions? + ds 2 end ****************************************************************