<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mdk/mixlib, branch master</title>
<subtitle>mix development kit</subtitle>
<id>https://jao.io/cgit/mdk/atom?h=master</id>
<link rel='self' href='https://jao.io/cgit/mdk/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://jao.io/cgit/mdk/'/>
<updated>2022-01-16T16:42:48Z</updated>
<entry>
<title>Fix: missing MIX_CMD_SBT</title>
<updated>2022-01-16T16:42:48Z</updated>
<author>
<name>Jose Antonio Ortega Ruiz</name>
<email>jao@gnu.org</email>
</author>
<published>2022-01-16T16:39:24Z</published>
<link rel='alternate' type='text/html' href='https://jao.io/cgit/mdk/commit/?id=4cc6b8d2a645e68fa2605b98dd753fd34ddb5146'/>
<id>urn:sha1:4cc6b8d2a645e68fa2605b98dd753fd34ddb5146</id>
<content type='text'>
Thanks to Kevin Sun.
</content>
</entry>
<entry>
<title>Year range in --version messages</title>
<updated>2020-10-19T03:26:12Z</updated>
<author>
<name>Jose Antonio Ortega Ruiz</name>
<email>jao@gnu.org</email>
</author>
<published>2020-10-19T03:26:12Z</published>
<link rel='alternate' type='text/html' href='https://jao.io/cgit/mdk/commit/?id=a7515e31fe9123321d3f4c80f511d861fae43d82'/>
<id>urn:sha1:a7515e31fe9123321d3f4c80f511d861fae43d82</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use g_error_free</title>
<updated>2020-10-18T17:47:30Z</updated>
<author>
<name>Jose Antonio Ortega Ruiz</name>
<email>jao@gnu.org</email>
</author>
<published>2020-10-18T17:47:30Z</published>
<link rel='alternate' type='text/html' href='https://jao.io/cgit/mdk/commit/?id=31ca889d27db05f2cfc6323f15a019d9aeb58fb6'/>
<id>urn:sha1:31ca889d27db05f2cfc6323f15a019d9aeb58fb6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>G_INLINE_FUNC deprecated</title>
<updated>2020-10-18T16:55:37Z</updated>
<author>
<name>Jose Antonio Ortega Ruiz</name>
<email>jao@gnu.org</email>
</author>
<published>2020-10-18T16:55:37Z</published>
<link rel='alternate' type='text/html' href='https://jao.io/cgit/mdk/commit/?id=82b857f78f94d2bc43132d0ecc684600100cbecf'/>
<id>urn:sha1:82b857f78f94d2bc43132d0ecc684600100cbecf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Change vm-&gt;address_list from GSList to GQueue</title>
<updated>2019-04-09T01:59:08Z</updated>
<author>
<name>Jose Antonio Ortega Ruiz</name>
<email>jao@gnu.org</email>
</author>
<published>2019-04-09T01:59:08Z</published>
<link rel='alternate' type='text/html' href='https://jao.io/cgit/mdk/commit/?id=5c331f54c23dd5db6ee4cd92bf67460935aaec5f'/>
<id>urn:sha1:5c331f54c23dd5db6ee4cd92bf67460935aaec5f</id>
<content type='text'>
The current emulator uses an unbounded linked list for tracking the
memory locations our program has traveled through. On a 64 bit system,
this requires 16 bytes of data for every instruction a MIX program
performs. For small programs that are light on computation cycles,
this does not cause a noticeable issue.

For programs that execute hundreds of millions of instructions, this
causes the memory footprint of the virtual machine to explode. I have
attached an example MIXAL program that will cause the VM to grow to
over 3 GB of memory usage when run.

To run the sample, compile coin-opt.mixal (attached), run it in mixvm,
and enter 499 at the prompt. Or use the following steps.

This patch changes all the appropriate references to GQueue references
and also caps the backtrace at 1000, which can be changed in the
mixlib/mix_vm.h header. I feel like 1000 is a reasonable limit for the
vast majority of debugging needs. Most people are looking back at the
most recent 100 instructions or so.

You can get the original behavior (unlimited tracing) back by setting
the MIX_MAXTRACE to -1, albeit with a slightly higher memory cost (24
bytes per instruction). Or you can turn it off entirely by setting it
to 0.

Using a queue doesn't change the logic of the program in any
significant way, and it allows programs to run for an extended period
of time without consuming all the memory on the machine and slowing
down to a crawl.

-Kevin Brunelle
</content>
</entry>
<entry>
<title>Support IOC commands for disk/drum devices</title>
<updated>2019-04-09T01:40:05Z</updated>
<author>
<name>Jose Antonio Ortega Ruiz</name>
<email>jao@gnu.org</email>
</author>
<published>2019-04-09T01:40:05Z</published>
<link rel='alternate' type='text/html' href='https://jao.io/cgit/mdk/commit/?id=b72dc79eec3d369a38202522165f5ef4cfa5b98b'/>
<id>urn:sha1:b72dc79eec3d369a38202522165f5ef4cfa5b98b</id>
<content type='text'>
Thanks to Kevin Brunelle

There is a minor fix included with regards to tape devices. The test
was failing if M == 0, when it should fail when M != 0.

NOTICE: This patch changes the behavior of the VM and changes the
function parameters for the ioc_ function. Documentation changes are
included.

Permits the following:
     LDX   BLKNUM
     IOC   0(8)
     OUT   ADDR(8)      Write block from ADDR into disk[BLKNUM]
     IOC   0(8)
     IN    ADDR(8)      Read block from disk[BLKNUM] into ADDR
...
BLKNUM  CON  45000      Example possible block on disk

I was having an issue writing a block to a drive and then reading back
the same block. Because it is impossible to move the SEEK_CUR pointer
backwards on a disk device, there was no way for a program to read
back a block that it wrote to a disk without restarting or fiddling
with ~/.mdk/disk?.dev files and symbolic links.

I have added a function parameter to the ioc_ function and used it to
pass the value of rX to ioc_. This permits us to use IOC commands to
move the read/write head on a disk/drum device. I believe that this
conforms to the potential meaning of Knuth's description of IOC for
disk/drum devices.

I have put in tests to verify that rX is positive and M = 0.

I have updated the documentation to reflect this new behavior.

This makes disks much more usable.

Note: I won't be offended if this patch is rejected because it changed
the behavior of the VM. I think it fits the spirit and enhances the
functionality in a way that some might find useful. I wanted it for
something I was working on, and I felt others might want the same. The
thing with the paper-tape should be fixed, though.
</content>
</entry>
<entry>
<title>Fix: correctly rewind tape</title>
<updated>2019-03-20T00:06:22Z</updated>
<author>
<name>Jose Antonio Ortega Ruiz</name>
<email>jao@gnu.org</email>
</author>
<published>2019-03-20T00:06:22Z</published>
<link rel='alternate' type='text/html' href='https://jao.io/cgit/mdk/commit/?id=ceec5c6d538a88867a92d826e33cddae6a80c545'/>
<id>urn:sha1:ceec5c6d538a88867a92d826e33cddae6a80c545</id>
<content type='text'>
According to the specification, if M &lt; 0, the tape is skipped backwards M
blocks, or to the beginning of the tape, whichever comes first.  In the
implementation, we don't check to verify that we aren't seeking past the
beginning of the file. This causes fseek(3) to fail, and it leaves us at the
position we were at.

Diagnosis and fix by Kevin Brunelle.
</content>
</entry>
<entry>
<title>Fix: allow access to last mem cell in devices (#9773)</title>
<updated>2019-03-19T01:13:46Z</updated>
<author>
<name>Jose Antonio Ortega Ruiz</name>
<email>jao@gnu.org</email>
</author>
<published>2019-03-19T01:13:46Z</published>
<link rel='alternate' type='text/html' href='https://jao.io/cgit/mdk/commit/?id=6decb49237b3179e251c9ead2cd31ac8b8ea9adc'/>
<id>urn:sha1:6decb49237b3179e251c9ead2cd31ac8b8ea9adc</id>
<content type='text'>
Author: Kevin Brunelle
</content>
</entry>
<entry>
<title>Fix for mixasm infinite loop on invalid F-specs (bug #32452)</title>
<updated>2019-01-08T18:02:00Z</updated>
<author>
<name>Jose Antonio Ortega Ruiz</name>
<email>jao@gnu.org</email>
</author>
<published>2019-01-08T18:02:00Z</published>
<link rel='alternate' type='text/html' href='https://jao.io/cgit/mdk/commit/?id=ab5d045fa8811a9d191c40bcbff996dfca8a2e32'/>
<id>urn:sha1:ab5d045fa8811a9d191c40bcbff996dfca8a2e32</id>
<content type='text'>
Thanks to Sascha Wilde.
</content>
</entry>
<entry>
<title>Fix for bug #43634: keep sign of rA for ADD/SUB yielding 0</title>
<updated>2019-01-08T05:22:16Z</updated>
<author>
<name>Jose Antonio Ortega Ruiz</name>
<email>jao@gnu.org</email>
</author>
<published>2019-01-08T05:22:16Z</published>
<link rel='alternate' type='text/html' href='https://jao.io/cgit/mdk/commit/?id=8981c9336bd73b0fabe65f449ccbe5fb808bebdd'/>
<id>urn:sha1:8981c9336bd73b0fabe65f449ccbe5fb808bebdd</id>
<content type='text'>
</content>
</entry>
</feed>
