flat assembler
Message board for the users of flat assembler.

Index > Tutorials and Examples > 16-bit x86 on WHP (Windows Hypervisor Platform)

Author
Thread Post new topic Reply to topic
bitRAKE



Joined: 21 Jul 2003
Posts: 4372
Location: vpcmpistri
bitRAKE 10 Feb 2026, 11:53
Windows GUI lab for editing, building, and executing 16-bit x86 modules on WHP (Windows Hypervisor Platform).

Coding in 16-bit on Windows has been more difficult than in the past, and I would occasionally find myself thinking about a problem in 16-bit. When WHP was released I created some stub programs to execute 16-bit code. Then AI came along and I had some agents convert all my notes into an IDE. Could be an educational interface, but no one learns/uses 16-bit x86 any more.

It is uncertain how much legacy support I will integrate (BIOS, DOS, video modes, etc.) but it meets my current needs to develop 16-bit real and unreal code with very little boilerplate.

Alpha Release for 16-bit testing:
https://github.com/bitRAKE/whp_x16

Edit: added light/dark theme, key shortcuts (faster dev cycle).

(Link snazzy image to make it look more impressive than it is:)
Image

_________________
¯\(°_o)/¯ AI may [not] have aided with the above reply.
Post 10 Feb 2026, 11:53
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 2050
Roman 12 Feb 2026, 12:31
How used this ? In windows 10
I try but not get any like on your screen.
Post 12 Feb 2026, 12:31
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4372
Location: vpcmpistri
bitRAKE 12 Feb 2026, 13:01
Did you follow "Quick Start" steps?

I'm going to guess you don't have WHP:
Quote:
0. See Alex Ionescu's How to install WHP.
... it's an optional Windows feature.

I also assumed, "git clone --recursive <repo>" is known by user.

There is also a user guide.

Edit: I have fixed the steps.

Perhaps it's an older version of WHP? Can you paste the console text?

_________________
¯\(°_o)/¯ AI may [not] have aided with the above reply.
Post 12 Feb 2026, 13:01
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8504
Location: Kraków, Poland
Tomasz Grysztar 12 Feb 2026, 13:52
This snippet of your code:
Code:
    db 67h ; use EDI
    rep stosd    
irks me a bit, because this is exactly what I wanted to avoid when I wrote fasm. See the fasm source, which was sometimes assembled as 16-bit too, and it has such instructions consistently written like:
Code:
        rep     stos dword [edi]    
Post 12 Feb 2026, 13:52
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4372
Location: vpcmpistri
bitRAKE 12 Feb 2026, 14:12
I need to create some examples for the AI to pick up on the alternate syntax.
Post 12 Feb 2026, 14:12
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 2050
Roman 13 Feb 2026, 09:33
rep16 and rep32 and rep64
Code:
rep32 stosd    
Post 13 Feb 2026, 09:33
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8504
Location: Kraków, Poland
Tomasz Grysztar 13 Feb 2026, 12:23
The full syntax also allows to specify segment overrides:
Code:
        rep     movs dword [es:edi],[fs:esi]    
and the assembler verifies that what you request is actually encodable (if, for instance, you forget which string instructions can use a different segment and for which operand).
Post 13 Feb 2026, 12:23
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1453
Location: Piraeus, Greece
Picnic 13 Feb 2026, 16:53
Roman wrote:
How used this ? In windows 10
I try but not get any like on your screen.

Verify your system meets the Hyper-V prerequisites.
It might be because of that.

bitRAKE this is a top-notch project.
I really admire your coding skills.

For some reason I am getting:
Code:
 [ERROR] CreateFileW failed (err=2)    

Maybe I am doing something wrong.
Post 13 Feb 2026, 16:53
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4372
Location: vpcmpistri
bitRAKE 13 Feb 2026, 21:48
Picnic wrote:
this is a top-notch project.
I really admire your coding skills.

For some reason I am getting:
Code:
 [ERROR] CreateFileW failed (err=2)    
Thank you. It is mostly a shim between Tomasz's work and WHP. There is potential for a larger project: different machine configurations, more extensive debugging, etc.

On the error, the only creation is a missing INI file, or the binary modules. Likely, the location of the ASM files is not writeable. It's possible to completely separate whp16.exe from fasmg and the 16-bit assembly files. The initial configuration is the repo layout - perhaps the x16/ directory is readonly.

_________________
¯\(°_o)/¯ AI may [not] have aided with the above reply.
Post 13 Feb 2026, 21:48
View user's profile Send private message Visit poster's website Reply with quote
Jessé



Joined: 03 May 2025
Posts: 82
Location: Brazil
Jessé 18 Feb 2026, 00:15
Great to see someone frying out some crispy floats off the (almost forgotten by "modern" codes) x87 FPU!
Unfortunately, I don't have any support to run this, but I'm certainly here for the assembly code. Cool
Post 18 Feb 2026, 00:15
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2026, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.