r416 - trunk/lisp/ucadr

rswindells at common-lisp.net rswindells at common-lisp.net
Sat May 25 17:28:45 UTC 2013


Author: rswindells
Date: Sat May 25 10:28:44 2013
New Revision: 416

Log:
Replace some bit fields with calculations based off Q-POINTER-WIDTH
value. Should be no functional change.

Assembled as 843.

Modified:
   trunk/lisp/ucadr/ucadr.lisp

Modified: trunk/lisp/ucadr/ucadr.lisp
==============================================================================
--- trunk/lisp/ucadr/ucadr.lisp	Thu May 23 02:39:24 2013	(r415)
+++ trunk/lisp/ucadr/ucadr.lisp	Sat May 25 10:28:44 2013	(r416)
@@ -103,6 +103,8 @@
 (DEF-DATA-FIELD Q-ALL-BUT-CDR-CODE 36 0)
 (DEF-DATA-FIELD Q-ALL-BUT-POINTER-WITHIN-PAGE 30 8)
 
+(ASSIGN Q-POINTER-WIDTH 24.)
+
 ;Stuff for address space quantization
 (DEF-DATA-FIELD VMA-QUANTUM-BYTE
 	(EVAL (- 24. (1- (HAULONG %ADDRESS-SPACE-QUANTUM-SIZE))))
@@ -3368,7 +3370,7 @@
 ;M-3 has the new free pointer, the free-pointer has not been updated yet, to 
 ;avoid attempting to scavenge the newly-allocated object, which is not yet initialized.
 SCAV0	;(JUMP-IF-BIT-SET M-TRANSPORT-FLAG SCAVT) ;If in transporter, don't invoke scavenger
-	((M-E) DPB M-B (BYTE-FIELD 24. 2) A-ZERO) ;4 times number of Q's consed (K=4)
+	((M-E) DPB M-B (BYTE-FIELD Q-POINTER-WIDTH 2) A-ZERO) ;4 times number of Q's consed (K=4)
 	((A-CONS-WORK-DONE Q-R) ADD M-E A-CONS-WORK-DONE)
 	(JUMP-LESS-THAN-XCT-NEXT Q-R A-SCAV-WORK-DONE SCAV0X)	;Return if not yet
        ((A-CONS-NEW-FREE-POINTER) M-3)				; time to scavenge
@@ -4362,23 +4364,23 @@
 
 SINFSA-1B
 	(POPJ-AFTER-NEXT (M-B) ADD M-B (A-CONSTANT 37))
-       ((M-4) (BYTE-FIELD 19. 5) M-B)
+       ((M-4) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 5) 5) M-B)
 
 SINFSA-2B
 	(POPJ-AFTER-NEXT (M-B) ADD M-B (A-CONSTANT 17))
-       ((M-4) (BYTE-FIELD 20. 4) M-B)
+       ((M-4) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 4) 4) M-B)
 
 SINFSA-4B
 	(POPJ-AFTER-NEXT (M-B) ADD M-B (A-CONSTANT 7))
-       ((M-4) (BYTE-FIELD 21. 3) M-B)
+       ((M-4) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 3) 3) M-B)
 
 SINFSA-8B
 	(POPJ-AFTER-NEXT (M-B) ADD M-B (A-CONSTANT 3))
-       ((M-4) (BYTE-FIELD 22. 2) M-B)
+       ((M-4) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 2) 2) M-B)
 
 SINFSA-16B
 	(POPJ-AFTER-NEXT (M-B) ADD M-B (A-CONSTANT 1))
-       ((M-4) (BYTE-FIELD 23. 1) M-B)
+       ((M-4) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 1) 1) M-B)
 
 SINFSA-32B
 	(POPJ-AFTER-NEXT NO-OP)
@@ -4654,7 +4656,9 @@
 XUP1	(JUMP-IF-BIT-CLEAR (BYTE-FIELD 1 0) M-3 XUP2)
 	(CALL-XCT-NEXT MPY)				;M-1 TIMES M-TEM TO Q-R
        ((Q-R) M-TEM)
-	((M-2) SELECTIVE-DEPOSIT Q-R (BYTE-FIELD 9 23.) A-2)	;DISCARDED BITS AND SIGN
+	((M-2) SELECTIVE-DEPOSIT Q-R
+	 (BYTE-FIELD (DIFFERENCE 33. Q-POINTER-WIDTH)
+		     (DIFFERENCE Q-POINTER-WIDTH 1)) A-2)	;DISCARDED BITS AND SIGN
 							;M-TEM IS 32 BITS, BUT FIXED BIN(23,0)
 	(JUMP-EQUAL-XCT-NEXT M-2 A-ZERO XUP2)		;JUMP IF POSITIVE NO OVERFLOW
        ((M-TEM) Q-R)					;PRODUCT BACK TO M-TEM
@@ -4663,7 +4667,9 @@
 	(JUMP-EQUAL M-3 A-ZERO XUP4)			;IF ZERO, RESULT IS IN M-TEM
 	(CALL-XCT-NEXT MPY)				;OTHERWISE COMPUTE NEXT POWER
        ((Q-R) M-1)					;I.E. Q-R GETS M-1 TIMES M-1
-	((M-2) SELECTIVE-DEPOSIT Q-R (BYTE-FIELD 9 23.) A-2)	;DISCARDED BITS AND SIGN
+	((M-2) SELECTIVE-DEPOSIT Q-R
+	 (BYTE-FIELD (DIFFERENCE 33. Q-POINTER-WIDTH)
+		     (DIFFERENCE Q-POINTER-WIDTH 1)) A-2)	;DISCARDED BITS AND SIGN
 	(JUMP-NOT-EQUAL M-2 A-ZERO XUPOUT)		;OVERFLOW (RESULT IS ALWAYS POSITIVE)
 	(JUMP-XCT-NEXT XUP1)
        ((M-1) Q-R)					;(SETQ M-1 (* M-1 M-1))
@@ -4774,7 +4780,7 @@
 ;VMA and M-B have location being bound.  MD has current contents.
 ;Will return with old-value saved and Q-ALL-BUT-TYPED-POINTER in M-E,
 ;VMA and M-B updated to actual location bound (different if there is a ONE-Q-FORWARD).
-QBND4	((M-1) ADD (M-CONSTANT 23.) A-QLBNDP)	;TEST P.C.E. (THIS M-CONST JUST HAPPENED TO
+QBND4	((M-1) ADD (M-CONSTANT (DIFFERENCE Q-POINTER-WIDTH 1)) A-QLBNDP)	;TEST P.C.E. (THIS M-CONST JUST HAPPENED TO
 	((M-1) SUB M-1 A-QLBNDH)		; BE AROUND AT THE WRONG TIME).
 	(CALL-IF-BIT-CLEAR BOXED-SIGN-BIT M-1 TRAP)
    (ERROR-TABLE PDL-OVERFLOW SPECIAL)		;M-1 SHOULD BE NEGATIVE AS 24-BIT QUANTITY
@@ -4988,7 +4994,7 @@
 
 ;DON'T CALL QBND4 TO AVOID REFERENCING A-SELF VIA SLOW VIRTUAL-MEMORY PATH
 BIND-SELF	;Bind SELF to M-A
-	((M-TEM) ADD (M-CONSTANT 23.) A-QLBNDP)
+	((M-TEM) ADD (M-CONSTANT (DIFFERENCE Q-POINTER-WIDTH 1)) A-QLBNDP)
 	((M-TEM) SUB M-TEM A-QLBNDH)
 	(CALL-IF-BIT-CLEAR BOXED-SIGN-BIT M-TEM TRAP)
 	    (ERROR-TABLE PDL-OVERFLOW SPECIAL)
@@ -5249,7 +5255,7 @@
 ;Get here when resuming a stack group whose active frame is a FEF.
 ;Restore M-INST-BUFFER and A-LOCALP.
 ;Dont restore M-FLAGS, etc, because that is handled by SG resume mechanism.
-QLLENT	((M-A) DPB C-PDL-BUFFER-INDEX (BYTE-FIELD 24. 2)
+QLLENT	((M-A) DPB C-PDL-BUFFER-INDEX (BYTE-FIELD Q-POINTER-WIDTH 2)
 		   (A-CONSTANT 0))  ;SET UP FROM M-AP.  SHIFT TO BYTE ALIGN
 	((PDL-BUFFER-INDEX) ADD M-AP (A-CONSTANT (EVAL %LP-EXIT-STATE)))
 	((A-TEM1) DPB C-PDL-BUFFER-INDEX (BYTE-FIELD 17 1) A-ZERO) ;RELATIVE PC IN BYTES
@@ -5363,7 +5369,7 @@
 	((PDL-BUFFER-INDEX) ADD M-AP (A-CONSTANT (EVAL %LP-EXIT-STATE)))
 	((M-FLAGS) (LISP-BYTE %%LP-EXS-PC-STATUS) C-PDL-BUFFER-INDEX A-FLAGS)
 	(CALL-IF-BIT-SET (LISP-BYTE %%LP-EXS-MICRO-STACK-SAVED) C-PDL-BUFFER-INDEX QMMPOP)
-	((M-TEM) DPB M-A (BYTE-FIELD 24. 2) (A-CONSTANT 0))	;FEF address in bytes
+	((M-TEM) DPB M-A (BYTE-FIELD Q-POINTER-WIDTH 2) (A-CONSTANT 0))	;FEF address in bytes
 	((A-TEM1) DPB C-PDL-BUFFER-INDEX (BYTE-FIELD 17 1) A-ZERO)
 			;CODE KNOWS THAT %%LP-EXS-EXIT-PC IS 0017
 	((LOCATION-COUNTER) ADD M-TEM A-TEM1)
@@ -6764,7 +6770,7 @@
 QFL1A	(CALL-IF-BIT-SET (LISP-BYTE %%FEFH-SV-BIND) M-D FRMBN1)  ;MOVE S-V BINDINGS TO
 		;S-V-CELLS AND PUSH PREVIOUS BINDINGS ON BINDING PDL (M-D HAS %FEFHI-IPC STILL)
 ;FINISH LINEARLY ENTERING
-QLENX	((M-TEM) DPB M-A (BYTE-FIELD 24. 1) (A-CONSTANT 0))	;NOW UNRELOCATE PC
+QLENX	((M-TEM) DPB M-A (BYTE-FIELD Q-POINTER-WIDTH 1) (A-CONSTANT 0))	;NOW UNRELOCATE PC
 	((LOCATION-COUNTER) ADD M-TEM A-J OUTPUT-SELECTOR-LEFTSHIFT-1)
 	(POPJ-EQUAL-XCT-NEXT M-ERROR-SUBSTATUS A-ZERO)	;RETURN TO MAIN LOOP IF NO ERROR
        ((A-IPMARK) (BYTE-FIELD 10. 0) M-AP)	;NO OPEN CALL BLOCK YET
@@ -7055,7 +7061,7 @@
 ;LETTERED REGS CLOBBERED: M-B, M-K.  M-T HAS S-V PNTR TABLE ADDR, M-C HAS FLAGS.
 QBSPCL	((VMA-START-READ) M-T)			;GET SPECIAL VALUE CELL POINTER
 	(CHECK-PAGE-READ)
-	((M-1) ADD (M-CONSTANT 23.) A-QLBNDP)	;TEST P.C.E. (THIS M-CONST JUST HAPPENED TO
+	((M-1) ADD (M-CONSTANT (DIFFERENCE Q-POINTER-WIDTH 1)) A-QLBNDP)	;TEST P.C.E. (THIS M-CONST JUST HAPPENED TO
 	((M-1) SUB M-1 A-QLBNDH)		; BE AROUND AT THE WRONG TIME).
 	(CALL-IF-BIT-CLEAR BOXED-SIGN-BIT M-1 TRAP)
 	    (ERROR-TABLE PDL-OVERFLOW SPECIAL)
@@ -8046,7 +8052,7 @@
 	 BYTE-INST (M-T) READ-MEMORY-DATA)
        ((M-T) IOR (A-CONSTANT (BYTE-VALUE Q-DATA-TYPE DTP-FIX)) M-T)
 
-QB1RY	((A-TEM1) (BYTE-FIELD 23 5) M-Q)	;BIT ARRAY
+QB1RY	((A-TEM1) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 5) 5) M-Q)	;BIT ARRAY
 	((VMA-START-READ) ADD A-TEM1 M-E)
 	(CHECK-PAGE-READ)
 	((A-TEM2) (BYTE-FIELD 5 0) M-Q)
@@ -8054,7 +8060,7 @@
        ((A-TEM3) (A-CONSTANT (OA-LOW-CONTEXT (BYTE-INST (BYTE-FIELD 1 0)))) )
 
 QB2RY	((M-J) (BYTE-FIELD 4 0) M-Q)		;2 BIT ARRAY
-	((A-TEM1) (BYTE-FIELD 24 4) M-Q)
+	((A-TEM1) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 4) 4) M-Q)
 	((VMA-START-READ) ADD A-TEM1 M-E)
 	(CHECK-PAGE-READ)
 	((A-TEM2) DPB M-J A-ZERO (BYTE-FIELD 4 1))	;LSH M-J 1
@@ -8062,7 +8068,7 @@
        ((A-TEM3) (A-CONSTANT (OA-LOW-CONTEXT (BYTE-INST (BYTE-FIELD 2 0)))) )
 
 QB4RY	((M-J) (BYTE-FIELD 3 0) M-Q)		;4 BIT ARRAY
-	((A-TEM1) (BYTE-FIELD 25 3) M-Q)
+	((A-TEM1) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 3) 3) M-Q)
 	((VMA-START-READ) ADD A-TEM1 M-E)
 	(CHECK-PAGE-READ)
 	((A-TEM2) DPB M-J A-ZERO (BYTE-FIELD 3 2))	;LSH M-J 2
@@ -8070,7 +8076,7 @@
        ((A-TEM3) (A-CONSTANT (OA-LOW-CONTEXT (BYTE-INST (BYTE-FIELD 4 0)))) )
 
 QB16RY	((M-J) (BYTE-FIELD 1 0) M-Q)		;16 BIT ARRAY
-	((A-TEM1) (BYTE-FIELD 27 1) M-Q)
+	((A-TEM1) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 1) 1) M-Q)
 	((VMA-START-READ) ADD A-TEM1 M-E)
 	(CHECK-PAGE-READ)
 	((A-TEM2) DPB M-J A-ZERO (BYTE-FIELD 1 4))	;LSH M-J 4
@@ -8083,7 +8089,7 @@
        ((M-T) DPB READ-MEMORY-DATA Q-POINTER 
 		(A-CONSTANT (BYTE-VALUE Q-DATA-TYPE DTP-FIX)))
 
-QB16SRY	((A-TEM1) (BYTE-FIELD 27 1) M-Q)	;HALFWORD FIXNUM ARRAY
+QB16SRY	((A-TEM1) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 1) 1) M-Q)	;HALFWORD FIXNUM ARRAY
 	((VMA-START-READ) ADD A-TEM1 M-E)
 	(CHECK-PAGE-READ)
 	(JUMP-IF-BIT-CLEAR-XCT-NEXT (BYTE-FIELD 1 0) M-Q A-ZERO QB16SRY-1)
@@ -8204,7 +8210,7 @@
 ;NOTE REFLECTING ABOUT 40 HACK NOT NECESSARY FOR DPB
 QSBARY	((M-J) DPB M-Q (BYTE-FIELD 2 3)		;STORE IN BYTE ARRAY (8 BIT)
 		(A-CONSTANT (OA-LOW-CONTEXT (BYTE-INST (BYTE-FIELD 10 0)))))
-	((A-TEM1) (BYTE-FIELD 26 2) M-Q)	;WORD OFFSET
+	((A-TEM1) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 2) 2) M-Q)	;WORD OFFSET
 QSANUM	((VMA-START-READ) ADD A-TEM1 M-E)	;COMMON STORE ROUTINE FOR NUMERIC ARRAYS
 	(CHECK-PAGE-READ)
 	(DISPATCH Q-DATA-TYPE M-T TRAP-UNLESS-FIXNUM)
@@ -8218,22 +8224,22 @@
 QS1RY	((M-J) DPB M-Q (BYTE-FIELD 5 0)		;STORE IN BIT ARRAY
 		(A-CONSTANT (OA-LOW-CONTEXT (BYTE-INST (BYTE-FIELD 1 0)))))
 	(JUMP-XCT-NEXT QSANUM)
-       ((A-TEM1) (BYTE-FIELD 23 5) M-Q)		;WORD OFFSET
+       ((A-TEM1) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 5) 5) M-Q)		;WORD OFFSET
 
 QS2RY	((M-J) DPB M-Q (BYTE-FIELD 4 1)		;STORE IN 2-BIT ARRAY
 		(A-CONSTANT (OA-LOW-CONTEXT (BYTE-INST (BYTE-FIELD 2 0)))))
 	(JUMP-XCT-NEXT QSANUM)
-       ((A-TEM1) (BYTE-FIELD 24 4) M-Q)		;WORD OFFSET
+       ((A-TEM1) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 4) 4) M-Q)		;WORD OFFSET
 
 QS4RY	((M-J) DPB M-Q (BYTE-FIELD 3 2)		;STORE IN 4-BIT ARRAY
 		(A-CONSTANT (OA-LOW-CONTEXT (BYTE-INST (BYTE-FIELD 4 0)))))
 	(JUMP-XCT-NEXT QSANUM)
-       ((A-TEM1) (BYTE-FIELD 25 3) M-Q)		;WORD OFFSET
+       ((A-TEM1) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 3) 3) M-Q)		;WORD OFFSET
 
 QS16RY	((M-J) DPB M-Q (BYTE-FIELD 1 4)		;STORE IN 16-BIT ARRAY
 		(A-CONSTANT (OA-LOW-CONTEXT (BYTE-INST (BYTE-FIELD 20 0)))))
 	(JUMP-XCT-NEXT QSANUM)
-       ((A-TEM1) (BYTE-FIELD 27 1) M-Q)		;WORD OFFSET
+       ((A-TEM1) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 1) 1) M-Q)		;WORD OFFSET
 
 QS32RY	((VMA) ADD A-Q M-E)			;32 BIT ARRAY (ANOMALOUS)
 	((WRITE-MEMORY-DATA-START-WRITE) M-T)
@@ -8735,7 +8741,7 @@
 	(JUMP-EQUAL M-K A-ZERO XLDB-ZERO)  ;WANT 0 BITS, RETURN 0
 					   ; (THIS IS A FAIRLY RANDOM THING TO CHECK FOR
 					   ; BUT IF WE DIDNT, IT WOULD CAUSE LOSSAGE)
-	(CALL-GREATER-THAN M-K (A-CONSTANT 30) TRAP)
+	(CALL-GREATER-THAN M-K (A-CONSTANT Q-POINTER-WIDTH) TRAP)
     (ERROR-TABLE ARGTYP FIXNUM-FIELD PP 0)
 	((M-J) SUB M-K (A-CONSTANT 1))	   ;BYTE LENGTH MINUS ONE FIELD
 	((M-E) (BYTE-FIELD 6 6) C-PDL-BUFFER-POINTER-POP) ;GET NUMBER OF PLACES OVER
@@ -8767,11 +8773,11 @@
 	(JUMP-EQUAL M-K A-ZERO XLDB-ZERO)  ;Want 0 bits, return 0
 					   ; (This is a fairly random thing to check for
 					   ; but if we didnt, it would cause lossage)
-	(CALL-GREATER-THAN M-K (A-CONSTANT 23.) TRAP)
+	(CALL-GREATER-THAN M-K (A-CONSTANT (DIFFERENCE Q-POINTER-WIDTH 1)) TRAP)
     (ERROR-TABLE ARGTYP FIXNUM-FIELD PP 0 XLDB0)
     (ERROR-TABLE ARG-POPPED 0 PP (FIXPACK M-1))
 	((M-J) SUB M-K (A-CONSTANT 1))	   ;Byte length minus one field
-	((M-E) (BYTE-FIELD (DIFFERENCE 23. 6) 6)
+	((M-E) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH (PLUS 1 6)) 6)
 		 C-PDL-BUFFER-POINTER-POP) ;Get number of places over
 	((M-2) SUB (M-CONSTANT 40) A-K)	   ;Maximum M-rotate to keep byte within a word
 XLDB3	(JUMP-GREATER-THAN M-E A-2 XLDB2)  ;Jump if left edge of byte off end of word
@@ -8793,10 +8799,10 @@
             (ERROR-TABLE ARGTYP FIXNUM PP 0 BIGNUM-LDB)
 	    (ERROR-TABLE ARG-POPPED 0 PP M-Q)
 	((M-K) (BYTE-FIELD 6 0) C-PDL-BUFFER-POINTER)    ;Get number of bits
-	(CALL-GREATER-THAN M-K (A-CONSTANT 23.) TRAP)
+	(CALL-GREATER-THAN M-K (A-CONSTANT (DIFFERENCE Q-POINTER-WIDTH 1)) TRAP)
 	    (ERROR-TABLE ARGTYP FIXNUM-FIELD PP 0 BIGNUM-LDB)
 	    (ERROR-TABLE ARG-POPPED 0 PP M-Q)
-	((M-E) (BYTE-FIELD (DIFFERENCE 23. 6) 6)
+	((M-E) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH (PLUS 1 6)) 6)
 			 C-PDL-BUFFER-POINTER)  ;Number of places over
 	((M-D) (A-CONSTANT 1))			;Offset within bignum
 BIGLDB2	(JUMP-LESS-THAN M-E (A-CONSTANT 31.) BIGLDB1)  ;Found word desired byte starts in
@@ -8824,7 +8830,7 @@
 	((OA-REG-LOW) DPB M-J OAL-BYTL-1 A-4)   ;Put those bits above the previous bits.
 	((M-T) DPB M-1 A-T)
 BIGLDB3	(POPJ-IF-BIT-CLEAR-XCT-NEXT BIGNUM-HEADER-SIGN M-C)	;Done if bignum was positive
-       ((M-E) (BYTE-FIELD (DIFFERENCE 23. 6) 6)	;Retrieve byte pos, flush arg from pdl
+       ((M-E) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH (PLUS 1 6)) 6)	;Retrieve byte pos, flush arg from pdl
 			 C-PDL-BUFFER-POINTER-POP)
 	;; Bignum was negative.  Take complement of the byte value retrieved.
 	;; This is a 1's or 2's complement depending on whether all bits to the
@@ -8916,7 +8922,7 @@
 	((M-E) (BYTE-FIELD 6 6) C-PDL-BUFFER-POINTER-POP)
 	((M-1) C-PDL-BUFFER-POINTER-POP)
 	(CALL-XCT-NEXT I-DPB)	  ;SEMI-RANDOM TO USE THIS ROUTINE, BUT SPEED DOESNT
-       ((M-ZR) (A-CONSTANT 24.))  ; MATTER AND IT SAVES A UINST OR TWO.
+       ((M-ZR) (A-CONSTANT Q-POINTER-WIDTH))  ; MATTER AND IT SAVES A UINST OR TWO.
 	(POPJ-AFTER-NEXT 
 	  (M-T) DPB M-2 Q-POINTER (A-CONSTANT (BYTE-VALUE Q-DATA-TYPE DTP-FIX)))
        (NO-OP)
@@ -8959,10 +8965,10 @@
     (ERROR-TABLE ARG-POPPED 0 PP PP M-1)
 	((M-K) (BYTE-FIELD 6 0) C-PDL-BUFFER-POINTER) ;GET NUMBER OF BITS
 	(JUMP-EQUAL M-K A-ZERO XDPB-ZERO)
-	(CALL-GREATER-THAN M-K (A-CONSTANT 23.) TRAP)
+	(CALL-GREATER-THAN M-K (A-CONSTANT (DIFFERENCE Q-POINTER-WIDTH 1)) TRAP)
     (ERROR-TABLE ARGTYP FIXNUM-FIELD PP 0 XDPB0)
     (ERROR-TABLE ARG-POPPED 0 PP PP M-1)
-	((M-E) (BYTE-FIELD (DIFFERENCE 23. 6) 6)
+	((M-E) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH (PLUS 1 6)) 6)
 			C-PDL-BUFFER-POINTER-POP) ;GET NUMBER OF PLACES OVER
 ASHDPB	((M-2) ADD M-K A-E)			;M-2 maximum number of bits in result
 	(JUMP-GREATER-THAN M-2 (A-CONSTANT 32.) XDPB2A)	;Multi-word => use bignum code 
@@ -8991,7 +8997,7 @@
 XDPB2A	(CALL-LESS-THAN-XCT-NEXT M-1 A-ZERO XDPB-BM)   ;MAGNITUDIFY M-1 AND SAVE SIGN
        ((M-C) A-ZERO)		    ;IN BIGNUM-HEADER-SIGN POSITION.
 ASHDPB1	((MICRO-STACK-DATA-PUSH) (A-CONSTANT (I-MEM-LOC BIGDPB3)))
-ASHDPB2	((M-J) DPB M-E (BYTE-FIELD (DIFFERENCE 23. 6) 6) A-K)
+ASHDPB2	((M-J) DPB M-E (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH (PLUS 1 6)) 6) A-K)
 	((C-PDL-BUFFER-POINTER-PUSH) DPB M-J Q-POINTER 
 		(A-CONSTANT (BYTE-VALUE Q-DATA-TYPE DTP-FIX)))  ;PUSH ARG2 BACK
 	((M-D) DPB M-1 Q-POINTER    ;SUBROUTINE SMASHES M-1
@@ -9004,11 +9010,11 @@
 ;Smashable bignum in M-T, header in M-C.  Length in M-I has been smashed.
 BIGDPB0	((M-I) BIGNUM-HEADER-LENGTH M-C)	;NEW LENGTH
 	((M-K) (BYTE-FIELD 6 0) C-PDL-BUFFER-POINTER)  ;NUMBER-OF-BITS
-	(CALL-GREATER-THAN M-K (A-CONSTANT 23.) TRAP)
+	(CALL-GREATER-THAN M-K (A-CONSTANT (DIFFERENCE Q-POINTER-WIDTH 1)) TRAP)
 	    (ERROR-TABLE ARGTYP FIXNUM-FIELD PP 0)
 	    (ERROR-TABLE ARG-POPPED PP PP M-T)
 	(CALL-IF-BIT-SET BIGNUM-HEADER-SIGN M-C BIGNEG)	;GET 2'S COMPLEMENT REPRESENTATION
-	((M-E) (BYTE-FIELD (DIFFERENCE 23. 6) 6)
+	((M-E) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH (PLUS 1 6)) 6)
 		C-PDL-BUFFER-POINTER-POP)  ;NUMBER OF PLACES OVER
 	((M-1) Q-POINTER C-PDL-BUFFER-POINTER-POP)	;DATA TO DEPOSIT.
 	((M-D) (A-CONSTANT 1))		;OFFSET WITHIN BIGNUM
@@ -9486,18 +9492,19 @@
    (ERROR-TABLE ARGTYP FIXNUM PP 0 XLSH0)
 	(JUMP-IF-BIT-SET BOXED-SIGN-BIT M-K XLSH1)  ;SHIFT TO RIGHT
 LSH-LEFT
-	((M-1) SUB (M-CONSTANT 23.) A-K)	;COMPUTE BYTE LENGTH <24.-SHIFT-1>
+	((M-1) SUB (M-CONSTANT (DIFFERENCE Q-POINTER-WIDTH 1)) A-K)	;COMPUTE BYTE LENGTH <24.-SHIFT-1>
 	(JUMP-LESS-THAN M-1 A-ZERO XLSH-ZERO)
 	(POPJ-AFTER-NEXT
 	 (OA-REG-LOW) DPB M-1 OAL-BYTL-1 A-K)
        ((M-T) DPB C-PDL-BUFFER-POINTER-POP (BYTE-FIELD 0 0) 
 		(A-CONSTANT (BYTE-VALUE Q-DATA-TYPE DTP-FIX)))
 
-XLSH1	(JUMP-LESS-THAN M-K (A-CONSTANT (PLUS 1_24. -23.)) XLSH-ZERO) ;SHIFT RIGHT
+XLSH1	(JUMP-LESS-THAN M-K
+	 (A-CONSTANT (DIFFERENCE (EVAL (ASH 1 %%Q-POINTER)) (DIFFERENCE Q-POINTER-WIDTH 1))) XLSH-ZERO) ;SHIFT RIGHT
 	((A-TEM1) ADD M-K (A-CONSTANT (PLUS (BYTE-MASK BITS-ABOVE-FIXNUM)  ;TO SIGN EXTEND
 					 40)))	; TO 32. COMPUTE 40-N .
 	((M-1) ADD M-K (A-CONSTANT (PLUS (BYTE-MASK BITS-ABOVE-FIXNUM)
-					 23.)))	;COMPUTE 24.-N-1
+					 (DIFFERENCE Q-POINTER-WIDTH 1))))	;COMPUTE 24.-N-1
 	(POPJ-AFTER-NEXT 
 	 (OA-REG-LOW) DPB M-1 OAL-BYTL-1 A-TEM1)
        ((M-T) BYTE-INST (A-CONSTANT (BYTE-VALUE Q-DATA-TYPE DTP-FIX))
@@ -9520,7 +9527,7 @@
 XROT3 ;	*** THIS SHOULD PROBABLY LET YOU INTERRUPT AND SEQUENCE-BREAK OUT ***
 	(JUMP-IF-BIT-SET BOXED-SIGN-BIT M-K XROT1)  ;ROT TO RIGHT
 	(JUMP-EQUAL M-K A-ZERO CPOPJ)			;NO CHANGE (AVOID BYTL-1 LOSS)
-	(JUMP-GREATER-OR-EQUAL M-K (A-CONSTANT 24.) XROT2)
+	(JUMP-GREATER-OR-EQUAL M-K (A-CONSTANT Q-POINTER-WIDTH) XROT2)
 ;GENERAL IDEA: (1) SHIFT A 24.-N BIT PIECE N PLACES LEFT
 ;		    (ACTUALLY, A TRUE SHIFT OF A UNMASKED 32 BIT PIECE WOULD DO.
 ;		     ON THE OTHER HAND, WE HAVE THE UNSAFE BYTE POINTER PROBLEM.)
@@ -9528,11 +9535,11 @@
 ;	       (3) IOR THE TWO.
 XROT3A	;REALLY DO THE WORK. BY NOW, 0 < M-K < 24.
 						;DO LSH OF STEP ONE
-	((M-1) SUB (M-CONSTANT 23.) A-K)	;COMPUTE BYTE LENGTH
+	((M-1) SUB (M-CONSTANT (DIFFERENCE Q-POINTER-WIDTH 1)) A-K)	;COMPUTE BYTE LENGTH
 ;	(JUMP-LESS-THAN M-1 A-ZERO XLSH-ZERO)   ;CANT BE
 	((OA-REG-LOW) DPB M-1 OAL-BYTL-1 A-K)
 	((A-TEM3) DPB M-T (BYTE-FIELD 0 0) A-ZERO)	;PART 1 DONE
-	((A-TEM2) ADD M-K (A-CONSTANT 8))		;COMPUTE 40-<24.-N>
+	((A-TEM2) ADD M-K (A-CONSTANT (DIFFERENCE 32. Q-POINTER-WIDTH)))		;COMPUTE 40-<24.-N>
 	((M-ZR) SUB M-K (A-CONSTANT 1))		;BYTE LENGTH MINUS ONE
 	((OA-REG-LOW) DPB M-ZR OAL-BYTL-1 A-TEM2)
 	(POPJ-AFTER-NEXT			;PART 2 DONE
@@ -9540,12 +9547,12 @@
        ((M-T) IOR M-T A-TEM3)			;PART 3
 
 XROT2	(JUMP-XCT-NEXT XROT3)			;LOOP UNTIL RESULT AFTER
-       ((M-K) SUB M-K (A-CONSTANT 24.))		;SUBTRACTION IS LESS THAN 24.
+       ((M-K) SUB M-K (A-CONSTANT Q-POINTER-WIDTH))	;SUBTRACTION IS LESS THAN 24.
 
 ;ROTATE TO RIGHT.  CONVERT TO EQUIVALENT LEFT ROTATE (24.- <-N>)
 XROT1	((M-K) SELECTIVE-DEPOSIT M-K Q-POINTER (A-CONSTANT -1))	;EXTEND SIGN
 	(JUMP-XCT-NEXT XROT3)
-       ((M-K) ADD M-K (A-CONSTANT 24.))
+       ((M-K) ADD M-K (A-CONSTANT Q-POINTER-WIDTH))
 
       (MISC-INST-ENTRY %INTERNAL-VALUE-CELL)
 XIVC	(CALL XVCL)		;Returns contents of IVC.  Does not follow EVCPs.
@@ -10532,8 +10539,14 @@
 	(CALL-XCT-NEXT MPY)
        ((Q-R) M-2)
 	(POPJ-AFTER-NEXT
-	 (M-T) (BYTE-FIELD 8 24.) Q-R (A-CONSTANT (BYTE-VALUE Q-DATA-TYPE DTP-FIX)))
-       ((M-T) DPB M-2 (BYTE-FIELD 16. 8) A-T)
+	 (M-T)
+	 (BYTE-FIELD (DIFFERENCE 32. Q-POINTER-WIDTH)
+		     (DIFFERENCE Q-POINTER-WIDTH 0))
+	 Q-R (A-CONSTANT (BYTE-VALUE Q-DATA-TYPE DTP-FIX)))
+       ((M-T) DPB M-2 (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH
+					      (DIFFERENCE 32. Q-POINTER-WIDTH))
+				  (DIFFERENCE 32. Q-POINTER-WIDTH))
+		  A-T)
 
 ;SPECIAL NON-OVERFLOW-CHECKING FUNCTIONS FOR WEIRD HACKS
 X24ADD (MISC-INST-ENTRY %24-BIT-PLUS)
@@ -10576,8 +10589,14 @@
 	((M-T) C-PDL-BUFFER-POINTER-POP)
 	((OA-REG-HIGH) BOXED-SIGN-BIT M-T)		;SIGN EXTEND (MUNG M SOURCE)
 	((M-1) SELECTIVE-DEPOSIT M-ZERO Q-ALL-BUT-POINTER A-T)
-	((M-TEM) DPB M-1 (BYTE-FIELD 8 24.) A-A)	;LOW WORD HAS 32 BITS
-	((M-A) (BYTE-FIELD 24. 8) M-1 A-1)		;ARITH SHIFT M-1 RIGHT 8 FOR HIGH WORD
+	((M-TEM) DPB M-1
+	 (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 0)
+		     (DIFFERENCE 32. Q-POINTER-WIDTH))
+	 A-A)	;LOW WORD HAS 32 BITS
+	((M-A)
+	 (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 0)
+		     (DIFFERENCE 32. Q-POINTER-WIDTH))
+	 M-1 A-1)		;ARITH SHIFT M-1 RIGHT 8 FOR HIGH WORD
 	(JUMP-GREATER-OR-EQUAL M-1 A-ZERO XDIVD3)	;MAKE DIVIDEND POSITIVE
 	(JUMP-NOT-EQUAL-XCT-NEXT M-TEM A-ZERO XDIVD2)	;DOUBLE PRECISION NEGATE M-A,,M-TEM
        ((M-TEM) SUB M-ZERO A-TEM)
@@ -10715,13 +10734,15 @@
 ;;; Return it via M-T checking only for single-bit overflow
 FIXPACK-T
 	(DISPATCH-POPJ-XCT-NEXT (I-ARG 0) 
-		(BYTE-FIELD 2 23.) M-1 D-FXOVCK)
+		(BYTE-FIELD 2 (DIFFERENCE Q-POINTER-WIDTH 1))
+	 M-1 D-FXOVCK)
        ((M-T) DPB M-1 Q-POINTER (A-CONSTANT (BYTE-VALUE Q-DATA-TYPE DTP-FIX)))
 
 ;;; Return it via pdl checking only for single-bit overflow
 FIXPACK-P
 	(DISPATCH-POPJ-XCT-NEXT (I-ARG 1) 
-		(BYTE-FIELD 2 23.) M-1 D-FXOVCK)
+	 (BYTE-FIELD 2 (DIFFERENCE Q-POINTER-WIDTH 1))
+	 M-1 D-FXOVCK)
        ((C-PDL-BUFFER-POINTER-PUSH M-T) DPB M-1 Q-POINTER
 		(A-CONSTANT (PLUS (BYTE-VALUE Q-DATA-TYPE DTP-FIX)
 				  (BYTE-VALUE Q-CDR-CODE CDR-NEXT))))
@@ -11116,7 +11137,10 @@
     (ERROR-TABLE ARG-POPPED 0 M-1 M-T)
 	(CALL-XCT-NEXT MPY)	;LOW PRODUCT TO Q-R, HIGH TO M-2
        ((Q-R) M-2)
-	((M-TEM) SELECTIVE-DEPOSIT Q-R (BYTE-FIELD 9 23.) A-2)	;DISCARDED BITS AND SIGN
+	((M-TEM) SELECTIVE-DEPOSIT Q-R
+	 (BYTE-FIELD (DIFFERENCE 33. Q-POINTER-WIDTH)
+		     (DIFFERENCE Q-POINTER-WIDTH 1))
+	 A-2)	;DISCARDED BITS AND SIGN
 	(JUMP-EQUAL-XCT-NEXT M-TEM A-ZERO FIXPACK-P)   ;JUMP IF NON-OVERFLOWING POSITIVE RESULT
        ((M-1) Q-POINTER Q-R A-TEM)		     ;SIGN EXTEND (IF NON-OVERFLOWING)
 	(JUMP-EQUAL M-TEM (A-CONSTANT -1) FIXPACK-P)   ;JUMP IF NON-OVERFLOWING NEGATIVE
@@ -11597,9 +11621,11 @@
 ;Left ASH of a fixnum turns into DPB.
 XASH2	((C-PDL-BUFFER-POINTER-PUSH M-4)	;Put arg 1 back on pdl
 		Q-POINTER M-1 (A-CONSTANT (BYTE-VALUE Q-DATA-TYPE DTP-FIX)))
-	((M-1) SELECTIVE-DEPOSIT M-3 (BYTE-FIELD 9 23.) A-ZERO)	;background to DPB into (signs)
-	((M-K) (A-CONSTANT 23.))		;Byte size
-	(JUMP-LESS-THAN-XCT-NEXT M-2 (A-CONSTANT 9) ASHDPB)	;Jump if fit in machine word
+	((M-1) SELECTIVE-DEPOSIT M-3
+	 (BYTE-FIELD (DIFFERENCE 33. Q-POINTER-WIDTH)
+		     (DIFFERENCE Q-POINTER-WIDTH 1)) A-ZERO)	;background to DPB into (signs)
+	((M-K) (A-CONSTANT (DIFFERENCE Q-POINTER-WIDTH 1)))		;Byte size
+	(JUMP-LESS-THAN-XCT-NEXT M-2 (A-CONSTANT (DIFFERENCE 32. Q-POINTER-WIDTH)) ASHDPB)	;Jump if fit in machine word
        ((M-E) M-2)				;Byte position
 	((M-1) M-ZERO)				;Bignum, DPB into background of zero
 	(JUMP-GREATER-OR-EQUAL-XCT-NEXT M-3 A-ZERO ASHDPB1) ;if positive
@@ -11608,7 +11634,8 @@
 		(A-CONSTANT (PLUS (BYTE-VALUE Q-DATA-TYPE DTP-FIX) POSITIVE-SETZ))
 		XASH3)
        ((M-4) SUB M-ZERO A-4)			;Make it positive
-	((M-4) DPB (M-CONSTANT -1) (BYTE-FIELD 1 22.) A-ZERO)	;Divide SETZ by 2
+	((M-4) DPB (M-CONSTANT -1)
+	 (BYTE-FIELD 1 (DIFFERENCE Q-POINTER-WIDTH 2)) A-ZERO)	;Divide SETZ by 2
 	((M-E) ADD M-E (A-CONSTANT 1))		; and increase shift
 XASH3	(CALL-XCT-NEXT ASHDPB2)
        ((C-PDL-BUFFER-POINTER) Q-POINTER M-4
@@ -11906,7 +11933,7 @@
        ((M-T) Q-POINTER M-ZERO			;  -1 if arg is negative.
 		(A-CONSTANT (BYTE-VALUE Q-DATA-TYPE DTP-FIX)))
 	(POPJ-LESS-OR-EQUAL M-I (A-CONSTANT 2000)) ;return 0 or -1 if fractional
-	(JUMP-GREATER-OR-EQUAL M-I (A-CONSTANT 2030) FLONUM-BIGFIX) ;big enough to be bignum
+	(JUMP-GREATER-OR-EQUAL M-I (A-CONSTANT (PLUS 2000 Q-POINTER-WIDTH)) FLONUM-BIGFIX) ;big enough to be bignum
 	((M-A) M-A-1 M-I (A-CONSTANT 2000))	;Byte length - 1 (maximum byte length 23.)
 	((M-B) ADD M-A (A-CONSTANT 2))		;Leftward rotation of M-1.
 	(POPJ-AFTER-NEXT (OA-REG-LOW) DPB M-A OAL-BYTL-1 A-B)
@@ -12527,21 +12554,37 @@
 
 XFLOAT-DOUBLE (MISC-INST-ENTRY %FLOAT-DOUBLE)
 	(CALL FXGTPP)
-	((M-1) DPB M-1 (BYTE-FIELD 24. 7) A-ZERO)
-	((M-1) (BYTE-FIELD 7. 17.) M-2 A-1)
+	((M-1) DPB M-1
+	 (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 0)
+		     (DIFFERENCE 31. Q-POINTER-WIDTH))
+	 A-ZERO)
+	((M-1)
+	 (BYTE-FIELD (DIFFERENCE 31. Q-POINTER-WIDTH)
+		     (DIFFERENCE Q-POINTER-WIDTH
+				 (DIFFERENCE 31. Q-POINTER-WIDTH)))
+	 M-2 A-1)
 	(JUMP-EQUAL M-1 A-ZERO FLOAT-DOUBLE-2)
-	((M-TEM) DPB M-2 (BYTE-FIELD 17. 15.) A-ZERO)
+	((M-TEM) DPB M-2
+	 (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH
+				 (DIFFERENCE 31. Q-POINTER-WIDTH))
+		     (DIFFERENCE 32.
+				 (DIFFERENCE Q-POINTER-WIDTH
+					     (DIFFERENCE 31. Q-POINTER-WIDTH))))
+	 A-ZERO)
 	((Q-R) M-TEM)
-	((M-I) (A-CONSTANT 2057))
+	((M-I) (A-CONSTANT (PLUS 2000 Q-POINTER-WIDTH Q-POINTER-WIDTH -1)))
 FLOAT-DOUBLE-1
 	(JUMP-XCT-NEXT FLOPACK-T)
        (CALL FNORM)
 
 FLOAT-DOUBLE-2
-	((M-1) DPB M-2 (BYTE-FIELD 24. 7.) A-ZERO)
+	((M-1) DPB M-2
+	 (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 0)
+		     (DIFFERENCE 31. Q-POINTER-WIDTH))
+	 A-ZERO)
 	((Q-R) A-ZERO)
 	(JUMP-XCT-NEXT FLOAT-DOUBLE-1)
-       ((M-I) (A-CONSTANT 2027)) 
+       ((M-I) (A-CONSTANT (PLUS 2000 Q-POINTER-WIDTH -1)))
 

 ;;;  Bignum arithmetic.
 
@@ -12668,7 +12711,7 @@
 
 DPB-BIGNUM-SETUP  ;CALL HERE TO SET UP FOR DOING A DPB, SEE RELEVANT CODE.
 	((M-K) (BYTE-FIELD 6 0) C-PDL-BUFFER-POINTER)
-	((M-E) (BYTE-FIELD (DIFFERENCE 23. 6) 6) C-PDL-BUFFER-POINTER)
+	((M-E) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH (PLUS 1 6)) 6) C-PDL-BUFFER-POINTER)
 	((M-1) ADD M-K A-E)			;COMPUTE BIT POSITION OF LEFT EDGE OF BYTE
 	((M-1) ADD M-1 (A-CONSTANT 31.))	;ROUND UP
 		;Note the inclusion of one extra bit.  This is in case we produce
@@ -12714,7 +12757,8 @@
 	(CHECK-PAGE-READ)
 	;; (length - 1) * 31. =  (length * 32.) - length - 31.
 	;; XHAUL1 wants this in M-T  and the high bits in M-1.
-	((M-T) DPB M-I (BYTE-FIELD 18. 5.) (A-CONSTANT (BYTE-VALUE Q-DATA-TYPE DTP-FIX)))
+	((M-T) DPB M-I (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH (PLUS 1 5)) 5.)
+	 (A-CONSTANT (BYTE-VALUE Q-DATA-TYPE DTP-FIX)))
 	((M-T) SUB M-T A-I)
 	((M-T) SUB M-T (A-CONSTANT 31.))
 	(JUMP-XCT-NEXT XHAUL1)
@@ -13819,7 +13863,7 @@
        ((M-T) A-MINUS-ONE)
 	;; we must allocate an array at least 31*I/T long
 	;; 31*I = 32*I - I
-	((M-1) DPB M-I (BYTE-FIELD 18. 5) A-ZERO)
+	((M-1) DPB M-I (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH (PLUS 1 5)) 5) A-ZERO)
 	((M-1) SUB M-1 A-I)
 	(CALL-XCT-NEXT DIV)
        ((M-2) Q-POINTER M-T)
@@ -13981,7 +14025,10 @@
 	(CHECK-PAGE-READ)
 	((M-1) Q-POINTER M-T)				;For UN-CONS
 	((M-2) ADD M-D (A-CONSTANT 1))
-	((M-A) (BYTE-FIELD 9. 23.) MD)			;All but 23 low bits
+	((M-A)
+	 (BYTE-FIELD (DIFFERENCE 33. Q-POINTER-WIDTH)
+		     (DIFFERENCE Q-POINTER-WIDTH 1))
+	 MD)			;All but 23 low bits
 	(JUMP-NOT-EQUAL-XCT-NEXT M-A A-ZERO BCLEANUP-SETZP)	;no. (unless it is SETZ)
        ((M-TEM) MD)
 	(JUMP-IF-BIT-CLEAR BIGNUM-HEADER-SIGN M-C BCLEANUP-1)
@@ -15122,11 +15169,12 @@
        ((Q-R) A-TV-SCREEN-LOCATIONS-PER-LINE)		;M-2 GETS OFFSET TO START OF LINE
 TVXYAD0 ((OA-REG-LOW) A-TV-SCREEN-BUFFER-PIXEL-SIZE-MROT)
 	;; X coordinate gets multiplied by pixel size
-	((M-TEM) DPB C-PDL-BUFFER-POINTER-POP (BYTE-FIELD 24. 0) A-ZERO)
+	((M-TEM) DPB C-PDL-BUFFER-POINTER-POP Q-POINTER A-ZERO)
 	((M-TEM) ADD M-TEM A-TV-SCREEN-BUFFER-BIT-OFFSET)
-	((M-1) (BYTE-FIELD 19. 5) M-TEM)		;WORD PART OF X POSITION
-	((OA-REG-HIGH) (BYTE-FIELD 1 18.) M-1)
-	((M-1) SELECTIVE-DEPOSIT M-ZERO (BYTE-FIELD 13. 19.) A-1)
+	((M-1) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 5) 5) M-TEM)		;WORD PART OF X POSITION
+	((OA-REG-HIGH) (BYTE-FIELD 1 (DIFFERENCE Q-POINTER-WIDTH 5)) M-1)
+	((M-1) SELECTIVE-DEPOSIT M-ZERO
+	 (BYTE-FIELD (DIFFERENCE 37. Q-POINTER-WIDTH) (DIFFERENCE Q-POINTER-WIDTH 5)) A-1)
 	((M-E) ADD M-2 A-1)				;RELATIVE WORD ADDRESS
 	(POPJ-AFTER-NEXT (M-E) ADD M-E A-TV-SCREEN-BUFFER-ADDRESS)
        ((M-T) (BYTE-FIELD 5 0) M-TEM)			;BIT PART OF X POSITION
@@ -15147,7 +15195,7 @@
 	(JUMP-EQUAL M-C (A-CONSTANT (BYTE-VALUE Q-DATA-TYPE DTP-FIX)) XFALSE)	;OR WIDTH
 	((M-C C-PDL-BUFFER-POINTER-PUSH) ADD M-T A-C)	;ADJUST WIDTH TO PRETEND
 							; STARTING ON WORD BOUNDARY
-	((M-C) (BYTE-FIELD 19. 5) M-C)			;WIDTH IN WORDS
+	((M-C) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 5) 5) M-C)	;WIDTH IN WORDS
 	((M-Q) (BYTE-FIELD 5 0) (M-CONSTANT -1))	;37 ;LOAD HANDY CONSTANT, USED LATER
 	((M-K) SUB M-Q A-T)				;BYTL-1 FOR FIRST WORD
 	((OA-REG-LOW) DPB M-K OAL-BYTL-1 A-T)		;GET MASK FOR BITS IN LEFT OF 1ST WD
@@ -15231,7 +15279,7 @@
 	((M-C) M-S)					;exch DX and DY
 	((M-S) M-R)
 	((M-R) M-C)
-TVDRL3	((M-A) (BYTE-FIELD 23. 1) M-R)			;M-A <length of long side>/2
+TVDRL3	((M-A) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 1) 1) M-R)	;M-A <length of long side>/2
 	((OA-REG-LOW) A-TV-SCREEN-BUFFER-PIXEL-SIZE-MROT)	;Log of pixel size
 	((M-2) DPB (M-CONSTANT -1) (BYTE-FIELD 1 0) A-ZERO)	;Number of bits in pixel
 	((M-1) SUB M-2 (A-CONSTANT 1))
@@ -15288,7 +15336,7 @@
 	((M-ZR) SUB Q-R A-4)				;Save eventual contents of M-T
 	((M-I) M-A)					;Save eventual contents of M-D
 	((M-R) M-Q)					;X offset in bits
-	((M-1) SUB (M-CONSTANT 23.) A-3)		;Make DPB ptr to convert width
+	((M-1) SUB (M-CONSTANT (DIFFERENCE Q-POINTER-WIDTH 1)) A-3)	;Make DPB ptr to convert width
 	((M-K) DPB M-1 OAL-BYTL-1 A-3)			; from bytes to bits
 	(CALL BITBLT-DECODE-ARRAY)			;Decode source
 	;; No sequence breaks after this point
@@ -15975,7 +16023,7 @@
 	(JUMP-LESS-OR-EQUAL-XCT-NEXT M-2 A-ZERO COLR-DONE)
        ((M-2) SUB M-2 (A-CONSTANT 1))			;One fewer iterations
 	((M-C) M-1)					;Do this many bytes
-	((M-TEM) (BYTE-FIELD 21. 3) M-Q)		;Word offset in array
+	((M-TEM) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 3) 3) M-Q)	;Word offset in array
 	((VMA-START-READ) ADD M-E A-TEM)
 	((M-J) M-Q)					;Copy array index
 	((M-Q) ADD M-Q A-D)				;Start of next row
@@ -16073,9 +16121,11 @@
 	;; X coordinate gets multiplied by pixel size
 	((M-TEM) DPB M-A (BYTE-FIELD 24. 0) A-ZERO)
 	((M-TEM) ADD M-TEM A-MOUSE-SCREEN-BUFFER-BIT-OFFSET)
-	((M-1) (BYTE-FIELD 19. 5) M-TEM)		;WORD PART OF X POSITION
-	((OA-REG-HIGH) (BYTE-FIELD 1 18.) M-1)
-	((M-1) SELECTIVE-DEPOSIT M-ZERO (BYTE-FIELD 13. 19.) A-1)
+	((M-1) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 5) 5) M-TEM)    ;WORD PART OF X POSITION
+	((OA-REG-HIGH) (BYTE-FIELD 1 (DIFFERENCE Q-POINTER-WIDTH 5 1)) M-1)
+	((M-1) SELECTIVE-DEPOSIT M-ZERO
+	 (BYTE-FIELD (DIFFERENCE 32. (DIFFERENCE Q-POINTER-WIDTH 5))
+		     (DIFFERENCE Q-POINTER-WIDTH 5)) A-1)
 	((M-E) ADD M-2 A-1)				;RELATIVE WORD ADDRESS
 	((M-E) ADD M-E A-MOUSE-SCREEN-BUFFER-ADDRESS)
 	((M-T) (BYTE-FIELD 5 0) M-TEM)			;BIT PART OF X POSITION
@@ -16188,7 +16238,7 @@
 	;Compute physical speed, which involves time averaging
 	((M-TEM) DPB M-ZERO Q-ALL-BUT-POINTER A-MOUSE-Y-SPEED)
 	(JUMP-EQUAL M-TEM A-ZERO TRACK-MOUSE-1C)
-	((A-TEM1) (BYTE-FIELD 20. 4) M-TEM)
+	((A-TEM1) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 4) 4) M-TEM)
 	((M-TEM) M-A-1 M-TEM A-TEM1)		;Speed times 15/16 or less
 TRACK-MOUSE-1C
 	(JUMP-GREATER-OR-EQUAL-XCT-NEXT M-A A-ZERO TRACK-MOUSE-1A)
@@ -16199,7 +16249,7 @@
 	((A-MOUSE-Y-SPEED) Q-POINTER M-TEM (A-CONSTANT (BYTE-VALUE Q-DATA-TYPE DTP-FIX)))
 	((M-TEM) DPB M-ZERO Q-ALL-BUT-POINTER A-MOUSE-X-SPEED)
 	(JUMP-EQUAL M-TEM A-ZERO TRACK-MOUSE-1D)
-	((A-TEM1) (BYTE-FIELD 20. 4) M-TEM)
+	((A-TEM1) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 4) 4) M-TEM)
 	((M-TEM) M-A-1 M-TEM A-TEM1)		;Speed times 15/16 or less
 TRACK-MOUSE-1D
 	(JUMP-GREATER-OR-EQUAL-XCT-NEXT M-B A-ZERO TRACK-MOUSE-1B)
@@ -16939,7 +16989,7 @@
 	;execute one more instruction, clobbering A-TEM1
 COMPUTE-PAGE-HASH				;New algorithm, 3-DEC-80
 	((A-TEM1) (BYTE-FIELD 10. 14.) M-T)	;VMA<23:14>
-	((M-T) (BYTE-FIELD 20. 4) M-T)		;VMA<23:8>x16+C
+	((M-T) (BYTE-FIELD (DIFFERENCE Q-POINTER-WIDTH 4) 4) M-T)	;VMA<23:8>x16+C
 	((M-T) ANDCA M-T (A-CONSTANT 17))	;-C
 	((M-T) XOR M-T A-TEM1)
 	((M-T) AND M-T A-PHT-INDEX-MASK)



More information about the mit-cadr-cvs mailing list