Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Transforming "C" into a Turing equivalent language 004 [ x86 based UTM ]

6 views
Skip to first unread message

olcott

unread,
Sep 1, 2020, 6:16:18 PM9/1/20
to
A Universal Turing Machine (UTM) with the x86 language as its TM
description language.

This x86 based Universal Turing Machine (UTM) directly executes COFF
object files generated by the Microsoft "C" compiler.

There are two restrictions on the "C" code that can be executed in this
virtual machine:
(1) All global data must be initialized.
(2) No library function can be called.

The UTM environment is like a tiny little operating system here are its
only functions:

// allocates memory from Heap_Space
u32* Allocate(u32 size);

// executes a slave UTM in single step debug mode
u32 Debug_Step(u32* master_state, u32* slave_state);

// Saves the execution state of a UTM to state_data
u32 Save_State(u32* state_data);

// Loads the execution state of a UTM from state_data
u32 Load_State(u32* state_data);

When a UTM is running the execution trace of each assembly language
instruction / operating system function call is provided.

After each Debug_Step() virtual machine instruction is executed the
Master UTM can examine the machine state of the Slave UTM.

The recursion depth of UTMs executing other UTMs in Debug-Step mode is
of arbitrary depth.

--
Copyright 2020 Pete Olcott
0 new messages