summaryrefslogtreecommitdiffhomepage
path: root/mixlib
AgeCommit message (Collapse)Author
2020-10-18G_INLINE_FUNC deprecatedJose Antonio Ortega Ruiz
2019-04-09Change vm->address_list from GSList to GQueueJose Antonio Ortega Ruiz
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
2019-04-09Support IOC commands for disk/drum devicesJose Antonio Ortega Ruiz
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.
2019-03-20Fix: correctly rewind tapeJose Antonio Ortega Ruiz
According to the specification, if M < 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.
2019-03-19Fix: allow access to last mem cell in devices (#9773)Jose Antonio Ortega Ruiz
Author: Kevin Brunelle
2019-01-08Fix for mixasm infinite loop on invalid F-specs (bug #32452)Jose Antonio Ortega Ruiz
Thanks to Sascha Wilde.
2019-01-08Fix for bug #43634: keep sign of rA for ADD/SUB yielding 0Jose Antonio Ortega Ruiz
2019-01-08Fix for bug #47208: correctly store immediate constantsJose Antonio Ortega Ruiz
We were taking only the first 3 bits of the index byte in a the word representing immediate constants, so that, for instance, =262143=, representing 00 00 63 63 63, was stored as 00 00 07 63 63.
2019-01-08Flex generation fix (invalid noreject removed)Jose Antonio Ortega Ruiz
2019-01-07Flex by-products added to CLEANFILESJose Antonio Ortega Ruiz
2015-03-03Add missed instructions: SLB,SRB,JAE,JAO,JXE,JXO (from volume 2, section 4.5.2)litvin
2014-08-03Apparently tautological comparisons fixed (bug #42871)jao
2014-05-21Avoiding format strings security warnings (cf. #8467)Jose Antonio Ortega Ruiz
2014-01-06Deprecated INCLUDES in Makefile.am removedJose Antonio Ortega Ruiz
2014-01-06Incorporating gcompletion (fixes #39817)Jose Antonio Ortega Ruiz
2013-10-24Invalid assertion in xmix_vm.c (closes #40359)Jose Antonio Ortega Ruiz
2010-10-10Fix for #56521.2.6Jose Antonio Ortega Ruiz
2010-09-27Fix for off-by-one bug in I-register modification breakpointsJose Antonio Ortega Ruiz
2010-09-11Fix for the fix of #31010Jose Antonio Ortega Ruiz
2010-09-10Fix for #31010 (no error on MOVE 0)Jose Antonio Ortega Ruiz
2009-10-11Copyright year updated.Jose Antonio Ortega Ruiz
2009-10-01Fix for #23816: missing symbol name in EQU is now just a warning.Jose Antonio Ortega Ruiz
2008-08-31.ignore files for the compilation productsjao
2008-08-31mix_eval_scanner: clean up dead code and remove warning (input() notjao
used)
2008-03-15arch-inventory files removedJose Antonio Ortega Ruiz
2008-03-15Copyright year updateJose Antonio Ortega Ruiz
2008-03-15Small intl fixes and POTFILES.in updated.Jose Antonio Ortega Ruiz
2008-03-15Ignore files generated by autogen.shJose Antonio Ortega Ruiz
2007-06-25GPL v3 noticesJose A Ortega Ruiz
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-43
2006-08-15Make -Werror a configuration option and use AM_CFLAGS everywhere1.2.3Jose Antonio Ortega Ruiz
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-42
2006-08-1064bit compilation fixes & About dialog embellishmentsJose Antonio Ortega Ruiz
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-37
2006-08-08Sloppy gpointer conversions fixedJose Antonio Ortega Ruiz
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-32
2006-08-08External programs management improvementJose Antonio Ortega Ruiz
- External programs (editor and mixasm) execution is more robustly controlled both in mixvm and gmixvm. - In gmixvm the external programs dialog has been revamped: - Only proper paths can be introduced for the executables (via a graphical file chooser). - Flags for mixasm are no longer free text, but a check button. - Internally, the code has been refactored. git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-28
2006-08-06Make distcheck happyJose Antonio Ortega Ruiz
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-23
2006-08-05All tests passing again (mix parser re-entrant)Jose Antonio Ortega Ruiz
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-17
2006-08-05Compilation tests re-enabledJose Antonio Ortega Ruiz
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-16
2006-08-05Invalid F-spec reported as warnings, to allow hacks as CMPX xxxx(6)Jose Antonio Ortega Ruiz
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-13
2006-08-05Accept F-spec in NOP (with warning)Jose Antonio Ortega Ruiz
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-12
2006-08-05Bug fix: mixvm's smem correctly handles negative zeroJose Antonio Ortega Ruiz
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-11
2006-08-05Bug fix: typo in cbpo help stringJose Antonio Ortega Ruiz
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-10
2006-08-05Compilation warnings fixedJose Antonio Ortega Ruiz
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-9
2006-03-24CVS $Id$ tags removed.Jose Antonio Ortega Ruiz
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-7
2006-03-24Compilation warnings fixed.Jose Antonio Ortega Ruiz
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-5
2006-03-21Arch inventory files addedJose Antonio Ortega Ruiz
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-4
2006-03-20Bug fixes for 1.2.2 (latest CVS version)Jose Antonio Ortega Ruiz
* mixgtk/mixgtk.glade (Module): I1 and I2 in mixvm swapped to their correct position (closes #15746). * mixgtk/mixgtk_mixvm.c (init_mem_): fixed segfault when clicking Memory title bar (closes #15910). * configure.in: obsolete C flags for Darwin deleted. * misc/mixal-mode.el (Module): sync with Emacs CVS (Pieter). * mixlib/mix.c: copyright year in console message updated. * mixgtk/mixgtk_device.c (write_char_): buffer size was insufficient. git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-3
2006-03-20Version 1.2.1 imported1.2.1Jose Antonio Ortega Ruiz
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-1