From 8cc7afaf0d47c1d9808a2f5b3d60a1a824114a58 Mon Sep 17 00:00:00 2001 From: Elliot Nunn Date: Sat, 7 Oct 2017 19:30:19 +0800 Subject: [PATCH] Reverse printing glue --- BuildResults/RISC/Obj/Printing.a.o | Bin 1212 -> 0 bytes BuildResults/RISC/Obj/PrintingExtra.a.o | Bin 0 -> 396 bytes Toolbox/Printing/PrintGlue.a | 21 +++++++++++++++++---- Toolbox/Printing/Printing.make | 12 ++++++++++++ Toolbox/Toolbox.make | 4 +++- 5 files changed, 32 insertions(+), 5 deletions(-) delete mode 100644 BuildResults/RISC/Obj/Printing.a.o create mode 100644 BuildResults/RISC/Obj/PrintingExtra.a.o create mode 100644 Toolbox/Printing/Printing.make diff --git a/BuildResults/RISC/Obj/Printing.a.o b/BuildResults/RISC/Obj/Printing.a.o deleted file mode 100644 index e40b3ddd549c90d405a766c8815c01bd362287fe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1212 zcmZWpPiP}m82`;QO)|;2#!^D5)r@tmQRqxsiv%~_{Mob{$Cymxrfip`ooJb{T4#rD zw*)B|VcixfbPqk$JuIPnuvug&9z@ErRw!8ZP>Lvs2P+=7m!@@BFi$4+f*H-)LEYa{< z3n!#(^#!p)pryA@C|*hHPLvoswk>I*`jX?DJcMX_wg~y24BySI?);h@km2WnkEC>)>9ySx0~Jh)*aPw8iJyF*;HTo|f`9ydT5$eX{>lz@7U$z~d^Ga2+@B z1+n%sjyM;x7)JzB^CgVCLb}17kMagf;D-C7LRw5RW&-!sB+2avN44HlVom|;#}Tp{ zJ=%fJj~tMHu#Ffof}|}pc=D>8;fkYnBNFxL6n8CE7SdJd^HokSmoDUghb%AZb0tmE zYy`sakS21vqE9|&LBvUt0Z1g<(bZ?61D#cuo+x!onl}tLTFn7TtG=$wrNF-$vQ<^R zt8X40dACaMqAPc$k@aihUyR5QY1QwXners<>GX+L0byU!^3B?t+?xR@f9B7C_*+Kj z`}aq7Sly{LyWfG_xHPf!-PhF13eudM0ECuPqIhS{ zoS9^Q82lU;XvrR8kxe>ini!h*xg~m%xE$Ohl9_pEp{AN1* z7WG2=-cq4LJ+pY{twBI8Ss6X%jhXVFhK?d?56=e)w?P+2> z>jHvYgZ_U=W|0#ZPex*Ps0D)f^1B1tNW($=(1|B^< z1`dS^rfpst%+~1)3^NMYHngX66mV{6Ph(){@)81ywM6#o?O|ZxbXSPC(_rBCIIhp` zx9h)+7ej=9dRl1z$|*MT_UtQXME2|31ULpb+S@!}SRt<#ufUz|q7hucARuy~C#a!_ zK}aOXv4layM1bK+gPK#2w?4N%kAe*Yqb$=uC9j46|8%j?etVn!#sv)e3@h85gbe@u giQ#k!@waDNIm73j%z^)JKt5pOU^of%LIV>604d9V!2kdN literal 0 HcmV?d00001 diff --git a/Toolbox/Printing/PrintGlue.a b/Toolbox/Printing/PrintGlue.a index 4c065db..73ff21a 100644 --- a/Toolbox/Printing/PrintGlue.a +++ b/Toolbox/Printing/PrintGlue.a @@ -362,7 +362,12 @@ GotPDEF _GetHandleSize ; How big is our PDEF Handle fau cmp.l #32,D0 ; Is it "small" fau bhi.s @RealPDEF ; no, don't flush the cache fau - jsr ([jCacheFlush]) ; else, flush the caches. fau + move.l A0,-(SP) + move.l (A0),A0 + move.l D0,A1 + import FLUSHCRANGE + bsr.l FLUSHCRANGE ; else, flush the caches. + move.l (SP)+,A0 @RealPDEF ; fau _HLock ;<22Feb87> JNP Restore curMap before jumping into the print code. @@ -375,7 +380,7 @@ GotPDEF Add.b ParmByt(a6),d0 Sub.w d0,sp ; We know the thing isn't actually more than a word wide Move.l sp,a1 ; Beginning of destination - _BlockMove ; Note: Leaves d0 = 0 + _BlockMoveData ; Note: Leaves d0 = 0 ; Call the routine. The offset into the PDEF to jump to is given by the glue parameter Move.b CodeOfs(a6),d0 ; Get offset (note high part of d0 is still 0) Andi.b #$7F,d0 ; Mask off the unlock bit that is stored there @@ -543,9 +548,17 @@ SetError LLOut Add.w #IOQElSize,sp ; Strip parameter block Move.w d0,PrintVars+iPrErr ; Set return code -GlueOut +GlueOut ; ; Get the number of bytes of parameter to this entry in d1 + Move.l sp,-(sp) + Moveq.l #0,d0 + Move.b FuncByt(a6),d0 + Lsr.b #3,d0 + Move.l d0,-(sp) + Import PRINTINGNEWFUNC_337D0 + Bsr PRINTINGNEWFUNC_337D0 + Addq #8,sp Moveq #0,d1 Move.b ParmByt(a6),d1 ; Get from the table, source of all knowledge... ; Copy the function value, if any, back up to the caller's stack frame @@ -670,7 +683,7 @@ kAliasID EQU -8192 ; System Printer alias's resID MOVE.B (A0), D0 ; which is this long ADDQ.B #1, D0 ; plus that length byte! LEA sysFileSpec + FSSpec.name(A6), A1 ; to the FSSpec - _BlockMove + _BlockMoveData ; ResolveDriver: Resolve the alias using the system file's FSSpec. diff --git a/Toolbox/Printing/Printing.make b/Toolbox/Printing/Printing.make new file mode 100644 index 0000000..662a2a0 --- /dev/null +++ b/Toolbox/Printing/Printing.make @@ -0,0 +1,12 @@ +PrintingObjs = "{ObjDir}PrintGlue.a.o" ¶ + "{ObjDir}PrintingExtra.a.o" + + +"{ObjDir}PrintGlue.a.o" Ä "{ObjDir}StandardEqu.d" ¶ + "{AIncludes}PrPrivate.a" ¶ + "{PrintingDir}PrintGlue.a" + Asm {StdAOpts} -o "{Targ}" "{PrintingDir}PrintGlue.a" + + +"{LibDir}Printing.lib" Ä {PrintingObjs} + Lib {StdLibOpts} -o "{Targ}" {PrintingObjs} diff --git a/Toolbox/Toolbox.make b/Toolbox/Toolbox.make index 500ce2d..4a9f5c0 100644 --- a/Toolbox/Toolbox.make +++ b/Toolbox/Toolbox.make @@ -10,7 +10,7 @@ ToolboxObjs = "{ObjDir}PackageMgr.a.o" "{ObjDir}GetMgr.a.o" ¶ "{ObjDir}TextEdit.lib" ¶ "{ObjDir}ScrapMgr.a.o" ¶ - "{ObjDir}Printing.a.o" ¶ + "{LibDir}Printing.lib" ¶ "{ObjDir}SexyDate.a.o" @@ -44,6 +44,7 @@ ToolboxObjs = "{ObjDir}PackageMgr.a.o" # The following libs are *not* part of Toolbox.lib +PrintingDir = "{ToolBoxDir}Printing:" AliasMgrDir = "{ToolBoxDir}AliasMgr:" ComponentMgrDir = "{ToolBoxDir}ComponentMgr:" DataAccessDir = "{ToolBoxDir}DataAccessMgr:" @@ -61,6 +62,7 @@ FontMgrDir = "{ToolBoxDir}FontMgr:" SANEDir = "{ToolBoxDir}SANE:" InSaneDir = "{ToolBoxDir}InSANE:" +#include "{PrintingDir}Printing.make" #include "{AliasMgrDir}AliasMgr.make" #include "{ComponentMgrDir}ComponentMgr.make" #include "{DataAccessDir}DataAccessMgr.make"