antoine-source/appleworksgs/WP/Src/Delete.aii

1 line
5.9 KiB
Plaintext
Raw Normal View History

2023-03-04 02:45:20 +00:00
load 'macros.dump' include 'driver.equ' include 'wp.equ' include 'wp.macros' ;----------------------------------------------- ; ; Imported addresses ; ;----------------------------------------------- IMPORT W_CalcDocRect IMPORT W_CalcFBytes IMPORT W_CalcPages IMPORT W_CheckDocPos IMPORT W_CurDoc IMPORT W_DelPars IMPORT W_DoRoom IMPORT W_eOffset IMPORT W_EndLine IMPORT W_EndOffset IMPORT W_EndPar IMPORT W_FindFont IMPORT W_FindLine IMPORT W_GetAddr IMPORT W_GetEndPar IMPORT W_GetParRec IMPORT W_JunkLeft IMPORT W_JunkRight IMPORT W_LessRoom IMPORT W_LineToTopPixel IMPORT W_MakeCaret IMPORT W_MakeLines IMPORT W_ParRec IMPORT W_PutOnScreen IMPORT W_SelectOff IMPORT W_STLIne IMPORT W_StartLine IMPORT W_StartOffset IMPORT W_StartPar IMPORT W_UnUseRuler IMPORT W_UpdateText IMPORT W_UseRuler IMPORT W_WriteFBytes2 IMPORT Q_Line IMPORT W_offset IMPORT Q_Rect IMPORT W_Selected ******************************************************************** * Includes.... * Thursday, April 27, 1989 1:38:25 AM ******************************************************************** **************************************************************** * W_DeleteRange(par,Q_Line,W_offset,par,Q_Line,W_offset) W_DeleteRange PROC EXPORT input par:w,Q_Line:w,W_offset:w,EPar:w,ELine:w,W_eOffset:w local FBytes:w,temp:w,PlacePtr:l,bytes:w local Font1:l,col1:w,Font2:l,col2:w,PBFlag:w,W_ParRec:l local SParRec:l,EParRec:l output OPar:w,OLine:w,OOffset:w begin stz PBFlag moveword par,OPar moveword Q_Line,Oline lda Par jsl W_GetParRec movelong ax,W_ParRec moveword [W_ParRec]:#W_pAttr,a and #W_PgBrk beq NoPb inc PBFlag inc par stz Q_Line moveword #W_TextHeader,W_offset cmpw par,EPar bne NoPb cmpw Q_Line,ELine bne NoPB cmpw W_offset,W_eOffset jeq AllPB NoPB in par:w,Q_Line:w,W_offset:w out W_offset:w Xcall W_JunkLeft sta OOffset in Epar:w,Eline:w,W_eOffset:w out W_eOffset:w Xcall W_JunkRight pha ;space for output pha pha pha pushword par pushword Q_Line pushword W_offset jsl W_FindFont moveword 1:s,col1 movelong 3:s,font1 pha pha pha pushword Epar pushword Eline pushword W_eOffset jsl W_FindFont moveword 1:s,col2 movelong 3:s,font2 jsl W_CalcFBytes pullword fBytes cmpw par,EPar jeq SamePar pha pushword EPar jsl W_GetEndPar pla sec sbc W_eOffset sta bytes pha pushword Par jsl W_GetEndPar pla sta temp pushword Par pushword W_offset lda bytes clc ;bytes+fbytes-(temp-W_offset) adc fbytes adc W_offset sec sbc temp pha jsl W_DoRoom cmpw W_offset,#W_TextHeader bne NotBegR lda par jsl W_GetParRec movelong ax,SParRec lda EPar jsl W_GetParRec movelong ax,EParRec pushword #1 pushlong [SParRec]:#W_pRulerHand jsl W_UnUseRuler movelong [EParRec]:#W_pRulerHand,[SParRec]:#W_pRulerHand pushword #1 pushlong [SParRec]:#W_pRulerHand jsl W_UseRuler NotBegR lda EPar ldx W_eOffset jsl W_GetAddr phx pha addword W_offset,fbytes,x lda Par jsl W_GetAddr phx pha pushword #0 pushword bytes _BlockMove pha pushword par pushword W_offset pushlong Font1 pushword col1 pushlong Font2 pushword col2 jsl W_WriteFBytes2 pla lda par inc a pha pushword EPar jsl W_DelPars lda PBFlag jeq DRExit AllPB lda par dec a pha pha jsl W_DelPars lda par dec a sta OPar stz OLine moveword #W_TextHeader,OOffset brl DRExit ;---------------------delete within a par SamePar pushword par pushword W_offset subword W_eOffset,W_offset,a subword a,fbytes,a pha jsl W_LessRoom pha pushword par pushword W_offset pushlong Font1 pushword col1 pushlong Font2 pushword col2 jsl W_WriteFBytes2 pla DRExit pushword par jsl W_MakeLines pha pushword OPar pushword OOffset jsl W_FindLine pullword OLine return ENDP **************************************************************** * W_DelSelect - deletes selection and turns off selc W_DelSelect PROC