Skip to content
ProjectsWritingAboutCVLinks
WA
Hire me
HomeProjectsWritingAboutCVLinks

Have a useful problem?

Let's make the next
thing worth using.

© 2026 Wasif AliBuilt around evidence, not hype. Privacy
WASIF ALI
Home/Projects/Real-Time Digital Clock & Stopwatch

Case study, Systems · Assembly

Real-Time Digital Clock & Stopwatch
Multi-function time UI · x86 Assembly

A real-time digital clock and stopwatch in x86 Assembly — a 7-segment ASCII display, live date, 12/24-hour toggle and a millisecond-precision stopwatch, all driven by a keyboard state machine.

Complete — presented with a live demo (2026).Systems · Assembly
View source All projects
Full presentation and live demo — slides, the running clock and stopwatch, and the assembly source.

Context

The problem

A console clock is easy to fake and hard to make feel alive. This one renders huge 7-segment digits from ASCII blocks, keeps real system time via the Win32 API, and switches between clock, stopwatch and about screens without flicker.

My role: COAL semester project (solo), Air University Kamra.

Implementation

How it works

Draw digits, don’t print them

Each digit is a 7-segment figure drawn from # blocks by dedicated SegA–SegG procedures, with a colon separator between pairs.

One loop, three modes

A state machine (currentMode) dispatches input and rendering between clock, stopwatch and about screens.

Fix the environment, not the user

A +12-hour wrap-around compensates for Wine’s broken AM-only time reporting, and a needsClear flag defers screen clears to mode changes.

Implementation highlights

  • 7-segment ASCII digits rendered from # blocks, 6 rows × 6 cols
  • Live clock via GetLocalTime, refreshing every ~50 ms
  • Millisecond-precision stopwatch with pause-safe elapsed time
  • 12/24-hour toggle with noon and midnight edge cases handled
  • Keyboard-driven 3-mode state machine (Clock, Stopwatch, About)
  • Colour-cycling display with flicker-free redraws

Evidence

What can be verified

The points below summarize the public repository and owner-provided CV where noted. Read the source for implementation details before drawing further conclusions.

Code763 lines

Single Project.asm file, 14 procedures.

Refresh~50 ms

Live clock updates via GetLocalTime.

Boundaries

Limitations and next questions

  • Console application; runs under Wine or Windows with MASM.
  • Time fix is specific to the Wine environment it was demoed in.
Evidence-first note: a live demo demonstrates an interface and workflow; it does not by itself prove security, scale, or real-world impact.

Technical overview

x86 AssemblyMASMIrvine32Win32 API

Project links

Inspect the original implementation and, where available, the live application.

Repository

Last content review: 14 November 2026. Details may change as project repositories evolve.