mac-rom/Toolbox/InSANE/HWElemsEqus.a
Elliot Nunn 4325cdcc78 Bring in CubeE sources
Resource forks are included only for .rsrc files. These are DeRezzed into their data fork. 'ckid' resources, from the Projector VCS, are not included.

The Tools directory, containing mostly junk, is also excluded.
2017-12-26 09:52:23 +08:00

136 lines
4.4 KiB
Plaintext

;
; File: HWElemsEqus.a
;
; Contains: Equates for HW SANE routines
;
; Written by: Apple Numerics Group, DSG
;
; Copyright: © 1985-1992 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <SM2> 2/3/93 CSS Update from Horror:
; <H2> 9/29/92 BG Adding Jon Okada's latest fixes.
; <1> 10/24/91 SAM/KSM Rolled in Regatta file.
;
; Regatta Change History:
;
; <2> 5/28/91 SAM Merged from TERROR sources. [<2> Added the constants IsItFinan &
; flag96bit]
; <1> 5/15/91 SAM Split off from TERROR Proj.
;
; Terror Change History:
;
; <1> 01/06/91 BG Added to TERROR/BBS for the time.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; File: 881ELEMSequs.a
;; Implementation of PACK5 for OmegaSANE. Expects 881
;; Copyright Apple Computer, Inc. 1985-7, 1989, 1990, 1992, 1993.
;; All Rights Reserved
;; Confidential and Proprietary to Apple Computer,Inc.
;;
;; Written by Clayton Lewis, begun 20 March 89.
;; Based on Elems881, package code for Mac by Jerome Coonen,
;; as modified for MacII by Stuart McDonald.
;;
;; Modification history:
;; 20 Mar 89 First paltry efforts
;; 6 Jun 89 ali: added more constants & NaNs for logorithms
;; 05 Apr 91 added the constant IsItFinan & flag96bit
;; 31 Mar 92 JPO Deleted 881 constant ROM selector values
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
DebugON EQU 0 ; 1 = install debug stops in code, 0 = production code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Exception bits for exceptions to be set at exit time (high word)
;; and for exceptions to be cleared at exit time (low word)
;; Exceptions themselves by bit number
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SetInexact EQU $00080000
SetDivByZ EQU $00100000
SetUFlow EQU $00200000
SetOFlow EQU $00400000
SetInvalid EQU $00800000
ClrInexact EQU $0008
ClrUflow EQU $0020
ClrOflow EQU $0040
Uflow EQU $0020
Oflow EQU $0040
invalid EQU $80 ; invalid bit pattern
divbyzero EQU $10 ; divide by zero bit pattern
Inexact EQU 3 ; accrued inexact bit number
ExcMask EQU $0F000000 ; to get flag bits from FPSR
ShiftIt EQU 5 ; number of fpsr bits to shift
UnderFlow EQU 5 ; accrued underflow bit number
IsItFinan EQU 14 ; is opcode a financial function <2>
flag96bit EQU 7 ; the 96 bit flag in the opword <2>
NegInf EQU "$FFFF00000000000000000000" ; bit pattern for -°
NaNLog EQU "$7FFF00004024000000000000" ; bit pattern for NaNLog
NaNTrig EQU "$7FFF00004021000000000000" ; bit pattern for NaNTrig
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Stack frame offsets, register usage
;; Control also saves FPSR and FPCR in correct order for ProcExit
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
FPRegs FREG FP2/FP3 ; 6 longs (record changes in control)
Regs REG D0/D1/A0/A4 ; 4 longs (record changes in control)
SavedRegs EQU 48 ; including status and control
; (record changes in control)
Addr3 EQU 14+SavedRegs ; source2
Addr2 EQU 10+SavedRegs ; source
Addr1 EQU 6+SavedRegs ; destination
Opcode EQU 4+SavedRegs ; opcode word
RetAddr EQU SavedRegs ; return address
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The opcode is defined as: [XY00 0000 NNNN NNN0]
;; X=1 for 2 & 3 address functions, Y=1 for 3 address functions
;; The six low order bits are the jump table index for the instruction
;; Bit 7 is set <=> all extended data is in 96- bit format
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
OPMASK EQU $003E ; mask for jump table index
THREEARG EQU $C0 ; high byte of opword for annuity, compound
SMALLEXP EQU 255
NANPOWER EQU 37
NANFINAN EQU 38
PLUSINFSGL EQU $7F800000
MINUSINFSGL EQU $FF800000
MINUSONESGL EQU $BF800000
PLUSONESGL EQU $3F800000
MINUSZEROSGL EQU $80000000
BIGSINGLE EQU $7F7FFFFF ; 2^128 - ulp
RANDMODULUS EQU $7FFFFFFF ; 2^31-1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Bit indices into STATUS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
XBit EQU 3
DBit EQU 4
UBit EQU 5
OBit EQU 6
IBit EQU 7
NaNBit EQU 24
InfBit EQU 25
ZeroBit EQU 26
NegBit EQU 27
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Values in 881 constant ROM - DELETED <3/31/92, JPO>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Ln2 EQU $30 ; offset of Ln(2) in the 68881 ROM
;CONSTONE EQU $32
;CONSTZERO EQU $0F