Browse Source

Add Zero Option to TIMER Application

@MartinR-UK enhanced TIMER to allow zeroing the seconds counter.

Co-Authored-By: MartinR <174514335+MartinR-UK@users.noreply.github.com>
pull/616/head
Wayne Warthen 4 months ago
parent
commit
cf528ef1c1
No known key found for this signature in database GPG Key ID: 8B34ED29C07EEB0A
  1. 1
      Doc/ChangeLog.txt
  2. BIN
      Doc/RomWBW Applications.pdf
  3. BIN
      Doc/RomWBW Disk Catalog.pdf
  4. BIN
      Doc/RomWBW Hardware.pdf
  5. BIN
      Doc/RomWBW Introduction.pdf
  6. BIN
      Doc/RomWBW System Guide.pdf
  7. BIN
      Doc/RomWBW User Guide.pdf
  8. 26
      RELEASE_NOTES.md
  9. 2
      ReadMe.md
  10. 2
      ReadMe.txt
  11. 69
      Source/Apps/timer/timer.asm
  12. 22
      Source/Doc/Applications.md

1
Doc/ChangeLog.txt

@ -28,6 +28,7 @@ Version 3.6
- WBW: Updated Cowgol disk image with latest COWFIX.COM from Ladislau Szilagyi
- WBW: Preliminary support for S100 Computers Z80 CPU
- HJB: Added MSX platform
- M?R: Update Timer app with "zero" option
Version 3.5.1
-------------

BIN
Doc/RomWBW Applications.pdf

Binary file not shown.

BIN
Doc/RomWBW Disk Catalog.pdf

Binary file not shown.

BIN
Doc/RomWBW Hardware.pdf

Binary file not shown.

BIN
Doc/RomWBW Introduction.pdf

Binary file not shown.

BIN
Doc/RomWBW System Guide.pdf

Binary file not shown.

BIN
Doc/RomWBW User Guide.pdf

Binary file not shown.

26
RELEASE_NOTES.md

@ -8,10 +8,27 @@ release of RomWBW.
- **Please** review the "Upgrading" Section of the RomWBW User Guide.
- The RomWBW ROM and the RomWBW disk images are intended to be a
matched set. After upgrading your ROM, it is important to update
the OS boot tracks of your disks as well as the RomWBW-specific
applications. This is discussed in the "Upgrading" section of the
RomWBW User Guide.
matched set. After upgrading your ROM, you need to update your
boot disk media by doing one of the following:
- Write a new disk image (typically hd1k_combo.img) onto your
disk media (will overwrite existing data/files).
- Update the boot tracks of the bootable OS images as described in
the RomWBW User Guid.
## Version 3.6
### Upgrade Notes
- The FZ80 (S100 FPGA Z80) platform has been renamed to SZ80 (S100 Z80)
and has two configurations. SZ80_std is for the generic S100
Z80 CPU. SZ80_fpga is for the FPGA Z80 SBC.
### New Features
### New Hardware Support
- Support for MSX systems.
## Version 3.5.1
@ -94,7 +111,6 @@ This is a patch release of v3.5.
- Enhancements to ASSIGN command to automatically assign drives
(Mark Pruden).
### New Hardware Support
- NABU w/ RomWBW Option Board.

2
ReadMe.md

@ -7,7 +7,7 @@
**RomWBW Introduction** \
Version 3.6 \
Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \
24 Sep 2025
26 Sep 2025
# Overview

2
ReadMe.txt

@ -1,6 +1,6 @@
RomWBW Introduction
Wayne Warthen (wwarthen@gmail.com)
24 Sep 2025
26 Sep 2025

69
Source/Apps/timer/timer.asm

@ -1,17 +1,21 @@
;===============================================================================
; TIMER - Display system timer value
; Version 1.31 24-July-2024
; Version 1.4 25-September-2025
;===============================================================================
;
; Author: Wayne Warthen (wwarthen@gmail.com)
; Updated: MartinR (July 2024) - A user of uppercase mnemonics
; Updated: MartinR (September 2025) - A user of uppercase Z80 mnemonics
;_______________________________________________________________________________
;
; This source code would benefit from a complete resstructuring to aid clarity.
;_______________________________________________________________________________
;
; Usage:
; TIMER [/C] [/?]
; ex: TIMER (display current timer value)
; TIMER /? (display version and usage)
; TIMER /C (display timer value continuously)
; TIMER [/C] [Z] [/?]
; ex: TIMER Display current timer value
; TIMER /? Display version and usage
; TIMER /C Display timer value continuously
; TIMER /Z Set the system timer to zero
;
; Operation:
; Reads and displays system timer value.
@ -21,7 +25,7 @@
; This source code assembles with TASM V3.2 under Windows-11 using the
; following command line:
; tasm -80 -g3 -l TIMER.ASM TIMER.COM
; ie: Z80 CPU; output format 'binary' named .COM (rather than .OBJ)
; ie: Z80 CPU, output format 'binary' named .COM (rather than .OBJ)
; and includes a symbol table as part of the listing file.
;_______________________________________________________________________________
;
@ -31,6 +35,7 @@
; 2019-11-08 [WBW] Add seconds support
; 2024-06-30 [MR ] Display values in decimal rather than hexadecimal
; 2024-07-24 [MR ] Also display value in Hours-Mins-Secs format
; 2025-09-25 [MR ] Add the option to set the system timer back to zero
;_______________________________________________________________________________
;
; Includes binary-to-decimal subroutine by Alwin Henseler
@ -63,14 +68,14 @@ BF_SYSGETSECS .EQU $D1 ; SECONDS subfunction
BF_SYSSETSECS .EQU $D1 ; SECONDS subfunction
;
;ASCII Control Characters
LF .EQU 00AH ; Line Feed
CR .EQU 00DH ; Carriage Return
LF .EQU $0A ; Line Feed
CR .EQU $0D ; Carriage Return
;
;===============================================================================
; Code Section
;===============================================================================
;
.ORG $100
.ORG $0100
;
; setup stack (save old value)
LD (STKSAV),SP ; save stack
@ -98,7 +103,7 @@ INIT:
CALL PRTSTR ; print it
;
CALL IDBIO ; identify active BIOS
CP 1 ; check for HBIOS
CP 1 ; check for HBIOS
JP NZ,ERRBIO ; handle BIOS error
;
LD A,RMJ << 4 | RMN ; expected HBIOS ver
@ -282,10 +287,12 @@ OPTION:
RET Z ; done if so
CP ' ' ; blank?
RET Z ; done if so
CP '?' ; is it a '?'?
JP Z,USAGE ; yes, display usage
CP 'C' ; is it a 'C', continuous?
JP Z,SETCONT ; yes, set continuous display
CP '?' ; Is it a '?' for 'help' command?
JP Z,USAGE ; Yes, display usage
CP 'C' ; Is it a 'C' for 'continuous' command?
JP Z,SETCONT ; Yes, set continuous display mode
CP 'Z' ; Is it a 'Z' for 'zero timer' command?
JR Z,ZEROISE ; Set the timer to zero
JP ERRPRM ; anything else is an error
;
USAGE:
@ -293,9 +300,21 @@ USAGE:
;
SETCONT:
;
OR $FF ; SET A TO TRUE
LD (CONT),A ; AND SET CONTINUOUS FLAG
JR OPTION ; CHECK FOR MORE OPTION LETTERS
OR $FF ; Set A to true
LD (CONT),A ; and set CONT(inous) flag
JR OPTION ; Check for any more option letters.
;
ZEROISE:
;
LD DE,MSGZERO ; Confirm resetting system timer to zero
CALL PRTSTR
;
LD B,BF_SYSSET ; HBIOS SYSSET function
LD C,BF_SYSSETSECS ; SETSECS subfunction
LD DE,$0000 ; set seconds value
LD HL,$0000 ; ... to zero
RST 08 ; Call HBIOS, DE:HL := seconds value
JP EXIT ; Done - so exit back to CCP
;
; Identify active BIOS. RomWBW HBIOS=1, UNA UBIOS=2, else 0
;
@ -772,14 +791,16 @@ LOOPDIV1:
; Messages Section
;===============================================================================
MSGBAN .DB "TIMER v1.31, 24-Jul-2024",CR,LF
MSGBAN .DB "TIMER v1.4, 25-Sep-2025",CR,LF
.DB "Copyright (C) 2019, Wayne Warthen, GNU GPL v3",CR,LF
.DB "Updated by MartinR 2024",0
MSGUSE .DB "Usage: TIMER [/C] [/?]",CR,LF
.DB " ex. TIMER (display current timer value)",CR,LF
.DB " TIMER /? (display version and usage)",CR,LF
.DB " TIMER /C (display timer value continuously)",0
.DB "Updated by MartinR 2024 & 2025",CR,LF,0
MSGUSE .DB "Usage: TIMER [/C] [Z] [/?]",CR,LF
.DB " ex. TIMER Display current timer value",CR,LF
.DB " TIMER /? Display version and usage",CR,LF
.DB " TIMER /C Display timer value continuously",CR,LF
.DB " TIMER /Z Set the timer to zero",0
MSGPRM .DB "Parameter error (TIMER /? for usage)",0
MSGZERO .DB "Setting system timer to zero",0
MSGBIO .DB "Incompatible BIOS or version, "
.DB "HBIOS v", '0' + rmj, ".", '0' + rmn, " required",0
STRTICK .DB " Ticks ",0

22
Source/Doc/Applications.md

@ -2487,6 +2487,7 @@ displays the value of the counter.
`TIMER`
`TIMER /?`
`TIMER /C`
`TIMER /Z`
#### Usage
@ -2494,9 +2495,11 @@ Use `TIMER` to display the current value of the counter.
Use `TIMER /C` to display the value of the counter continuously.
Use `TIMER /Z` to zero the seconds counter.
The display of the counter will be something like this:
`13426 Ticks 268.52 Seconds`
`2859 Ticks 24.18 Seconds 0:00:24.18 HH:MM:SS`
The first number is the total number of ticks since system startup, where
there are 50 ticks per second. The second number is the total number of
@ -2504,15 +2507,18 @@ seconds since system startup. Numbers are displayed in decimal format.
#### Notes
The seconds value is displayed with a fractional value which is not a
an actual fraction, but rather the number of ticks past the seconds
rollover. All values are in hex.
Not all systems will have a system timer. In this case, the
`TIMER` command will output 0 for both ticks and seconds and never
increment.
The primary use of the `TIMER` application is to test the system
timer functionality of your system.
The resolution of the timer is determined by the system timer
frequency which is typically 50Hz. This means that the seconds
fraction will increment 0.02 seconds with each timer tick.
In theory, you could capture the value before and after some process
you want to time.
The primary use of the `TIMER` application is to test the system
timer functionality of your system. However, it can be used to
capture the value before and after some process you want to measure
elapsed runtime.
#### Etymology

Loading…
Cancel
Save