mac-rom/Toolbox/InSANE/FPHW.a
Elliot Nunn 0ba83392d4 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-09-20 18:04:16 +08:00

111 lines
3.5 KiB
Plaintext

;
; File: FPHW.a
;
; Contains: HW Floating Point FP68K ("PACK 4") that calls MC68881/882 or uses MC68040 FPU
;
; Written by: Apple Numerics Group, DSG
;
; Copyright: © 1985-1992 by Apple Computer, Inc. All rights reserved.
;
; Change History (most recent first):
;
; <SM2> 10/29/92 SWC Changed ToolEqu.a->ToolUtils.a.
; <2> 10/28/91 SAM/KSM Added a default definition for BACKPATCH of true.
; <1> 10/24/91 SAM/KSM Rolled in Regatta file.
;
; Terror Change History:
;
; <2> 1/9/91 BG Removed the PROC040 -IF- directive. FPHW.a will now build with
; MACHINE MC68040 set so that all the FPU instructions will be
; assembled the same as if there was an MC68881 directive, but
; this will also allow the use of 040 cache manipulation
; instructions (CPUSH).
; <1> 01/06/90 BG Added to TERROR/BBS for the time.
; ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
; Pre-TERROR ROM comments begin here.
; ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
; 12/17/90 JPO Added conditional equate for PROC040.
; 12/6/90 JPO Modified for MC68040 platform.
; 9/30/90 SM Goes final for Terror alpha.
; 9/7/90 SM Goes beta for Tim. Updated version number.
; 5/22/90 SM Goes alpha for waimea. Copyright updated.
; 12/18/89 SM Complete rewrite begins.
; 1/23/87 SM MC68881 directive moved here from file fp881arith.a.
; 1/16/87 SM Added INCLUDE TRAPS.A for _SysError call in fp881ctrl.a.
; 1/15/87 SM Changed copyright notice.
; 1/15/87 SM Deleted INCLUDE SYSEQU.A.
; Rev28 1/16/85 moved to MPW.
; Rev27 12/19/85 CVT routines fixed and shortened.
; Rev26 12/5/85 NextAfter OK.
; Rev14 8/28/85 (Debugging Coonen Bin-Dec routines).
; Rev9 6/17/85
;
MAIN
BLANKS ON
STRING ASIS
DATA MAIN
ORG -$100
CODE
PRINT ON
FPASSEMBLER EQU 1
;------------------------------------------------------------------------------- <T2> thru next <T2>
;
; NOTE - The MACHINE MC68040 directive "should" create the same instructions as
;
; MACHINE MC68020
; MC68881
;
; ... but allows you to also use the 040 special cache-flushing instructions
; as well. As far as I know, there's only one place where this could be an
; issue (FLUSHCACHE), which uses a CPUSHL bc,(Ax) to push the appropriate
; cache line in the backpatching install code on an 040, whereas it does a
; MOVEC D0,CACR to set the "flush I-Cache" bit on 020/030s. This should
; still work, since the MOVEC Dx,CACR instruction creates the same instruction
; in both the 020/030 and 040.
;-------------------------------------------------------------------------------
MACHINE MC68040
; MACHINE MC68020
; MC68881 ; <T2>
INCLUDE 'FPHWEqus.a'
INCLUDE 'ToolUtils.a'
INCLUDE 'Traps.a'
; This is not a standard definition in the System Equates, so it is included here <T2>
IF &TYPE('BACKPATCH') = 'UNDEFINED' THEN ; <2>
BACKPATCH: EQU 1
ENDIF
If &TYPE('_SysBreak') = 'UNDEFINED' Then ; Arg!! <T3>
MACRO ; <T2>
_SysBreak ; <T2>
MOVE.W #-490, D0 ; <T2>
_SysError ; <T2>
ENDM ; <T2>
ENDIF ; <T3>
INCLUDE 'SANEMacs.a'
CPUFlag EQU $12F ; So this builds! <T3>
cpu68040 EQU 4
;INCLUDE 'SysEqu.a' ; for CPUFlag definition <T2>
EXPORT FP68K
FP68K
INCLUDE 'FPHWCtrl.a'
INCLUDE 'FPHWArith.a'
INCLUDE 'FPHWNonArith.a'
INCLUDE 'FPHWB2DC.a'
OMEGA881END:
END