Page 1 of 1

S-AOS v3.2 — Major Update

Posted: Tue Oct 20, 2026 2:28 am
by Moslem
# S-AOS v3.2 — Major Update

After a substantial amount of development, S-AOS has reached version 3.2. This is a major update to the existing project, with significant work across the kernel, GUI, setup system, filesystem, storage drivers, input handling, user-mode applications, and build system.

## Desktop and GUI

S-AOS now provides a complete graphical desktop environment with:

- Wallpaper
- Mouse cursor
- Application icons
- Transparent pixel-art icons
- Taskbar/dock
- System clock and date
- USB storage status
- Left-aligned desktop shortcuts
- Application windows
- Window close buttons
- Mouse-based application launching
- Keyboard navigation
- Mouse wheel support
- Lock screen
- Settings
- Restart and shutdown controls

Current native GUI applications include:

- Files
- Editor
- Shell
- Calculator
- Calendar
- Snake
- Stopwatch
- Timer
- Hello
- Draw
- Notepad
- Settings
- Control Center

The desktop uses VBE/framebuffer graphics and dynamically adapts to the detected display dimensions. QEMU is currently the primary development and testing environment, with 1920x1080 preferred and compatible fallback modes available. The GUI has also been tested at 640x480.

## First-Boot Setup

S-AOS now includes a first-boot setup system supporting:

- English
- French
- Spanish
- Italian
- QWERTY
- AZERTY
- Username
- Password
- Password confirmation
- Password hint
- Masked password input
- Required-field validation
- Password mismatch detection
- Disk-save error reporting

User information is stored in a persistent `USER.DAT` profile.

The profile stores information such as:

- Username
- Password
- Password hint
- Language
- Keyboard layout
- Login/profile information

The selected language and keyboard layout are reused throughout the operating system.

## Boot Modes

The boot process supports multiple startup paths:

- Text-mode setup
- GUI setup
- Text-mode operating environment
- Graphical desktop

The selected boot mode can be saved through profile/CMOS data for subsequent boots.

## Lock Screen

S-AOS now includes a graphical lock screen with:

- Centered live clock
- Date
- Password panel
- Masked password entry
- Enter-to-unlock
- Password verification
- Return to desktop

## Settings and Control Center

The Settings system provides configuration for:

- Language
- Keyboard layout
- QWERTY/AZERTY
- Restart/shutdown confirmations
- Profile information
- Keyboard navigation
- Mouse wheel behavior

The system information page reports:

- CPU vendor/brand
- Logical processor count
- VBE width
- VBE height
- Color depth
- Framebuffer stride
- FAT32/storage status

Some hardware information is intentionally not reported yet, including reliable total RAM and monitor identity, because the current boot protocol does not provide a complete memory map or EDID implementation.

The Control Center currently contains panels for:

### Network

- DHCP/static selection
- Network readiness status
- Future networking configuration

Networking itself is not implemented yet; there is currently no Ethernet/Wi-Fi/TCP/IP stack.

### Display

- VBE dimensions
- Display scale
- Graphical state

### Sound

- PC speaker state

### Users and Login

- Current profile
- Lock-screen status

### Storage

- FAT32 status
- USB/ATA backend

### System Information

- CPU
- Processor count
- Resolution
- Color depth
- Framebuffer stride
- FAT32 status

The Control Center supports keyboard and mouse navigation, including arrows, mouse wheel, Enter, left/right navigation, Escape, and the red close button.

## FAT32 and Storage

Storage support has been expanded significantly.

S-AOS currently contains:

- ATA PIO support
- FAT32 filesystem support
- USB storage through xHCI
- FAT32 volume discovery
- Root-directory handling
- Directory listing
- File opening
- File reading
- File creation
- File deletion
- File renaming
- File seeking
- File writing
- Cluster allocation
- Directory-entry management
- FSInfo handling

The build system can create FAT32 disk images and install:

- Language files
- Sound files
- User profiles
- XEC applications

The raw S-AOS disk layout also contains support for probing the FAT32 system volume at LBA 1800 when normal partition discovery is unavailable.

## Keyboard

S-AOS supports PS/2 keyboards with:

- Extended scan codes
- Shift
- Caps Lock
- QWERTY
- AZERTY
- Backspace
- Enter
- Escape
- Function keys
- Numeric keypad
- Operators
- Decimal key
- Extended slash
- Application shortcuts

A shared keyboard translator is used across the system so that the selected keyboard layout can be reused by different applications.

## Mouse

PS/2 mouse support includes:

- Cursor movement
- Left-click
- Dragging
- Mouse wheel
- GUI buttons
- Window controls
- Application launching
- Drawing
- Files navigation
- Calculator controls
- Control Center navigation

The mouse implementation also distinguishes normal mouse packets from keyboard-controller data and handles auxiliary packets.

## Graphics

The graphical subsystem provides:

- VBE modes
- Framebuffer access
- Pixel drawing
- Rectangles
- Lines
- Ellipses/circles
- Filled shapes
- Text rendering
- Windows
- Buttons
- Icons
- Taskbars
- Wallpaper
- Cursor rendering
- Screen redraw
- Dynamic display dimensions
- Framebuffer stride handling

The GUI currently uses 32 MiB of QEMU VGA memory during testing.

The icon atlas contains 14 icons at 32x32 pixels.

## Graphical Calculator

S-AOS now includes a mouse-operated scientific calculator.

Supported operations include:

- Addition
- Subtraction
- Multiplication
- Division
- Equality
- Backspace
- Clear
- Power
- Factorial
- Factor counting
- Square
- Developer information
- Help

The calculator uses unsigned 64-bit arithmetic.

Power operations support exponents up to 63, with overflow detection.

Factorial values above 20 are rejected.

`FACT` counts positive divisors. For example:

`FACT(12) = 6`

The calculator also rejects values above its supported factor-counting limit and reports invalid operations such as division by zero, underflow, overflow, unsupported factorials, and invalid powers.

Verified operations include:

- `2 + 3 = 5`
- `2 ^ 3 = 8`
- `5! = 120`
- `FACT(12) = 6`

## DRAW

The graphical Draw application provides a fullscreen drawing canvas with:

- Freehand drawing
- Continuous mouse drawing
- Straight lines
- Rectangles
- Ellipses
- Flood fill
- Eraser
- Multiple brush sizes
- Color selection
- Clear canvas
- Toolbar controls

Available tools include:

- Pen
- Line
- Bucket
- Eraser
- Rectangle
- Ellipse
- Brush size
- Palette
- Clear

The application supports Escape, Alt+F4, and the red close button.

## NOTEPAD

S-AOS now includes a fullscreen graphical Notepad/editor.

Features include:

- Text entry
- Cursor movement
- Text insertion
- Backspace
- Delete
- Newline
- Home/End
- New document
- Keyboard input
- Shift
- Caps Lock
- QWERTY/AZERTY
- Numeric keypad
- Underscore input

Shortcuts include:

- F2 — Save
- F3 — Open
- Ctrl+S — Save
- Ctrl+O — Open
- Ctrl+N — New

The GUI file browser can open files directly in Notepad.

Persistent fullscreen buffer saving is still incomplete, so this part of the editor remains under development.

## FILES

The graphical Files application provides a FAT32 browser with:

- Navigation/address bar
- Quick-access sidebar
- Directory listing
- Current-folder title
- Breadcrumb path
- Refresh
- New-file menu
- New-folder menu
- Folder navigation
- Back navigation
- File opening
- USB storage information

Generated names include:

- `NEWFILE<n>.TXT`
- `NEWDIR<n>`

Files larger than 511 bytes are reported rather than silently truncated.

Files uses the FAT32 driver and the kernel syscall interface.

## SHELL

S-AOS includes a graphical shell window with:

- `/` directory display
- Editable prompt
- `S-AOS SMD >` prompt
- Character input
- Backspace
- Enter
- Visible command history
- New prompts
- Mouse polling
- Window close controls

The Enter handling bug that previously caused the shell to close has been fixed. Commands now submit correctly and return to a new prompt.

This is an S-AOS command shell and is not intended to be a full Linux/Unix shell.

## Other Applications

S-AOS also contains multiple XEC applications.

### Calendar

Calendar is available as an XEC application with generated variants for:

- Standard
- 16-bit
- 32-bit
- 64-bit

### Timer

Timer is available in standard, 16-bit, 32-bit, and 64-bit XEC variants.

### Stopwatch

The graphical Stopwatch displays:

`HH:MM:SS:CC`

Controls include:

- Start
- Pause
- Reset
- Space — Start/Pause
- R — Reset
- Escape/Alt+F4/red-X — Close

### Snake

S-AOS contains a native graphical Snake game along with XEC variants.

### Hello

The Ring-3 Hello application demonstrates user-mode execution and console I/O.

It loads a user-mode XEC application, writes to stdout, waits for keyboard input, and exits.

### Editor

An XEC Editor is available with generated standard, 16-bit, 32-bit, and 64-bit variants.

### Games

Generated GAMES XEC variants also exist, although the legacy GAMES desktop tile is no longer used.

## Ring-3 and XEC

S-AOS has a user-mode application format called XEC.

The current XEC execution environment includes:

- Virtual address `0x00400000`
- 32-byte header
- Entry offset
- User-mode execution
- `int 0x80` system-call interface
- Register-based syscall ABI

The syscall ABI uses:

- RAX — syscall number
- RDI — argument 1
- RSI — argument 2
- RDX — argument 3
- R10 — argument 4
- R8 — argument 5
- R9 — argument 6
- RAX — return value

## System Calls

Current system calls include:

```text
SYS_EXIT 0
SYS_READ 1
SYS_WRITE 2
SYS_OPEN 3
SYS_CLOSE 4
SYS_LSEEK 5
SYS_GETKEY 6
SYS_CLEAR 7
SYS_CREATE 8
SYS_DELETE 9
SYS_RENAME 10
SYS_READDIR 11
SYS_GETTIME 12
SYS_SLEEP 13
SYS_REBOOT 14
SYS_HALT 15
SYS_GETUSER 16
SYS_GETCWD 17
SYS_ALLOC 18
SYS_GETINFO 19
SYS_RUN_APP 20
SYS_YIELD 21
SYS_EXEC 22
```

Standard descriptors are:

- STDIN = 0
- STDOUT = 1
- STDERR = 2

User applications can therefore perform console I/O, file operations, directory operations, seeking, time access, sleeping, rebooting, halting, user/profile access, working-directory access, memory allocation, system-information queries, application execution, and yielding.

## Kernel and Memory Systems

The kernel currently contains:

- GDT
- IDT
- CPU exception handlers
- Page-fault handling
- Physical memory management
- User/kernel separation
- Syscall dispatch
- Basic memory allocation

The boot process transitions through:

- 16-bit startup
- 32-bit protected mode
- 64-bit long mode

The system includes both exception and page-fault handling.

## Audio

S-AOS includes:

- PC speaker support
- Sound status
- SB16 kernel code
- QEMU SB16 emulation
- SDL audio support

The startup sound is loaded from:

`Sounds\STARTUP.WAV`

The QEMU runner uses SDL audio with SB16 emulation, 44.1 kHz, stereo, and 16-bit signed audio.

Physical audio hardware support is not guaranteed on arbitrary systems.

## CPU and Hardware Information

S-AOS uses CPUID to obtain:

- CPU vendor
- CPU brand
- Logical processor count

The GUI also reports:

- VBE resolution
- Color depth
- Framebuffer stride
- FAT32/storage status

Reliable total RAM, monitor identity, complete ACPI support, and universal hardware information are not implemented yet.

## Restart and Shutdown

S-AOS provides:

- Restart
- Shutdown/halt
- QEMU ACPI shutdown support
- Reset
- GUI confirmation dialogs

Because complete ACPI support is not implemented, physical power-off cannot be guaranteed on arbitrary PCs.

## Build System

The primary Windows build process is handled by:

`build.bat`

The build process can:

- Check NASM
- Check QEMU
- Assemble the bootloader
- Assemble the second stage
- Build the 16-bit kernel
- Build the 32-bit kernel
- Build the 64-bit kernel
- Build the GUI kernel
- Build XEC applications
- Create the FAT32 image
- Install language files
- Install sound files
- Start QEMU

Additional build/test scripts are available for XEC applications, FAT32 image generation, and QEMU testing.

## Project Scale

S-AOS has grown substantially from its original implementation.

The current assembly source contains more than 31,000 lines across the `.asm` files, covering the boot process, kernels, GUI, drivers, filesystem, applications, input handling, system calls, and supporting subsystems.

The project is still actively under development, particularly in the areas of hardware compatibility, storage reliability, networking, and desktop functionality.

## Current Limitations

S-AOS does not currently provide:

- Ethernet
- Wi-Fi
- TCP/IP
- Internet access
- Complete ACPI
- Guaranteed physical shutdown on arbitrary PCs
- Reliable total-RAM reporting
- EDID monitor detection
- A full Unix/Linux shell
- POSIX process semantics
- Package management
- A compiler inside the OS
- A web browser
- Modern filesystems beyond FAT32
- Fully persistent fullscreen Notepad saving
- Universal graphics hardware support
- Universal audio hardware support
- Universal USB-controller support
- Unlimited-precision arithmetic
- Floating-point arithmetic
- Full signed/negative-number arithmetic in the calculator
- Factorial values above 20
- Arbitrarily large powers
- Unlimited factor-counting inputs

QEMU remains the strongest and most predictable development/testing environment at this stage.

## What’s Next

Development is continuing toward improving:

- Real-hardware compatibility
- USB mass-storage reliability
- FAT32 write persistence
- Desktop functionality
- Application support
- Hardware detection
- Storage drivers
- GUI features
- User-mode execution
- Overall system stability

S-AOS v3.2 represents a major step forward from the earlier versions of the project, particularly in the transition from a basic experimental OS into a much more complete graphical operating environment.
Download it at : https://github.com/moslemhamoudi6-cyber ... es/tag/GUI