KASM, KINT, and other Komplex Koncepts...

In the winter/spring of 2001, while working on Lunatile and the 5.0 revision of Solitile, I decided that enough was enough. I was tired of being jerked around by Microsoft every couple of years when they decided to introduce their next "let's keep the competition off-balance and make boatloads of more money" version of Windows. That, in addition to several other reasons, got me off my duff, and I started work on my own "operating environment" and interpreted programming language. Yes, I could have used Java, but there's things about it which I don't care for, and that would have just put me at the mercy of a different set of masters. And he with no master drifts aimlessly at the whim of the four winds.... er.... umm.... never mind.

Anyway, I designed my own CPU (the K-CPU) with its own set of registers and opcodes, wrote an assembler program (KASM) that would process KASM source files (.KA files) into K object files (.KO files), and then wrote a linker (KLNK) that would link the object files together into an executable file (.KE file), and then I wrote an interpreter program (KINT) which would interpret (execute) the .KE file. THEN.... I started rewriting, from the ground up, Sherlock in the KASM language. Along the way, I had to write my own library of functions to provide menus, dialogs, controls, user interface, etc, etc. Nine months later (an appropriate time period...) Sherlock 5.0 was released, with major new features, written in my own intrepreted language. Knarly Mazes soon followed, also written in this language, and then Latin Squares, etc, and I'm intending to write all future games in this language/environment.

Why? Well, by porting (modifying and recompiling) the KINT interpreter program to run on another computer and/or operating system (like unix, Linux, MacOS, etc), all games written in the language will automagically work on that other platform, EXACTLY as they do on the MS Windows platform, with no further modifications to the games themselves. (That's assuming, of course, that the other platform has sufficient disk storage, RAM, and display graphics capabilities to support the games... handhelds will still be a challenge for a few more years.) Just one porting job (of a reasonably small, simple, but not trivial program), KINT, and ALL of the games automatically work. What could be better? :-)


In 2021, having semi-retired from writing new games, I got intrigued by a game I'd written for the HP-85 computer in 1980 called ASTEROIDS. Knowing there was zero commercial value in it, I decided to re-implement it in my KINT environment, expanding it and modernizing it (somewhat). In the process of doing that, I realized I needed better floating point math than my KINT environment supported (which was pretty much none :-), and that got me to thinking about how far computers have come since 2001, and one thing lead to another (as they will)... So, after completing KNARLY ASTEROIDS, I began playing around with the idea of a whole new KINT CPU design, completely incompatible with earlier KINT designs, but thus also unhinged ...er... untethered from earlier designs. The result, about 15 months later, is KINT 6 and the Crocotile game completely rewritten to use that new KINT platform. The first version of Crocotile was written in KASM 1 assembly language, and in addition to a new KINT CPU design, I also wanted to do some redesigning of the user interface for menus, dialogs, player settings, etc. Crocotile was one of four games that were still written in KASM 1 assembly language (instead of C), so I chose it for a "test case" for developing KINT 6 and the user interface library to go along with it, as well as the new KLCC C compiler and the new KASM 6 assembler/linker.

So, all of my games (EXCEPT for Crocotile 2.0) are written in the KINT 1 through 5 environment, which means they can all be run using the latest KINT 5 interpreter. However, Crocotile 2.0 requires the KINT 6 interpreter, and the KINT 6 interpreter can NOT run any of the other games, as the CPU designs and the user interface architectures are significantly (if not totally) different. The other games COULD be ported to KINT 6, but that would be mind-numbingly boring work, and is unlikely to happen. However, Occam's Quilt, Descartes Enigma, and Descartes Rainbow are still written in KINT 1 assembly language, and it would be nice to rewrite them in C ...someday. IF that ever happens, it will get done using the new KINT 6 platform. In the even unlikelier chance that I ever develop a NEW game, that, too, would happen using KINT 6. KINT 6 is my future ...such as it is. :-)


Why do you care? If you're not a programmer, you probably don't. If you ARE a programmer, here's the deal: I'm making the source codes to the KINT interpreter publicly available for your own private use. You may NOT redistribute them. You may NOT use them in a commercial product. You may NOT distribute any modified or ported version of the the program without my written permission. Under NO circumstances may you distribute the licensed versions of any of my programs (the .KE files). What can you do?

You MAY modify and recompile the sources for your own uses. If you wish to share a ported version of the KINT interpreter with others, you MAY send a copy of the files to me and I'll add them to this page (I intend to maintain my copyrights on the sources, and to keep the distribution of the interpreter in a central place, like right here, for the time being). When I'm dead and gone, dust in the wind, a spark no-longer in anyone's eye, then you can do whatever you want with the KINT sources. Until then, use them for your own private use and none other. Fair enough? :-)

Starting with version 1.04, the KASM and KLNK programs are also included in the package, along with a second sample program, so that you can build your own test programs to help in porting the KINT program.

In KINT 6, the Crocotile program is included (along with all the other tools, of course) to aid in the porting/debugging of the interpreter.


Here's the ZIP file containging the KINT 6 development package. The latest version is 6.0.19:

KINT_6_0_19.zip - the latest 64-bit KINT 6 development environment(Last updated Dec 11, 2022.)


I've modified KINT and the KLCC C compiler to support 64-bit data types (double, long long, etc.) Soon (a month or two?) I'll upload the latest KINT package for the latest interpreter. But here is the KRCC portion (the core of the compiler) of the KLCC C compiler, as well as my Code::Blocks projects of several other components. See the aaa_KASERnotes.txt for brief notes about the modifications I made to the source code. NOTE: one other change that was made to the compiler back in 2004 was the addition of the _asm() function to support in-line KASM assembly language, which involves an addition to the end of the table in token.h, the asm.h file (included in dag.c, expr.c and gen.c), as well as modifications to those three .c files for processing _asm() statements.

KINT_krcc.zip - the latest 64-bit KRCC component of the KLCC (LCC) C compiler, as a Code::Blocks project.(Last updated Aug 2, 2021.)
kcpp.zip - the LCC C pre-processor, as a Code::Blocks project.(Last updated Aug 2, 2021.)
klcc.zip - the LCC C control program, as a Code::Blocks project. Also includes, in a sub-folder, the 'ops' project.(Last updated Aug 2, 2021.)

So, you run klcc on the .c source file of choice
klcc runs the .c file through kcpp, the C pre-processor
then pipes the output of kcpp into krcc, the actual compiler
which then outputs the target assembly language results.

Running "klcc -?" will display the syntax and list of optional command line switches/arguments for the compiler.
Running "klcc -E src.c" will run the file "src.c" through kcpp (the C pre-processor) and output (to standard out) the results.
So, "klcc -E src.c > pre.c" will create a pre-processed version of src.c in pre.c.
You could then use "pre.c" as the input to krcc if you needed to debug krcc.


KINT 4.5

Version 4.5 of the KINT package made these changes:
1) CHANGED: Completely rewritten MIDI code because Win 10 broke the old stuff.
2) REMOVED: A bunch of #if code for POCKET_PC and such.
3) ADDED: Code to tell Windows that this app is DPI aware, so don't scale the window.
4) ADDED: Code to return the pixel size of the CURRENT display (in a multi-monitor system) rather than the MAIN display.
5) CHANGED: Probably several other minor things I don't remember.

KINT 4.5 is (as far as I know) totally backwards compatible to version 2.0.

Microsoft Windows

Here's the KINT 4.5 source files and documentation (which is, in its entirety and in all its separate pieces, copyrighted 2016 by Everett Kaser):

MSKINT45.EXE - the KINT sources and documentaion for Microsoft Windows (32-bit) (Last updated Nov 23, 2016.)
MSKINT45.ZIP - the same file as a standard ZIP (instead of the above Windows self-extracting .EXE file)

A README.TXT file is included that you should read first, as it contains much (ok, some...) useful information regarding the other files in the package. MANUAL.DOC in the DOC folder contains much useful information. If you have questions, comments, etc, send email to: everett@kaser.com.

Mac OS X

(Sorry, the 4.5 OS X code is not yet available... but soon!)

KINT 4.4

Version 4.4 of the KINT package made these changes:
1) Fixed problem with LoadBM transparencies, and fixed a problem in LEA instruction.

KINT 4.4 is (as far as I know) totally backwards compatible to version 2.0.

Microsoft Windows

Here's the KINT 4.4 source files and documentation (which is, in its entirety and in all its separate pieces, copyrighted 2012 by Everett Kaser):

MSKINT44.EXE - the KINT sources and documentaion for Microsoft Windows (32-bit) (Last updated Dec 2, 2012.)
MSKINT44.ZIP - the same file as a standard ZIP (instead of the above Windows self-extracting .EXE file)

A README.TXT file is included that you should read first, as it contains much (ok, some...) useful information regarding the other files in the package. MANUAL.DOC in the DOC folder contains much useful information. If you have questions, comments, etc, send email to: everett@kaser.com.

KINT 4.2

Version 4.2 of the KINT package made these changes:
1) Addition of support for a 'tipping' mouse wheel for horizontal scrolling (currently only supported in Knarly Hexes)

KINT 4.2 is (as far as I know) totally backwards compatible to version 2.0.

Microsoft Windows

Here's the KINT 4.2 source files and documentation (which is, in its entirety and in all its separate pieces, copyrighted 2009 by Everett Kaser):

MSKINT42.EXE - the KINT sources and documentaion for Microsoft Windows (32-bit) (Last updated April 3, 2009.)
MSKINT42.ZIP - the same file as a standard ZIP (instead of the above Windows self-extracting .EXE file)

A README.TXT file is included that you should read first, as it contains much (ok, some...) useful information regarding the other files in the package. MANUAL.DOC in the DOC folder contains much useful information. If you have questions, comments, etc, send email to: everett@kaser.com.

Mac OS X

MacKINT42.zip is the source files for the interpreter, along with the game icons and the .plist files.

KINT 4.0

Version 4.0 of the KINT package made these changes:
1) File handling in MAIN.C to create/write files to AppData folder rather than PgmPath folder.
2) Fixed a bug in SYS_LINES that was accessing memory directly rather than through the GEMMEMW() macro.
3) Added the SysGetSystemData pseudo-opcode.
4) Fixed a bug in SYS_CLIP to prevent bitmap operations outside the physical bitmap memory on systems with multiple displays.

See MANUAL.DOC for further details. KINT 4.0 is (as far as I know) totally backwards compatible to version 2.0.

Microsoft Windows

Here's the KINT 4.0 source files and documentation (which is, in its entirety and in all its separate pieces, copyrighted 2008 by Everett Kaser):

MSKINT40.EXE - the KINT sources and documentaion for Microsoft Windows (32-bit) (Last updated September 29, 2008.)
MSKINT40.ZIP - the same file as a standard ZIP (instead of the above Windows self-extracting .EXE file)

A README.TXT file is included that you should read first, as it contains much (ok, some...) useful information regarding the other files in the package. MANUAL.DOC in the DOC folder contains much useful information. If you have questions, comments, etc, send email to: everett@kaser.com.


KINT 3.5

Version 3.5 of the KINT package just makes a couple of minor changes to the Windows PRINT dialog and the SystemMessage() dialog title bar. See MANUAL.DOC for further details. KINT 3.5 is (as far as I know) totally backwards compatible to version 2.0.

Microsoft Windows

Here's the KINT 3.5 source files and documentation (which is, in its entirety and in all its separate pieces, copyrighted 2007 by Everett Kaser):

MSKINT35.EXE - the KINT sources and documentaion for Microsoft Windows (32-bit) (Last updated December 5, 2007.)
MSKINT35.ZIP - the same file as a standard ZIP (instead of the above Windows self-extracting .EXE file)

A README.TXT file is included that you should read first, as it contains much (ok, some...) useful information regarding the other files in the package. MANUAL.DOC in the DOC folder contains much useful information. If you have questions, comments, etc, send email to: everett@kaser.com.

Mac OS/X

The changes between KINT versions 3.4 and 3.5 are MS-Windows specific and don't affect the Mac version, so use the 3.4 Mac OS/X version available below.

KINT 3.4

Version 3.4 of the KINT package adds support for playing of WAV files that reside in memory, and adds an additional return value to the SysFileSize function. See MANUAL.DOC for further details. KINT 3.4 is (as far as I know) totally backwards compatible to version 2.0, although 3.4 is required for the newest games (starting with Fermat's Fences and MESH:Hero 3.0).

Microsoft Windows

Here's the KINT 3.4 source files and documentation (which is, in its entirety and in all its separate pieces, copyrighted 2007 by Everett Kaser):

MSKINT34.EXE - the KINT sources and documentaion for Microsoft Windows (32-bit) (Last updated June 12, 2007.)
MSKINT34.ZIP - the same file as a standard ZIP (instead of the above Windows self-extracting .EXE file)

A README.TXT file is included that you should read first, as it contains much (ok, some...) useful information regarding the other files in the package. MANUAL.DOC in the DOC folder contains much useful information. If you have questions, comments, etc, send email to: everett@kaser.com

Apple Mac OS/X

Here's the KINT 3.4 source files and documentation for the Mac OS/X port done by Brad Oliver:

OSX_KINT34.ZIP - the KINT sources and documentaion for Microsoft Windows (32-bit) (Last updated Dec 15, 2007.)

A README.TXT file is included that you should read first, as it contains much (ok, some...) useful information regarding the other files in the package. MANUAL.DOC in the DOC folder contains much useful information. Regarding the MAC specific files, see SRC/Mac Source/Mac Read Me!.rtf. If you have questions, comments, etc, regarding the general KINT system, send email to: everett@kaser.com. If you have questions about the Mac OS/X specific files, send email to: bradman@pobox.com.

 

KINT 3.3

Version 3.3 of the KINT package adds support for smooth stretching (or compressing) of MASKED bitmaps, additional pseudo-opcodes for supporting floating point math operations, fixed problems with KPrint routines, added the SysSleep opcode, and fixed several other bugs in the graphics routines. KINT 3.3 is (as far as I know) totally backwards compatible to version 2.0, although 3.3 is required for the newest games (starting with Baker Street and Honeycomb Hotel 2.0).

Microsoft Windows

Here's the KINT 3.3 source files and documentation (which is, in its entirety and in all its separate pieces, copyrighted 2006 by Everett Kaser):

MSKINT33.EXE - the KINT sources and documentaion for Microsoft Windows (32-bit) (Last updated December 7, 2006.)
MSKINT33.ZIP - the same file as a standard ZIP (instead of the above Windows self-extracting .EXE file)

A README.TXT file is included that you should read first, as it contains much (ok, some...) useful information regarding the other files in the package. MANUAL.DOC in the DOC folder contains much useful information. If you have questions, comments, etc, send email to: everett@kaser.com

 

KINT 3.0

Version 3.0 of the KINT package supports a C compiler for generating KASM/KINT programs from standard C (not C++) source files. KINT 3.0 is (as far as I know) totally backwards compatible to version 2.0, although 3.0 is required for the newest games (starting with Knarly Jigs and Knarly Works 2.0).

Besides a C compiler (a port of the LCC compiler), games written for 3.0 (and on into the future) use an entirely new library of UI and Help routines that place the toolbar/menu downl the left side of the screen rather than across the top, with numerous enhancements from the old UI library. The UI library, however, is not publicly available. Sorry 'bout that.

Microsoft Windows

Here's the KINT 3.0 source files and documentation (which is, in its entirety and in all its separate pieces, copyrighted 2005 by Everett Kaser):

MSKINT30.EXE - the KINT sources and documentaion for Microsoft Windows (32-bit) (Last updated November 19, 2005.)
MSKINT30.ZIP - the same file as a standard ZIP (instead of the above Windows self-extracting .EXE file)

A README.TXT file is included that you should read first, as it contains much (ok, some...) useful information regarding the other files in the package. MANUAL.DOC in the DOC folder contains much useful information. If you have questions, comments, etc, send email to: everett@kaser.com

 

KINT 2.4

As I've written further games, I've found additional changes or ...um... additions... that I wanted to make. KINT 2.4 is the latest version. 2.4 is (as far as I know) totally backwards compatible to version 2.0, although 2.4 is required for the newest games (such as Watson's Map and Dinner With Moriarty 2.0).

Microsoft Windows

Here's the KINT 2.4 source files and documentation (which is, in its entirety and in all its separate pieces, copyrighted 2004 by Everett Kaser):

MSKINT24.EXE - the KINT sources and documentaion for Microsoft Windows (32-bit) (Last updated November 27, 2004.)
MSKINT24.ZIP - the same file as a standard ZIP (instead of the above Windows self-extracting .EXE file)

The ZIP file contains a README.TXT file that you should read first, as it contains much (ok, some...) useful information regarding the other files in the package. MANUAL.DOC in the DOC folder contains much useful information. If you have questions, comments, etc, send email to: everett@kaser.com

 

KINT 2.0

In January 2003, I started work on a port of Sherlock to the Pocket PC handheld computers. This required a few changes to the KINT interpreter, and then one thing followed another, and pretty soon I'd almost completely rewritten the entire interpreter, doing all of the graphics routines myself rather than calling the OS (except for the final bit-blitting of the screen bitmap to the screen), as well as adding a bunch of new functionality. Some of this new functionality was heavily used in the next game, Occam's Quilt (such as colorization and alpha-blending). I tried to keep the 2.0 interpreter backwards-compatible so that it could still run 1.x KASM programs (like Sherlock, Knarly Mazes, and Latin Squares), and was successful (I believe) except in one case: when printing. The SysGetFont changed so drastically that, rather than doing all of the printing myself to memory (as I did with the screen output), I switched to a separate SysPrintFont call, so printing is somewhat broken when running a 1.x KASM program on the 2.0 interpreter. But since that's a pretty minor aspect of most of my games, I was willing to live with that. When I next revise any of those three older games, I'll update them so that they become 2.0 programs, and that'll be that. Most of the 2.0 changes were things that had been in the back of my mind for quite a while. I don't forsee any more massive changes like this in the future, but who knows. A couple of years from now, I may be getting bored... :-)

Microsoft Windows

Here's the KINT 2.0 source files and documentation (which is, in its entirety and in all its separate pieces, copyrighted 2003 by Everett Kaser):

MSKINT20.ZIP - the KINT sources and documentaion for Microsoft Windows (32-bit)
(Last updated April 19, 2003.)

The ZIP file contains a README.TXT file that you should read first, as it contains much (ok, some...) useful information regarding the other files in the package. MANUAL.DOC in the DOC folder contains much useful information. If you have questions, comments, etc, send email to: everett@kaser.com

 

KINT 1.0

Microsoft Windows

Here's the KINT 1.x source files and documentation (which is, in its entirety and in all its separate pieces, copyrighted 2002 by Everett Kaser):

MSKINT104.ZIP - the KINT sources and documentaion for Microsoft Windows (32-bit)
(Last updated July 15, 2002. See "REVS.TXT" file for changes.)

The ZIP file contains a README.TXT file that you should read first, as it contains much (ok, some...) useful information regarding the other files in the package. If you have questions, comments, etc, send email to: everett@kaser.com

Apple Mac

A gentleman named Ed Wall has ported the KINT 1.04 interpreter to the Apple Mac platform, for running on OS 9.x and as a Classic application in OS X 10.2. He has also now ported it to run natively in OS X 10.3 and above. I don't have a Mac myself, so am unable to test or explore the following archives, so these are provided "as-is" and you use at your own risk.

The following archives contain the SHAREWARE (demo) versions of Sherlock, Knarly Works, and Latin Squares, in .SEA.BIN archives suitable for unpacking on a Mac (or so I'm told). Each archive also contains a documentation file that talks about how to use the programs on a Mac. There are also three archives contain "extras", the additional image sets for those three games. NOTE: THE LICENSED VERSIONS OF THESE GAMES ARE NOT AVAILABLE FOR THE MAC PLATFORM AT THIS TIME. (However, if you have access to a Windows platform, you could purchase and install the licensed game(s) on a Windows platform, then copy the MAIN.KE file from there to your Mac machine, and acquire a licensed version on your Mac in that way. Each game has a MAIN.KE which is actually the game code for that game. The MAIN.KE in the shareware and licensed versions are different, but the interpreter program is the same, so substituting the licensed MAIN.KE for the shareware MAIN.KE should do the trick. However, sometimes there are a few other files that need to be copied: on Sherlock, you'd also need to copy PRECALC7 and PRECALC8. On Knarly Mazes, you'd also need to copy PRE_A15, PRE_B11, PRE_B13, and PRE_B15. On Latin Squares, you'd also need to copy PRECALC4, PRECALC5, PRECALC6, PRECALC7, and PRECALC8. However, you're "on your own" doing this, as I can't support it, not having any Mac platforms "in house." NOTE: if you get the licensed version on a Mac in this fashion, you must then UNinstall the copy on the Windows platform!) Ed's port of the KINT environment was done in such a way that he had to manually convert the .WAV, .MID and .BMP files to file formats that are useable on the Mac. If you'd like to contact Ed, his email address is in the documentation files in the archives, or just click here: Ed Wall <ewall@umich.edu>

Files for Apple Mac OS X 10.3 and above (added January 17, 2005):
NOTE: These binaries were compiled for the Power PC CPU, and will NOT run on Intel CPU based Macs! I do not have "Universal Binary" versions of these programs at this time. Sorry...
shareware Sherlock (sherlockx.sea.bin - about 1.2 Mbytes)
shareware Knarly Mazes (kmx.sea.bin - about 830 Kbytes)
shareware Latin Squares (lmx.sea.bin - about 990 Kbytes)

Files for Apple Mac OS 9 (added December 18, 2002):
shareware Sherlock (sherlock.sea.bin - about 1.1 Mbytes)
shareware Knarly Mazes (km.sea.bin - about 780 Kbytes)
shareware Latin Squares (ls.sea.bin - about 930 Kbytes)
extra image sets for Sherlock (Sherlock_Extra.sea.bin - about 1.1 Mbytes)
extra image sets for Knarly Mazes (Knarly_Extra.sea.bin - about 830 Kbytes)
extra image sets for Latin Squares (Latin_Extra.sea.bin - about 1.1 Mbytes)

JAVA

The KINT 1.04 interpreter has been ported to Java by Mr. Stephen M. Bennett (and in the process of which he discovered several minor bugs in my programs that hadn't shown up using the Windows interpreter... :-). He has provided three files:

jkint.jar - the actual interpreter implemented as a Java program (about 64Kbytes).
jkint - a script file showing how to run JKINT.JAR.
jkint_ReadMe.html - documentation on how to use the system.
javasrc1.zip - the source code to the Java 1.04 KINT (added Nov 19, 2007)

(added Feb 3, 2003)

If you have questions, comments, etc, send email to: everett@kaser.com If I'm unable to help, I'll forward your message on to Stephen for his consideration.