Commit de54f113 authored by Martin Ruckert's avatar Martin Ruckert

removing mmixedit from the repository

parent 2b0157f9

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MMIX-Edit", "MMIX-Edit\MMIX-Edit.vcxproj", "{5EFCE61A-9647-4F99-8B76-D33080D6B3E4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5EFCE61A-9647-4F99-8B76-D33080D6B3E4}.Debug|Win32.ActiveCfg = Debug|Win32
{5EFCE61A-9647-4F99-8B76-D33080D6B3E4}.Debug|Win32.Build.0 = Debug|Win32
{5EFCE61A-9647-4F99-8B76-D33080D6B3E4}.Release|Win32.ActiveCfg = Release|Win32
{5EFCE61A-9647-4F99-8B76-D33080D6B3E4}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
This diff is collapsed.
#pragma once
#include "Resource.h"
#include <Windows.h>
#include <stdio.h>
#include <Richedit.h>
#include <CommDlg.h>
Binary files a/mmixedit/src/MMIX-Edit/MMIX-Edit.rc and /dev/null differ
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{5EFCE61A-9647-4F99-8B76-D33080D6B3E4}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>MMIXEdit</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="mmix-arith.w" />
<None Include="MMIX-Edit.ico" />
<None Include="mmix-io.w" />
<None Include="mmix-sim.ch" />
<None Include="mmix-sim.w" />
<None Include="mmixal.ch" />
<None Include="mmixal.w" />
<None Include="mmmix.ch" />
<None Include="mmmix.w" />
<None Include="ReadMe.txt" />
<None Include="small.ico" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="abstime.c" />
<ClInclude Include="MMIX-Edit.h" />
<ClInclude Include="Resource.h" />
<ClInclude Include="SciLexer.h" />
<ClInclude Include="Scintilla.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="mmix-arith.c" />
<ClCompile Include="MMIX-Edit.cpp" />
<ClCompile Include="mmix-io.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsC</CompileAs>
</ClCompile>
<ClCompile Include="mmix-sim.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</ExcludedFromBuild>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsC</CompileAs>
</ClCompile>
<ClCompile Include="mmixal.c" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="MMIX-Edit.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Quelldateien">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Headerdateien">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Ressourcendateien">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="ReadMe.txt" />
<None Include="small.ico">
<Filter>Ressourcendateien</Filter>
</None>
<None Include="MMIX-Edit.ico">
<Filter>Ressourcendateien</Filter>
</None>
<None Include="mmixal.ch">
<Filter>Quelldateien</Filter>
</None>
<None Include="mmixal.w">
<Filter>Quelldateien</Filter>
</None>
<None Include="mmix-arith.w">
<Filter>Quelldateien</Filter>
</None>
<None Include="mmix-sim.ch" />
<None Include="mmix-sim.w" />
<None Include="mmmix.ch" />
<None Include="mmmix.w" />
<None Include="mmix-io.w" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="targetver.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="Resource.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="MMIX-Edit.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="SciLexer.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="Scintilla.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="abstime.c">
<Filter>Quelldateien</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="MMIX-Edit.cpp">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="mmixal.c">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="mmix-arith.c">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="mmix-sim.c">
<Filter>Quelldateien</Filter>
</ClCompile>
<ClCompile Include="mmix-io.c">
<Filter>Quelldateien</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="MMIX-Edit.rc">
<Filter>Ressourcendateien</Filter>
</ResourceCompile>
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/*1:*/
#line 17 "abstime.w"
#include <stdio.h>
#include <time.h>
main()
{
printf("#define ABSTIME %ld\n",time(NULL));
return 0;
}
/*:1*/
\datethis
\def\title{ABSTIME}
@* Intro. This tiny program prints the number of seconds
elapsed since 00:00:00 Greenwich Mean Time
on January 1, 1970. (Greenwich Mean Time is now more properly
called Coordinated Universal Time, or UTC.)
On January 19, 2038, at 03:14:08 UTC,
a 32-bit signed integer will become too small to hold the
desired result. (The number of elapsed seconds will then be $2^{31}$.)
This program will still work on
January 20 of that year if it has been compiled
with a \CEE/ compiler that has type \&{time\_t}
equivalent to \&{long}, provided that \&{long} integers
hold more than 32 bits.
@c
#include <stdio.h>
#include <time.h>
@#
main()
{
printf("#define ABSTIME %ld\n",time(NULL));
return 0;
}
% This material goes at the beginning of all MMIXware CWEB files
\def\topofcontents{
\leftline{\sc\today\ at \hours}\bigskip\bigskip
\centerline{\titlefont\title}}
\font\ninett=cmtt9
\def\botofcontents{\vskip 0pt plus 1filll
\ninerm\baselineskip10pt
\noindent\copyright\ 1999 Donald E. Knuth
\bigskip\noindent
This file may be freely copied and distributed, provided that
no changes whatsoever are made. All users are asked to help keep
the {\ninett MMIX}ware files consistent and ``uncorrupted,''
identical everywhere in the world. Changes are permissible only
if the modified file is given a new name, different from the names of
existing files in the {\ninett MMIX}ware package,
and only if the modified file is clearly identified
as not being part of that package.
(The {\ninett CWEB} system has a ``change file'' facility by
which users can easily make minor alterations without modifying
the master source files in any way. Everybody is supposed to use
change files instead of changing the files.)
The author has tried his best to produce correct and useful programs,
in order to help promote computer science research,
but no warranty of any kind should be assumed.}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
% This file is part of the MMIXware package (c) Donald E Knuth 1999
@i boilerplate.w %<< legal stuff: PLEASE READ IT BEFORE MAKING ANY CHANGES!
\def\title{MMIX-MEM}
\def\MMIX{\.{MMIX}}
\def\Hex#1{\hbox{$^{\scriptscriptstyle\#}$\tt#1}} % experimental hex constant
@s octa int
@* Memory-mapped input and output. This module supplies procedures for reading
@^I/O@>
@^input/output@>
@^memory-mapped input/output@>
from and writing to \MMIX\ memory addresses that exceed 48 bits. Such addresses
are used by the operating system for input and output, so they require special
treatment. At present only dummy versions of these routines are implemented.
Users who need nontrivial versions of |spec_read| and/or |spec_write| should
prepare their own and link them with the rest of the simulator.
Many I/O devices communicate via bytes or wydes or tetras instead of
octabytes. So these prototype routines have a |size| parameter, to
distinguish between the various kinds of quantities that \MMIX\ wants to
read from and write to the memory-mapped addresses.
@p
#include <stdio.h>
#include "mmix-pipe.h" /* header file for all modules */
extern octa read_hex(); /* found in the main program module */
static char buf[20];
static char *kind[]={"byte","wyde","tetra","octa"};
extern octa shift_left @,@,@[ARGS((octa y,int s))@];
/* $y\LL s$, $0\le s\le64$ */
extern octa shift_right @,@,@[ARGS((octa y,int s,int u))@];
/* $y\GG s$, signed if |!u| */
@ If the |interactive_read_bit| of the |verbose| control is set,
the user is supposed to supply values dynamically. Otherwise
zero is read.
@p
octa spec_read @,@,@[ARGS((octa,int))@];@+@t}\6{@>
octa spec_read(addr,size)
octa addr;
int size;
{
octa val;
size&=0x3, addr.l&=-(1<<size);
if (verbose&interactive_read_bit) {
printf("** Read %s from loc %08x%08x: ",kind[size],addr.h,addr.l);
fgets(buf,20,stdin);
val=read_hex(buf);
} else val.l=val.h=0;
switch (size) {
case 0: val.l&=0xff;
case 1: val.l&=0xffff;
case 2: val.h=0;
case 3: break;
}
if (verbose&show_spec_bit) {
printf(" (spec_read ");
switch (size) {
case 0: printf("%02x",val.l);@+break;
case 1: printf("%04x",val.l);@+break;
case 2: printf("%08x",val.l);@+break;
case 3: printf("%08x%08x",val.h,val.l);@+break;
}
printf(" from %08x%08x at time %d)\n",addr.h,addr.l,ticks.l);
}
return shift_left(val,(8-(1<<size)-(addr.l&7))<<3);
}
@ The default |spec_write| just reports its arguments, without actually
writing anything.
@p
void spec_write @,@,@[ARGS((octa,octa,int))@];@+@t}\6{@>
void spec_write(addr,val,size)
octa addr,val;
int size;
{
if (verbose&show_spec_bit) {
size&=0x3, addr.l&=-(1<<size);
val=shift_right(val,(8-(1<<size)-(addr.l&7))<<3,1);
printf(" (spec_write ");
switch (size) {
case 0: printf("%02x",val.l);@+break;
case 1: printf("%04x",val.l);@+break;
case 2: printf("%08x",val.l);@+break;
case 3: printf("%08x%08x",val.h,val.l);@+break;
}
printf(" to %08x%08x at time %d)\n",addr.h,addr.l,ticks.l);
}
}
@ Incidentally, the combined address $a$ and size $s$ could be transmitted
in 64 bits of an actual memory bus, because $a$ is always a multiple of~$2^s$
that is less than $2^{63}$. Thus $(a,s)$ can be packed neatly into the
64-bit number $2a+2^s$. (Think about it.)
@* Index.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
@x
int main(argc,argv)
int argc;
char *argv[];
@y
char* mmmix(FILE* exFile)
@z
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
Binary files a/mmixedit/src/MMIX-Edit/resource.h and /dev/null differ
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment