From 9677eca5869e8ba3f8a58e103a0cded0fea467f6 Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Wed, 29 Nov 2023 17:30:41 +0100 Subject: [PATCH] =?UTF-8?q?MMIX=202009=20=E2=80=94=20Release=202023-11-25.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bugtest.mms | 15 +++++++++++++++ mmix-arith.w | 2 +- mmix-pipe.w | 2 +- mmixal.w | 16 +++++++++------- 4 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 bugtest.mms diff --git a/bugtest.mms b/bugtest.mms new file mode 100644 index 00000000..441ac11f --- /dev/null +++ b/bugtest.mms @@ -0,0 +1,15 @@ +* testing BSPEC data + LOC #100 + BSPEC 5 +% TETRA #1234FFFF +%a GREG 3 +% TETRA a-$0 +% TETRA &a + WYDE #96,$1,2 +% OCTA "abd" +% BYTE #EF,"AB" +% TETRA "11" +% TETRA #11 + WYDE #2345 + ESPEC +Main ADD $1,$1,$1 diff --git a/mmix-arith.w b/mmix-arith.w index 6c1b6080..33fac8bf 100644 --- a/mmix-arith.w +++ b/mmix-arith.w @@ -588,7 +588,7 @@ switch (r) { o = o>>2; o += (e-0x380)<<23; if (o>=0x7f800000) exceptions |= O_BIT+X_BIT; /* overflow */ -else if (o<0x100000) exceptions |= U_BIT; /* tininess */ +else if (o<0x800000) exceptions |= U_BIT; /* tininess */ if (s=='-') o |= sign_bit; return o; diff --git a/mmix-pipe.w b/mmix-pipe.w index a6070b8c..18bd86ab 100644 --- a/mmix-pipe.w +++ b/mmix-pipe.w @@ -14,7 +14,7 @@ ultra-configurable \MMIX\ pipeline: It defines the |MMIX_run| routine, which does most of the work. Another routine, |MMIX_init|, is also defined here, and so is a header -file called \.{mmix\_pipe.h}. The header file is used by the main routine and +file called \.{mmix-pipe.h}. The header file is used by the main routine and by other routines like |MMIX_config|, which are compiled separately. Readers of this program should be familiar with the explanation of \MMIX\ diff --git a/mmixal.w b/mmixal.w index 88c5ab5c..ac03c69a 100644 --- a/mmixal.w +++ b/mmixal.w @@ -1403,8 +1403,13 @@ void assemble(k,dat,x_bits) unsigned char x_bits; { register int j,jj,l; - if (spec_mode) l=spec_mode_loc; - else { + if (spec_mode) { + l=spec_mode_loc; + if (l&(k-1)) { + if (held_bits==1 && k==2) spec_mode_loc=l=l+1,hold_buf[1]=0,held_bits=3; + else spec_mode_loc=l=(l+k)&-k,mmo_clear(); + } + }@+else { l=cur_loc.l; @; if (!held_bits && !(cur_loc.h&0xe0000000)) mmo_sync(); @@ -1416,10 +1421,7 @@ void assemble(k,dat,x_bits) listing_bits|=1<=